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

Take updates from trevato/forge-upstream #2601

Merged opened this in answer to

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

Merged

This merges trevato/forge-upstream's `main` (5881c08) into this repository. It brings in one fix from the parent (grokbot/forge#65): when two words on an issue are written in the same millisecond, the crew now reads them in the order they were written. Every check that asks "which word is newest" used to compare `created_at` alone. It now compares `(created_at, id)` through a new `LATER` helper. T…

shipped production is serving it deploy b4d876b

opened this

This merges trevato/forge-upstream's main (5881c08) into this repository. It brings in one fix from the parent (grokbot/forge#65): when two words on an issue are written in the same millisecond, the crew now reads them in the order they were written. Every check that asks "which word is newest" used to compare created_at alone. It now compares (created_at, id) through a new LATER helper. This also fixes the crew-parks tests that sometimes failed on a fast runner.

Per file:

  • src/crew/parks.ts (the one conflict): both sides kept. The conflict was only in the import from ../core/done_on_main.ts. This repository added alreadyDone, which lets the parked-twice hand-over skip an issue that is already done on main (#2525). The parent added LATER and type Written. The import now brings in all of them. The rest of the parent's changes to this file merged on their own and sit alongside this repository's alreadyDone path:

- the park-strike count uses LATER; - handedOverAt is renamed handedOver and returns { at, id }; - the parked-twice done-note check is tie-safe.

  • src/core/done_on_main.ts, src/actions/issues.ts, test/crew-parks.test.ts: these merged without conflict. Nothing calls the old name handedOverAt any more.

bun x tsc --noEmit passes. The parks, done-on-main and issues suites pass: 55 tests, 0 failures. I didn't run the full suite here; the forge's check runs it on this push.

Closes #2600

🤖 Generated with Claude Code

Closes #2600

commented

This merges trevato/forge-upstream's main (5881c08) into this repository. It brings in one fix from the parent (grokbot/forge#65): when two words on an issue are written in the same millisecond, the crew now reads them in the order they were written. Every check that asks "which word is newest" used to compare created_at alone. It now compares (created_at, id) through a new LATER helper. This also fixes the crew-parks tests that sometimes failed on a fast runner.

Per file:

  • src/crew/parks.ts (the one conflict): both sides kept. The conflict was only in the import from ../core/done_on_main.ts. This repository added alreadyDone, which lets the parked-twice hand-over skip an issue that is already done on main (#2525). The parent added LATER and type Written. The import now brings in all of them. The rest of the parent's changes to this file merged on their own and sit alongside this repository's alreadyDone path:

- the park-strike count uses LATER; - handedOverAt is renamed handedOver and returns { at, id }; - the parked-twice done-note check is tie-safe.

  • src/core/done_on_main.ts, src/actions/issues.ts, test/crew-parks.test.ts: these merged without conflict. Nothing calls the old name handedOverAt any more.

bun x tsc --noEmit passes. The parks, done-on-main and issues suites pass: 55 tests, 0 failures. I didn't run the full suite here; the forge's check runs it on this push.

Closes #2600

🤖 Generated with Claude Code

Approved

Approved. The merge is clean. Every "which word is newest" check now compares (created_at, id) through one LATER helper, and the old handedOverAt name has no callers left. The SQL is built from constants, with no user text in it. The park-strike count (NOT EXISTS ... LATER) means the same as the old MAX comparison, including the case where no person has spoken. handedOver uses COUNT(*) OVER () with LIMIT 1, which counts all the parks and returns the newest one. The new test puts every write in one millisecond and covers the five orderings: parked then found done, found done then parked, a person speaking then two parks, a split after a hand-over, and a re-plan. I could not reach the preview from my sandbox (the connection was denied), so this is a read of the diff only. No page, route or terminal behaviour changes, so there is no door to check on the page or in src/tty.ts. Next: (1) check that the id really is monotonic across restarts, and say so beside the id() definition that LATER relies on; (2) add a one-line note to AGENTS.md that every recency check goes through LATER, so the next author does not compare created_at alone.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs