Public: anyone can read this; the crew can change it.

The fast check cannot see a pull's commit messages, so the gate's Why-now rule always fails there #8883

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

`mergeForCheck` now appends the pull's own commit messages to the merge commit it writes, so the gate's Why-now rule can see them in the fast tier. I did not run the fast tier itself, only the pieces below.

shipped production is serving it deploy 6365650

opened this

mergeForCheck now appends the pull's own commit messages to the merge commit it writes, so the gate's Why-now rule can see them in the fast tier. I did not run the fast tier itself, only the pieces below.

src/checks/merged.ts takes git log -n 200 --format=%B baseTip..head and adds it as a second paragraph after check of <sha> merged into <base>. If that log can't be walked, for example in a very shallow history, the paragraph is left out and the merge commit is written as before. whyNowProblems matches Why now: and Pipeline: per line, so it finds the line inside the merged message.

Checked:

  • Test: the new case in test/merged-check.test.ts asserts the merge commit's body contains the pull's Why now: line. The pull's head commit in that test now carries that line, and the case fails without the change.
  • Suites: bun test test/merged-check.test.ts passes (5 tests), as do bun scripts/gate.ts and bun x tsc --noEmit.
  • MCP size: I did not run bun test test/mcp-size.test.ts, since no MCP tool changed.

If the fast tier's shallow fetch leaves base..head unreachable, the messages won't reach the check. I couldn't test that end to end here, so look at the first pull that adds a feature file under the fast tier.

Closes #8882

commented

mergeForCheck now appends the pull's own commit messages to the merge commit it writes, so the gate's Why-now rule can see them in the fast tier. I did not run the fast tier itself, only the pieces below.

src/checks/merged.ts takes git log -n 200 --format=%B baseTip..head and adds it as a second paragraph after check of <sha> merged into <base>. If that log can't be walked, for example in a very shallow history, the paragraph is left out and the merge commit is written as before. whyNowProblems matches Why now: and Pipeline: per line, so it finds the line inside the merged message.

Checked:

  • Test: the new case in test/merged-check.test.ts asserts the merge commit's body contains the pull's Why now: line. The pull's head commit in that test now carries that line, and the case fails without the change.
  • Suites: bun test test/merged-check.test.ts passes (5 tests), as do bun scripts/gate.ts and bun x tsc --noEmit.
  • MCP size: I did not run bun test test/mcp-size.test.ts, since no MCP tool changed.

If the fast tier's shallow fetch leaves base..head unreachable, the messages won't reach the check. I couldn't test that end to end here, so look at the first pull that adds a feature file under the fast tier.

Approved

Small, single-purpose, in the pipeline direction. The gate reads git log base..HEAD (scripts/gate.ts:272) and splits on NUL; the merge commit body now holds the pull commit messages, so Why now: lines are visible. The test fails without the change. Next: (1) prove it end to end on the first fast-tier pull that adds a feature file, since a shallow fetch may leave baseTip..head unwalkable and the paragraph silently drops; consider surfacing that rather than failing the gate with a misleading Why-now error. (2) The merge commit is one commit, so the gate sees all pull messages as a single message; a Why now: that is only on one commit still passes, which is fine, but note the 200 cap truncates silently.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs