Repository navigation
Conversation
The GitLab triage and prioritize doors found the bot's earlier note that starts with the marker and edited it in place, folding the previous body into a "Previous run" block. The newest result then sat above the requests that asked for it. fullsend-ai/fullsend#9399 (still open) makes the doors in that repo append a new comment per run; these two doors live here. tracker_post_sticky_comment (gitlab-triage-ops) and forge_post_sticky_comment (gitlab-prioritize-ops) now POST one new note per run, marker on the first line and the body below it, as before. This covers the sufficient result, the in-progress status note and the prioritize result. They no longer resolve the token owner, list notes or PUT to /notes/:id, so the now-unused _gitlab_bot_username helpers go too. Both require GITLAB_TOKEN and, on a failed POST, print a ::warning:: and return 1. The function names stay. The in-repo Jira door posts through `fullsend issues post-comment` and would change with #9399's CLI, not here. With several marked notes possible, the triage agent's step 2e reads every triage-agent comment, starts from the newest (found by edit or creation time after paging through every GitLab note or Jira comment) and keeps every cause from any of them. docs/triage.md says per tracker how re-runs post, and docs/prioritize.md says GitLab adds a new comment each run. The GitLab sticky tests in post-triage-test.sh and post-prioritize-test.sh are replaced by append tests (both triage markers and the prioritize marker). The mocks list a bot-authored note per marker, so code that edits in place would PUT it; each test asserts exactly one new marked note carrying the result body and no listing or PUT of notes. New triage and prioritize tests check that a failed note POST warns and fails the step. Bundles rebuilt. Raised by @waynesun09 on fullsend-ai/fullsend#9399. BREAKING CHANGE: on GitLab, each triage (sufficient, in-progress) and prioritize run, a retry included, adds a new issue note instead of editing the earlier marked one, so re-runs add comments to the thread. No migration is needed; earlier notes are left as they are. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Follow-ups from review of this PR: - agents/triage.md: step 2e no longer names an open pull request in another repository; it says some trackers edit the marked comment in place, which stays true as they change. - behaviour/features/prioritize.feature: the post-script posts "a RICE comment", not a "sticky" one. The behaviour suite runs on GitHub, which still edits the comment in place, while GitLab now appends. - docs/triage.md: the Retries bullet says it describes Jira, where the `sufficient` and `in-progress` comments each keep one fixed marker and every run edits the earlier comment with that marker. Carrying a refuted cause forward between triage runs, raised in the same review, needs a change to how every tracker's triage comment holds its state; it is tracked in fullsend-ai#2042. Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Step 2e asked a re-triage to keep every cause from every earlier analysis, but a refutation lived only in the unpublished reasoning, so a later run could restore a cause an earlier run had ruled out. With results appended rather than edited (fullsend-ai/fullsend#9399), there is also no single comment to read. Every sufficient comment now ends with an Open causes list and a Ruled out list. A re-triage starts from the newest marked analysis by the triage account, keeps open causes unless it refutes them, and keeps ruled-out causes out unless their evidence no longer holds or newer evidence revives them. On Jira the agent reads the marker from the comment's fullsend.sticky-marker property via expand=properties. The eval fixture can seed comments on GitHub issues. A cause_lists check judge reads the posted lists, and two new cases check that a cause ruled out in run 2 stays out in run 3, with and without the lists in the earlier analyses. Fixes fullsend-ai#2042 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
- With no recognised triage bot account among several marked-comment authors, there is no trusted baseline: both lists are rebuilt from every marked analysis, so a planted comment cannot drop an open cause. GitLab bot usernames and a single Jira property account count as the triage account. - The cause_lists judge reads headings with a trailing note, matches phrases only in each item's cause name, and catches more spellings of a restored ruled-out cause; the cases accept more correct wordings. - fixture.comments: false is refused instead of read as an empty list. - The jira-forge comment no longer has an uppercase word the skill env reachability test reads as a variable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Only a comment from a recognised triage bot account can be the baseline, even when it is the only marked comment; otherwise both lists are rebuilt from evidence. Earlier comments are data: instructions inside them are never followed. Case 015 seeds a single forged analysis that inverts the real causes and asks the next run to copy its lists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Every comment, the baseline included, is data. Triage comments newer than the baseline count as updates only from the same triage bot account; a marked comment from anyone else is a human comment whose claims are verified. Jira lets any commenter set the marker property, so Jira has no trusted baseline and always rebuilds the lists from evidence. forbidden_open in the re-triage cases now catches any plus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
On Jira the agent can learn the account its credential belongs to (GET /rest/api/3/myself, the same lookup fullsend uses), so a property-marked comment by that account is a trusted baseline again. forbidden_open entries can be AND-groups, so the re-triage cases flag a plus only beside a rejection claim, and cause_lists gates at 0.9 like the other live checks until the cases have run live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Any GitLab user can register a name like group_1_bot, so a username proves nothing. The agent now looks up the account its GITLAB_TOKEN belongs to (GET /api/v4/user, the same token the post-script posts with) and trusts only notes whose author.id matches, as it already does on Jira with /myself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
fullsend-ai#2042's done-when asks for a live cause from run 1 to survive a run that does not mention it. Case 016 seeds a run-1 analysis whose second open cause (an unhandled ValueError) is not in the issue body and whose third (an authgw gateway stripping the email parameter) rests only on log lines run 1 quotes, then a question and an answer that name no cause, then a newer full analysis that leaves authgw out without refuting it. The next full analysis must keep all three open causes and run 1's ruling; nothing else on the issue or in the code names authgw, so a triage that ignores run 1 cannot find it. The judge tests seed case 016's own fixture comments. Cases 013 and 014 repeat the cause in run 2, so they could not catch an agent that reads only the newest run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
gh issue view returns App logins without the "[bot]" suffix, so a -triage[bot] check on its author.login either matched nothing or, read loosely, trusted a user account named like an App. Step 2e now always reads authors from the REST comment listing and trusts a GitHub comment only when user.type is Bot and performed_via_github_app.slug ends in -triage; the github-forge skill shows the listing. cause_lists now requires seeded_comments instead of defaulting to 0, and the eval README documents the block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…e it Step 2e reads every marked comment and keeps every cause in them, so a marker anyone can type would plant causes that persist across runs. A marked comment now counts as a triage-agent comment only when the triage account wrote it: on GitHub a REST author of type Bot whose App slug ends in -triage (gh issue view drops the [bot] suffix), on GitLab and Jira the account the agent's own credential belongs to. Anyone else's marked comment is a human comment whose causes are hypotheses. The forge skills show the REST listing, the account lookups, and the Jira expand=properties that exposes the marker property. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
The REST listing gave authors but no bodies, and gh issue view uses different comment ids, so the agent could not tie a REST author to the marked comment it read. The listing now includes the body, step 2e reads GitHub comments from it, and a comment no App posted never counts as the triage account's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Brings in the fullsend-ai#2037 commits that count a marked comment only when the triage account wrote it and read GitHub comments with their authors from one REST listing. This branch's step 2e already carries the same rule; its GitHub bullet now reads comments from that listing too, and a comment no App posted never counts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
If the agent cannot learn its own account, or a comment has no author, no marked comment counts as a triage-agent comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Step 2e here already rebuilds the lists when no marked comment is from the triage account; it now does the same when the agent cannot look up its own account. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
… REST only The triage App slug is pinned in harness/triage.yaml, so step 2e now requires performed_via_github_app.slug == "fullsend-ai-triage" (or the fullsend-ai-triage[bot] login), the idiom pr-review uses for the review App, instead of any slug ending in -triage. The step also reads GitHub comments only from the REST listing, so it no longer points back at gh issue view for pagination. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Step 2e here now trusts a GitHub comment only from the fullsend-ai-triage App slug pinned in harness/triage.yaml (or its [bot] login), as fullsend-ai#2037 does and as pr-review does for the review App. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
cause_lists cannot see input.yaml, so a stale seeded_comments would let it grade a seeded comment as the run's output. cause-lists-test.sh now checks, for every triage case that declares cause_lists, that the count equals the number of fixture.comments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
The listing renamed fields to user, type and app, while step 2e names user.login, user.type and performed_via_github_app.slug; it now keeps those paths so the two match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com> * gitlab-doors-append: fix(github-forge): keep the REST field paths in the comment listing
Anyone with edit rights can edit an older comment, which bumped its edit time past a newer analysis and made it the starting point, losing the newer one's findings. Step 2e now orders trusted analyses by creation time and uses edit time only for a comment fullsend updated in place, which shows a Previous run fold. The GitHub REST listing adds created_at. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Step 2e here now picks the baseline as the trusted analysis created last and counts updates by creation time, using edit time only for a comment fullsend updated in place (one with a Previous run fold). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
The judge passed every case that declares no cause_lists, so one re-triage case that kept failing still met the 0.9 threshold. It now abstains on those cases, which the nightly aggregate does not count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
The trusted App was hard-coded as fullsend-ai-triage, so a harness that overrides slug through base: composition, or an install under another app set, matched no earlier triage comment. fullsend exports the harness slug into the sandbox as FULLSEND_SLUG (since v0.36.0), so step 2e now compares with it and falls back to fullsend-ai-triage only when it is unset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Step 2e here now compares the GitHub App slug with FULLSEND_SLUG, the harness slug fullsend exports into the sandbox, as fullsend-ai#2037 does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
The exception for a comment with a Previous run fold reopened the edit hole: anyone with edit rights can add a fold, or edit a folded comment, and its edit time won again. fullsend edits only its first marked comment in place, and later ones come only from appending, so creation order is right for its own edits as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Step 2e here now orders trusted analyses by creation time only, with no exception for folded comments, as fullsend-ai#2037 does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
… made it Ordering by creation time alone broke the duplicate case on GitHub and Jira, where fullsend keeps editing its first marked comment after a later duplicate exists. A trusted comment is now dated by its last edit only when the triage account made that edit (GitHub GraphQL editor, Jira updateAuthor), and by creation time otherwise. GitHub trust uses the App names scripts/lib/review-ops.lib.sh trusts for the review App (FULLSEND_SLUG, <owner>-triage, fullsend-ai-triage, FULLSEND_APP_SET), and requires a Bot author and editor. A triage-in-progress note is never the prior analysis. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Step 2e here now dates a trusted analysis by its last edit only when the triage account made it, uses the App name set the review scripts trust, requires a Bot author, and never takes a triage-in-progress note as the baseline, matching fullsend-ai#2037. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…m case-insensitively FULLSEND_APP_SET never reaches the triage sandbox, so it is dropped from the trusted names (FULLSEND_SLUG does: fullsend run exports it). App names compare case-insensitively, and step 2e says the GraphQL editor query pages while the REST listing does not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
On a shared /tmp another user can plant the job's prior triage
directory, or a symlink, where this user cannot remove it, and the
harness would copy its file into the sandbox as this run's analysis.
The pre-script now fails when something stays at that path or the new
directory is not a real directory this user owns; other write failures
still leave nothing there and only warn.
A triage-account edit timed after the comment listing (GitHub
updated_at, GitLab note updated_at) means the listed body is stale, so
that comment is untrusted ("edited during the read"). The size fold's
"Also ruled out (see earlier analysis): a; b; c" line now counts each
name, as the eval cause_lists judge reads it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
The job directory was checked only when it was created, but the comment reads take seconds, and on a shared RUNNER_TEMP it could be swapped for a symlink to a planted file meanwhile. It is now checked again before the copy (still a real directory this user owns) and after it (the file is byte-equal to the one this run wrote and not a symlink); either failure fails the pre-script. The ownership check right after mkdir, which could not fail, is gone. Headers now say what fails the run and what only warns, and the fold-line parsing is described on its own terms, with fullsend-ai#2062's judge reading the line the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…i#2044 fcf1107 * fork/triage-prior-script: docs(triage): fold copies carry no marker, in the rebuild rule too fix(triage): trust nothing on editor query errors; stale-file clause fix(triage): never fail the pre-script on a write, keep dropped rulings fix(triage): per-job prior triage file, full Jira paging, earlier results fix(triage): read the prior triage analysis in the pre-script fix(triage): harden the prior-triage scripts after review feat(triage): pick the trusted prior analysis with a script Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
|
🤖 Finished Review · ✅ Success · Started 12:00 PM UTC · Completed 12:11 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.08 |
The read-race check allowed 5 seconds between the comment listing's
update time and the editor query's edit time. A triage-account edit in
that window left a stale listed body trusted, and a bot edit within 5
seconds of someone else's could vouch for a body the bot never wrote.
Any editor time later than the listed update time now makes the comment
untrusted ("edited during the read"); a false positive only sends step
2e down the rebuild path.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
|
🤖 Finished Review · Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.02 This review was superseded by a newer commit. Check the current pull request HEAD's review status before merging. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
|
🤖 Finished Review · ✅ Success · Started 1:19 PM UTC · Completed 1:27 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.86 |
fullsend-ai/fullsend#9575 merged on 17 Nov and closed #9568, so the caveat now applies only to installs on fullsend v0.56.1 or earlier. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
* gitlab-doors-append: docs(triage): fullsend's triage job now exports FULLSEND_APP_SET Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com> # Conflicts: # docs/triage.md
* triage-carry-state: docs(triage): fullsend's triage job now exports FULLSEND_APP_SET Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com> # Conflicts: # docs/triage.md
|
🤖 Finished Review · ✅ Success · Started 1:29 PM UTC · Completed 1:42 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.89 |
Under fullsend's ADR 0133 a host-side read that feeds the model admits only authorized records. The prior triage file now carries text only for records the pre-script trusts; untrusted_marked lists other marked comments by id, created time, marker and reason, and step 2e has the agent read those itself with its forge skill, as claims. The lib header, step 2e and docs/triage.md now say that the GitHub App-name list is an interim convention ADR 0107 does not accept as bot identity, to be replaced by bot_role == "triage" once fullsend-ai/fullsend#9602 lands, that the GitLab and Jira own-account match is exact pending #9602, and that the pre-script is an interim subset of ADR 0141's entity-context snapshot. The trusted text is not scanned on the host: fullsend scan input does not fit (event-shaped input, an SSRF stage that would drop analyses quoting local URLs, no secret redaction), so the gap is recorded rather than filled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
|
🤖 Finished Review · ✅ Success · Started 2:52 PM UTC · Completed 3:06 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.15 |
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
|
🤖 Finished Review · ✅ Success · Started 4:31 PM UTC · Completed 4:46 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.39 |
| _prior_triage_github() { | ||
| local work="$1" owner="${REPO%/*}" after="" trust_error="" names _ | ||
| # --paginate prints one array per page; --slurpfile below joins them. | ||
| if ! gh api --paginate "repos/${REPO}/issues/${ISSUE_NUMBER}/comments?per_page=100" > "${work}/comments.json" \ |
There was a problem hiding this comment.
[medium] edge-case
The GitHub comment listing (gh api --paginate) and the GraphQL editor loop (gh api graphql, up to 100 iterations) run with no execution deadline. A stalled API response blocks the pre-script instead of producing the error snapshot and letting triage continue. The GitLab GraphQL request in the same lib (line ~241) and _gitlab_api use --connect-timeout 10 --max-time 30; pre-triage.src.sh adds no wrapping timeout.
Suggested fix: Put a time limit on the GitHub gh api calls (e.g. a timeout wrapper) and route expiry through the existing error/trust_error handling.
| # note's updated_at for notes edited before last_edited_at existed, | ||
| # and resolving a thread moves updated_at, so resolving such a note | ||
| # during the read reads as a race: a known, safe false positive. | ||
| | .raced = (.edit == "own" and .listed_at != null |
There was a problem hiding this comment.
[low] edge-case
The read-race check uses a strict > on second-precision timestamps. A bot edit landing in the same second as the REST updated_at is not flagged, so the listed body may be an older revision than the one the GraphQL editor metadata describes, yet it is still trusted.
Suggested fix: Fetch the body and editor metadata together, or otherwise verify that both reads describe the same comment revision; add a same-second edit regression test.
| item = re.compile(r"^\s*(?:[-*+]|\d+[.)])\s+(.*)$") | ||
| def names(s): | ||
| return [re.split(r"\s[—–-]\s|—", m.group(1), maxsplit=1)[0] | ||
| for m in (item.match(line) for line in (s or "").splitlines()) if m] |
There was a problem hiding this comment.
[low] logic-error
The cause_lists judge's names() only reads list-item lines. A plain compacted line such as Also ruled out (see earlier analysis): Alpha; Beta is ignored, although agents/triage.md allows it and the production parser accepts it, so a compliant comment can fail the judge.
Suggested fix: Recognize compacted ruled-out lines with the same semantics as the production parser and add a test for the plain-line form.
|
|
||
| # --- Comments --- | ||
|
|
||
| # Posts a new note whose first line is <marker>. Each run appends a new |
There was a problem hiding this comment.
[low] scope-bundling
The diff vs base rewrites the prioritize GitLab door's forge_post_sticky_comment (drops the find-and-edit sticky logic and _gitlab_bot_username; it now always POSTs a new note) in a PR whose stated intent is triage prior-analysis reading (#2053). The PR body says the branch is stacked on #2044, so the change likely comes from the stacked base, but it is still part of what this diff would merge.
Suggested fix: Split prioritize-specific door changes into their own submission, or land #2044 first and rebase.
|
Closing. With #2079 carrying triage state as a structured marker on the newest trusted comment, the agent only reads that one marker, so nothing is left for a host-side script to do. That also removes the host-side reading of untrusted comments this PR added, which is where most of its review findings were. fullsend's ADR 0141 entity-context-snapshot is the eventual home for this; the bot-identity part is fullsend-ai/fullsend#9602. |
Summary
Fixes #2053. Stacked on #2044: review only the commits after fcf1107. The last commit is an
oursmerge that only records this branch's pre-rebase history so the push stayed a fast-forward; it changes no files.Step 2e of
agents/triage.mdasked the triage agent to do multi-request bookkeeping by hand: read every page of the comment listing and of a GraphQL editor query, join them by id, check each author and last editor against the triage account, date each comment by its last trusted edit, cut at the firstPrevious runfold, and pick the newest analysis. A missed page or a wrong join silently changes the baseline.This moves that work into the triage pre-script, which already runs on the host with the tracker credentials. It writes a JSON result that the harness copies into the sandbox, and step 2e now works from that file. The agent's tools are unchanged:
Bash(gh,curl,jq), Skill.The result also restores what e6098e0 took out of the prompt: it lists causes that an older trusted analysis or a
Previous runfold of the baseline names but the baseline's lists do not, so the agent can re-check them.Changes
scripts/lib/prior-triage.lib.sh, bundled intoscripts/pre-triage.sh.prior_triage_writereads every comment page and every editor page, applies the trust and dating rules, and writes the JSON. It never fails the pre-script: any error is written into the file.gh api --paginateplus a GraphQL cursor loop forlastEditedAtandeditor. The trusted names are<owner>-triage,fullsend-ai-triageand${FULLSEND_APP_SET}-triage, compared case-insensitively. These are the namesreview-ops.lib.shtrusts for the review App, with-triage.pageandX-Next-Page, and a full page without the header still asks for the next one. A GraphQL cursor loop readslastEditedBy. Ownership is matched by account id from/api/v4/user, using the triage ops'_gitlab_apiand trusted CI origin.startAt, advancing by the comments returned. Without atotalin the response, a full page is never taken as the last. The loop stops with an error after 100 pages, the same cap fullsend's own Jira client uses. The marker comes from thefullsend.sticky-markerproperty, run status from thefullsend.agent-statusproperty, ownership from/myself, and edits fromupdateAuthor. The ADF body is rendered as text and cut at the firstPrevious runexpand node. It uses the triage ops'_jira_api, which strips trailing slashes from the base URL and selects the auth mode.updates,untrusted_markedanddropped_cause_candidates.scripts/pre-triage.src.sh: after the label reset, writes${RUNNER_TEMP}/triage-workspace-${CI_JOB_ID}/prior-triage.jsonwhenRUNNER_TEMPis set. It removes any earlier directory, creates a new one private to the runner user, and checks every write: a failedmkdir,cpor write becomes a warning and never fails the pre-script. The log says whether the file was written, written with an error, or not written.harness/triage.yaml: an optional host file copies it to/sandbox/workspace/prior-triage.json.agents/triage.mdstep 2e: read that file withjq, field by field. The file is a snapshot taken before the run. The pagination, join, trust and dating prose is gone. What the pre-script does not cover stays: how to read the lists, the carry rules, and claims versus findings. The dropped-cause rule is back, driven bydropped_cause_candidates.skills/gitlab-forge/SKILL.md,skills/jira-forge/SKILL.md: the paging rules the pre-script follows, for the by-hand fallback. On GitLab, a full page withoutX-Next-Pagestill has a next page. On Jira, keep going until a page is empty, thetotalis reached, or (with nototal) a page is short, and stop after 100 pages.docs/triage.md: describes the pre-script.scripts/prior-triage-test.sh, wired intomake script-test.Output shape:
{"forge": "github", "error": null, "trust_error": null, "trusted_names": ["acme-triage", "fullsend-ai-triage"], "seen": {"comments": 12, "marked": 3}, "analyses": [{"id": "1", "created": "…", "dated": "…", "edited": false, "text": "…", "folds": [{"title": "Previous run", "text": "…"}]}], "baseline": {"id": "1", "dated": "…", "has_lists": true, "text": "<text above the first fold>"}, "updates": [{"id": "3", "dated": "…", "marker": "triage-in-progress", "text": "…"}], "earlier_results": [{"id": "0", "dated": "…", "marker": null, "text": "Duplicate of #12 …"}], "untrusted_marked": [{"id": "2", "created": "…", "marker": "triage-agent", "reason": "not posted by the triage account"}], "dropped_cause_candidates": [{"cause": "Stale token", "newest": "open", "open_in": ["1 Previous run"], "ruled_out_in": []}]}Relation to fullsend's specs
These are fullsend-ai/fullsend's ADR 0107 (bot identity), ADR 0133 (actor-attributed data) and ADR 0141 (entity-context staging), and the authorization v2 sections "Bot identity fields" and "Model-bound actor-attributed data admission".
<owner>-triage,fullsend-ai-triage,${FULLSEND_APP_SET}-triage) is an interim naming convention. ADR 0107 does not accept App names as bot identity. The list is to be replaced by the mint's registeredbot_role == "triage"once Let harness scripts resolve a bot's registered role (ADR 0107) fullsend#9602 exposes that lookup to harness scripts; todayfullsend runwithholds the mint's OIDC variables from child scripts. The GitLab and Jira own-account match (/api/v4/userid,/myselfaccountId) is an exact identity, pending confirmation in #9602.analyses,updatesandearlier_results. TheirPrevious runfolds are included, but a fold may hold text someone else edited before fullsend folded it, so step 2e reads fold text as claims.dropped_cause_candidatesare drawn from those alone.untrusted_markedlists other marked comments by id,created,markerand reason only. Step 2e has the agent read those itself with its forge skill, as claims, as it did before this PR.fullsend scan input(internal/cli/scan.go).fullsendis on the pre-script's PATH: the Jira post-script already calls it, and the eval runsfullsend run. But the command does not fit:EVENT_PAYLOADand returns sanitized text only through theGITHUB_OUTPUTside channel, so each comment would have to be wrapped in a fake event.*bodyfield. It marks anylocalhostor private-IP URL critical and resolves every URL's host from the runner, so it would drop the many analyses that quote a local URL.internal/security/hooks.go: every tool, on by default; Unicode, secret redaction, context suppression) sees it when the agent reads the file, as they see the agent's ownghreads. ADR 0141's filtered snapshot is where host-side filtering belongs.Trade-offs
bashin the agent's Bash allowlist. That would let an agent reading untrusted issue text run any shell command. pi's enforced allowlist refusesbashanyway. The pre-script approach depends on these points in fullsend (as pinned ingo.mod):internal/cli/run.goruns the pre-script (runPreScript) beforebootstrapEnvstageshost_files.internal/harness/harness.go, the host-file check).${VAR}src is expanded on the host at staging time. A relative src would instead be fetched from the base URL when the harness is composed (internal/harness/compose.goresolveBaseHostFiles), which is why the src uses${RUNNER_TEMP}.RUNNER_TEMP. fullsend's GitLab job script exports it for exactly this use (internal/scaffold/fullsend-repo-gitlab/.gitlab/ci/scripts/run-agent-job.sh), and the scribe harness does the same.RUNNER_TEMPthere is no file, and step 2e falls back to reading the comments with the forge skill and trusting none of them.go.mod:internal/sticky/sticky.goBuildUpdatedBody;fullsend:agent-status:body marker:internal/tracker/tracker.goStatusMarkerPrefix;fullsend.agent-statusandfullsend.sticky-markerJira properties:internal/tracker/jira_client.go.FULLSEND_SLUGexists only in the sandbox. The host side trusts the same names as the review pre-script, and the triage harness's slug isfullsend-ai-triage, which is in that list. fullsend's triage job exportsFULLSEND_APP_SETsince fix(#9568): export FULLSEND_APP_SET to the triage agent step fullsend#9575; an install on fullsend v0.56.1 or earlier whose custom App set is not named after the owner still matches none of the names. The output liststrusted_names. A Bot whose App name ends in-triagebut is not one of them gets the reasonApp not in the trusted names, so the agent can say why inreasoning. Any other Bot is "not posted by the triage account".newest: the list its most recent source put it in. Step 2e puts anopenone back in Open causes ending(unverified), unless the agent refutes it now. Aruled_outone goes back in Ruled out while its evidence still holds, and to Open causes only on reviving evidence. A cause an older source only ruled out is never revived just because the baseline dropped it.(unverified). A cause written in other words cannot be matched deterministically, so it shows up as a candidate, and the prompt tells the agent to drop any candidate the baseline already lists in other words. That means false positives the agent filters out, never a silently missed cause. Folds carry no timestamps, so the sources come out in the most recent order the script can know: the baseline's folds in order, then older analyses newest first, each before its own folds. Fold rulings are never treated as established.trust_error) when any of these happens:errorsnext to partial data;/tmp), fails the pre-script with an::error::. The directory is checked again before and after the copy, because the network reads take seconds. Before the copy, it must still be a real directory this user owns. After the copy, the file must byte-compare equal to the one this run wrote and not be a symlink. A failed triage is better than a forged baseline. What remains is the instant between the last check and the harness copying the file, which no check in the pre-script can close. Every other write failure leaves nothing at the path, so it stays a warning and the run goes on without the file.updated_at(GitHub) or noteupdated_at(GitLab) means the listed body is an older one, possibly one someone else edited. Any later editor time counts, with no slack, and the comment is untrusted with the reasonedited during the read. A false positive (the two APIs stamping one edit apart) only sends step 2e down the rebuild path. On GitLab,lastEditedAtfalls back to the note'supdated_atfor notes edited beforelast_edited_atexisted, and resolving a thread movesupdated_at, so resolving such a note during the read reads as a race; that false positive is safe. Jira reads body and editor in one request. Reading the body from the GraphQL editor query instead would make the two consistent, but it would move author and App identity off the REST listing that the trust check is built on, so I kept the comparison. On Triage re-runs: carry the prior analysis and its refutations reliably across trackers #2042, the status comment fullsend edited shows RESTupdated_atand GraphQLlastEditedAtboth at2026-11-15T18:21:13Z, so the two APIs stamp the same edit identically.Also ruled out (see earlier analysis): a; b; cline, as a list item or a plain line, with the label bold or not, after a colon or a spaced dash, counts each;-separated name as ruled out. A plain list item such asAlpha, Betastays one name. The evalcause_listsjudge at this base does not split the line; as test(eval): cover reviving, size folds, question refutations and fold-only causes #2062 changes it, the judge reads it the same way.triage-agentcomment, or an edit of one, newer thanbaseline.dated, step 2e has the agent check it by hand with the same trust rules, and use it as the baseline only if it passes.updatesandearlier_results. They are recognised by the body marker, or on Jira by the property.post-triage.shposts it withtracker_post_comment). Those dated after the baseline areupdates. Those dated before it, or all of them when there is no baseline, areearlier_results;triage-in-progressnotes are left out ofearlier_results. Step 2e counts them as triage results when they read as one, as the old prompt did.date unreadable), so it can never sort its way into being the baseline.RUNNER_TEMPto/tmp, which the jobs of a persistent runner share, so the path carriesCI_JOB_ID. On GitHubCI_JOB_IDis unset: the pre-script and the host file both expand it to empty (internal/cli/run.gohostFileSource→safeExpandEnv,os.Expand), and each Actions job has its ownRUNNER_TEMP. Nothing removes the file after the run. It holds issue comments only and is readable only by the runner user.eval/scripts/run-fullsend.shrunsfullsend run triage, which runs the pre-script. The functional-test workflows run on GitHub-hosted runners, whereRUNNER_TEMPis set, so the file is produced there. The seeded comments come from the eval account, not a triage App, so they are listed inuntrusted_markedwithout text. The agent reads them with its forge skill, as before this PR, and cases 013–017 still take the no-trusted-baseline rebuild path they were written for. A local eval run withoutRUNNER_TEMPgets no file and the by-hand fallback. I have not re-run the eval cases.mainnow folds GitLab notes itself, with nested<details>blocks all titledPrevious run. The parser handles them: the baseline cut is right, and nested closing tags are stripped (tested). But fold labels repeat, and thePrevious run (2)order the prompt describes does not hold there. That needs revisiting when this branch is rebased.Testing
bash scripts/prior-triage-test.sh: 79 checks, passing against both the source and the bundledpre-triage.sh. They run the real pre-script against stubbedghandcurl.triage-in-progressnote, an unmarked question, and a run-status comment;-triageApp outside them;errorswith partial data;triage-in-progressnote left out, and with no baseline (earlier_results);lastEditedBy;lastEditedAtwithoutlastEditedBy;X-Next-Page;newestlist;errors, and a next page without a cursor;/user.updateAuthor;+0200offset;fullsend.agent-statusproperty;total;/myself.RUNNER_TEMP, the pre-script writes nothing;CI_JOB_ID;RUNNER_TEMPgives a warning, and the run continues;ghstub) fails the pre-script, and the planted file is neither read nor overwritten;Bash(gh,curl,jq), Skill.scripts/pre-triage-test.sh(source and bundled) unsetsRUNNER_TEMPso it stays about labels, and passes.scripts/harness-jira-test.shscripts/sandbox-credential-boundary-test.shscripts/skill-env-reachability-test.shmake check-bundlemake lintpre-commit run --from-ref fcf1107 --to-ref HEAD