Skip to content

triage: pick the trusted prior analysis with a script, not a multi-API prompt procedure #2053

Closed as not planned

Description

@tpouyer

Problem

Step 2e of agents/triage.md decides which earlier triage comments to trust and which one is the newest analysis. On GitHub the agent has to do all of this itself:

  • read every comment from the REST listing;
  • read every page of a GraphQL query for each comment's editor and lastEditedAt;
  • join the two by databaseId;
  • check the author's user.type and App slug against the trusted names, and the last editor the same way;
  • date each trusted comment by its last edit or its creation time, and pick the newest.

GitLab and Jira have their own versions of the same steps. That is a lot of multi-request bookkeeping for a prompt, and a slip, such as a missed page, a wrong join or a case-sensitive compare, silently changes which analysis the agent starts from.

What should change

Move the selection into a deterministic script the triage agent runs, for example in scripts/ next to the other triage helpers, one per forge or one with a --forge switch. It reads the comments, applies the trust and dating rules from step 2e, and prints a small JSON result: the trusted analyses in order, the chosen baseline's id and text above its first Previous run fold, and the status or result comments dated after it. Step 2e then tells the agent to run the script and work from its output instead of describing the procedure.

Recovering a cause the newest trusted analysis dropped without a ruling also belongs in the script (review of #2044). On GitHub and Jira, before fullsend-ai/fullsend#9399, older runs survive only in the Previous run folds fullsend writes when it edits a comment in place: Previous run is the most recent, then Previous run (2) and so on, and fullsend drops the oldest folds of a very long comment. On GitLab they survive as earlier notes. The script should list, from every trusted analysis and fold, causes that no newer trusted analysis lists or rules out, newest ruling winning, so the agent can re-check them. Matching a cause written in other words is the hard part. Folds are claims: a fold's ruling counts only when its evidence still holds.

Done when

  • A script implements step 2e's trust and dating rules for GitHub, GitLab and Jira.
  • Its tests cover:
    • a forged marked comment;
    • a bot comment edited by someone else;
    • a duplicate fullsend kept editing;
    • a triage-in-progress note;
    • more than one page of comments.
  • The script lists dropped causes as above, with tests for a reworded cause, a ruled-out cause in a fold, and a truncated fold history.
  • Step 2e uses the script's output, and the prose procedure is reduced to what the script does not cover.

Follow-up from the review of #2037.

Activity

  1. fullsend-ai-triage commented on Nov 16, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 7:43 PM UTC · Completed 7:45 PM UTC

    Commit: 0869ded · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.25

  2. fullsend-ai-triage commented on Nov 16, 2026

    @fullsend-ai-triage

    This is a reasonable follow-up, but it is blocked on two pieces of in-flight work.

    • fix(gitlab)!: post triage and prioritize results as new notes #2037 (open): The trust and dating procedure this script is meant to encode (comment/editor join, trusted author and last-editor checks, edit-time dating, the Previous run fold) is not yet in step 2e on the main branch. It is being introduced in that PR. That PR does not implement this issue, so it is a prerequisite rather than a fix. A script written now would encode rules that may still change in review.
    • Triage re-runs: carry the prior analysis and its refutations reliably across trackers #2042 (open): This issue defines how a re-triage chooses its baseline (the newest full analysis, with live causes and a cumulative ruled-out list) and leaves open how the newest analysis is identified on each tracker. That is the selection logic the script would implement, so the design needs to settle first.

    Related, but not blocking: #2050 changes the set of trusted App names (including the app-set name) that the script's trust check would use. It is worth landing before or alongside this work so the script does not hard-code a stale set.

    Once #2037 merges and #2042 settles the baseline rules, this can be re-triaged. The proposed scope looks implementable then. A script in scripts/ would take a --forge switch for GitHub, GitLab and Jira, with fixture-based tests for the five cases listed (forged marked comment, bot comment edited by someone else, duplicate fullsend kept editing, triage-in-progress note, multiple comment pages).

    Blocked by:

  3. self-assigned this
    on Nov 16, 2026
  4. fullsend-ai-triage commented on Nov 17, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 1:28 AM UTC · Completed 1:30 AM UTC

    Commit: 0869ded · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.23

  5. fullsend-ai-triage commented on Nov 17, 2026

    @fullsend-ai-triage

    This is still blocked. Both prerequisites from the earlier triage are open.

    Related, not blocking:

    The scope itself looks implementable once those land. It needs a script in scripts/ with a forge switch for GitHub, GitLab and Jira, fixture-based tests for the listed cases, and a shorter step 2e in agents/triage.md. No workflow files are involved. Re-triage after #2037 merges and #2042 settles the baseline rules.

    Blocked by:

  6. added 2 commits that reference this issue on Nov 17, 2026
    085d85d
    53cc68a
  7. tpouyer commented on Nov 18, 2026

    @tpouyer
    ContributorAuthor

    Closing as not planned. #2079 replaces step 2e's multi-API procedure with a structured state marker on the newest trusted triage comment, so the agent decodes one marker instead of reconstructing history, and there's no bookkeeping left for a script. The trusted-history part this asked for belongs to fullsend's ADR 0141 entity-context-snapshot and its agent-run receipts; bot identity is fullsend-ai/fullsend#9602.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions