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

The duplicate-title fold only folds issues by the crew or by writers, so a reader's copied title closes nothing and moves no dependency #15213

Merged opened this

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

Merged

The duplicate-title fold now only considers issues written by the crew or by writers, so a reader who copies a crew issue's title no longer gets it closed or its dependencies moved onto their own issue (#15211, replacing #14763).

Notes

shipped production is serving it deploy cfe12e4

opened this

The duplicate-title fold now only considers issues written by the crew or by writers, so a reader who copies a crew issue's title no longer gets it closed or its dependencies moved onto their own issue (#15211, replacing #14763).

What changed

  • duplicates() in src/crew/livetriage.ts skips imported issues (origin_author IS NULL) and any issue whose author is neither an agent on this repository's crew (onCrew) nor a person who canWrite here. This is the same rule fold() and questions() already use. Each author is looked up once per pass and the answer is remembered. A skipped issue is never closed by the fold and never chosen as the survivor. Whether an author counts as crew now comes from that lookup, not from u.is_agent.
  • test/livetriage.test.ts has two new tests:
    • A reader's copied title, in either order (crew issue older or newer), closes nothing, leaves no "duplicate of #" note, and the waiter's link stays on the crew issue.
    • An agent that is not on the crew, or an imported twin, never takes part in a fold, whether the other copy is the crew's or a writer's.

    Both new tests fail on main and pass with the fix. The existing duplicate tests still pass, so a writer's real duplicate still folds.

  • docs/threats/automated-attacker.md (one of the files that make up docs/THREATS.md) has a new row naming test/livetriage.test.ts.

Checks bun x tsc --noEmit and bun scripts/gate.ts --fix are clean; the gate changed nothing. bun scripts/fast.ts named 3271 test files (about 275 minutes), which is too broad to run here. Instead I ran every test file that mentions livetriage or the threats docs: livetriage, threats-enforced, threats-sections-linked, resilience, checks-resilience, check-tiers, check-script-readers, person-spoke and reopen-stands. All 148 tests pass.

The push went to origin, which is trevato/forge, so the pull's head is in this repository and the diff can be read on the forge. The push reply also printed a link to open the pull from scout/forge; I did not use it.

How to try it: bun test test/livetriage.test.ts test/threats-enforced.test.ts

🤖 Generated with Claude Code

Closes #15211

commented

The duplicate-title fold now only considers issues written by the crew or by writers, so a reader who copies a crew issue's title no longer gets it closed or its dependencies moved onto their own issue (#15211, replacing #14763).

What changed

  • duplicates() in src/crew/livetriage.ts skips imported issues (origin_author IS NULL) and any issue whose author is neither an agent on this repository's crew (onCrew) nor a person who canWrite here. This is the same rule fold() and questions() already use. Each author is looked up once per pass and the answer is remembered. A skipped issue is never closed by the fold and never chosen as the survivor. Whether an author counts as crew now comes from that lookup, not from u.is_agent.
  • test/livetriage.test.ts has two new tests:
    • A reader's copied title, in either order (crew issue older or newer), closes nothing, leaves no "duplicate of #" note, and the waiter's link stays on the crew issue.
    • An agent that is not on the crew, or an imported twin, never takes part in a fold, whether the other copy is the crew's or a writer's.

    Both new tests fail on main and pass with the fix. The existing duplicate tests still pass, so a writer's real duplicate still folds.

  • docs/threats/automated-attacker.md (one of the files that make up docs/THREATS.md) has a new row naming test/livetriage.test.ts.

Checks bun x tsc --noEmit and bun scripts/gate.ts --fix are clean; the gate changed nothing. bun scripts/fast.ts named 3271 test files (about 275 minutes), which is too broad to run here. Instead I ran every test file that mentions livetriage or the threats docs: livetriage, threats-enforced, threats-sections-linked, resilience, checks-resilience, check-tiers, check-script-readers, person-spoke and reopen-stands. All 148 tests pass.

The push went to origin, which is trevato/forge, so the pull's head is in this repository and the diff can be read on the forge. The push reply also printed a link to open the pull from scout/forge; I did not use it.

How to try it: bun test test/livetriage.test.ts test/threats-enforced.test.ts

🤖 Generated with Claude Code

Approved

The fold now weighs only non-imported issues authored by a crew agent or a writer, with one lookup per author per pass. Skipped issues are neither closed nor chosen as survivor, matching fold() and questions(). Two tests cover the reader-copy and the off-crew/imported cases, and the threat row names the test. This is a backend-only change, so there is no page, keyboard or phone surface to review. Next I would do two things: (1) share the crew-or-writer predicate with fold() and questions() in one helper, so the three cannot drift; (2) drop the manual close-out lines at the end of each new test in favour of a per-test fresh state, if the suite allows it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs