Repository navigation
chore(repo): retire the repository-local gates for distributable enforcers - #138
Merged
Merged
Conversation
…rcers No scripts/guards/* and no gate script under scripts/tools/ remain. Each invariant they held is now enforced by a distributable tool locked in flake.lock, by Cargo's manifest semantics, by a product test, or it is dropped (see docs/plans/2026-10-09-1203-refactor-distributable-guards-plan.md): - workflow validity: actionlint from the locked nixpkgs (CI checks) - version surfaces: version-management sync check from the locked pnpm-release-management release-tools (CI checks); plugin.json is now a declared surface, so the toolchain also bumps it - binary identity: the crate inherits version.workspace; the nix job compares the built binary's --version to package.json - exit contract: crates/comment-checker/tests/exit_codes.rs - platform rows: stage-platform-package/bundle-release-tarball fail on an unknown row in the packaging rehearsal Removes the pre-push hook and husky, tools.yml, and the scripts/lib modules only the gates used.
…argo.lock The inherited crate version makes Cargo.lock's member entry a version surface; the toml kind rewrote Cargo.toml alone. The cargo kind also rewrites and compares pinned members and their Cargo.lock entries. The nix identity step compares the whole --version line. The plan is superseded with the review dispositions.
- js-gate: a step reads an output of a step that does not exist (actionlint) - crate pins version 0.3.7 with Cargo.lock updated, plugin.json at 0.3.7 (version-management sync check; nix --version identity) - a blocked payload exits 1 instead of 2 (exit_codes.rs) - the win32 platform row names suffix windows-x64 (packaging stage)
…ted next)" This reverts commit a4b1e6a.
…og doc's stale claim
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.
No
scripts/guards/*remains, and no script underscripts/tools/gates a change. Each invariant the gates held is now enforced by something this repository already locks in its flake (actionlintfromnixpkgs,version-management sync checkfrom thepnpm-release-managementrelease tools), by Cargo's manifest semantics, by a real test of the product, or by the release tooling's real effect. Otherwise it is dropped, with the reason in the map below. No enforcer decides by a name, word or regex match.Plan:
docs/plans/2026-10-09-1313-refactor-distributable-guards-plan.md. Lesson:docs/solutions/integration-issues/version-surfaces-declared-not-rechecked.md.Old gate → new enforcer → CI job
scripts/guards/check-remote-master.ts(pre-push)masterpull_requestCI tests GitHub's merge ref, which already containsmaster. Requiring up-to-date branches is a ruleset setting only the operator can turn oncheck-dep-pins.ts(lockfile)@types/nodeonly at 24.xpnpm-workspace.yamloverrides('@types/node': ^24.19.1) and the launcher specifier are the declarations;--frozen-lockfilerefuses a lock that disagrees. The check compared against a24written inside the checkercheck-dep-pins.ts(Dependabot)typescript/@types/nodemajorsdependabot.ymlis the declaration Dependabot reads; checking that the file contains its own lines is a text matchcheck-versions.tsversion-management sync check(locked toolchain).release.jsoncnow declaresCargo.tomlas acargosurface (workspace version, pinned members,Cargo.lock) and.claude-plugin/plugin.jsonas ajsonsurfaceCI / actionlint + version surfacescheck-versions.ts(crate) +run-binary-smoke.ts(identity)version.workspace = true, and a re-pinned member counts as drift forsync check. Thenixjob builds from the flake and requires--version==claude-code-comment-checker <package.json version>CI / nix flake check,CI / actionlint + version surfacesrun-binary-smoke.ts(exit contract)crates/comment-checker/tests/exit_codes.rsruns the built binaryCI / gaterun-binary-smoke.ts(per platform)platform.ymlrelease mode, has no caller; the shipped binary is the flake's source buildlint-workflows.tsactionlintfrom the flake's lockednixpkgs(also in the devShell)CI / actionlint + version surfaceslint-workflows.ts(file mode)check-matrix.ts(rows ⊆ table)platform.ymlrow names atargets.jsontarget/suffix/binstage-platform-package.tsexits 1 on an unknown pair;bundle-release-tarball.tsfails when the table's bin is not the built fileCI / packagingcheck-matrix.ts(table ⊆ rows)check-matrix.ts(runners)runnerhas no reader; workflow labels are checked by actionlintcheck-matrix.ts(suffix set)check-matrix.ts(package shape).exeiff win32check-matrix.ts(launcher pins)optionalDependenciesequal platform packagesoptionalDependenciescheck-matrix.ts(caller)ci.ymlcallsplatform.ymlpackagingjobs show on every PRverify-platform-metadata.tstools.ymlpackaging / rehearsal · win32-x64runsstage-platform-package.tsandbundle-release-tarball.tsonwindows-2022CI / packagingmasterrequires no status checks, so each enforcer above is a red CI job, not a merge block. Making the jobs required is a ruleset change only the operator can make.Each kept enforcer red on one honest violation
Violation commit
a4b1e6a, CI run 37935471723, reverted by4047edd:actionlint + version surfaces:.github/workflows/js-gate.yml:30:24: property "nope" is not defined in object type {}, thenCargo.toml 0.3.7 != package.json 0.3.6and.claude-plugin/plugin.json 0.3.7 != package.json 0.3.6nix flake check:nix-built binary reports 'claude-code-comment-checker 0.3.7', expected 'claude-code-comment-checker 0.3.6'gate:flagged_payload_exits_with_the_blocked_contract ... FAILED(blocked payload exited 1)packaging / rehearsal · windows-x64:target x86_64-pc-windows-msvc / suffix windows-x64 missing from targets.json, exit 1, onwindows-2022The head is green on every job (below).
Removed
scripts/guards/,check-dep-pins.ts,check-matrix.ts,check-versions.ts,lint-workflows.ts,run-binary-smoke.ts,verify-platform-metadata.ts,scripts/lib/{matrix-rows,version-files,version-sync}.ts,.husky/withhuskyandprepare,tools.yml, and the gate tasks, imports and path constants that only the gates used. The release tooling (stage-platform-package.ts,bundle-release-tarball.ts,generate-platform-manifest.tsand theirscripts/lib/modules) stays.