Skip to content

build(repo): retire the repository-local guards for flake, test and engine enforcers - #247

Merged
ryanleecode merged 8 commits into
mainfrom
chore/distributable-guards
Oct 9, 2026
Merged

ryanleecode merged 8 commits into
mainfrom
chore/distributable-guards

Conversation

@systemfsoftware-maker

@systemfsoftware-maker systemfsoftware-maker commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Retires every repository-local guard. scripts/guards/ and scripts/lib/ are deleted with the guard:projects and test:scripts scripts that ran them; no .claude/hooks/guard-* existed. Each invariant worth keeping is now held by the systemfsoftware flake's repo-checks, a test of the product, or the engine itself (layer 2, #249). Nothing decides by a name, word or regex over source text.

Old guard → enforcer → CI job

Old guard Invariant Enforcer CI job
check-single-plan.ts A change adds at most one plan under docs/plans repo-checks single-plan from the systemfsoftware flake, through this flake's repo-checks output: pnpm gate:repo in check:ci, and .husky/pre-push CI check: step Gate runs it, step pnpm gate:repo fails on a change that adds two plans plants two plans in a plumbing commit and requires exit 1
check-contract-versions.ts A narrower contract document ships a major (minor while 0.x); a narrower stream schema raises the stream version major packages/stryker-js-cli-contract/tests/contract-version-law.integration.test.ts: committed documents against the released tarball the workspace dogfoods, law chosen by a member the document declares, a lagging baseline refused, packages weighed equal to those whose manifest files declares contract CI check (pnpm test)
check-e2e-manifest.ts (journey exists) Every witness-registry journey names an existing file test/e2e-core/tests/status-closure.integration.test.ts CI check (pnpm test)
check-verdict-semantics.ts (cache safety) A verdict is never reused by an engine whose code changed The engine (#249): reuse keys on a digest of the installed engine files CI check (pnpm test) on #249

Dropped

  • check-verdict-semantics.ts (trailer discipline): the trailer only forced a hand-bumped integer; the engine digest is derived from the installed files.
  • check-e2e-manifest.ts (path prefix, skip/only/todo marker): a path prefix and a marker regex are name heuristics; vitest refuses .only under CI on its own.
  • check-e2e-manifest.ts (no test script, uncached test:e2e): a test script would run container journeys in CI check, which has no LGTM or microVM, so it fails loudly; CI e2e restores no turbo cache.
  • check-span-names.ts: a regex over callee names, and it certified nothing; the published taxonomy is not a superset of the emitted spans today, and making it one is a product change outside this unit.
  • check-changelog-sections.ts: pnpm-release-management's release engine refuses any versioning.changelog.storage but repository/registry and writes exactly one section per release.
  • check-tarball-contents.sh: the flake tarballs are pnpm pack of the committed tree, so the check compared one command against itself; release plan verifies each tarball against its tag.

Honest violations, shown in CI

  • single-plan: run 37921109744, job check, step pnpm gate:repo fails on a change that adds two plans: repo-checks single-plan: violated … added: docs/plans/planted-a-plan.md … planted-b-plan.md, exit 1 required and observed.
  • contract law and journey existence: commit ebd0fe6 removed properties.config from the plugin-interface report schema under a patch intent and pointed a registry journey at a missing file. Run 37915084914, job check, failed on contract-version-law (pointer: /properties/config … must declare 16.0.0 or higher, declared: 15.0.1) and on both status-closure scenarios. Commit f625c62 reverts it.

…te the local guards

The repository-local deno guards under scripts/guards/ and their helpers
under scripts/lib/ are gone, with the guard:projects and test:scripts
scripts that ran them.

- single-plan (REPO-D2) now runs as `repo-checks single-plan` from the
  systemfsoftware flake, exposed as this flake's `repo-checks` output.
  `pnpm gate:repo` runs it inside check:ci and .husky/pre-push runs it per
  pushed ref. CI `check` fetches main's commit graph first, and a step plants
  two plans in a plumbing commit and requires exit 1.
- The tarball-contents job is removed: the flake packs the committed tree
  with `pnpm pack` itself, so the comparison was one command against itself.
- AGENTS.md, test/e2e/AGENTS.md, .changeset/README.md and the ledger
  solution doc now name the enforcer that holds each rule.

The plan maps every guard to its enforcer or its drop reason.
The contract-version law the deleted guard read from git history now runs as
a test of the product. It reads every contract document of
stryker-js-cli-contract and stryker-js-plugin-interface from the released
tarballs the workspace dogfoods (installed from .sfs-deps under aliases) and
from the committed packages, and weighs them:

- a committed document narrower than its release needs a declared next
  version (the package version raised by its pending intents) at the next
  major, or the next minor while the release is 0.x;
- a narrower stream schema needs a higher stream version major;
- a document's law is chosen by the members it declares, never by its file
  name, and a document that declares none fails by name;
- a package whose committed version differs from its released tarball while
  an intent for it is pending fails as a stale baseline, so a lagging
  stryker-published pin cannot hide a member added in an unpinned release.
…invariants

Reverted by the next commit. A contract member removed under a patch intent
must turn the contract version law red, and a registry journey pointing at a
missing file must turn the status closure red.
Pruning scripts/deno.json to what mutation-backstop.ts imports dropped
@std/fs/ensure-dir and @std/encoding, which test/e2e/scripts/export-traces.ts
and import-traces.ts resolve through the same config, so every e2e lane failed
at Export telemetry.
- The contract version law no longer lets a version an unpinned release
  already raised clear a narrowing: while the released tarball lags the
  workspace version, any pending intent or any narrowed document refuses
  the comparison as a stale baseline.
- The law's package list must equal the workspace packages whose manifest
  files field declares a contract directory, so a new contract package
  cannot go unweighed.
- The status closure requires each registry journey's file to exist and no
  longer scans its source with a skip/only/todo regex, matching the plan's
  drop of that clause.
- The CI plant runs through `pnpm gate:repo --head <planted>`, the script
  check:ci runs, instead of the repo-checks binary directly.
@systemfsoftware-maker systemfsoftware-maker changed the title build(repo): enforce single-plan from the systemfsoftware flake, delete the local guards build(repo): retire the repository-local guards for flake, test and engine enforcers Oct 9, 2026
@ryanleecode
ryanleecode removed this pull request from stack #250 October 9, 2026 11:52

@kiro-systemf kiro-systemf Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conductor verdict: 10/10 green on 1fdacd4; each kept enforcer red on a planted violation in CI (single-plan step, contract law, status closure); review dispositions audited; hunt grep clean.

@ryanleecode
ryanleecode merged commit d11e158 into main Oct 9, 2026
10 checks passed
@ryanleecode
ryanleecode deleted the chore/distributable-guards branch October 9, 2026 11:52
ryanleecode pushed a commit that referenced this pull request Oct 10, 2026
…v0.4.0 (#265)

#247 added three devDependencies to the published package.json after the
v0.4.0 tag and recorded a none intent, so the packed content no longer
matches the tag's recorded integrity and the release derive phase refuses
with tag-integrity-mismatch. Replace the none intent with a patch intent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants