|
78 | 78 | * |
79 | 79 | * ## The provenance of a floor, and how to reproduce it |
80 | 80 | * |
81 | | - * `MEASURED` is a claim about ONE named commit -- `MEASURED.ref` -- and never |
82 | | - * about `main`. It is the census the floors under it were derived from, not a |
83 | | - * statement about the tree you are running on. |
| 81 | + * `MEASURED` is a claim about ONE named tree, and never about `main`. It is the |
| 82 | + * census the floors under it were derived from, not a statement about the tree |
| 83 | + * you are running on. |
84 | 84 | * |
85 | | - * ⚠️ `MEASURED.ref` is this gate's PR BASE, and this gate DOES NOT EXIST in |
86 | | - * that tree: the census was taken on the PR branch, and the base is the sha the |
87 | | - * branch had to record. So the obvious recipe -- check the ref out and run the |
88 | | - * gate there -- fails with `MODULE_NOT_FOUND` (measured 2026-08-29), and the |
89 | | - * reader who tries it learns nothing about the record. Reproduce it by running |
90 | | - * TODAY's instrument AGAINST that tree instead. `sweep` is exported and takes a |
91 | | - * root for exactly this: |
| 85 | + * ⚠️ `MEASURED.ref` is the BASE of the PR that last wrote the record, and the |
| 86 | + * census is that PR's own tree: the base plus the PR's diff, which is the tree |
| 87 | + * of the commit that landed the record on `main`. A branch sha would not |
| 88 | + * survive a squash landing, so the base is the sha the branch can record. Two |
| 89 | + * consequences: |
92 | 90 | * |
93 | | - * git worktree add --detach ../os-keyed-provenance "$REF" # $REF = MEASURED.ref |
94 | | - * node --input-type=module -e "import('./scripts/check-keyed-text-bounds.mjs') |
95 | | - * .then((m) => console.log(m.sweep('../os-keyed-provenance').counts))" |
| 91 | + * - Checking the ref out and running the gate there may fail with |
| 92 | + * `MODULE_NOT_FOUND` (measured 2026-08-29, when the PR that wrote the first |
| 93 | + * record also added this gate). Run TODAY's instrument AGAINST a tree |
| 94 | + * instead; `sweep` is exported and takes a root for exactly this: |
| 95 | + * |
| 96 | + * git worktree add --detach ../os-keyed-provenance "$TREE" |
| 97 | + * node --input-type=module -e "import('./scripts/check-keyed-text-bounds.mjs') |
| 98 | + * .then((m) => console.log(m.sweep('../os-keyed-provenance').counts))" |
| 99 | + * |
| 100 | + * - Against the ref ALONE the instrument reads the base's census, which |
| 101 | + * differs from the record by exactly what the writing PR changed. The record |
| 102 | + * itself reproduces on the landing commit (or on the ref with that PR's diff |
| 103 | + * applied). |
96 | 104 | * |
97 | 105 | * All five counts are source-only, so where the tree is available the |
98 | | - * re-derivation is cheap: no install and no build. Re-derived at `MEASURED.ref` |
99 | | - * on 2026-08-29: 113/118/255/594/151 -- exactly the record, which is the |
100 | | - * measurement that rules out "the original count was written wrong". |
| 106 | + * re-derivation is cheap: no install and no build. The first record |
| 107 | + * (113/118/255/594/151, ref `fa5d137ab0`, written by a PR whose diff declared no |
| 108 | + * object) re-derived at its ref on 2026-08-29 -- exactly the record, which is |
| 109 | + * the measurement that ruled out "the original count was written wrong". The |
| 110 | + * current record is C3 stage 8's: 111/116/236/592/148, re-derived on 2026-10-13 |
| 111 | + * on the stage-8 tree (ref `01a3421f42` plus the stage-8 diff). Against the ref |
| 112 | + * alone the instrument reads 115/120/248/612/152; the difference is the four |
| 113 | + * retired security-catalog object files. |
101 | 114 | * |
102 | 115 | * ⚠️ A SHALLOW clone cannot do this at all -- `MEASURED.ref` predates the |
103 | 116 | * default checkout window, so the commit is simply absent. That is why the |
@@ -378,21 +391,23 @@ const ALLOWLIST_KINDS = new Set(['unboundable', 'pending']); |
378 | 391 | // make visible in a diff. |
379 | 392 |
|
380 | 393 | const MEASURED = Object.freeze({ |
381 | | - // The commit this census describes. ⚠️ It is this gate's PR BASE, not a tree |
382 | | - // the gate ever ran in -- see the header for the recipe that actually |
383 | | - // reproduces it, and for why that distinction is not a detail. Immutable, so |
384 | | - // the record stays reproducible forever even as `main` moves away from it. |
385 | | - // ⛔ Never repoint it without re-running all five counts against the new ref. |
| 394 | + // The base of the PR that last wrote this census; the census is that base |
| 395 | + // plus the PR's diff. ⚠️ Not a tree the five counts hold on by itself -- see |
| 396 | + // the header for the recipe that actually reproduces it, and for why that |
| 397 | + // distinction is not a detail. Immutable, so the record stays reproducible |
| 398 | + // forever even as `main` moves away from it. |
| 399 | + // ⛔ Never repoint it without re-running all five counts against the new tree. |
386 | 400 | // |
387 | 401 | // [C3 stage 8] Re-measured, all five, when the four security-catalog row |
388 | | - // objects retired (ADR-0131 D3) and took their declarations and 25 index |
389 | | - // entries with them: the census is the stage-8 branch's, the ref its base. |
390 | | - ref: 'eab7236ff7', |
391 | | - files: 108, |
392 | | - objects: 113, |
393 | | - indexEntries: 230, |
394 | | - textFields: 569, |
395 | | - keyedTextColumns: 144, |
| 402 | + // objects retired (ADR-0131 D3) and took 4 files, 4 objects, 12 index entries, |
| 403 | + // 20 text fields and 4 keyed columns with them: the census is the stage-8 |
| 404 | + // tree's, the ref its base. |
| 405 | + ref: '01a3421f42', |
| 406 | + files: 111, |
| 407 | + objects: 116, |
| 408 | + indexEntries: 236, |
| 409 | + textFields: 592, |
| 410 | + keyedTextColumns: 148, |
396 | 411 | }); |
397 | 412 | const MIN_FILES = 105; |
398 | 413 | const MIN_OBJECTS = 110; |
|
0 commit comments