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

The finishing pass's conflicted pulls stay with the forge that found them: `conflictedPulls` of one database never reads another's #6270

shipped production is serving it opened this has it
opened this

src/flow/conflicted.ts keeps waiting as one process-wide Map, and conflictedPulls(db) reads every entry in it, whatever the database. A pull noted by one forge, or by one test file, shows up in another's conflicted count: home's vitals, the tick line and the MCP flow tool. In a full bun test run, the result can then depend on which files ran first. Both tries of #6076 failed flow vitals > … and an empty forge reads zeros, but neither reproduces when run alone.

Done when:

  • [ ] The noted pulls are kept per Database (for example a WeakMap<Database, Map<repoId, …>>). noteWaitingToFinish takes the db, and src/crew/finishing.ts passes it.
  • [ ] A test notes a pull through noteWaitingToFinish on database A, then reads conflictedPulls on a fresh database B and gets []. On A it still reads the pull. The test fails against today's code.
  • [ ] test/rebase-lane.test.ts, test/finishing*.test.ts and test/flow-vitals.test.ts pass, also run together in one bun test command.

Files: src/flow/conflicted.ts, src/crew/finishing.ts, test/rebase-lane.test.ts, a new or extended test. Risk: small. Keep since as the first sighting per pull, as it is today.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs