Skip to content

LAND-3: merge-train fixes from train 1 (device run judged on evidence, regen after devices, no-code skip vouch, rebuild on an earlier position) - #76

Merged
thejackshelton merged 2 commits into
masterfrom
train-tooling
Oct 3, 2026
Merged

thejackshelton merged 2 commits into
masterfrom
train-tooling

Conversation

@thejackshelton

@thejackshelton thejackshelton commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Merge-train fixes for the four gaps train 1 hit at position 1 (PM ruling, option A; freeze exception). All changes are in scripts/ and their tests.

  • Device run judged on its evidence (deviceRunProblems, parseDeviceEvidence). train build used to stop whenever pnpm run parity:devices exited non-zero. Master's own device-pixels lane fails on purpose (iOS 57 / Android 86, listed in device-failures-<target>.json), so every run exits 1. Now each run is compared with the lanes.json and failure lists committed on the train's base. The run passes when:

    • every lane passes, or fails as it does on the base;
    • a failing lane lists no failure (lane, case, DPR, node, kind) that the base does not list. It may list fewer;
    • lane parity passes, and the committed-mode parity:lanes prints no STALE line.

    The build also stops if the run did not rewrite lanes.json, or if either lanes command ends with anything but exit 0 or 1.

  • Regen after the device run (POSITION_STEPS). The position runs pnpm regen again after judging the run, so native-lanes.ts (which reads lanes.json) is current in the position's regen commit. Train 1 position 1 failed p6a-promotion without this.

  • "No code objects were reviewed." skip. pr:review now vouches for this skip under the same guard as "All code in this push has already been reviewed.": the head's patch id over reviewed paths must equal that of an earlier commit of the PR whose correctness check succeeded. Near-miss titles and non-skipped conclusions still fail. Macroscope gave T128: column flex automatic minimum size measures content with the item height as auto (Blink IntrinsicBlockSize) #59's position commit (2d47e5d, regen-only) this title.

  • A PR head that is an earlier build's position. build merges the member's PR head when it is a position from an earlier build, so land's plain push fast-forwards it. T128: column flex automatic minimum size measures content with the item height as auto (Blink IntrinsicBlockSize) #59 is in this state, at 2d47e5d.

    • memberTip accepts that head only if it contains the clean head and every commit on the chain down to the clean head is a "Train position" commit.
    • planPositions records the merged tip, and prProblems/mergeGate accept it as the PR head.
    • check still predicts against the clean head's patch id. So a fake "Train position" commit that changes code is caught there, and a test pins that.
  • Spending-limit waiver (owner directive, 2026-10-02: "When it hits limit that's fine you just dont do the review"). pr:review passes a commit only when every Macroscope check on it was skipped with exactly "Monthly spending limit reached (workspace setting).". It prints a loud UNREVIEWED: Macroscope spending limit line. CI must still pass and every finding (from any commit) must be answered (reviewExit). A near-miss title or a mixed result fails. AGENTS.md step 4 records the rule in one sentence.

  • review/ base.* land stops before pushing and prints gh pr edit <n> --base master.

What passed

  • pnpm typecheck: pass.
  • Targeted: merge-train.test.ts and pr-review.test.ts, 62 pass. The new tests fail on the previous scripts: merge-train.test.ts cannot import the new exports, and the "No code objects were reviewed." test fails on the old title list.
  • /tmp/heavy-lease.sh pnpm test on d2d3f0c: 3623 pass, 1 skipped (the DRAGON_REGEN_CHECK suite), 0 fail. On the previous scripts, pr-review.test.ts fails 9 tests.
  • Pre-PR audit (AGENTS.md step 3):
    • external input is checked: lanes.json and the failure lists are parsed strictly, and so are the commit subjects and parents in the tip walk;
    • no silent error path: the lanes commands' exit codes and verdict line are checked, and a run that did not write lanes.json stops the build;
    • checks cover the whole set: every target and lane on both sides is compared.
    • Not unit-tested: the CLI glue in merge-train.ts that spawns the device and lanes commands. Its decisions are the tested library functions.

Review

Macroscope skipped this PR for its monthly spending limit. Under the owner's directive it lands unreviewed once CI passes; pr:review (this branch's script) reports it as UNREVIEWED.

Changed tests and checks

  • New tests only: the device judgement (an equal run, fewer failures, a new failure, a newly failing or not-run lane, stale, parity, a missing target or lane, strict parsing), the position steps, the earlier-build tip (fast-forward, patch id, rejection of unreviewed and foreign heads), the review/* stop, and the "No code objects were reviewed." vouch.
  • pr-review.test.ts: the existing outcome pins gain unreviewed: false, because outcome now reports the waiver. Their intent is unchanged. New tests cover the waiver: the exact title passes; CI that is pending or failed, a near-miss title, a mixed result and an unanswered earlier finding all still fail.
  • No tolerance is loosened and no check is removed. The vouch accepts one more skip title, under the same patch-id guard.

🤖 Generated with Claude Code

- train build judges each position's device run against the device evidence committed on the train's base (lanes.json and device-failures-<target>.json), not by the lanes command's exit code: every lane must pass or fail as on the base, a failing lane may list no failure the base does not, and lane parity must pass with no stale lane (deviceRunProblems). It also checks the run rewrote lanes.json and the lanes commands exited 0 or 1.
- train build runs pnpm regen again after the device run (POSITION_STEPS), so native-lanes.ts follows the run's lanes.json in the position's regen commit.
- pr:review vouches for Macroscope's 'No code objects were reviewed.' skip under the 'already reviewed' guard: the head's patch id over reviewed paths must equal an earlier reviewed commit's.
- A member whose PR head is a position from an earlier build is merged at that head (memberTip walks its train-made commits down to the clean head), so land's push fast-forwards it; check still predicts against the clean head's patch id.
- land stops on a review/* base with the exact 'gh pr edit <n> --base master'.
…review passes a commit whose every Macroscope check was skipped with exactly 'Monthly spending limit reached (workspace setting).', prints UNREVIEWED, and still requires CI to pass and every finding to be answered (reviewExit); a near-miss title or a mixed result fails. AGENTS.md step 4 records the rule. pr-review.test.ts pins each case; the outcome pins gain unreviewed: false
@thejackshelton
thejackshelton merged commit 0d04dc0 into master Oct 3, 2026
4 checks passed
@thejackshelton
thejackshelton deleted the train-tooling branch October 3, 2026 06:49
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