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

Live triage: open means someone will act, closed means done on main or decided - kept true continuously, in the background #3245

Parked opened this in answer to
Closed without merging

Live triage now runs on every autonomy tick and the tick line reports triage=closed/labelled/folded. bun x tsc --noEmit and the touched tests plus the five cross files pass. I did not run the full check.

Notes

stopped parked by the crew deploy b66a247

opened this

Live triage now runs on every autonomy tick and the tick line reports triage=closed/labelled/folded. bun x tsc --noEmit and the touched tests plus the five cross files pass. I did not run the full check. I did not start the app. The tick line was checked in test logs, but the home line only in a unit test.

What changed (src/crew/livetriage.ts, called from autonomyTick in src/crew/autonomy.ts)

  • Rules only, no model: it makes at most 25 changes per repository per tick and skips mirrors. A model fallback for what the rules can't decide is not built. The pass is idempotent.
  • Landed: an open issue that a merged pull's Closes #N names closes as done, with a note naming the merge commit.
  • Done on main: an issue the crew already noted as done on main closes with those commits, using the same note as the manual close.
  • Directions: a title starting Question:, Wish:, Idea: or Direction:, or ending in ?, adds a Folded: #N … line to the direction issue (repo.directionIssueId) and closes as dropped. This is title-based, so a real task phrased as a question would fold.
  • Duplicates: an exact repeat of an older open title (case and punctuation ignored) closes as dropped, pointing at the survivor.
  • Labels: unlabelled issues go through the existing pillar writer (new labelServed in src/actions/pillars.ts).
    • An issue serving a pillar gets that pillar's label.
    • An issue serving none is linked to wait for the Later gate and reads as Later.
    • Later issues therefore don't count as ready or roadmap through the existing deferral. The label alone does not defer anything.
    • A repository with no pillars or no gate has no priority scheme, so nothing in it is counted as unlabelled. unlabelled=N appears on the tick line only when issues in a repository with pillars are still unlabelled.
  • Never touched: the plan's own issues, the direction issue, and anything assigned. Duplicates that other issues wait on are also left open.
  • Home: waiting on you: N, oldest X h shows beneath the KPI row when N > 0. It counts open agent-authored pulls untouched for 24 h or more. It is a separate line rather than a tenth tile, so the grid and the "nine tiles" tests are unchanged. Kpis.waiting is optional.
  • Tests: test/live-triage.test.ts seeds each case and asserts its outcome. The hand-built schemas in test/home-kpi-row.test.ts gained the columns the new query reads, which was a test fixture fix and not a wrong assertion. The README has a short paragraph on this.

Left out

  • A model fallback.
  • Reading P3 or similar from a title to place an issue under that pillar.
  • Re-pointing issues that wait on a closed duplicate.
  • The "within an hour" guarantee is only as good as the tick interval.
  • "Waiting on a person" is approximated by age alone. It does not read holds or review state.

Try it: the tick log line, e.g. tick repo=… did=picked … triage=0/0/0 spent=…. Home, as an admin in studio mode, shows the waiting line when a pull qualifies. bun test test/live-triage.test.ts runs the new tests.

Closes #3242

Show 13 earlier items

7 earlier comments
commented

Replaced, unchanged: the work is #3265, then #3266, #3267 and #3268. My token still cannot close a pull, and #3301 is still open. Until it lands, a person closes this unmerged.

commented

Replaced, unchanged: the work is #3265, then #3266, #3267 and #3268. #3301, which lets the planner close a crew pull, is now being built. Until it lands, a person closes this unmerged.

commented

Replaced, unchanged: the work is #3265, then #3266, #3267 and #3268. #3301, which lets the planner close a crew pull, is still being built. Until it lands, a person closes this unmerged.

commented

Closed by the planner: its issue #3242 was split into #3265 (the livetriage module on the autonomy tick, closing issues noted already done on main, with events and counters applied only after the transaction commits — juniper's ask here), then #3266, #3267, #3268. The work continues as #3265 from a fresh branch; this branch carries the three slices at once, which is what the reviews kept finding too large.

commented

Correction: the planner cannot close pulls (its token lacks the scope), so this stays open for a person to close. Recommendation: close it unmerged; #3265 carries the first slice, with the one concrete change juniper asked for — publish the event and apply the budget/gone counters only after the fold transaction commits.

commented

State, second pass: the planner still cannot close pulls (#3301 gives it that). One concrete change if this branch goes another round: cut it to #3265 alone, publishing the event and applying the budget/gone counters only after the fold transaction commits, and drop the labelling, duplicate and fold passes (#3266-#3268). Otherwise a person closes it unmerged.

commented

I merged main into the branch and pushed. The type check is clean. The live-triage, done-on-main, home-KPI and autonomy tests pass: 68 across 5 files. I didn't run the rest of the suite.

The conflict: main added its own src/crew/livetriage.ts (#3284), so the file collided with mine. Its liveTriage closes a done-on-main issue only after checking that every commit the crew named is on the default branch.

How I resolved it:

  • src/crew/donetriage.ts: main's verified close moved here unchanged, along with its test (test/donetriage.test.ts).
  • src/crew/livetriage.ts: triageRepo stays mine. It still closes issues that landed by merged pull, folds agents' questions, closes exact-title duplicates and labels by pillar.
  • Dropped step: I removed my own done-on-main step. It closed on the note alone, which would have undone main's reachability check.
  • src/crew/autonomy.ts: the tick runs both. The triaged= figure on the tick line is the sum of the two, and the triage= words are still mine.

Test changes: test/live-triage.test.ts no longer covers done-on-main closes. I changed its cap test to use duplicate titles, which are closed in the same way.

Not done: the README's "Live triage" sections still describe both behaviours as one module, and I didn't reword them.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs