Repository navigation
Description
A Triage run's session can still label an issue ready-for-agent itself, and thirdshift never takes the label off. The session holds the user's gh login, so a Report that steers it can do what Q1.12 of the #706/#1323 grilling held back by default: put an issue where the next Pickup run builds and possibly Self-merges it, with nobody reading anything. The Spec review of PR #1715 (Spec #1323) raised this, and the PR leaves the decision here.
Evidence
The review's test, run on issue-1323 at 9c73bb8, has the fake session file an issue itself and then recommend nothing:
scenario.repo_has_labels(&["bug", "ready-for-agent"]);
scenario.agent_does(&format!(
"gh issue create --title 'Handle an empty cache' --body 'Filed by the session.' --label bug,ready-for-agent > /dev/null || true\n{}",
recommendation_script(r#"{"category":"bug","state":"ready-for-agent","issues":[],"investigation":"The session filed the empty-cache problem itself."}"#)
));
let result = scenario.run_with_input(&["triage"], REPORT);
assert!(!scenario.issue_labels(8).iter().any(|label| label.eq_ignore_ascii_case("ready-for-agent")));It fails: ready-for-agent kept without permission on #8: ["bug", "ready-for-agent"]; exit Some(0).
src/triage.rs(check_publication,publish): thirdshift files every issue from the session's finalTriage recommendation:line and appliesneeds-triagein place ofready-for-agentunless--allow-ready-for-agentortriage.allow_ready_for_agentpermits it. It never reads back what the session itself did on GitHub.src/prompt.rs(triage) andskills/thirdshift-triage/SKILL.mdtell the session to write nothing to GitHub. That is a prompt rule, not a wall.- The session keeps the user's GitHub login in both launches. The ordinary launch is the fully trusted Harness of ADR 0013, and the
--read-machinesandbox links~/.config/ghinto its private home (src/sandbox/triage.rs,prepare_home) without--clearenv.
Why the Day shift has to decide
Spec #1323 has the session file and report its issues, then thirdshift remove ready-for-agent from "any issue it filed". The Spec branch moved filing into thirdshift instead, so thirdshift never applies a label it isn't allowed to (US 11). Neither model catches a session that writes to GitHub without reporting it, and closing that gap changes the trust model ADR 0013 records:
- Amend Spec Triage run: turn a Report into triaged issues #1323 to say thirdshift files, and accept ADR 0013's trust in the session for GitHub writes, as for every other Harness session.
- Sweep after the session: swap
ready-for-agentforneeds-triageon any issue created or labelled during the run. It is cheap, but it would also strip readiness that a concurrent Architect run, Security run or the Day shift applied in the same window, and a session that labels an existing issue instead still gets through. - Narrow the session's GitHub access, as Keep text from strangers out of agent sessions #511 proposes for every session: a read-only or repository-scoped token, or thirdshift reading the open issues for the session so it needs no login at all.
I lean toward 1 now and 3 with #511, because 2 trades a rare attack for a common false positive. Related: #511, #1701.
Activity