refactor(governance): dependency pin policy + validation-library decision (#1233 B2.11) - #1297
Merged
Merged
Conversation
…rary decision (#1233 B2.11) - docs/governance/DEPENDENCY_POLICY.md: enforcement inventory (one mechanism per layer, no duplicate assertions found), deno.json specifier pin policy (lockfile+vendor is the pin; exact pins = deliberate-diff tooling and the URLPattern polyfill, caret ranges = shared platform libs and published package deps), and the explicit justified dual zod/valibot decision with its boundary rule. - tools/check-validation-boundary.ts + test: mechanical gate asserting published package source imports no schema-validation library; registered as validation:boundary-check in the AutoFlow gate registry (ci/release). - Pointers from PROJECT_WORKFLOW.md and docs/integrations/validation.md. Closes #1233
Deploying openelement with
|
| Latest commit: |
594b48d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://394751e5.lessjs.pages.dev |
| Branch Preview URL: | https://1233-dependency-pin-policy.lessjs.pages.dev |
Contributor
|
APIError: Insufficient Balance |
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Audit L10 (#1233, stage #1288, umbrella #1155): the repository had no documented policy for exact pins vs caret ranges across its
deno.jsonimport maps and workflows, the zod/valibot duality had never been adjudicated, and duplicated generic validation had never been ruled out. Acceptance: a documented pin policy and a single validation-library decision (or an explicit, justified dual decision), recorded in governance docs.Owner
Implementer, dispatch packet B2.11 (issue #1233), under ADR-0151 Beta.2.
Before
vite,@playwright/test,@zag-js/*,urlpattern-polyfill, …) and caret ranges (@std/*,hono,preact, …) coexisted without a stated rule.packages/*/src).After
docs/governance/DEPENDENCY_POLICY.mdrecords:tools/check-action-pins.ts), CI binaries (version + SHA-256 inline), JSR/npm resolved versions (committeddeno.lock+vendor/+deno install --frozen+git diff --exit-code -- deno.lock), Dependabot (github-actions only, weekly + cooldown), dependency-review-action, validation boundary. No layer had two mechanisms asserting the same policy, so nothing was consolidated (net-reduction satisfied by recording, not merging).tools/publish-npm.ts), so they prefer caret ranges to avoid diamond duplication for consumers./register) and valibot (/subscribe) each appear exactly once in the request-time interop fixture as the executable proof that the ADR-0120 action loop is library-agnostic, gated in three browser engines byfixture:request-time:gate. Neither ships in any published package. Convergence would weaken the interop evidence with no consumer-observable benefit. Boundary rule:packages/*/srcimports no schema-validation library. Duplicated generic validation: none found — no repo code re-implements schema validation.validation:boundary-check(tools/check-validation-boundary.ts+ test) asserting the §3 boundary rule, registered in the AutoFlow gate registry at ci/release tiers.docs/governance/PROJECT_WORKFLOW.mdanddocs/integrations/validation.md.No dependency version was upgraded, downgraded or restyled; the diff is policy + one boundary gate.
Why-not-second-owner
The retained zod/valibot pair is not a duplicate implementation of a project-owned semantic surface: the canonical owner is the ADR-0120 action protocol (
FormDatain,fail(422)/redirectout); the two libraries are userland executors retained as the interop proof. Reason: two structurally different schema APIs are what makes the library-agnosticism claim falsifiable. Parity proof:fixture:request-time:gateasserts both routes (422/303 + echo) on Chromium, Firefox and WebKit in CI. No new duplicate-looking implementation is introduced; the new gate asserts a boundary, it does not re-implement one.Evidence
Against commit 594b48d (branch
1233-dependency-pin-policy, baseorigin/dev5ba5a47):deno test --allow-read --allow-env tools/check-validation-boundary.test.ts— exit 0 (4 passed; includes the real-tree assertion that nopackages/*/srcfile imports zod/valibot). RED proven first: exit 1 with the checker module absent.deno task validation:boundary-check— exit 0.deno task test— exit 0 (1788 passed / 0 failed + starter 150 passed / 0 failed).deno task pack:dry-run— exit 0.deno task package-artifacts:check— exit 0 (5 packages).deno fmt --check(touched files) /deno lint— exit 0;deno task lint:markdown— 0 issues.deno test tools/autoflow/__tests__/policy.test.ts— 33 passed (registry integrity: every gate resolves to a task, no shared commands).deno task docs:check-role-neutral,workflow:check,docs:check-public,docs:check-claims,text-integrity:check,docs:check-strategy,docs:check-current— all exit 0.Scope
Owned paths only:
docs/governance/DEPENDENCY_POLICY.md(new),docs/governance/PROJECT_WORKFLOW.md,docs/integrations/validation.md,tools/check-validation-boundary.ts(new),tools/check-validation-boundary.test.ts(new),tools/autoflow/policy.ts,deno.json(one task entry). No frozen paths touched; no product code changed; no dependency versions changed.Risk
None material. The new gate is additive and currently green; if a future change legitimately needs a schema library in published source, the gate fails closed and the policy doc must be amended in the same PR — that friction is intentional.
Closes #1233