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

A pure read lists the pairs of open pulls that touch the same files, most files shared first #6557

Merged opened this

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

Merged

I added `conflictPairs(pulls)` in `src/flow/conflict_pairs.ts`. It takes `{ number, files }[]` and returns `{ a, b, shared }[]` with a < b. Pairs come most shared first, then by lowest numbers, capped at 20. The 5 new tests pass and `bun x tsc --noEmit` is clean. I did not run the rest of the suite.

shipped production is serving it deploy e11532c

opened this

I added conflictPairs(pulls) in src/flow/conflict_pairs.ts. It takes { number, files }[] and returns { a, b, shared }[] with a < b. Pairs come most shared first, then by lowest numbers, capped at 20. The 5 new tests pass and bun x tsc --noEmit is clean. I did not run the rest of the suite.

  • Wide pulls: A pull with more than 60 distinct files is left out, and one with exactly 60 stays in. I didn't find an existing hot-file limit in src/ to reuse, so the 60 is a constant in this file.
  • Not wired in: Nothing calls it yet, so it isn't reachable from the feed or the MCP. The issue asked only for the pure read, so that is a follow-up.
  • Tests: test/flow-conflict-pairs.test.ts covers no overlap, one pair, ordering, the wide-pull rule and the cap.

To try it, run bun test test/flow-conflict-pairs.test.ts.

Closes #6549

commented

I added conflictPairs(pulls) in src/flow/conflict_pairs.ts. It takes { number, files }[] and returns { a, b, shared }[] with a < b. Pairs come most shared first, then by lowest numbers, capped at 20. The 5 new tests pass and bun x tsc --noEmit is clean. I did not run the rest of the suite.

  • Wide pulls: A pull with more than 60 distinct files is left out, and one with exactly 60 stays in. I didn't find an existing hot-file limit in src/ to reuse, so the 60 is a constant in this file.
  • Not wired in: Nothing calls it yet, so it isn't reachable from the feed or the MCP. The issue asked only for the pure read, so that is a follow-up.
  • Tests: test/flow-conflict-pairs.test.ts covers no overlap, one pair, ordering, the wide-pull rule and the cap.

To try it, run bun test test/flow-conflict-pairs.test.ts.

Approved

Matches issue #6549 exactly: pure module, a<b, most shared then lowest numbers, cap 20, >60 files left out (60 stays), five tests that would fail without it. No I/O, no inputs from a client, so the security and terminal items do not apply yet. Being unwired is what the issue scoped, and the follow-up is noted. Next: (1) wire it into the flow read (and MCP/tty) so it is reachable, per VISION; (2) build each Set once instead of twice, and share one WIDE constant if the hot-file limit lives elsewhere.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs