Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scripts/check-adr-0087-registration.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ import { maskComments, maskCommentsAndLiterals } from './js-comment-mask.mjs';
// #16421 — the DIRECTION ARM, read through the fleet's one declaration reader.
// ⛔ Not re-implemented here: the ruling's condition on the arm is that it has a
// single legal spelling read in a single place, and every reader imports it.
import { readClause2Line } from './pm/check-clause2-carriers.mjs';
import { readClause2Line } from './pm/clause2-line.mjs';
// #16421 — the staging manifest for this gate's own I1/I2 fixture, derived from
// the module graph rather than typed out. Shared with the OTHER site that copies
// this gate into a sandbox (`objectui-changeset-digest.mjs`), because two hand
Expand Down Expand Up @@ -7024,8 +7024,8 @@ function selfTest() {
// ⭐ DERIVED, not listed, and derived by a module BOTH staging sites of this
// gate import (#16421). It was a two-name list here and the same two-name
// list in `objectui-changeset-digest.mjs`'s `fw-gate` sandbox. Signal (4)
// added an edge to `pm/check-clause2-carriers.mjs`, whose own closure is nine
// modules deep; this site was updated in the same edit and the other was not,
// added an edge to the clause-② declaration reader, then ten thousand lines
// of sweep behind it; this site was updated in the same edit and the other was not,
// and `check:objectui-changeset` went red in CI with an error naming neither
// the import nor the manifest. One in two is the measured hit rate of "the
// next author remembers", so neither site holds an opinion about the graph
Expand All @@ -7037,7 +7037,7 @@ function selfTest() {
// moment signal (4) is reached, and the two I-cases below would again report
// about the wrong thing. This names the one edge that made the list a graph.
assert(
staged.includes(copy) && staged.includes('scripts/pm/check-clause2-carriers.mjs'),
staged.includes(copy) && staged.includes('scripts/pm/clause2-line.mjs'),
`I1/I2: the staged closure must carry the gate AND the declaration reader it imports — got ${staged.length} file(s): ${staged.join(', ')}`,
);
w(
Expand Down
8 changes: 4 additions & 4 deletions scripts/check-changeset-no-major.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ import { isEntrypoint } from './invoked-as.mjs';
// from the gate the PM protocol actually runs. Both modules import node
// builtins only, so this file still runs before `pnpm install`.
import { CONTRACT_REVIEW_LABEL } from './pm/check-half-states.mjs';
import { readClause2Line } from './pm/check-clause2-carriers.mjs';
import { readClause2Line } from './pm/clause2-line.mjs';

const __dirname = dirname(fileURLToPath(import.meta.url));
const REPO_ROOT = resolve(__dirname, '..');
Expand Down Expand Up @@ -885,7 +885,7 @@ export function render(result) {
// ① the CLAUSE-② declaration — "this PR puts a new key on a published
// payload" — carried by the `needs:contract-review` gate label and/or by
// the fixed `Clause-②: yes` line the PM protocol spells (read here through
// `check-clause2-carriers.mjs`'s own `readClause2Line`, imported rather
// `clause2-line.mjs`'s own `readClause2Line`, imported rather
// than restated, so the two readers cannot drift);
// ② the CHANGESET LEVEL for the package whose `packages/**/src/**` the diff
// moves.
Expand Down Expand Up @@ -1383,7 +1383,7 @@ export function packagesTouched({ cwd, from, head }) {
// `readClause2Line` returns a REASON with every near miss, and this gate used
// to print the offending line without it: the reader knew which of three
// different mistakes the author had made, and the refusal said only "a near
// miss". The three owe different remedies — `check-clause2-carriers.mjs` says
// miss". The three owe different remedies — `clause2-line.mjs` says
// so in its own words ("⛔ The reason changes the sentence, never the state") —
// so the sentence is what this map supplies.
//
Expand Down Expand Up @@ -1433,7 +1433,7 @@ export function clause2NearMissRemedy(reason, line) {
}
return (
`this gate carries no remedy sentence for a near miss of reason ${JSON.stringify(reason ?? null)} — ` +
'`readClause2Line` (scripts/pm/check-clause2-carriers.mjs) reports a reason this file has not been taught, ' +
'`readClause2Line` (scripts/pm/clause2-line.mjs) reports a reason this file has not been taught, ' +
`and the reason plus the line are printed rather than swallowed. The offending line is: ${line}. Whatever the ` +
'reason, a declaration is `Clause-②: yes` or `Clause-②: no`, bare, at the start of a line of its own. Add the ' +
'sentence for this reason to CLAUSE2_NEAR_MISS_REMEDIES in scripts/check-changeset-no-major.mjs.'
Expand Down
6 changes: 3 additions & 3 deletions scripts/objectui-changeset-digest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2321,8 +2321,8 @@ function selfTest() {
// moved.
//
// ⭐ It was a hand MANIFEST, and the manifest is what broke (#16421). That
// gate gained one import — `pm/check-clause2-carriers.mjs`, the fleet's one
// clause-② declaration reader, whose own closure is nine modules deep — and
// gate gained one import — the fleet's one clause-② declaration reader, then
// living inside ten thousand lines of sweep with a nine-module closure — and
// the author updated the gate's OWN I1/I2 staging site in the same edit and
// not this one. CI went red HERE, on a gate about objectui changesets, with
// an error naming neither the new import nor this list. Both sites now DERIVE
Expand All @@ -2346,7 +2346,7 @@ function selfTest() {
for (const rel of gateDeps) gw(rel, readFileSync(join(__dirname, '..', rel), 'utf8'));
check(
'#6494 the staged gate carries its whole first-party closure — DERIVED, not a hand manifest',
gateDeps.includes('scripts/pm/check-clause2-carriers.mjs') && gateDeps.length >= 2,
gateDeps.includes('scripts/pm/clause2-line.mjs') && gateDeps.length >= 2,
`${gateDeps.length} dependenc(ies): ${gateDeps.join(', ')}`,
);
gg('add', '-A');
Expand Down
Loading
Loading