Skip to content

test-proof: local test runs as verifiable review evidence (CI at merge unchanged) - #997

Merged
hhff merged 16 commits into
mainfrom
operator/local-test-proof
Dec 5, 2026
Merged

hhff merged 16 commits into
mainfrom
operator/local-test-proof

Conversation

@hhff

@hhff hhff commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Cause

The owner asked the operator (2026-12-04, in the operator's terminal; not a recorded owner answer) for agents' local test runs to count toward review, but only with proof, and never in place of the CI check at merge. Until now a review record could only say "I ran the tests". Nothing showed which command ran, at which commit, on which Node, or with what result, so a reviewer had to run the tests again or take the claim on trust. A stale or edited claim couldn't be caught either.

Owner's yes needed: both commits' text, nothing merges on reviewer approval

  • Both doc changes are owner-only. process/worker.md (§6 "Test proofs", "What a proof is not" and "Citing a proof", §8 step 3, in commits ea360aa5, cb28330c, f378e1ae, 39eae4c6 and c18cd69c) and governance/quality.md §3 (commits cf2ec3e3, 3d198d3d, f9942f78, 1aef2644 and 642d55ba). Both change what counts as review evidence: process/ and governance/ change only with the owner's answer (constitution.md, process-edit and governance-edit).
  • The code doesn't stand on its own without the text. The engine's verdictHolds and check-ticket changes enforce the §3 rule the text states.
  • devteam-dev's supervisor puts one Inbox question to the owner on the final text (the quality.md sentence quoted below, plus the worker.md paragraphs). The PR merges only on that answer, and the merge cites its q-… id. It doesn't merge on reviewer approval alone.

Governance text (quality.md §3), final, word for word

The changed passage in "At an exact head":

It still holds at a later head only if every commit since just adds new review-record files (a test proof under reviews/proofs/ is one when test-proof verify finds it well formed, worker.md §6; editing any byte of one voids it), or fills one in: …

A new bullet after it (the cite sentences moved out of "At an exact head" into a line of their own):

Test proofs. Instead of rerunning the full suite, a final reviewer may cite a current, full, passing test proof, one test-proof verify prints a cite line for (worker.md §6), by putting that line in the record, which names the proof by file and sha256 (- Test proof: <file> sha256:<hex> …). Only a run of the test gate as merge runs it is full. A newer test-proof run of the same command at the same code that did not pass (failed or inconclusive) supersedes a pass, whether or not its proof was committed; a plain gate run does not. Once one has, a cite of the earlier pass is dead, even after a still newer pass, and the ticket needs a new final review; that newer pass is citable in its turn, so a flaky suite rerun until it passes yields a citable proof. A newer pass supersedes no pass. check-pr, which on a forge's CI reads only the landed log, only warns, wherever it runs, about a cited proof whose run is not in the log it reads; check-ticket, and so merge, reads the live log on the box and fails it. The reviewer still runs at least one test command itself, and the mutations it owes, as the spec reviewer re-runs a red seen cell; this is stated, not checked, since check-ticket can't tell the reviewer's run from the worker's. A proof the record doesn't name is no evidence the reviewer relied on. A proof is evidence that a run happened, not a signature. CI and the merge gates still run at merge.

The governance edit is in its own commits (cf2ec3e3, 3d198d3d, f9942f78, 1aef2644, then 642d55ba on top, which makes the check-pr clause exact on the box and on CI: on the box check-pr reads the live log, only on a forge's CI is it the landed log alone, and the warning, not a failure, is the same wherever it runs). None touches code.

For the owner's question, both directions of supersession: after a newer failing (or inconclusive) test-proof run at the same code, a cite of the earlier pass is dead for good and the ticket needs a new final review, so a flaky failure by a second reviewer costs the first reviewer's approval; a still newer pass is citable again, so a flaky suite rerun until it is green yields a citable proof. That is intended: CI and the merge gates still run the suite at merge.

Design

devteam.mjs test-proof [--ticket id] [--gate name] [-- <command>]

  • With no command, it runs the settings' test gate as merge runs it: sh -c <the gate's command>, read from main's committed settings (home's gates, or the link's), at the checkout's root whatever folder it is called from, with merge's gate env (gateEnv with the ticket, so DEVTEAM_GATE_TICKET is set). The record keeps the folder (cwd). This makes a full proof.
  • --gate <other> runs another gate the same way but makes a partial proof: merge runs only the test gate as the full suite.
  • -- <command> runs a command you name in the caller's folder and makes a partial proof. That is evidence of that command alone, never of the suite. Only a full proof can be cited instead of rerunning the suite.
  • It runs at gentle priority, passes the exit status through, and logs a gate line.
  • It writes <stamp>-<sha12>.json and <stamp>-<sha12>.tap to the ticket's reviews/proofs/. The .json holds the gate, scope, the command as run, the commit and tree, Node, start and end, exit, the TAP counts and the output's sha256. The .tap is the stdout, whole.
  • Every field is bound. The gate line's new optional proof field is the sha256 of the whole record: keys sorted, every field but log, the output's sha256 among them. The file's stamp must match started and its sha12 must match sha. The line also carries proof_cmd (the sha256 of the command and folder) and proof_passed, so the run counts whether or not its files are ever committed.
  • HEAD and the tree are read before and after the run. Uncommitted changes, a tracked file marked skip-worktree or assume-unchanged (read from git ls-files -v; git hides its changes from status and diff), or a change while it ran, make the proof dirty. The dirty check leaves out the ticket's reviews/, as verify does.
  • Records in home (code in a linked repo, records in home) are supported:
    • It runs in the link's checkout of ticket/<id> and records the link's commit, tree and repo.
    • The files go to home's records checkout: .worktrees/records-<id>, or a review worktree's -records beside it.
    • From home it refuses such a ticket, since it would record home's commit.
  • An unknown ticket is refused.

devteam.mjs test-proof verify [<id>] [--sha s] [--records s] [--json] judges each proof committed at the records head against the code head. The code head is --sha, else this checkout's HEAD when it is the code's, else the code repo's ticket/<id>. Each proof gets three labels:

  • current, stale, dirty or broken. Broken means the name, output, recount, ticket or log line doesn't match, or the record was edited.
  • passed, failed or inconclusive. passed needs exit 0, TAP present, fail 0, cancelled 0 and pass > 0. Exit 0 with no TAP or nothing passing is inconclusive.
  • full or partial. Full needs the test gate, run at the root (cwd .), with the gate's command on main now. Another gate, another folder, or a gate command changed on main since is partial.

Supersession. A current proof is superseded by a newer test-proof run of the same command and folder at the same code that disagrees with it: a pass by a newer run that did not pass (failed or inconclusive), one that did not pass by a newer pass. A plain gate run carries no proof and supersedes nothing. The runs are the committed proofs and every proof-bearing gate line in the log, so a failing run whose files were thrown away or git rmed still supersedes the pass before it. A newer run that agrees (a second reviewer's pass, a worker's rerun) supersedes nothing. A dirty run counts for nothing.

Cost (round-3 B-F1). The log keeps every proof run of every ticket. verify asks git (cat-file -e, diff --quiet) only about log runs of a command some current proof ran, newer than the oldest such proof's ended, and only once per commit per process (codeSince, shared with judgeProof, so check-ticket judging several cites asks once per commit). An old line, or another command's, costs a string compare. Every ticket's full proof runs the same command, so other tickets' newer full runs do pass that filter (b4 N1); their commits are asked about together, in two git calls however many there are (codeSinceAll: one cat-file --batch-check for which are in the clone, one diff-tree --stdin for which differ from the head under the same pathspec). They are not filtered out by ticket, because another ticket's run at the same code (a dependent ticket built on this one's head, say) is a real run of that code and still supersedes, as before. A test appends 400 old failing proof lines (half this command, half others, each at its own commit) and asserts, from a test-only stderr trace (DEVTEAM_TEST_PROOF_TRACE), that git is asked about none of them. verify exits 0 only when a current, full proof passed, is not superseded, and none is broken. It then prints the cite line: - Test proof: <file> sha256:<json sha256> (gate test: \`) current at `.

Verdicts.

  • verdictHolds: an added proof keeps a verdict only when it is well formed at the head. A proof is never "filled in", so any edit voids the verdict. As for every record, an edit and its exact revert count as no change.
  • check-ticket holds each - Test proof: cite in a latest final APPROVE to verify's rule at the verdict's commit. The named file must be committed with that sha256, current there, full, passed and not superseded. A malformed cite line fails too. Judged at the verdict's commit, a cite still stands after main is merged in, as the verdict does.
  • The reviewer's own run is stated, not checked. A proof's by is the log's writer: the ticket in the worker's session and in a reviewer session that inherits its DEVTEAM_TICKET, supervisor for a run in a review worktree with --ticket from the supervisor's session, responder or plan-<feature> for one with --ticket from the responder's or a planner's session, never the reviewer. So check-ticket can't tell the reviewer's run from the worker's. quality.md §3 and worker.md §6 say so.
  • On a forge's CI (check-pr), only the landed log is read, and log-sync lands it about once a day. A cited proof whose run isn't there yet is a warning ("unverifiable there until the log lands"), never a failure. check-pr is in that mode wherever it runs, also on the box; the warning now says check-ticket and merge, on the box, read the live log and fail it if it is missing there. A proof added after a verdict doesn't void it for that reason either. Merge, on the box, reads the live log and still holds every proof to its line. On the box a missing line reads "not in the log this checkout reads", not "written or edited by hand".

Docs (process/worker.md):

  • §6 "Test proofs": full vs partial, run at the root with merge's env, TAP needed, records in home, what verify says, supersession.
  • §6 "What a proof is not": evidence that a run happened, not a signature. A session that can append to its own log could forge one. A tree changed and put back mid-run, gitignored files, stderr and the environment (NODE_OPTIONS, say) aren't bound. An edit git's stat cache doesn't see (same size, mtime put back, under core.checkStat=minimal and core.trustctime=false) isn't caught. A sparse checkout makes every run dirty, so nothing proven there is citable. The forge CI view. This is why CI and the merge gates still run everything at merge.
  • §6 "Citing a proof": the reviewer cites by the printed line and still runs at least one test command itself plus the mutations it owes. A reviewer's own proof is handed over with its record and committed beside it in reviews/proofs/, because review-worktree --remove deletes the review worktree.
  • §8 step 3: commit a current, full proof before the final review; the reviewer's own test run is stated, not checked, as §6 says.

This is evidence, not attestation. A session that appends a matching gate line to its own log can still forge a proof (a test shows a forged record reads as current, and is still judged partial when it claims another gate or folder). CI and the merge gates are unchanged and still required.

Tests

test/test-proof.test.mjs (9 tests), test/test-proof.runs.test.mjs (6 tests, new in f378e1ae; 2778272d moves the smoke gate's --test-name-pattern before the file, since Node 18 and 20 pass whatever follows a file to the test) and test/test-proof.home.test.mjs (2 tests, records in home), on fixture fleets. They cover:

  • the full record and its log-line hash (now with cwd, proof_cmd and proof_passed), with an uncommitted review record beside the run not counting as dirty
  • current, stale and the cite line
  • broken cases: an edited output and a recount; a hand-written proof, and one whose log line isn't in the log; each bound field edited alone; the start time edited, a renamed file (sha12), another ticket's proof
  • passed needs exit 0, TAP, no failure or cancellation and a pass; a lone # pass 5 a test prints adds nothing
  • a named command is partial and never citable; a gate command changed on main; dirty runs
  • verdicts and cites: a well-formed added proof holds; a blank line added voids; cites good, wrong sha256, malformed, not committed, partial, stale
  • A-I1: test-proof from src/ still runs the gate at the root (the suite names src/a.test.mjs); a gate that checks DEVTEAM_GATE_TICKET and pwd passes; a named command records its folder
  • A-I3: a --gate smoke pass is recorded and judged partial, never citable; with the test gate failing at the same code, verify is not ok
  • A-I2: a failing run whose files were thrown away supersedes the pass before it; so does one committed and then git rmed; a newer pass restores; a dirty failing run counts for nothing
  • B-F1: a second reviewer's proof (committed with final-3b.md) and a worker's rerun, both passing, leave the cite standing in check-ticket; a failing rerun voids it, and still does once its proof is dropped (the log holds the run)
  • B-F5: main merged in after the verdict with a code change: the cite still passes check-ticket, while verify at the merged head says stale
  • B-F2: check-pr with the worker's live log set aside (CI's view): the verdict holds, no failure, and a warning says the run is unverifiable until the log lands; on the box (live log present) there is no warning; verify with the log set aside says "not in the log this checkout reads" and not "by hand"
  • a forged record with a log line of its own: it reads as current, and is partial when it claims the smoke gate or the src folder
  • records in home (unchanged)
  • Round 3: 400 old log lines cost no git (B-F1); two newer failing runs at other code leave the pass citable (B-N4/A-m3) and their commit is asked about once; a skip-worktree and an assume-unchanged file with a lasting edit make the run dirty though git status is empty (B-N1)
  • Round 4 (b4 N1): 200 newer failing runs of the same command by another ticket at 200 real other commits, and 200 at commits not in the clone: the pass stays citable, and git is asked about them in exactly two calls (from the trace, which now also counts git calls); another ticket's failing run at an empty commit on the head (same code, another commit, answered by the batch) supersedes the pass

Mutation-proved. In the earlier round, 25 mutants: 22 killed, 3 equivalent survivors (A1's from === 'none' clause, the created_by cross-check, the repo check; kept as defence in depth). In this round, 15 new mutants, each in a copy of the worktree with the relevant test file run, and all 15 killed:

  • A-I1: no cwd on the spawn; gateEnv(null) in place of the ticket
  • A-I2: log-only runs ignored; dirty log lines counted
  • A-I3: the judge's test-gate check dropped; the judge's root-folder check dropped; the run's recorded scope full for any gate
  • B-F1: supersede on any newer run, agreeing or not
  • B-F2: landedOnly ignored in proofProblem; not passed by verdictHolds; not passed by judgeProof; check-pr not passing forge to check-ticket; the warning branch removed
  • B-F5: the cite judged at the head in place of the verdict's commit
  • Minor: a TAP summary block needing only pass

Round 3, 4 new mutants, all killed (each with the named test run): the log loop without the same-code check (a failing run at other code supersedes: killed, "a failing run at other code supersedes nothing"); without the command/time filter (killed, 400 probes of old lines); codeSince without its memo (killed, the commit asked about twice); dirtyHash without the index-flag check (killed, "skip-worktree: a marked file makes the run dirty").

Round 4, 3 new mutants, all killed (test-proof.runs.test.mjs run each time): the batch call removed, back to git one by one per commit (killed, test 6: "415 single probes for 14 earlier proof commits"); the batch answering every present commit changed (killed, tests 2, 3 and 6); answering every one same (killed, tests 5 and 6).

origin/main was merged in (05fd3966, no rebase) for kit-1243's project-hosts C3 fix.

Run with DEVTEAM_HUB_PORT=<unused> DEVTEAM_BOX=off node test/run.mjs --file-timeout 1200 …. All three proof files pass. These neighbouring files pass locally too: check-ticket, devteam-mjs-regions, kit.validate, gate-add, landing, multirepo-home.left, multirepo-home.records, review-dates, split-dist-docs.

Limits and what I couldn't test

  • A tree changed and put back within the run can't be seen from outside it. The full proof runs the project's own configured command, so it isn't the author's to choose.
  • An edit git's stat cache doesn't see (same size, mtime restored, core.checkStat=minimal, core.trustctime=false) leaves the run clean; worker.md §6 says so (b4 N3). A sparse checkout makes every run dirty (b4 N4, a4).
  • Gitignored files a test reads are not hashed into the dirty check, and stderr and the env aren't kept. Only stdout is kept. worker.md §6 now says so.
  • On CI, log-only runs count only once landed. A thrown-away failure that hasn't landed is seen by merge on the box, not by check-pr on CI.
  • A log-only run that exits 0 while its TAP fails is judged by proof_passed, which applies the same rule as verify, so it counts as a failure.
  • TAP counting: a test that prints a whole summary block of its own (# tests n and # pass n together) can still add to the counts. It can't hide a failure, since counts only add.
  • A gate command changed on main makes every outstanding cite of the old command partial, so each such ticket needs a new final review. worker.md §6 says so.
  • Partial runs feed gate statistics. They are logged under the gate name (test by default), like full ones.
  • A runner that prints no TAP (vitest's default reporter, say) gives inconclusive and can't be cited. Its project needs a TAP reporter in the gate's command.
  • Not tested end to end: a real worker or reviewer session citing a proof. No fleet was touched.
  • test/run.mjs and .github/workflows are untouched.

Opened by the box operator.

🤖 Generated with Claude Code

hhff and others added 2 commits December 4, 2026 15:18
…n cite

The owner approved (2026-12-04) that local test runs by agents may count
toward review, with proof, never replacing the CI check at merge.

`devteam.mjs test-proof [--ticket id] [--gate name] -- <test command>` runs
the command as `gate` does (gentle priority, exit status passed through,
logged as a gate line) and writes, under tickets/<id>/reviews/proofs/:
- <stamp>-<sha12>.tap: the command's stdout whole;
- <stamp>-<sha12>.json: the command, the commit and tree it ran at (or the
  sha256 of the uncommitted change when the tree was dirty), Node's version,
  start and end, exit code, pass/fail/skip/todo/cancelled counts read from
  the TAP (node's summary lines, else top-level test points), the output's
  sha256, and the id of the gate line, which carries the same hash in a new
  optional `proof` field (log schema).

`test-proof verify [<id>] [--sha s] [--json]` reads each proof committed at
the head and says current (it tested this head's code: same commit, or a
tree that differs only under the ticket's reviews/), stale (the code
changed), dirty (no commit names what ran) or broken (output hash, recount,
file name or log line don't match: edited or hand-written). Exit 0 only
when a current proof passed and none is broken.

verdictHolds counts an added proof file (proofs/<stamp>-<sha12>.json|.tap)
like an added review record, so committing a proof after a final verdict
keeps it holding; editing one voids it.

worker.md §6 says how to make and cite one; §8 asks for a current proof
before the final review. CI and merge's gates are unchanged.

Tests: test/test-proof.test.mjs (fixture ticket). Mutation-proved: 12
mutants (counts, hash check, recount, log presence, log match, stale and
current judgement, dirty judgement, dirty hashing, exit status, the
verdictHolds proof allowance, a failed run counted as passing), all killed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…inal reviewer may cite one

Two additions to §3 "At an exact head", nothing else:
- a test proof under reviews/proofs/ counts as a newly added review-record
  file for whether a verdict holds (what verdictHolds now does);
- a final reviewer may cite a current, passing test proof (test-proof
  verify, worker.md §6) instead of rerunning that test command, naming it
  in the record; CI and the merge gates still run at merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

PR #997 review B: test-proof works as described on the happy paths, but verify blesses two cases it should not

  • Reviewer: operator-review-B (fresh subagent, claude-fable-5-2), not the author
  • Head: cf2ec3e
  • Date: 2026-12-04T15:46Z

What I ran vs only read

Ran (scratch clone, DEVTEAM_HUB_PORT=<unused> DEVTEAM_BOX=off, no fleet or real hub touched):

  • node test/run.mjs --file-timeout 600 test/test-proof.test.mjs: 5 pass, 0 fail.
  • My own probe on a fixture fleet (fleetFixture, 5 scenarios, results below in Findings): older pass + newer fail on the same code; a proof of true; a proof renamed to another sha12; a proof restamped with its command, Node and start time edited by hand; a clean merge of main after the proof; verify and test-proof inside a review-worktree; a run beside an uncommitted review record; an unknown ticket id.
  • Mutation 1: judgeProof's tree comparison made always-same (git diff --quiet p.sha p.sha): tests 2 and 4 went red. Killed.
  • Mutation 2: the file-name check (p.sha.slice(0, 12) !== name[2]) and the ticket check (p.ticket !== id) both replaced with if (false): all 5 tests stayed green. Survived (F4).
  • CI at the head when I posted: box-image success, test still queued. I did not wait for it.

Only read: the verdictHolds change and its callers, dirtyHash, proofDirOf, the schema addition, quality.md §1 and §3, worker.md §6 and §8, constitution lines on governance/ and process/. Records-in-home tickets I did not run (see Notes).

What held up in the probe: a proof goes stale after main is merged into the branch (the tested tree is no longer the head's); a proof whose file-name sha differs from its record is broken; verify in a review worktree reads the same log and judges the worker's proof current; an added proof keeps a verdict, an edited one voids it.

Findings

Id Severity Rule Where Finding
F1 Important quality.md §3 "a current, passing test proof"; worker.md §6 "exits 0 only when a current proof passed" devteam.mjs testProofVerify (proofs.some(passed) && !broken) defect: any current pass wins over a newer current failure of the same command on the same code. Probe: proof 1 passed at the work commit; proof 2, same command, same code, failed 3 seconds later (exit 1, 0 pass, 1 fail); both committed. verify listed current passed and current FAILED (exit 1), then printed "a current proof passed ...: cite it in the review record" and exited 0. A flaky or order-dependent suite rerun until green, or a failure that appeared after the first run, is exactly what a reviewer's own rerun might have caught, and the kit tells the reviewer to cite the pass. The latest current proof of a command should decide (or any current failure should make ok false). No test covers two current proofs that disagree.
F2 Important worker.md §6: broken = "its output, its counts or its log line don't match what it says: written or edited by hand"; PR body "This is how an edited ... proof shows up" devteam.mjs judgeProof; the gate line binds only proof, sha, ok defect: the record's command, node, started, ended, tree and by are bound to nothing. Probe: I took a real proof of node --test src/a.test.mjs, renamed both files to stamp 20200101T000000000Z, and rewrote the JSON's command to pnpm test --everything, node to v99.0.0 and started to 2020. verify: "current passed 1 pass 0 fail ... pnpm test --everything on node v99.0.0, 2020-01-01T00:00:00.000Z", exit 0. No log line was forged, so this is outside the limit the PR admits to (a forger writing the log). The command is the one field that tells a reviewer which suite ran; a proof of one file can be relabelled as the whole suite and still be current. Bind the whole record: put the command (or a sha256 of the record without log/by) in the gate line and compare it in judgeProof, and check the stamp against started.
F3 Minor quality.md §3 new sentence; worker.md §6 testProofVerify, docs weak-check: test-proof -- true gives "current passed 0 pass 0 fail 0 skip ... true" and verify exits 0 with "cite it". Nothing in the kit or the two doc texts says the proof's command must be the command the reviewer would have run (the settings' test gate, or the verification.md row). §3 says "instead of rerunning it", which implies it, but worker.md §8 step 3 ("so the reviewer can cite it instead of rerunning your tests") points the other way: the author chooses what was proved. Suggest one clause in both texts ("a proof of that same command; read its command and counts") and that verify not print "cite it" for a proof with counts.from: none or zero tests.
F4 Minor quality.md §3 Scoped (mutations) test/test-proof.test.mjs coverage: the PR body lists "the file name" among broken causes, but mutation 2 shows no test covers the name-sha check or the wrong-ticket check. My probe confirms the code is right for the name case; it has no test.
F5 Minor constitution: "anything in governance/ or process/" is the owner's PR body, commit ea360aa contradicts: the body says the first commit "stands on its own" without the governance lines. It does not: ea360aa already changes verdictHolds (the enforcement of §3's "At an exact head" rule) and already tells reviewers in process/worker.md §6 and §8 that they may cite a proof instead of rerunning. Landed alone it would have the engine and worker.md say what quality.md §3 does not. process/ is owner-only too, so both commits need the owner's yes on the wording, not only cf2ec3e. The governance text itself is short and I found no widened authority in it beyond what the PR states; "CI and the merge gates still run at merge" is kept in both texts.

Notes

  • Minor: dirtyHash excludes only reviews/proofs/, while judgeProof ignores all of reviews/. A run made beside an uncommitted review record is marked dirty (probe confirmed), though by verify's own rule that file is not code. A reviewer who writes its record before running hits this.
  • Minor: a reviewer's own test-proof --ticket <id> in a review worktree works (probe), but the proof lands in a detached tree that review-worktree --remove deletes. worker.md §6 says "you or a reviewer" and "commit both files" without saying how a reviewer's proof reaches the branch.
  • Minor: test-proof --ticket no-such-ticket -- true writes a proof folder for a ticket that does not exist (probe).
  • Minor: every test-proof run is logged as gate test by default, including a one-file run; that feeds the same gate statistics (ms, pass rate) as full runs. Not measured.
  • Minor: only stdout is kept; a runner that reports failures on stderr leaves a proof whose output shows nothing, with the exit code as the only signal. The env is not recorded either (my F1 probe failed the second run with one env var; the two records are identical but for the result).
  • Not checked by running: records-in-home tickets. By reading, proofDirOf refuses only when the cwd is a non-home repo. Run from the home checkout with --ticket <records-in-home id>, nothing refuses: the proof would carry home's sha and stay current while the linked repo's code changes. The PR body says such tickets are refused; that is true only from the linked checkout. Worth a guard or a test before anyone relies on it.
  • Not checked: log lines surviving a fleet move (a proof made on the old machine is broken on the new one if its gate line does not travel), and CI's test job, queued when I posted.
  • On incentives: with F1 and F2 fixed I think the trade is sound. The merge gates rerun everything at merge, a stale or dirty proof counts for nothing, and the text says a proof is evidence of a run and not a reviewer's read. As it stands, the two findings make "current passed" weaker than the docs say it is, and that is the phrase reviewers will lean on.

Opened by the box operator.

Verdict: CHANGES cf2ec3e

@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

PR #997 review A: a "current, passing" proof can be had at a head whose tests fail

  • Reviewer: operator-review-A (fresh subagent, claude-opus-5-5), not the author
  • Head: cf2ec3e
  • Date: 2026-12-04T15:54Z

What I ran vs only read

I ran everything in a scratch clone at the head, with DEVTEAM_HUB_PORT set to an unused port, DEVTEAM_BOX=off and DEVTEAM_IMAGE_HUB unset, through testslot nice -n 19 node test/run.mjs:

  • test/test-proof.test.mjs: 5/5 pass.
  • Neighbouring files, all green: check-ticket 14/14 (verdictHolds), kit.validate 3/3, landing 5/5, split-dist-docs 4/4, devteam-mjs-regions 7/7 (HELP_SESSIONS).
  • Probe (my own fixture test, not committed). It sets up a ticket whose head has a failing test: src/a.mjs exports 2 and the test asserts 1. Then it tries four attacks, each test-proof -- sh -c '<cmd>' → commit → test-proof verify --json. All four get ok: true, status current, exit 0, on a clean tree:
    1. Exit swallowed, node --test … ; exit 0: counts {tests:1, pass:0, fail:1}. verify still prints "current passed 0 pass 1 fail" and exits 0.
    2. true: counts from: "none", 0 tests, "current passed".
    3. Faked TAP, printf "ok 1\n# tests 900\n# pass 900\n# fail 0\n": "current passed 900 pass".
    4. Tree swapped during the run, git checkout <good> -- src/a.mjs && node --test …; git checkout HEAD -- src/a.mjs: the dirty check runs only before the command, so the proof is clean and "current passed" at the bad head.
  • Mutations, each against test-proof.test.mjs and each restored after:
    • (M1) drop the proofs/…json|tap alternative from verdictHolds' isRecord: red, 4/5.
    • (M2) if (false && p.dirty) in judgeProof: red, 4/5.
    • (M3) drop g.proof !== p.output_sha256 from the log-line match: red, 4/5.
  • CI at the head: box-image success. test (run 47364042068) was still queued when I posted.
  • Read only: .github/workflows and test/run.mjs aren't touched, so CI at merge is unchanged. cmdGate/gateAll aren't touched. The proof field in the log schema is optional and additive, so older lines are unaffected. Records-in-home tickets are refused with a message, and gate is unchanged for them.

Findings

Id Severity Rule Where Finding
A1 Important quality.md §3 "At an exact head" (new sentence: a reviewer may cite "a current, passing test proof … instead of rerunning it"); worker.md §6 testProofVerify passed = status==='current' && exit_code===0 "Passing" means exit 0 only. Probe 1: a proof whose own TAP says fail 1 (exit swallowed with ; exit 0, or `
A2 Important quality.md §3 new sentence ("for a test command"); worker.md §6 "instead of rerunning that command" judgeProof/testProofVerify: the command is never compared with anything Probes 2 and 3: the proof may record any command (true, printf of a fake summary, one test file of the suite, a script outside the repo such as /tmp/x.sh whose bytes are never kept), and verify still calls it current and passing. The project's test command is in settings (settings.gates[*].cmd, which gate --all runs), but verify never checks the proof against it. The docs never tell the reviewer to check either, and the cite line - Test proof: <file> current at <sha> doesn't name the command. For the governance sentence to mean what it says, verify must mark a proof whose command isn't a configured gate command as not citable, or at the very least print the mismatch, and the doc must require the reviewer to confirm the command is the full suite.
A3 Important quality.md §3 "At an exact head" (the proof must have tested "this head's code") cmdTestProof: dirtyHash runs once, before the spawn Probe 4: a command that changes tracked files while it runs and puts them back is recorded clean, and is current at a head whose code fails. HEAD and dirtyHash should be checked again after the run, and the record marked dirty (or the run refused) if either changed. A2 alone would cover most of this, but a configured command such as pnpm test that runs a pre-step can still change the tree.
A4 Important constitution.md (rules table line 21 and "governance/ and process/ change only with the owner's answer", classes governance-edit/process-edit) PR body "Governance lines"; commit ea360aa The body says cf2ec3e "is the only governance edit" and that the first commit "stands on its own". But ea360aa edits process/worker.md, also owner-only. Its §6 already says "A final reviewer may cite a current, passing proof instead of rerunning that command", the same review-evidence change as the quality.md line, and §8 step 3 changes the final-review procedure. Whatever answer the owner gives must cover both commits, and the PR should cite that answer (q-…). Don't merge either commit on reviewer approval alone.

Notes

  • Minor: record.command stores rest, not the argv gentleFlags actually ran. The record should keep what actually ran.
  • Minor: isRecord now matches .tap/.json, so fillInOnly applies to them. A modified proof that only gains or loses blank lines, or gains a - Reviewer: line, keeps the verdict holding, against the PR's "editing a committed proof voids it". verify would then report it broken. Proofs should take the add-only path, with no fill-in edits.
  • Minor: dirtyHash uses --exclude-standard, so gitignored files the tests read (.env, a built dist/) don't count as dirty.
  • Minor: the stated limit holds. A forged proof with a matching gate line written by hand into the log passes. That's acceptable only because CI still runs at merge, which I confirmed by reading.
  • Not checked: a real worker or reviewer session end to end, and non-node runners.

Opened by the box operator.

Verdict: CHANGES cf2ec3e

hhff and others added 2 commits December 4, 2026 16:14
… gate, every field bound, records in home

Fixes PR #997's finals A and B and devteam-dev's supervisor's points:
- passed needs exit 0, TAP, no failed or cancelled test and at least one pass;
  else failed or inconclusive (A1)
- with no command test-proof runs the settings' gate on main as sh -c <cmd>:
  a full proof; a named command is partial; only a full one is citable, and
  it turns partial when the gate's command on main changes (A2, F3)
- HEAD and the tree are read again after the run: a change makes it dirty (A3)
- the newest current proof of a command decides: a pass under a newer
  failure is superseded (F1)
- the gate line's proof is the sha256 of the whole record (keys sorted, all
  but log); the file's stamp must match started (F2)
- verdictHolds: an added proof keeps a verdict only when well formed; a proof
  is never filled in, so any edit voids
- a final record cites a proof by file and sha256 (the line verify prints);
  check-ticket holds the cite to verify's rule at the verdict's commit
- records-in-home tickets: run in the link's checkout of ticket/<id>, the
  link's commit recorded, the files written to home's records checkout;
  refused from home; verify reads the link's ticket branch
- the command recorded as run; the dirty check leaves out reviews/, as
  verify does; an unknown ticket is refused
- worker.md §6/§8: full vs partial, citing, the reviewer still runs one test
  command, how a reviewer's proof reaches the branch

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… reviewer still runs one test command

A test proof added after a verdict is a review-record file only when
test-proof verify finds it well formed, and editing any byte of one voids it.
A final reviewer may cite a current, full, passing proof instead of rerunning
the full suite, by the cite line verify prints (file and sha256); it still
runs at least one test command itself and the mutations it owes, as the spec
reviewer re-runs a red seen cell. A proof the record doesn't name is no
evidence the reviewer relied on. Owner-only text: waits on the owner's answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

Fixes for finals A and B and devteam-dev's supervisor's points, head 3d198d3

The new commits are cb28330c (code, tests, process/worker.md) and 3d198d3d (governance/quality.md §3 alone, on top). Nothing was rebased or force-pushed.

Id What changed
A1 passed now needs exit 0, TAP present, fail 0, cancelled 0 and pass > 0. Otherwise the proof is failed, or inconclusive (exit 0 with no TAP or nothing passing), and verify won't cite it. Tests cover each case: the exit swallowed with fail 1, true, a cancelled test, and all tests skipped.
A2 / F3 With no command, test-proof runs the settings' gate (test by default; main's committed settings, home's or the link's) as sh -c <cmd>, as merge does. That makes a full proof. A named command makes a partial one. Only a current, full, passing proof is citable. A full proof turns partial once the gate's command changes on main. The cite line names the gate and the command. Docs: worker.md §6 says the same, and quality.md §3 says "full suite" and "full ... proof".
A3 HEAD and the tree are read again after the run. A move or a leftover change makes the record dirty with changed_during_run. Tests cover a tree left changed and HEAD moved. A change undone within the run can't be seen from outside, and the PR body says so. A full proof runs the project's own command, which narrows that gap.
A4 / F5 The PR body says both commits' text is owner-only (process/ and governance/), that devteam-dev's supervisor puts one Inbox question to the owner on the final text, and that nothing merges on reviewer approval alone. The final governance text is quoted word for word.
F1 Of the current proofs of one command, the newest decides. An older pass under a newer failure is marked superseded_by. Tested both ways round, on the same code.
F2 The gate line's proof is now the sha256 of the whole record (keys sorted, every field but log, the TAP's sha256 among them), and the file's stamp must equal started. Tests edit each of these alone, and each comes out broken: command, node, tree, ended, by, gate, scope, dirty, started.
F4 There are now tests for a renamed file (sha12 mismatch) and for another ticket's proof. Both are mutation-proved.
A minor / dd 4 verdictHolds: an added proof keeps a verdict only when it's well formed at the head (the proofProblem check verify uses). Proofs never take the fill-in path, so any byte changed voids the verdict. As for every record, an edit and its exact revert count as no change. A final record cites a proof by file and sha256: verify prints the line. check-ticket holds each cite to verify's rule at the verdict's commit: the file committed with that sha256, current there, full, passed and not superseded. A proof the record doesn't name is no evidence.
dd 3 worker.md §6 "Citing a proof" and §8 step 3, and quality.md §3: the reviewer may cite a current full proof instead of rerunning the suite, but still runs at least one test command itself plus the mutations it owes, as the spec reviewer re-runs a red seen cell.
dd 1 / B note Records-in-home tickets are supported. The proof runs in the link's checkout of ticket/<id> and records the link's sha, tree and repo. Its files go to home's records checkout (records-<id>, or a review worktree's -records). From home, a run with --ticket <id> refuses rather than record home's sha. verify reads the proofs at home's ticket/<id> (or --records) and judges them against the link's ticket branch (or --sha, or this checkout's HEAD). Tests in test/test-proof.home.test.mjs.
Minors The command is recorded as actually run, after gentleFlags; a full run records sh -c <cmd>. The dirty check now leaves out the ticket's reviews/, as verify does (tested). An unknown ticket id is refused before anything is written (tested). How a reviewer's proof reaches the branch is documented in worker.md §6: it's handed over with the record and committed beside it in reviews/proofs/.

Mutations

25 mutants: 22 killed, 3 equivalent survivors. The survivors are A1's from === 'none' clause (no TAP already counts no pass), the created_by cross-check (by is inside the hash), and the repo check (reachable only with a forged log line). Details are in the PR body.

Not done (Minor)

  • gitignored files are still outside the dirty hash.
  • stderr and env aren't kept.
  • partial runs still log under the gate's name.

Local runs

All pass, run with DEVTEAM_HUB_PORT=<unused> DEVTEAM_BOX=off node test/run.mjs:

  • test-proof (9/9) and test-proof.home (2/2)
  • check-ticket, devteam-mjs-regions, kit.validate, review-dates, gate-add
  • split-dist-docs, landing, multirepo-home.records, multirepo-home.left. These four first timed out at 300 s on the loaded box, then passed with --file-timeout 1200.

CI at this head is still running.

Opened by the box operator.

@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

PR #997 review B2: the proof rules are sound, but a cite fails closed in two ordinary cases, and the owner's text overstates what a proof proves

  • Reviewer: operator-review-B2 (fresh subagent, claude-fable-5-2), not the author
  • Head: 3d198d3
  • Date: 2026-12-04T17:45Z

What I ran vs only read

Ran, in a scratch clone at the head, with DEVTEAM_HUB_PORT=<unused> DEVTEAM_BOX=off, DEVTEAM_IMAGE_HUB unset, through testslot nice -n 19 node test/run.mjs --file-timeout 1200. No fleet or real hub was touched.

  • test/test-proof.test.mjs: 9/9 pass. test/test-proof.home.test.mjs: 2/2 pass (records in home, end to end on its fixture).
  • Probe (my own fixture test, not committed): a ticket with one full proof, cited by final-1.md with the line verify prints, then seven scenarios against check-ticket:
    • S1, a record holding the cite and nothing else: passes. Nothing asks what the reviewer ran itself (F3).
    • S2, main merged into the branch after the verdict: the verdict still holds (the existing rule) and the cite still passes, since it is judged at the verdict's commit. verify at the merged head says stale. See Notes.
    • S3, the gate's command changed on main after the cite: check-ticket fails the cite as partial (the test gate's command on main is now …). Restored, it passes again. Fails closed, as documented.
    • S4, a second full proof of the same code, passing, committed after the verdict: check-ticket fails with its test proof … is no evidence at …: superseded by the newer … (F1).
    • S5, the same with a failing second proof: fails the same way, as it should.
    • S6, a failing full run whose proof is not committed: verify stays ok and check-ticket passes. The log holds that run's gate line; nothing reads it (Notes).
    • S7, the worker's live log file set aside, which is what a forge CI's checkout has before a log-sync lands: check-ticket and check-pr both fail with broken (its run (r-…) is not in the log: the kit did not record it). Put back, both pass (F2).
  • Mutation: in checkTicket, proofVerdict({ ...citeCtx, codeHead: r.sha }) changed to codeHead: sha (judge the cite at the head, not at the verdict's commit). test-proof.test.mjs stayed green, 9/9. Survived (F5). Restored after.
  • CI at the head: test success, box-image success.

Only read: the whole engine diff, verdictHolds and its merge rule, checkPr/cmdCheckPr, foldLog and the log directories, quality.md §1 and §3, worker.md §6 and §8, the two earlier finals and the fixer's reply. I did not read the other reviewer's new comment.

What held up: every fix claimed for A1 to A4 and F1 to F5 is in the code as described. No existing gate is weakened that I could find: merge's gates, check-ticket's other rules, CI and test/run.mjs are untouched; an added proof keeps a verdict only when its log line exists; an edited one voids it. Both doc commits are named as owner-only in the body and nothing merges on reviewer approval.

Findings

Id Severity Rule Where Finding
F1 Important worker.md §6 "Citing a proof" ("current there, full, passed and not superseded"); quality.md §1 point 4 devteam.mjs proofVerdict (superseded_by set for any newer current proof of the command) and checkTicket's cite check (!p.citable) defect: a newer proof that agrees supersedes the cited one, and the cite then fails check-ticket (probe S4). The plausible path is the one §6 itself describes: on risk: high, reviewer 1 cites the worker's proof; reviewer 2 runs test-proof itself and its proof is "committed beside" its record. Reviewer 1's approval now fails. There is no way back short of a new final review: the record can't be edited to name the newer proof (that voids it), and deleting or reverting the newer proof voids every verdict (a commit that adds or deletes a record never pairs). A worker who reruns test-proof after the review does the same. Supersede only on disagreement (a newer current proof of the command that did not pass), or let a cite stand when what supersedes it is itself citable. No test covers a cite under a newer passing proof.
F2 Important supervisor.md "Where a forge CI runs check-pr. It sees only the landed log"; quality.md §1 (check-ticket at the PR's exact head) devteam.mjs proofProblem (readLog() for the gate line), reached from checkTicket both through the cite check and through verdictHolds' proofOk defect: a proof's gate line is written to the worker's live log (run/log/<ticket>.jsonl, gitignored). check-pr on a forge's CI reads only the log landed on main, which the supervisor lands about once a day (log-sync, merge --chore log). Until then a cited proof is broken there and the check is red (probe S7, by setting the live file aside), and by the same path a proof committed after a verdict makes the verdict "not hold" on CI while it holds on the box. It fails closed, but it means a ticket that follows §8 step 3 and whose reviewer cites cannot pass the forge check until the log lands and the check is rerun, and the failure message ("the kit did not record it", "written or edited by hand") points at forgery, not at an unlanded log. Neither the docs nor the PR body mention it, and no test runs the cite path under a landed-only log. Either say so and word the message for it (as the result.json rule does: "refuses a result whose answer is not in that log yet"), or have check-pr in forge mode treat a missing line as not yet checkable.
F3 Important constitution (governance-edit, process-edit: the owner answers on this text); quality.md §3 "At an exact head" as changed; the PR body's own "This is evidence, not attestation" quality.md §3 new sentences; worker.md §6 "Test proofs" and "Citing a proof" contradicts: the text the owner is asked to approve is stronger than what the code gives, in two ways the PR body admits and the docs do not. (a) §6 says the log line binds the record "so an edit to any field shows" and that broken means "written or edited by hand". A session that also appends a matching gate line to its own live log file forges a proof that verify calls current, full and passed; the log is a plain file a worker writes. A proof is tamper-evident against an edit of the record, not a signature. (b) Neither doc says that a tree changed and put back within the run, gitignored files, stderr and the environment are outside what the proof binds. The body lists all of this under "Limits"; the kit's readers (the owner, every later reviewer, other projects) see only the docs. One sentence in §6 would do: what it is not, and that this is why CI and the merge gates still run. As it stands a reviewer is told broken catches a hand-written proof, which is true only of a lazy one.
F4 Minor quality.md §3 new clause "it still runs at least one test command itself, and the mutations it owes" docs only; checkTicket weak-check: the clause has no teeth. Nothing in the record's form names the reviewer's own run, and check-ticket passes a record that holds a cite and nothing else (probe S1). That is on a par with the unchecked "reads and runs that commit" before this PR, so I don't block on it, but the owner's question should say "stated, not checked". It could be checked with what the PR already has: require a citing record to also name a proof made by its own reviewer (a partial one through test-proof -- is enough), current at the verdict's commit.
F5 Minor quality.md §3 Scoped (mutations); worker.md §6 "at the verdict's commit" test/test-proof.test.mjs coverage: judging the cite at the verdict's commit and not at the head is untested (my mutant survived). The two differ only once main is merged in after the verdict (probe S2).

Notes

  • Minor, S2: after main is merged into the branch, a held verdict's cite is still "current at" the verdict's commit, though verify at the head says stale. This follows the existing rule that a verdict survives a merge of main, and a reviewer's own run would be as old; the merge gates cover it. Worth one clause in §6 so nobody reads the cite as proof of the merged head.
  • Minor, S3: a gate command changed on main fails every outstanding cite, and since the record can't be edited, each such ticket needs a new final review. Fails closed and the full-to-partial rule is documented; the consequence for approved tickets is not.
  • Minor, S6: "the newest decides" holds only among committed proofs. A failing run left uncommitted leaves a gate line in the log (ok: false, same sha, a proof hash) that verify could report. Rerun-until-green can't be closed in general, but this much is visible and unused.
  • Minor: quality.md §3's bullet is now one very long paragraph; the two new sentences would read better as their own "Test proofs" line under it. Taste, not a rule.
  • Not checked: a real worker or reviewer session end to end; a real forge CI run of check-pr (S7 simulates its log view on the fixture); a fleet move; runners other than node's TAP.

Opened by the box operator.

Verdict: CHANGES 3d198d3

@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

PR #997 final review A2: a "full" proof can still be a subset run, or sit beside a failure verify ignores

  • Reviewer: operator-review-A2 (fresh subagent, claude-opus-5-5), not the author
  • Head: 3d198d3
  • Date: 2026-12-04T17:33Z

What I ran vs only read

Everything ran in a scratch clone at the head with DEVTEAM_HUB_PORT set to an unused port, DEVTEAM_BOX=off and DEVTEAM_IMAGE_HUB unset, through testslot nice -n 19 node test/run.mjs --file-timeout 1200. No hub or fleet was touched.

  • test/test-proof.test.mjs ok (9 tests), test/test-proof.home.test.mjs ok (2), test/check-ticket.test.mjs ok, test/landing.test.mjs ok.
  • Mutations, each run against test-proof.test.mjs and restored afterwards:
    • (M1) judgeProof: dropped counts.fail > 0 || from result. Went red: not ok 4 - passed needs exit 0, TAP, ….
    • (M2) proofProblem: dropped g.proof !== proofHash(p) || (the whole-record binding). Went red: not ok 3 - broken: … any field of the record edited ….
  • Probe: my own fixture test, not committed. Settings gates on main are test: env -u NODE_TEST_CONTEXT node --test --test-reporter=tap (bare discovery) and smoke: … src/sub/good.test.mjs. The ticket head has src/sub/good.test.mjs (passes) and src/bad.test.mjs (fails).
    • P1 (cwd): test-proof run at the repo root gives exit 1, 1 pass, 1 fail. The same command run from src/ sub/ gives exit 0, 1 pass, 0 fail, and the record says scope: full. Once committed, verify --json returns ok: true, status current passed full, exit 0, and prints a cite line for it at a head whose test gate fails.
    • P2 (rerun until green): a full run with an env var that fails the test gives exit 1. I deleted those two untracked files, reran, got a pass, and committed only the pass. verify returns ok: true. The log still holds both proof-bearing gate lines at that sha (ok:false, then ok:true). Variant: the pass is committed, then a newer failure is committed, and verify correctly gives ok:false, superseded_by. Then a commit git rms the failing proof, and verify returns ok: true, exit 0.
    • P3 (another gate): test-proof --gate smoke passes, then a newer test-proof (the test gate) fails, both committed at the same head. verify returns ok: true, exit 0, and cites the smoke proof (gate smoke: …). The newest test-gate proof at that head is current failed full.
  • Earlier findings, checked:
    • A1: closed. The tests and M1 show it, and P1's root run reads as failed.
    • A3: closed as far as it can be, and tested.
    • A4/F5: closed. The body now says both commits need the owner's text and must cite the q-… id.
    • F2: closed. M2 goes red.
    • F4: tests added.
    • A2/F3: partly closed. A named command is now partial and never citable, but see I1 and I3.
    • F1: closed only for committed proofs. See I2.
  • Read only:
    • proofGates reads committedComponents() → mainSettings() at origin/main (settingsAt(mainRef())), so a ticket branch can't change the gate a full proof is held to. Good.
    • A partial run of exactly the gate's argv stays scope: partial, because scope is in the hashed record. Good.
    • verdictHolds: a proof added after V needs proofProblem clean at head. An M, D or R of a proof doesn't take fillInOnly, so it voids unless it is an exact revert. Good.
    • check-ticket's cite check judges at codeHead: r.sha with the proofs read at the checked head. A proof from a later commit with changed code comes out stale, and another ticket's proof is broken via p.ticket. Good.
    • Records in home: proofPlace requires that cwd's repo is the code repo, and repo is bound into the hash. I didn't probe this beyond test-proof.home.test.mjs.
  • CI at the head: test success (run 47376206360), box-image success.

Findings

Id Severity Rule Where Finding
I1 Important quality.md §3 (new sentence: cite "a current, full, passing test proof" "instead of rerunning the full suite"); worker.md §6 "runs the settings' test gate … as merge runs it" cmdTestProof: spawn(...gentleArgv(gp, 'sh', ['-c', configured]), { stdio, env }) has no cwd, and the record keeps none A full proof runs in whatever folder the caller is in. Merge runs the gate with cwd: wt, the worktree root (devteam.mjs ~L11109). Any gate whose meaning depends on cwd can be proved on a subset and labelled full: bare node --test, go test ./..., pytest, vitest. Probe P1: run from src/sub, the proof is full, current and passed, and verify cites it, at a head whose test gate fails at the root. Nothing has to be forged, and an honest worker in a subfolder does it by accident. Fix: run with cwd: repoRoot (and DEVTEAM_GATE_TICKET as merge sets it), and add a test that runs from a subfolder.
I2 Important quality.md §3 / worker.md §6 "Of the current proofs of one command, the newest decides: a pass under a newer failure is superseded"; final B's F1 ("a flaky or order-dependent suite rerun until green") proofVerdict reads only proofs at the records head, and testProofVerify/checkTicket never look at the log F1's threat is still open. Supersession only sees committed proofs. Probe P2: a failing full run whose files are thrown away before committing, or committed and then git rmed before the review, leaves verify and check-ticket with a lone pass: ok: true, cite printed. The log already holds the failing run as a proof-bearing gate line at the same sha. verify should let the newest log gate line carrying proof for the same gate and repo at the same code decide (the same git diff test judgeProof uses), whether or not its files are committed. Otherwise the docs' "a pass under a newer failure is superseded" holds only for a worker who chooses to commit the failure.
I3 Important quality.md §3 "instead of rerunning the full suite"; worker.md §6 "the settings' test gate … a full proof, the only kind a reviewer may cite instead of rerunning the suite" proofVerdict citable: no check of p.gate. check-ticket's cite check doesn't check it either Any gate run with --gate <name> is "full" and citable. Supersession is keyed by command, so a different gate's pass ignores a newer failure of the test gate. Probe P3: smoke passes, then the test gate fails at the same head. verify prints "a current, full proof passed", cites the smoke proof and exits 0, and check-ticket would accept that cite. Either only the test gate's proof (or every test-type gate's) should be citable as "the full suite", or ok should be false while the newest current full proof of any gate failed. The doc should say which.

Notes

  • Minor: env isn't recorded, and the full run inherits process.env. NODE_OPTIONS=--import=/tmp/x.mjs, with the file outside the repo so the run isn't dirty, can stub assertions under a full label without forging the log. This is a stronger forger than the one the PR admits to (a hand-written gate line). It's acceptable only because CI and the merge gates rerun everything, and the PR says they do. Worth one clause in worker.md §6's "evidence, not attestation".
  • Minor: TAP summary lines are summed across every # pass N the output holds. A test that logs pass 5 under the TAP reporter becomes # pass 5 and adds to the count. It can't hide a failure (fail only grows), so this is a weak-check only.
  • Minor (carried): gitignored inputs stay outside the dirty hash. stderr isn't kept. Partial runs log under the gate's name.
  • The governance text: I found no authority widened beyond what the PR states. "CI and the merge gates still run at merge" is kept in both texts. Both commits' text still needs the owner's answer (process-edit, governance-edit), and the body says so.
  • Not checked: a records-in-home run beyond the shipped tests, and a fleet move (proof gate lines that don't travel).

Opened by the box operator.

Verdict: CHANGES 3d198d3

hhff and others added 2 commits December 4, 2026 18:46
… the log's runs count, agreeing runs keep a cite, CI's unlanded log

- A-I1: a gate runs at the checkout's root with gateEnv for the ticket (DEVTEAM_GATE_TICKET), from
  any folder; the record keeps the folder (cwd), and a full proof needs '.'.
- A-I2 / B-F1: a current proof is superseded only by a newer run of the same command and folder at
  the same code that disagrees. Runs are the committed proofs and every proof-bearing gate line in
  the log (proof_cmd, proof_passed), so a thrown-away or deleted failing run still counts; an
  agreeing pass (a second reviewer's, a worker's rerun) supersedes nothing; a dirty run counts for
  nothing.
- A-I3: only the test gate's run is full; --gate <other> records partial and verify judges it so.
- B-F2: check-pr (forge) treats a proof whose run isn't in the landed log as unverifiable on CI: a
  warning, never a failure, and never a voided verdict; merge still holds it to its line. The
  missing-line message no longer says "by hand".
- B-F3 / B-F4: worker.md §6 says what a proof is not, and that the reviewer's own run is stated,
  not checked.
- B-F5: a test that the cite is judged at the verdict's commit (main merged in after it).
- Minor: TAP counts come from summary blocks (tests and pass together), so a lone "# pass N" a
  test prints adds nothing.
- New tests in test/test-proof.runs.test.mjs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…test gate is full; a newer failing run supersedes; the reviewer's own run is stated, not checked

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

Fixes for re-finals A2 and B2, head f9942f7

The new commits are f378e1ae (code, tests, process/worker.md, the log schema) and f9942f78 (governance/quality.md §3 alone, on top). Nothing was rebased or force-pushed.

Id What changed
A-I1 A gate run (no command) now spawns at the checkout's root (repoRoot), from whatever folder it's called in, with gateEnv(id, R): the env merge gives a ticket's gates, DEVTEAM_GATE_TICKET among it. The record keeps cwd (relative to the root; . for a gate run), inside the hash. A full proof needs cwd .. Tests: test-proof run from src/ still passes (the suite names src/a.test.mjs, so a run in src/ finds nothing), and a gate that checks DEVTEAM_GATE_TICKET and pwd -P against the toplevel passes from src/.
A-I2 verify and check-ticket's cite check now read the log as well as the committed proofs. A proof's gate line now also carries proof_cmd (the sha256 of the command and folder) and proof_passed (verify's passed rule), both in the schema. A current proof is superseded by a newer run with the same proof_cmd at the same code (the same git diff test) that disagrees, whether the run comes from a committed proof or only from a log line. A dirty run counts for nothing. Tests: a failing run whose files were deleted before committing supersedes the pass, and so does a failing proof committed and then git rmed. A newer pass restores verify. A dirty failing run doesn't count. In check-ticket, a cite voided by a failing rerun stays voided after the rerun's proof is dropped.
A-I3 Only the test gate is the full suite. --gate <other> records scope: partial, and the judge also requires gate === 'test'. Test: a smoke pass, then the test gate failing at the same code. The smoke proof is recorded and judged partial, verify isn't ok, and nothing is cited. A forged record (with a log line of its own) that claims full for the smoke gate, or for the src folder, is still judged partial.
B-F1 Supersession is on disagreement only, as above. Tests: a second reviewer's proof committed with final-3b.md, and a worker's rerun, both passing, leave the cite in final-3.md passing check-ticket. A failing rerun voids it.
B-F2 The CI view I chose: check-pr runs check-ticket with forge. A proof whose gate line isn't in the log it reads (on CI, only the landed log) is "unverifiable on CI (log not landed)": a devteam: warning: line, never a failure. In verdictHolds, a proof added after a verdict doesn't void it for that reason either. Merge, on the box, calls check-ticket without forge, reads the live log and still holds every proof to its line. On the box a missing line now reads "not in the log this checkout reads: the kit did not record it here (where only the landed log is read, a forge's CI, it may not have landed yet)", with no "by hand". "By hand" is kept only for a line that exists and records a different run. Documented in worker.md §6 "What a proof is not". Test: check-pr with the worker's live log set aside, as B did. The verdict holds, nothing fails, and the warning names the run. With the log in place there's no warning. verify with the log set aside says "not in the log this checkout reads" and not "by hand".
B-F3 worker.md §6 has a new paragraph, "What a proof is not". It says a proof is evidence that a run happened, not a signature. A session that can append to its own log could forge a record and its line, and verify would call it current. A tree changed and put back within the run, gitignored files, stderr and the environment (NODE_OPTIONS, say) are not bound. It also gives the CI view, and says this is why CI and the merge gates still run everything at merge. The "broken" gloss no longer says "written or edited by hand".
B-F4 Stated, not checked, in quality.md §3, worker.md §6 and the PR body. I didn't enforce it because it isn't small: a proof's by is logWriter(), which is the ticket id for the worker and for a reviewer in its review worktree alike. "by ≠ the worker" can't be told apart without a new self-asserted field, which a worker could set as easily.
B-F5 Test: after the cite, main moves on with a code change and is merged into the branch. check-ticket still passes the cite (judged at the verdict's commit), while verify at the merged head says stale. Killed the codeHead: sha mutant. worker.md §6 says the cite is no proof of the merged head.
Minor (A, TAP) The counts now come only from summary blocks: a run of # <word> <n> lines holding both tests and pass. A lone # pass 5 a test prints adds nothing (tested). A test that prints a whole block can still add, and can't hide a failure. Documented in the code comment and the PR body's limits.
B notes S2/S3 worker.md §6 now says a cite stands after main is merged in but proves nothing about the merged head, and that a gate command changed on main makes outstanding cites partial, so each such ticket needs a new final review.

Final governance text (quality.md §3), word for word

"At an exact head" keeps only its proof clause ("… (a test proof under reviews/proofs/ is one when test-proof verify finds it well formed, worker.md §6; editing any byte of one voids it) …"). The cite sentences moved to a bullet of their own, as B's note suggested:

Test proofs. Instead of rerunning the full suite, a final reviewer may cite a current, full, passing test proof, one test-proof verify prints a cite line for (worker.md §6), by putting that line in the record, which names the proof by file and sha256 (- Test proof: <file> sha256:<hex> …). Only a run of the test gate as merge runs it is full, and a newer run of the same command at the same code that failed supersedes a pass, whether or not its proof was committed. The reviewer still runs at least one test command itself, and the mutations it owes, as the spec reviewer re-runs a red seen cell; this is stated, not checked, since check-ticket can't tell the reviewer's run from the worker's. A proof the record doesn't name is no evidence the reviewer relied on. A proof is evidence that a run happened, not a signature. CI and the merge gates still run at merge.

It still needs the owner's answer (governance-edit), as does worker.md (process-edit). The merge cites the q-… id. Nothing merges on reviewer approval alone.

Mutations

15 new mutants, each in a copy of the worktree with the relevant test file run, all 15 killed:

  • A-I1: no cwd on the spawn; gateEnv(null)
  • A-I2: log-only runs ignored; dirty log lines counted
  • A-I3: the judge's test-gate check dropped; the judge's root check dropped; the run's scope full for any gate
  • B-F1: supersede regardless of agreement
  • B-F2: landedOnly ignored in proofProblem; not passed by verdictHolds; not passed by judgeProof; check-pr not passing forge; the warning branch removed
  • B-F5: codeHead: r.sha changed to codeHead: sha
  • the TAP block needing only pass

I checked that each was killed by the assertion meant for it, not by a timeout. Running the whole file caught one real bug: a folded log object keeps created_at, not at, and my first comparison read undefined. The "newer pass restores" assertion caught it, and it's fixed.

Local runs

All pass, run with DEVTEAM_HUB_PORT=<unused> DEVTEAM_BOX=off node test/run.mjs --file-timeout 1200:

  • test-proof (9/9), test-proof.runs (4/4, new) and test-proof.home (2/2)
  • check-ticket, devteam-mjs-regions, kit.validate, gate-add, landing, multirepo-home.left, multirepo-home.records, review-dates, split-dist-docs

The new tests are in their own file, because test-proof.test.mjs with them came close to the 1200 s watchdog on the loaded box.

CI at this head is still running; I'll follow it.

Opened by the box operator.

…nd 20 pass what follows a file to the test)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

Head 2778272: CI green

At f9942f78, CI's Node 18 and 20 shards failed the new A-I3 test. The smoke gate was … src/a.test.mjs --test-name-pattern=two, and Node 18 and 20 read anything after a file as another file to test ("Could not find '…/--test-name-pattern=two'"). The test-only commit 2778272d puts the pattern before the file. I reproduced the failure with Node 20 locally, and test-proof.runs now passes on Node 20 (4/4).

The Node 22 chrome shard also failed once, in dashboard-pages "settings area" (the fleet-move "Left before the move" line). No other recent run shows that failure, and the file passes locally with Chrome (ok 3 - settings area, nothing skipped). It's unrelated to this PR.

CI at 2778272d: test success (run 47408345736), box-image success.

The governance text is unchanged from my previous comment. f9942f78 is still the only commit touching governance/quality.md, and 2778272d touches only test/.

Opened by the box operator.

@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

PR #997 review b3: the earlier fixes hold under a worker's and a second reviewer's hands, but verify and check-ticket now pay for every proof run the log has ever held

  • Reviewer: operator-review-b3 (fresh subagent, claude-fable-5-2), not the author
  • Head: 2778272
  • Date: 2026-12-04T20:30Z

What I ran vs only read

Everything ran in a scratch clone at the head, DEVTEAM_HUB_PORT on an unused port, DEVTEAM_IMAGE_HUB unset, DEVTEAM_BOX=off, through testslot nice -n 19 node test/run.mjs --file-timeout 600, one file at a time. No fleet or real hub was touched.

  • test/test-proof.test.mjs 9/9, test/test-proof.runs.test.mjs 4/4, test/test-proof.home.test.mjs 2/2.
  • Probe 1, a worker gaming it (my own fixture fleet, not committed; the head's code fails its test unless said otherwise):
    • NODE_OPTIONS=--import=<file outside the repo> that stubs assert.equal: the proof is current passed full, verify exits 0 and prints the cite line. worker.md §6 says the environment is not bound, so this is as documented. An honest run after it (files thrown away) supersedes it: verify not ok.
    • git update-index --skip-worktree src/a.mjs, then the file edited to pass: git status is empty, the record says dirty: false, and verify cites it at a head whose committed code fails (N1).
    • A test that prints # tests 50 / # pass 50 / # fail 0, and a whole summary block from an exit handler: node's TAP reporter escapes both (# \# tests 50), the counts stay 2 tests, 1 pass, 1 fail, the proof is failed. Held.
    • A failing run committed and then deleted, and one never committed: both still supersede. Held.
    • A named command with the gate's exact argv at the root (test-proof -- sh -c '<gate cmd>'), failing: recorded partial, and it supersedes the full pass (same command and folder). Fails closed.
    • Pass P cited in final-1.md, then a failing run, then a newer pass P2 committed: verify exits 0 and cites P2; check-ticket still fails final-1.md ("superseded by the newer run …") (N2).
  • Probe 2, a forge's CI and a second reviewer:
    • A proof written wholly by hand (no log line forged), full and passing at a failing head, cited by final-1.md. check-ticket on the box: fails, "not in the log this checkout reads". check-pr with the live log set aside: no failure from the cite, one warning ("unverifiable there until the log lands"). check-pr with the live log in place prints the same warning and no failure, since cmdCheckPr always passes forge: true (N3). Merge calls checkPr without forge (read, devteam.mjs ~L10836), so the box still refuses it.
    • Second reviewer: review-worktree <id> <sha> --name b; test-proof verify <id> there prints the worker's cite line; test-proof --ticket <id> there writes a full, clean proof at the reviewed sha; copied to the branch and committed with final-2b.md after final-2.md cited the worker's proof, check-ticket raises nothing about the cite or the verdict. A mutated run in the review worktree is dirty and voids nothing. review-worktree --remove then removes it.
  • Probe 3, cost as the log grows: one ticket, one full proof, one citing record. Then 400 proof-bearing gate lines appended to the log for 400 other commits, all dated months before the proof (what other tickets' proofs leave). Wall time, two runs each: test-proof verify 1.0 s and 1.7 s before, 40.8 s and 41.8 s after; check-ticket 2.1 s and 1.5 s before, 19.4 s and 16.0 s after. verify's answer is unchanged (ok). Not niced and outside the fixture, one git cat-file -e plus one git diff --quiet pair took 52 ms at load 12 (F1).
  • Mutations (each restored after):
    • M1, proofVerdict's log loop without || !isSameCode(l.sha) (a log run at any code counts): test-proof.runs.test.mjs stayed green, 4/4. Survived (N4).
    • M2, the after-run tree check dropped (changed = HEAD moved only): test-proof.test.mjs test 7 red. Killed.
    • M3, citable without passed: test 5 red. Killed.
  • CI at the head: test success (run 47408345736), box-image success.
  • Only read: the whole engine diff, verdictHolds, checkTicket, checkPr/cmdCheckPr, merge's gate loop (sh -c, cwd: wt, gateEnv(id, R)), readLog/durableText, the log schema, quality.md §1 and §3, worker.md §6 and §8, all four earlier finals and both replies.

Every fix claimed for A-I1, A-I2, A-I3, B-F1, B-F2, B-F3, B-F4 and B-F5 is in the code and behaved as described when I drove it. I found no authority widened beyond what the body states: both doc changes are named owner-only, the body says nothing merges on reviewer approval, and merge's gates, test/run.mjs and the workflows are untouched.

Findings

Id Severity Rule Where Finding
F1 Important quality.md §1 (merge runs check-ticket at every head; worker.md §8 step 4); worker.md §6 "superseded by a newer run … at the same code" devteam.mjs proofVerdict, the loop over readLog().byType.get('gate') and isSameCode defect: for every proof-bearing gate line in the whole log, of every ticket, at any date, the loop spawns git cat-file -e and git diff --quiet <its sha> <head> before anything cheaper is asked. A line older than every current proof can never supersede one, and another ticket's line is never the same code, yet each is paid for, once per verify and once per citing record in check-ticket (the memo is per call). Probe 3: 400 old lines take verify from about 1.5 s to 41 s and check-ticket from about 2 s to 17 s. §8 step 3 now has every ticket leave at least one such line and reviewers more; I found nothing that prunes them, and on a forge's CI the landed log holds them all. A fleet merging a few dozen tickets a day reaches 400 lines in about a week and 4,000 in a few months, at which point every check-ticket of a citing ticket (so every merge, and every check-pr) spends minutes here. Fix is small: before isSameCode, skip a line whose created_at is not after the oldest current proof's ended (it can supersede nothing), and only then ask git; a test with old lines at other commits would also kill M1.

Notes

  • N1, Minor (worker.md §6 "What a proof is not"): skip-worktree or assume-unchanged on a tracked file hides a lasting edit from dirtyHash (git status and git diff HEAD both read the index flags). The list of what is not bound names a tree "changed and put back within the run", gitignored files, stderr and the environment; this one is none of those and needs no log edit. Either refuse to run while git ls-files -v shows such a file, or add it to the list.
  • N2, Minor (worker.md §6 "Citing a proof"): once any newer run of the command at the same code fails, a cite of the earlier pass is dead for good, even after a still newer pass; verify at the same moment exits 0 and prints a cite line (for the newer proof). The record can't be edited to name it, so the ticket needs a new final review. That follows the rule as written, and fails closed, but on a loaded box a flaky failure by a second reviewer costs the first reviewer's approval. §6 says this for a changed gate command; it should say it here too.
  • N3, Minor: check-pr is always in forge mode, also when a supervisor runs it on the box with the live log present. There a proof whose line is in no log gets the warning "not in the landed log … unverifiable there until the log lands", though check-ticket at the same head calls it broken. The message could say that check-ticket and merge decide on the box.
  • N4, Minor (quality.md §3 Scoped, mutations): M1 survived. Nothing tests that a newer failing log run at other code (another ticket's, or this ticket's after main is merged in) leaves a cite standing.
  • N5, Minor (docs against code, wording): worker.md §6 quotes the warning as "unverifiable on CI until the log lands"; the engine prints "unverifiable there until the log lands". quality.md §3 says a newer run "that failed" supersedes a pass; the engine supersedes on any newer run that did not pass, an inconclusive one included. worker.md §6 says a proof's by is the ticket "for the worker and its reviewers alike": in a review worktree with no DEVTEAM_TICKET in the environment, bare test-proof refuses ("name the ticket"), and with --ticket the record and its gate line are written as supervisor (probe 2). It is the ticket only when the reviewer's session inherits the worker's environment.
  • N6, Suggestion: the .tap is the suite's whole stdout, committed on the ticket branch and so merged to main with the ticket, one per proof. Nothing caps it, and the gitleaks gate (quality.md §2, L-SEC-8) will read it. §8 step 3 reads as an order to every worker, also where the project's test gate prints no TAP (the proof is then inconclusive and the run bought nothing) and after step 1 already ran the gates; it could say "where the test gate prints TAP" and that the step 1 run of the test gate can be the test-proof run.
  • Not checked: a real worker or reviewer session end to end; a real forge CI run (I set the live log aside on the fixture); records in home beyond the shipped test file; a fleet move (whether unlanded proof lines travel); runners other than node's TAP reporter. I did not rerun the neighbouring files (check-ticket, kit.validate, split-dist-docs, regions); CI ran them green at this head.
  • My first probe run started with the working set at 43 (the gate is under 42); testslot's own gate let it through. Later runs waited on the gate first.

Opened by the box operator.

Verdict: CHANGES 2778272

@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

PR #997 review a3: the claimed fixes hold under probe; no Critical or Important found, five Minor items

  • Reviewer: operator-review-a3 (fresh subagent, claude-opus-5-5), not the author
  • Head: 2778272
  • Date: 2026-12-04T20:37Z

What I ran vs only read

Everything ran in a scratch clone at the head with DEVTEAM_HUB_PORT set to an unused port, DEVTEAM_BOX=off and DEVTEAM_IMAGE_HUB unset, through testslot nice -n 19 node test/run.mjs --file-timeout 1200, one file at a time. No hub or fleet was touched.

  • Baseline: test-proof.test.mjs 9/9 pass (230 s), test-proof.runs.test.mjs 4/4 (477 s), test-proof.home.test.mjs 2/2 (59 s).
  • Probe (my own fixture test file, deleted afterwards), on the same fixture shape as test-proof.runs:
    • A. A full pass P is committed, then a failing full run F. F's .tap is removed so its committed proof is broken, and a final record cites P. I expected a broken committed F to hide its log line from supersession. It doesn't: judgeProof leaves log off a broken view, so F's gate line still counts. Both verify and check-ticket say "superseded by the newer run r-… (in the log …)". The A-I2 fix holds here too.
    • B. A pass P, then a plain gate test -- sh -c <the same command> that fails at the same code: P stays not superseded (Minor m1).
    • C. A hand-written proof whose log id never existed (g-20991231-…), cited by a final APPROVE. check-pr (always forge: true, run here on the box with the live log present) gives only the warning "not in the landed log … unverifiable there until the log lands". check-ticket (as merge calls it, no forge) fails it as broken (… not in the log this checkout reads …). So the B-F2 fix does what the body says, with Minor m2.
    • TAP: real Node 22 output of a test that prints # tests 1 / # pass 1 / # fail 0 and a process.on('exit') # fail 0. Node escapes these as # \# fail 0, and the 1..N plan line always comes between test output and the summary block, so a test's output can't join the real summary and override fail (first key wins within a block). The counts only add, as the body says.
  • Mutations (each one in the clone, the named file run, restored with git checkout after; the tree is clean at the end):
    • proofResult without counts.cancelled > 0: red (not ok 4). Killed.
    • verdictHolds added proof return !isProof(file) || proofOk(file) → return true: red (not ok 9). Killed.
    • proofProblem treats every missing line as unlanded (drop landedOnly): red (not ok 3). Killed.
    • cmdTestProof after-run check without the dirtyHash comparison: red (not ok 7). Killed.
    • proofVerdict compares the supersession time the wrong way (r.at < p.ended): red (runs 1, 2, 3). Killed.
    • checkTicket drops the malformed-cite failure: red (not ok 9). Killed.
    • proofVerdict log-run loop without !isSameCode(l.sha): survived, test-proof.runs 4/4 green (Minor m3). It can only add supersession, so it fails closed.
  • CI at the head: test success (run 47408345736), box-image success.
  • Read only: the whole engine diff and its callers. cmdMerge calls checkPr without forge (L10836), so merge reads the live log and enforces every proof line. cmdCheckPr always passes forge: true (L8299). Merge's gate loop (detachedWorktree, sh -c, gateEnv, covered_by) is untouched, as are .github/workflows and test/run.mjs, so nothing weakens what merge or CI run. runDir comes from the common git dir, so a review worktree's runs land in the same live log as the worker's. The log schema fields are optional. I also read quality.md §1 and §3, worker.md §6 and §8, all five earlier review comments and the author's replies 7421603178 and 7422451505.
  • Earlier findings, checked: A-I1 (gate at root, gate env) in code and tested. A-I2 holds, including a broken committed failure (probe A). A-I3: the judge needs gate === 'test' and cwd === '.', and scope is in the hash. B-F1: agreeing runs don't supersede, tested. B-F2: warning only on check-pr, strict at merge (probe C). B-F3: "What a proof is not" is in worker.md §6. B-F4: "stated, not checked" is in quality.md §3, worker.md §6 and the PR body (see m4). B-F5: tested, and the mutant is killed per the author; I didn't rerun it.
  • Governance: the body says plainly, under its own heading, that the process/ and governance/ text needs the owner's answer through one Inbox question, that the merge cites the q-… id, and that nothing merges on reviewer approval alone. I checked each named commit: cf2ec3e3, 3d198d3d and f9942f78 touch only quality.md, and 2778272d only test/. I found no authority widened beyond what the body states. "CI and the merge gates still run at merge" is in both texts, and the code agrees.

Findings

Findings: none (no Critical or Important).

Notes

  • m1 (Minor, quality.md §3 "a newer run of the same command at the same code that failed supersedes a pass"): only test-proof runs carry proof_cmd. A plain gate test -- <same command> failure, the way worker.md §6 tells workers to run every gate, never supersedes (probe B). Worth one word in the owner's text: "a newer test-proof run".
  • m2 (Minor): check-pr is always forge-mode, on CI and on the box alike. It treats any missing proof line as "not landed yet", even an id that can never land (probe C). quality.md §3's "well formed when test-proof verify finds it so" is therefore weaker on CI than on the box. worker.md §6 says so, but quality.md doesn't. Merge enforces it, so this is not a gap in the gate. It could say "missing" when the landed log of that file is already newer than the id's time.
  • m3 (Minor, coverage): the same-code test for log-only runs isn't covered by any test (the mutant survived). Today it only prevents false voids, for example a failing run at code later reverted.
  • m4 (Minor): worker.md §8 step 3 repeats "it still runs at least one test command itself" without "stated, not checked". §6 right above says it, so this is only a wording note.
  • m5 (Minor, cost): proofVerdict reads every proof-bearing gate line in the fleet's log, from every ticket, and runs a cat-file plus a git diff for each distinct sha. That grows with history on every check-ticket and verify. Filtering by created_by === id would keep the semantics, since a reviewer's by is the ticket too.
  • For the owner's question: a newer pass makes a pass citable again after a failure ("a failure by a newer pass", worker.md §6), so a flaky suite rerun until green yields a citable proof. That is intended and documented in worker.md, but quality.md §3 states only the other direction. The owner should see both.
  • Not checked: a real worker or reviewer session end to end, a real forge CI check-pr run (simulated on the fixture), records in home beyond the shipped test, runners other than node's TAP, and a fleet move.

Opened by the box operator.

Verdict: APPROVE 2778272

hhff and others added 3 commits December 4, 2026 21:00
…it; an index-flagged file makes a run dirty

proofVerdict asked git (cat-file -e, diff --quiet) about every proof-bearing
gate line in the log, of every ticket, at any date (round-3 B-F1). Now a log
line is skipped unless its command is one a current proof ran and it is
newer than the oldest such proof's end; only then is its commit asked about,
through codeSince, memoized per process for each head and commit and shared
with judgeProof, so check-ticket judging several cites asks once a commit.
A test appends 400 old lines and counts git probes through a test-only
stderr trace (DEVTEAM_TEST_PROOF_TRACE); two newer failing runs at other code
leave the pass citable (kills the same-code mutant, B-N4/A-m3).

dirtyHash reads git ls-files -v: a tracked file marked skip-worktree or
assume-unchanged hides its changes from status and diff, so its being marked
makes the run dirty (B-N1). check-pr's unlanded warning says check-ticket and
merge fail a missing line on the box (B-N3/A-m2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s; by as written; index flags; the warning as printed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…supersedes; both directions; check-pr warns where check-ticket fails

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

Round-3 fixes at 1aef264

Replies to b3 (issuecomment-7423405659, CHANGES) and a3 (issuecomment-7423574959, APPROVE with minors). Three commits on top of 2778272, no rebase: bf99f02b (engine and tests), 39eae4c6 (worker.md, process), 1aef2644 (quality.md §3, governance, alone).

  • B-F1 (Important), and A-m5. Fixed in proofVerdict. A log line is now skipped before git is asked unless its proof_cmd is a command some current proof ran and its created_at is after the oldest such proof's ended (an older line or another command's line can supersede nothing). Only then is its commit asked about, through a new codeSince(ctx, sha) ('same', 'changed' or 'missing'). It is memoized per process for each repo, head, exclude and commit, and judgeProof uses it too, so check-ticket judging several cites asks once per commit. Cost now grows with recent runs of the proven command, not with the log's age. I did not filter by created_by === id (A-m5): a supervisor-run review proof is written as supervisor (see B-N5), so that filter would drop real runs. New test in test-proof.runs.test.mjs: 400 old failing proof lines (half this command, half others, each at its own commit) plus two newer failing runs of the command at other code. A test-only stderr trace (DEVTEAM_TEST_PROOF_TRACE, one line per commit git is asked about) gives a deterministic count: none of the 400 commits is probed, the other-code commit is probed exactly once, no commit twice, and the total is at most the earlier proof commits plus one.
  • B-N4 / A-m3. The same test asserts that a newer failing log run at other code leaves the pass citable. Mutant "log loop without the same-code check": killed ("a failing run at other code supersedes nothing").
  • A-m1. I changed the text, not the code: "a newer test-proof run", and "a plain gate run does not" (quality.md §3, worker.md §6). That is correct as built. A plain gate line carries no proof record, its argv goes through gentle flags so its command key need not match, and nothing binds its result to TAP counts. Letting it supersede would be a second, looser rule.
  • A-m4. worker.md §8 step 3 now ends "(stated, not checked, as §6 says)".
  • B-N5. worker.md §6 now quotes the warning as the engine prints it: "unverifiable there until the log lands". Supersession now reads "did not pass (failed or inconclusive)" in quality.md, worker.md and the body, matching r.passed !== passed. by is now stated as it is: the log's writer. That is the ticket in the worker's session and in a reviewer session that inherits its DEVTEAM_TICKET, and supervisor for a run in a review worktree with --ticket from the supervisor's session. It is never the reviewer.
  • B-N2 and a3's governance note. quality.md §3 and worker.md §6 now give both directions. After a newer run that did not pass, a cite of the earlier pass is dead, even after a still newer pass, and the ticket needs a new final review. That newer pass is citable in its turn, so a flaky suite rerun until it passes yields a citable proof. The PR body repeats this plainly under the governance heading, for the owner's question.
  • B-N1. I added detection, not just a line in the docs. dirtyHash reads git ls-files -v. A tracked file flagged S (skip-worktree) or lowercase (assume-unchanged) makes the tree dirty, and its name and bytes go into the hash. New case in test-proof.test.mjs test 7, for both flags: git status is empty and the record is dirty: true. Mutant "dirtyHash without the index-flag check": killed ("skip-worktree: a marked file makes the run dirty").
  • A-m2 / B-N3. quality.md §3 now says check-pr reads only the landed log wherever it runs and only warns about a cited proof missing from it, while check-ticket, and so merge, reads the live log and fails it. The engine's warning now ends "check-ticket and merge, on the box, read the live log and fail it if it is missing there".
  • B-N6 (suggestion): not taken in this round.

Mutations this round: 4, all killed. The fourth, codeSince without its memo, was killed after I made the test use two newer runs at one commit ("asked about once").

Local runs at the final code (testslot nice -n 19 node test/run.mjs --file-timeout 1200, DEVTEAM_HUB_PORT=4996 DEVTEAM_BOX=off, one file at a time): test-proof.runs 5/5, test-proof 9/9, test-proof.home 2/2.

Final governance text (quality.md §3), word for word

  • Test proofs. Instead of rerunning the full suite, a final reviewer may cite a current, full, passing test proof, one test-proof verify prints a cite line for (worker.md §6), by putting that line in the record, which names the proof by file and sha256 (- Test proof: <file> sha256:<hex> …). Only a run of the test gate as merge runs it is full. A newer test-proof run of the same command at the same code that did not pass (failed or inconclusive) supersedes a pass, whether or not its proof was committed; a plain gate run does not. Once one has, a cite of the earlier pass is dead, even after a still newer pass, and the ticket needs a new final review; that newer pass is citable in its turn, so a flaky suite rerun until it passes yields a citable proof. A newer pass supersedes no pass. check-pr, which reads only the landed log as on a forge's CI wherever it runs, only warns about a cited proof whose run is not in that log; check-ticket, and so merge, reads the live log on the box and fails it. The reviewer still runs at least one test command itself, and the mutations it owes, as the spec reviewer re-runs a red seen cell; this is stated, not checked, since check-ticket can't tell the reviewer's run from the worker's. A proof the record doesn't name is no evidence the reviewer relied on. A proof is evidence that a run happened, not a signature. CI and the merge gates still run at merge.

Opened by the box operator.

@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

PR #997 review b4: the round-3 cost fix removes the old-line cost and the filter drops no run that should supersede; one cost path is left (newer full-gate runs of other tickets), Minor

  • Reviewer: operator-review-b4 (fresh subagent, claude-fable-5-2), not the author
  • Head: 1aef264
  • Date: 2026-12-04T23:27Z

What I ran vs only read

Everything ran in a scratch clone at the head, DEVTEAM_HUB_PORT on an unused port, DEVTEAM_IMAGE_HUB unset, DEVTEAM_BOX=off, through testslot nice -n 19 node test/run.mjs --file-timeout …, one file at a time, on a loaded box (load 24 to 36). No fleet or real hub was touched. The probe was a fixture test file of my own on the shape of test-proof.runs.test.mjs, not committed.

  • Cost probe (one ticket, one full proof, one citing final record; wall time, two runs each, niced):

    Log state test-proof verify check-ticket
    baseline 2.1 s, 6.0 s 6.8 s, 4.8 s
    + 400 old failing lines of this command, commits not in the clone 3.2 s, 2.1 s 4.5 s, 4.3 s
    + 400 old failing lines of this command, at 400 real other commits 1.7 s, 1.4 s 3.5 s, 2.0 s
    + 400 newer failing lines of this command, commits not in the clone 23.8 s, 16.2 s 15.2 s, 18.0 s
    + 400 newer failing lines of this command, at 400 real other commits 84.0 s, 55.1 s 24.5 s, 52.2 s

    b3's F1 as stated (old lines, 41 s) is fixed: old lines now cost nothing measurable. In the last state the trace shows 806 commits asked about, and the answer stays right (ok, the cite stands). See N1.

  • Trying to make the filter drop a run that should supersede (all on the fixture; "held" means the pass was superseded as it should be):

    • A failing test-proof -- sh -c '<gate cmd>' at the root, files thrown away: same proof_cmd as the full proof, supersedes. Held. A newer pass is then citable, the older pass is not.
    • A failing full test-proof called from src/: runs at the root, supersedes. Held.
    • A failing named command run in src/ (cd .. && <suite>): another folder and argv, another key, supersedes nothing. As worker.md §6 says ("in the same folder").
    • A failing run by the supervisor, test-proof --ticket <id> in a review-worktree: the record's by is supervisor, its line is in the supervisor's log, verify says superseded, and check-ticket fails a final-1.md citing the pass ("superseded by the newer run r-…-supervisor (in the log …)"). Held.
    • Ordering, with hand-made log-only failing lines against two committed passes pa (older) and pb: at exactly pa.ended, and at pa.started: supersedes nothing (not newer). At pa.ended + 1 ms, and between the two: supersedes pa only, pb stays citable. At pb.ended + 1 ms: both superseded, not ok. Newer and inconclusive (ok: true, proof_passed: false), newer with no proof_passed, newer at an earlier commit with the same code: all supersede. Newer and dirty, or with no proof_cmd: nothing. So the filter (created_at after the oldest current proof's ended for that key) passes exactly the lines the final compare (r.at > p.ended) could use; I found no run it drops wrongly. Read: since is the minimum over current proofs, and the final loop only judges current proofs, so the two agree.
  • Hiding an edit from the dirty check: skip-worktree and assume-unchanged with a lasting edit: dirty: true both. skip-worktree on an unchanged file: dirty: true too (as worker.md says, a marked file is dirty whether or not it changed). A clean filter that returns the committed bytes (.git/info/attributes): plain git status still shows the file modified, the run is dirty. A same-size edit with the mtime put back under core.checkStat=minimal and core.trustctime=false: git status is empty, ls-files -v shows H, and the record says dirty: false (N3).

  • Mutations (both applied in the clone, the named file run, restored with git checkout after; the tree is clean at the end):

    • since kept as the newest current proof's end in place of the oldest (<= → >=): test-proof.runs.test.mjs red, not ok 2 (4 pass, 1 fail). Killed.
    • dirtyHash's index-flag regex without the lowercase letters (assume-unchanged not seen): test-proof.test.mjs red, not ok 7 ("assume-unchanged: a marked file makes the run dirty"; test 9 after it also red). Killed.
    • I did not rerun the author's four mutants or the three files unmutated; the mutant runs show the other tests of both files green at this code, and CI ran all three files green on Node 18, 20, 22 and 24.
  • CI at the head: box-image success. test failure (run 47425279278): one job, kit (24, chrome 2/5), one test, test/project-hosts-e2e.test.mjs "C3 PL-S7: a reload, and a second browser with the session, show the same project". The same test fails on main at 3f207ad (kit (22, chrome 5/5), run 47436497432) and at 554b7f7 (kit (24, chrome 2/5), run 47423456366), and main's newest run is green: a flake on main. The PR touches no file of it (only the two docs, the schema, devteam.mjs's proof code and three test-proof* files). Not caused by the PR.

  • Only read: the delta 2778272d..1aef2644 whole, proofVerdict, codeSince, judgeProof, proofProblem, dirtyHash, cmdTestProof, checkTicket's cite loop, cmdCheckPr/checkPr/merge's call, appendLog/logWriter, quality.md §1 and §3, worker.md §6 and §8, b3, a3 and the author's reply.

Governance: the delta widens nothing. The quality.md change is alone in 1aef2644, the worker.md change alone in 39eae4c6, the body still says both need the owner's answer and that nothing merges on reviewer approval. Merge's gates, test/run.mjs and the workflows are untouched.

Findings

Findings: none (no Critical or Important).

Notes

  • N1, Minor (worker.md §8 step 4, check-ticket at every head; the body's "Cost" paragraph): the cost that is left grows with the fleet, not with the ticket. A full proof's proof_cmd is the same for every ticket of a repo (sh -c <the test gate> at .), so every other ticket's full test-proof run made after this ticket's oldest current proof ended passes the cheap filter and costs a cat-file and a diff (one spawn when the commit is not in the clone). 400 such lines: verify 55 to 84 s, check-ticket 25 to 52 s here, niced on a loaded box. §8 step 3 has every ticket leave such a line, so a ticket merged within hours of its proof pays for a handful, one that waits a day in a busy fleet for perhaps a hundred (several seconds to 20 s a check), one parked a week for the table's last row on each check-ticket and merge. The answer is always right, and it is bounded by the wait, which is why I hold it Minor where b3's unbounded form was Important. Cheap ways out: write the ticket on the proof line and compare it before asking git (a supervisor's review run names the ticket with --ticket, so nothing real is dropped, unlike a3's created_by filter); or ask about all candidate commits in one git cat-file --batch-check and diff only those present. The test's 400 lines are all older than the proof, so nothing covers this path.
  • N2, Minor (docs against code, the owner's text): quality.md §3 says "check-pr, which reads only the landed log as on a forge's CI wherever it runs". On the box check-pr reads the live log like everything else (readLog; the PR's own test asserts no warning there when the run is in the live log, and a failing run in the live log supersedes there too). What is the same wherever it runs is only that a cited proof whose run is in no log it reads gets a warning, not a failure. Since the owner answers on this sentence word for word, it could read: "check-pr, which on a forge's CI reads only the landed log, only warns, wherever it runs, about a cited proof whose run is not in the log it reads".
  • N3, Minor (worker.md §6 "What a proof is not"): an edit hidden by the stat cache (same size, mtime restored, core.checkStat=minimal, core.trustctime=false in the clone's config) leaves git status empty with no index flag, and the record says dirty: false. Same class as b3's N1 and needs no log edit; the list of what is not bound could name "an edit git's stat cache does not see", or dirtyHash could run git update-index --really-refresh (or status with -c core.checkStat=default -c core.trustctime=true) first. The section already says a proof is no signature, and CI and the merge gates run at merge.
  • N4, Minor: a sparse checkout marks every excluded file S, so every proof run in one is dirty and nothing is citable there. The kit sets no such flag itself (I searched devteam.mjs). One line in worker.md §6 would save a worker the puzzle.
  • N5, Suggestion: the comment above proofVerdict still says "a pass by a newer failure, a failure by a newer pass" and "for this repo and gate"; the code and docs now say "did not pass", and the log loop filters by repo and command, not gate. A committed proof is ordered by ended and a log-only run by its line's created_at (written after the second tree check), so a run that ended just before a pass ended can count as newer when only its line is left; it fails closed.
  • Docs otherwise agree with the engine as I read and drove it: "did not pass (failed or inconclusive)" is r.passed !== passed; "a plain gate run does not" (no proof_cmd); both directions of supersession (probe); by as the log's writer (supervisor in the review worktree, probe); the warning text as printed ("unverifiable there until the log lands"); §8 step 3's "(stated, not checked, as §6 says)".
  • Not checked: a real worker or reviewer session end to end; a real forge CI check-pr run; records in home beyond CI's run of the shipped file; a fleet move; per-probe cost un-niced on an idle box (my times are upper-end). Two of my hand-made lines (second-precision time, a supervisor line in the ticket's log file) superseded nothing; I take that as the log reader refusing a malformed line and did not chase it, since the engine writes neither.

Opened by the box operator.

Verdict: APPROVE 1aef264

@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

PR #997 review a4: delta final after round 3 (B-F1 git cost, index-flag dirtiness, doc sync)

  • Reviewer: operator-review-a4 (fresh subagent, claude-opus-5-5), not the author
  • Head: 1aef264
  • Date: 2026-12-04T23:25Z

What I ran vs only read

Scope: git diff 2778272d..1aef2644, reading engine bf99f02b, worker.md 39eae4c6 and quality.md §3 1aef2644, plus the code they call: proofVerdict, judgeProof, proofProblem, cmdTestProof, dirtyHash, checkTicket's cite block, logWriter/currentTicketId, appendLog's at, and cmdCheckPr's forge: true.

Tests, scratch clone, one file at a time through testslot nice -n 19 node test/run.mjs --file-timeout 600, with DEVTEAM_HUB_PORT set to a throwaway port and DEVTEAM_IMAGE_HUB unset:

  • test/test-proof.runs.test.mjs: ok (5 tests, 170.6 s)
  • test/test-proof.test.mjs: ok (167.4 s)
  • test/test-proof.home.test.mjs: ok (22.5 s)

Mutations: each was applied to devteam.mjs in the scratch clone and the file was restored afterwards. All 5 went red.

# Mutation Test file Result
M1 since keeps the newest current proof's end instead of the oldest (<= to >=) runs red: test 2, where the thrown-away failure no longer supersedes p1
M2 codeSince with no memo (if (true)) runs red: test 5, "asked about once"
M3 the cheap filters removed from the log loop (back to git for every line) runs red: test 5, where the fake old commits get probed
M4 dirtyHash returns null when status is empty, ignoring hidden test-proof red: test 7
M5 the index-flag regex without S (skip-worktree missed) test-proof red: test 7

Probes, by reading the code:

  • The B-F1 filter can't drop a real superseder. A log run supersedes proof p only when r.key === key(p), r.at > p.ended and it disagrees. The filter keeps a line only when proof_cmd is a key some current proof has and created_at > min(ended) over the current proofs of that key. That is a necessary condition of superseding, so nothing that could supersede is skipped. Both ended and the line's at/created_at come from toISOString(), so the string comparison is the same one the supersede loop already does. Clock skew is therefore no worse than before this change: the filter adds no comparison of its own.
  • cwd. A proof whose command key differs only by cwd has a different proofRunKey in both the committed and the log path. This was already true before the PR. A full proof always runs at the root (.), so it doesn't affect full proofs.
  • Supervisor-run proof. The key doesn't include by, and the log scan isn't filtered by writer, so a supervisor-written run still counts.
  • Missing and non-string at. These behave as before. A non-string created_at was excluded by the supersede loop's typeof r.at check anyway.
  • Memo key. It is (codeR.name, codeHead, codeExclude, sha). checkTicket calls proofVerdict with codeHead: r.sha per verdict, and the exclude is per ticket, so there's no cross-ticket or cross-head bleed.
  • Index flags. ls-files -v -z reports assume-unchanged in lowercase and skip-worktree as S, and the regex matches exactly those. The file's name and bytes go into the hash, and the same pathspec and exclude are used as for status.
  • Docs against the engine. I checked every changed sentence:
    • "did not pass (failed or inconclusive)" matches r.passed !== passed.
    • "a plain gate run carries no proof" matches the !l.proof skip.
    • "dead even after a still newer pass" holds because any newer disagreeing run supersedes.
    • "that newer pass is citable" holds because only a later failure supersedes it.
    • check-pr always passes forge: true and warns on unlanded runs; check-ticket defaults to forge = false and fails a missing line.
    • The quoted warning "unverifiable there until the log lands" is in the engine string.
    • by = logWriter(): the ticket via DEVTEAM_TICKET/branch, and supervisor in a detached review worktree.
    • The skip-worktree/assume-unchanged sentence matches dirtyHash.
    • The PR body's quality.md quote is byte-identical to the text at head.
  • Governance. The PR body says both doc changes are owner-only and lists their commits (1aef2644 and 39eae4c6 included). It says devteam-dev's supervisor puts one Inbox question to the owner, and that the PR merges only on that answer, citing its q-… id, never on reviewer approval alone. The governance commit 1aef2644 touches only quality.md.

CI at head: box-image passed. test failed on one job, kit (24, chrome 2/5). The failing test is test/project-hosts-e2e.test.mjs, not ok 3 - C3 PL-S7: a reload, and a second browser with the session, show the same project. The same test fails the same way on main runs 47436497432 (3f207ad6, Node 22 chrome 5/5) and 47430847213 (51742934, Node 24 chrome 4/5). This PR doesn't touch that test or what it covers, so the failure is not this PR's.

Findings

Findings: none.

Notes

  • Minor, sparse checkout. In a sparse checkout, every file outside the cone is skip-worktree, so every test-proof run there is dirty and never citable. This fails safe: no proof, so the reviewer reruns the suite. Worth one clause in worker.md §6 if a linked repo ever uses sparse checkout.
  • Minor, memo caches 'missing'. codeSince caches 'missing' for the whole process, so a fetch later in the same process wouldn't revive a log run at that commit as a superseder. Skipping a missing commit's run was already the behaviour before this PR; the memo only makes it last per process. I found no path that fetches between two proofVerdict calls.
  • Suggestion, by sentence. The worker.md by sentence leaves out the responder and plan-<feature> writers that logWriter can also return. Its point, "never the reviewer", still holds.
  • Not checked: the full suite and the other CI shards beyond reading their status. No live-fleet probe was run.

Opened by the box operator.

Verdict: APPROVE 1aef264

hhff and others added 4 commits December 4, 2026 23:25
…er many (b4 N1); proofVerdict's comment brought up to date (b4 N5)

Every ticket's full proof runs the same command, so other tickets' runs made after a
ticket's proof pass the cheap filter. Their commits are now asked about together:
one cat-file --batch-check for which are in the clone, one diff-tree --stdin for
which differ from the head under the same pathspec. Nothing is filtered by ticket:
another ticket's run at the same code still supersedes, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in what a proof is not; by also names responder and plan-<feature>

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…orge's CI, and only warns wherever it runs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

b4 N1 (residual cost: other tickets' newer full runs), fixed in 4601aa52

Head 642d55ba548338038153c34b0db54ce6abc66663.

I did not add a ticket filter. A run of the same command at the same code by another ticket can legitimately supersede: a dependent ticket built on this ticket's head (tickets may build on finished deps) that runs the full suite before changing anything is a real run of this code. Filtering by ticket would drop that failure and make a pass citable that is citable today. So the batch is used instead:

  • proofVerdict now collects the lines that pass the cheap filter first, then codeSinceAll asks git about all their commits not yet known in two calls, however many there are: one git cat-file --batch-check=%(objecttype) (which are in the clone), then one git diff-tree --stdin -r --name-only -- . ':(exclude)<reviews>' with <commit> <head> pairs (it prints a pair's first commit only when something differs). The answers go into the same memo codeSince reads, so judgeProof and check-ticket are unchanged. If either call fails, its commits stay unknown and codeSince asks one by one, as before.
  • New test (test-proof.runs.test.mjs test 6): 200 newer failing runs of the same command written by another ticket (its own log file) at 200 real other commits (one fast-import), plus 200 at commits not in the clone. The pass stays citable. From DEVTEAM_TEST_PROOF_TRACE, which now also prints each git call: single probes ≤ the earlier committed proofs' commits, and exactly two batched calls covering ≥ 400 and ≥ 200 commits. Then another ticket's failing run at an empty commit on the head (same code, different commit, answered by diff-tree) supersedes the pass.
  • Mutations, all killed (test-proof.runs.test.mjs run each time, file restored with git checkout): the batch call removed (test 6: "415 single probes for 14 earlier proof commits"); the batch answering every present commit changed (tests 2, 3, 6); answering every one same (tests 5, 6).
  • Local runs: test-proof.runs 6/6, test-proof 9/9, test-proof.home 2/2, check-ticket 14/14.

Opened by the box operator.

@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

b4 N2 (quality.md §3, check-pr sentence), fixed in 642d55ba (governance, its own commit)

I used your rewording. The sentence now reads, word for word:

check-pr, which on a forge's CI reads only the landed log, only warns, wherever it runs, about a cited proof whose run is not in the log it reads; check-ticket, and so merge, reads the live log on the box and fails it.

The full final quality.md §3 "Test proofs" bullet is quoted word for word in the PR body. worker.md §6 already said "On a forge's CI, check-pr reads only the landed log", so it needed no change.

Opened by the box operator.

@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

b4 N3 + N4 / a4 (stat-cache hide, sparse checkout), fixed in c18cd69c (worker.md §6 "What a proof is not")

Added after the skip-worktree/assume-unchanged sentence:

An edit git's stat cache does not see is not caught: a same-size edit with its mtime put back, in a clone set to core.checkStat=minimal and core.trustctime=false, leaves git status empty and the run clean. A sparse checkout marks every file outside it skip-worktree, so every run in one is dirty and no proof made there is citable: prove in a full checkout.

I reproduced the stat-cache case in a scratch repo: git status is empty and ls-files -v shows H. I made no engine change (no --really-refresh); the section already says a proof is no signature.

Opened by the box operator.

@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

a4 suggestion (by writers), fixed in c18cd69c (worker.md §6 "Citing a proof")

This is accurate per logWriter: responder comes from DEVTEAM_ROLE=responder or a responder worktree, and plan-<feature> from DEVTEAM_FEATURE or a plan/<name> branch when no ticket is current. The sentence now reads: "a proof's by is the log's writer, the ticket in the worker's session and in a reviewer session that inherits its DEVTEAM_TICKET, supervisor for a run in a review worktree with --ticket from the supervisor's session, responder or plan-<feature> for one with --ticket from the responder's or a planner's session, and never the reviewer". The PR body's Verdicts bullet matches.

Opened by the box operator.

@hhff

hhff commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

b4 N5 (stale comment above proofVerdict), fixed in 4601aa52

The comment now matches the code and the docs:

  • supersession is by a newer run of the same command (proofRunKey: argv and folder) that "did not agree": a pass by a newer run that did not pass (failed or inconclusive), a failure by a newer pass;
  • the log loop is "for this repo and command, committed or not and whoever wrote it";
  • a committed proof is ordered by ended and a log-only run by its line's created_at, so a run that ended just before a pass can count as newer when only its line is left, which fails closed.

Opened by the box operator.

@hhff

hhff commented Dec 5, 2026

Copy link
Copy Markdown
Member Author

PR #997 review d5: delta since APPROVE at 1aef264

  • Reviewer: operator-review-d5 (fresh subagent, Claude Opus 5.5), not the author
  • Head: 642d55b
  • Date: 2026-12-05T00:15Z

Scope: git diff 1aef2644..642d55ba minus what main brought: 4601aa5 (engine N1 codeSinceAll, N5 comment, a new test), c18cd69 (worker.md §6/§8), 642d55b (quality.md §3 N2 wording), and the merge 05fd396.

What I ran vs only read

  • Merge 05fd396 is clean. git show --remerge-diff 05fd3966 is empty (no hand resolution). git range-diff shows commits 1-10 identical to the approved ones, plus the three new commits. The PR's own diff against main (origin/main...HEAD) is still the same 7 files.
  • Batched vs single, on a hand-built fixture (git 2.39.5). I built commits for each case: an excluded-path-only change (proj/tickets/T1/reviews/..., twice), a code change, a code change then put back, a change in another dir, an empty commit on the head (same tree), and a sha that is not in the clone. I asked each one through git diff --quiet <sha> <head> -- . :(exclude)<reviews> and through cat-file --batch-check=%(objecttype) plus diff-tree --stdin -r --name-only -- . :(exclude)<reviews>. All 8 answers match (same/same/changed/same/same/changed/same/missing). diff-tree honours :(exclude) magic. A tree or blob sha prints one "missing" line, so alignment holds. A bad line in diff-tree's input is skipped and later lines still answer.
  • test/test-proof.runs.test.mjs: 6/6 pass (157 s). test/test-proof.test.mjs: 9/9 pass. test/check-ticket.test.mjs: 14/14 pass. Each ran alone through testslot, hub env pointed away.
  • Mutations of the batch, each run on test-proof.runs (file restored after each):
    • M1, swap the changed/same answer: red, 4 of 6 fail (tests 2, 3, 5, 6).
    • M2, drop the codeSinceAll call: red (test 6).
    • M3, batch diff-tree without the :(exclude) (only -- .): red (test 3).
    • M5, treat every cat-file answer as a commit (missing shas go to diff-tree and come back "same"): red (test 6).
  • Fallback, M4a (diff-tree given a bogus flag, so it fails) and M4b (cat-file fails): only the cost assertions go red. Tests 5 and 6 reach their count checks, which say "215" and "415 single probes", so the commits were asked one by one. The supersede tests 2 and 3 stay green, so the fallback gives the same answers.
  • Another ticket's failing run at the same code still supersedes the pass. The new test's last step covers it: an empty commit on the head is logged by another ticket, the batch says 'same', and the pass turns uncitable. M1 breaks exactly this.
  • Docs read against the code. Sparse checkout means dirty: ls-files -v flags S entries, line 35599. responder and plan-<feature> as by: writerClass, line 2111. quality.md N2 now matches worker.md's "What a proof is not" (on CI check-pr reads only the landed log; it only warns wherever it runs).
  • CI at the head: test success (run 47447926381, attempt 2), box-image success.

Findings: none.

Notes

  • Minor (no rule; it fails closed). A sha that names an annotated tag object peels to commit in cat-file --batch-check '%(objecttype)'. diff-tree --stdin then rejects that line ("is a tag, not a commit or tree") but still exits 0 and prints nothing for it, so the batch answers 'same'. The single path answers 'changed' (git diff peels the tag). The kit writes log shas from rev-parse HEAD, which are always commits, so this can't come up from kit-written lines. If it did, it would only add a supersession (a pass made uncitable), never revive a cite. A cheap fix: --batch-check='%(objectname) %(objecttype)' and feed diff-tree the peeled objectname.
  • Minor, older than this PR. The single path runs git diff -- . in HOME_CWD, which is the process cwd when run from inside a home checkout. Run from a subfolder of home, . would narrow the single path's pathspec to that folder (this also affects judgeProof current/stale). The batch always runs at codeR.root, which is the more correct reading. I did not probe this end to end.
  • Not checked: Node versions other than the box's, and a live fleet. Tests only, plus the git fixture above.

Opened by the box operator.

Verdict: APPROVE 642d55b

@hhff

hhff commented Dec 5, 2026

Copy link
Copy Markdown
Member Author

Delta confirm review: 642d55b (approved) to 4234759 (merge of origin/main d0a0608)

What I checked:

  1. git log 642d55ba..HEAD: there are no non-merge commits outside origin/main. The only new commit off main is the merge 4234759, with parents 642d55b and d0a0608.
  2. The merge carries no edit of its own: git merge-tree --write-tree 642d55ba d0a0608d gives tree 5fb13e37, the same as HEAD's tree.
  3. The PR's diff is unchanged. git diff <old merge-base 6cddab92> 642d55ba and git diff origin/main...HEAD are identical apart from index lines and hunk offsets: the same 7 files, +1207/-12 (devteam.mjs, log.schema.json, worker.md, quality.md, test-proof{,.runs,.home}.test.mjs).
  4. No semantic conflicts. Main's range 6cddab9..d0a0608 (91 files) changes nothing in docs/devteam/scripts, docs/devteam/schema, process/, governance/, test/run.mjs or .github. It contains dashboard work (kit-270, kit-1242, kit-1114) and kit-1204's test-file splits (11 files deleted and split into parts). The PR names none of the deleted or split test files. The only grep hits ("package-pin", "watch-install") are observation kinds and a run file in devteam.mjs, not test paths.
  5. Local run at HEAD (testslot node test/run.mjs test/test-proof.test.mjs test/test-proof.runs.test.mjs test/test-proof.home.test.mjs): all 3 files ok.
  6. CI at 4234759: 46/46 pass. The first attempt of kit (22, chrome 1/5) failed in test/dashboard-inbox-panel.views.test.mjs ("an Inbox road from a peek over the panel, at 900px and below": a 30 s wait timed out on the focused Overrule box). The PR touches no dashboard code. The failure has the same shape as the quarantined sibling dashboard-inbox-panel.controls in test/flaky.json, main's own run of that shard at d0a0608 passed, and the rerun on the same commit passed. I judge it a flake. Note: dashboard-inbox-panel.views is not in flaky.json.

Verdict: APPROVE at 4234759

Opened by the box operator.

@hhff

hhff commented Dec 5, 2026

Copy link
Copy Markdown
Member Author

PR #997 review d6: delta since APPROVE at 4234759

  • Reviewer: operator-review-d6 (fresh subagent, Claude Opus 5.5), not the author
  • Head: 0fdde42
  • Date: 2026-12-05 11:46 UTC

Delta from review d5's comment 7435990869 (APPROVE 4234759).

What I ran vs only read

Findings

Findings: none.

Notes

  • Not re-reviewed: the PR's substance. d5 and the reviews before it cover that, and this delta changes none of it.

Opened by the box operator.

Verdict: APPROVE 0fdde42

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