check:restated-values reads a range in CI and the tree locally, so a member's green run can miss the job's red #107

Open
opened 2026-11-23 21:54:04 +00:00 by juno · 0 comments
Member

Purpose (defect): a member's local green run of check:restated-values means the same thing as the CI job's green, so nobody spends a CI round learning that they ran a different mode.

The instance (2026-11-23, PR 106 at b38558f0). I moved a block of constants from src/declare_crew/declare_crew.ts into a new file. Locally, npm run check:restated-values exited 0 — twice, and so did the whole battery. CI's job went red (task 6855) with two findings, both true: 60000 restating claude_code_relay/hooks/crew_turn_beat.ts's REFRESH_BEAT_MS, and 'worktrees' restating declare_crew/what_a_checkout_proves.ts's WORKTREES_BESIDE_CLONES. Both were the same constants, moved.

The cause. The package.json script reads the tree; the job reads a range:

      - name: no literal restates a defined value, in the range or a value it defines
        run: npm run --silent check:restated-values -- --range "$BASE_SHA..$HEAD_SHA"

In a range read a definition moved to another line is an added literal, so a pure move is judged as new text. Nothing in the local default says which mode CI uses, and the check's own instruction ("Import the constant, or declare the coincidence…") is the same in both, so nothing looks different until CI.

What would fail mechanically. The check's default in package.json runs both modes: the tree, and — when the checkout has an origin/main to compare with — the range origin/main...HEAD, the same reading the job makes of a pull request. A member then gets CI's answer locally, and a machine with no origin still gets the tree run. Whatever is chosen, the guard should be that the job's flags and the script's default cannot drift apart unnoticed: today every-check-runs proves only that each check runs in a job, never with which arguments.

Refs #87 (the structural floor package this surfaced in), Refs #102.

Scope, appended after the dispatcher's read (the text above is left as it was)

The both-modes default is the fix and belongs in a package: the check's own script runs the tree and, when the checkout has an origin/main, the range too.

The second half — a guard that a job's flags and the script's default cannot drift apart — is a new check, and DECIDED 2026-11-19 "No new checks without your yes" keeps it out of any package until the owner says yes. IDEA, not part of this fix.

Purpose (defect): a member's local green run of `check:restated-values` means the same thing as the CI job's green, so nobody spends a CI round learning that they ran a different mode. **The instance (2026-11-23, PR 106 at `b38558f0`).** I moved a block of constants from `src/declare_crew/declare_crew.ts` into a new file. Locally, `npm run check:restated-values` exited 0 — twice, and so did the whole battery. CI's job went red (task 6855) with two findings, both true: `60000` restating `claude_code_relay/hooks/crew_turn_beat.ts`'s `REFRESH_BEAT_MS`, and `'worktrees'` restating `declare_crew/what_a_checkout_proves.ts`'s `WORKTREES_BESIDE_CLONES`. Both were the same constants, moved. **The cause.** The package.json script reads the tree; the job reads a range: ```yaml - name: no literal restates a defined value, in the range or a value it defines run: npm run --silent check:restated-values -- --range "$BASE_SHA..$HEAD_SHA" ``` In a range read a definition moved to another line is an added literal, so a pure move is judged as new text. Nothing in the local default says which mode CI uses, and the check's own instruction ("Import the constant, or declare the coincidence…") is the same in both, so nothing looks different until CI. **What would fail mechanically.** The check's default in `package.json` runs both modes: the tree, and — when the checkout has an `origin/main` to compare with — the range `origin/main...HEAD`, the same reading the job makes of a pull request. A member then gets CI's answer locally, and a machine with no origin still gets the tree run. Whatever is chosen, the guard should be that the job's flags and the script's default cannot drift apart unnoticed: today `every-check-runs` proves only that each check runs in a job, never with which arguments. Refs #87 (the structural floor package this surfaced in), Refs #102. ## Scope, appended after the dispatcher's read (the text above is left as it was) The both-modes default is the fix and belongs in a package: the check's own script runs the tree and, when the checkout has an `origin/main`, the range too. The second half — a guard that a job's flags and the script's default cannot drift apart — is a **new check**, and DECIDED 2026-11-19 "No new checks without your yes" keeps it out of any package until the owner says yes. IDEA, not part of this fix.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
martha-ai/martha#107
No description provided.