Skip to content

D112: the migrator is a pinned input of each corpus - #2284

Merged
ehartford merged 4 commits into
drop-native-sortfrom
corpus-pins
Oct 9, 2026
Merged

ehartford merged 4 commits into
drop-native-sortfrom
corpus-pins

Conversation

@ehartford

@ehartford ehartford commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Implements the D112 ruling.

  • Each corpus carries corpus.stamp: migrated_by (hash of the migrator sources) and modules (hash of the promoted output). <stem>-integrity checks it; corpus-integrity-check replaces corpus-drift-check in the gate. A hand edit to a corpus fails integrity, and restoring it passes.
  • corpus-migrator-gate (in :test) migrates every corpus afresh into scratch and runs its upstream tests on that output, with no promotion: <stem>-check-generated plus the fresh lanes (pcre2-test, zlib-test, c-algorithms-test-fresh, tommyds-test-fresh). It ran 17 c-algorithms programs, tommycheck, zlib and pcre2 RunTest.
  • corpus-drift-report is nightly and informational (continue-on-error); it reported 0 changes.
  • <stem>-stamp refuses a corpus that is not current.
  • The ceremony census skips directories holding corpus.stamp: corpora do not teach.
  • Build-layer clones the pinned seed still needs are granted in build/ceremony-allowances.tsv (clone-call in build: 169 → 176).

Eric Hartford added 4 commits October 8, 2026 19:44
…eplace the drift check

- Promotion writes <corpus>/corpus.stamp: the migrator generation (a hash
  of the migrator's sources) and a hash of the corpus's modules.
- <stem>-integrity (in the gate, as corpus-integrity-check) compares the
  hash; no migration. A hand edit fails it, naming both hashes.
- corpus-migrator-gate (in :test): every corpus migrated afresh,
  type-checked with its harness, and its upstream tests run on the fresh
  output (pcre2-test, zlib-test, c-algorithms-test-fresh,
  tommyds-test-fresh). Nothing is promoted. pcre2's and zlib's tests ran
  only before a promotion until now; every battery runs them.
- corpus-drift-report (nightly, never failing): which modules a
  re-promotion would change, and by how much. <stem>-stamp stamps a corpus
  that is already today's migrator output, and refuses one that is not.
- The ceremony census skips any directory holding a corpus.stamp.
- Registry fields fresh_test_lanes and extra_generated_dirs; the tommyds
  lane takes its source, c-algorithms' takes fresh=; wo_arg_value is
  shared.
Each was stamped by <stem>-stamp, which re-migrated it and found no module
a re-promotion would change, so migrated_by names the migrator that
produced it.
The census caught three `move` at consuming parameters (ceremony: the
signature already consumes) and nine `.clone()`. The moves are gone, and
hashing each generated directory directly drops two clones. The other
seven are required by the pinned seed, which predates D111 (each removal
was refused); build/ceremony-allowances.tsv grants them until the
post-D111-seed build/ sweep.
…tory

c-algorithms-integrity took test/corpora/c_algorithms as an input, the
declared output of c-algorithms-promote-tests, so the build ran the
promotion to produce it: the check re-promoted what it checks. It went
unseen while the migrator was unchanged (the re-promotion wrote the same
bytes) and failed on the first migrator change (the ternary lowering). The
directory's .w files are the inputs, as the corpus's own modules are.
@ehartford
ehartford added this pull request to stack #2287 October 9, 2026 04:33
@ehartford ehartford changed the title corpus pins D112: the migrator is a pinned input of each corpus Oct 9, 2026
@ehartford

Copy link
Copy Markdown
Contributor Author

Battery GREEN on f329092 (stack top: #2280, #2284, #2285, #2286), with run tools/battery.w: gate rc=0 (605 s), uat rc=0 (97 s), battery-checks rc=0 (1213 s), fixpoint and the drop and move audits included.

The first battery, on 859e562, was red. It found three defects the fixed-array default had hidden, plus a red main, all fixed in f329092 and f57ba3c:

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.

1 participant