Skip to content

fix(triage)!: carry causes as structured state across re-triage runs - #2079

Open
tpouyer wants to merge 23 commits into
fullsend-ai:mainfrom
tpouyer:triage-state-v1
Open

tpouyer wants to merge 23 commits into
fullsend-ai:mainfrom
tpouyer:triage-state-v1

Conversation

@tpouyer

@tpouyer tpouyer commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #2042. Supersedes #2044, #2061 and #2062. Independent of #2037.

A re-triage now carries its causes as structured data instead of prose. A sufficient result lists open_causes and ruled_out ({cause, evidence, verified}). The post-script shows both lists to people and attaches the same state to the comment as data. The next run starts from the newest trusted state and re-checks it. Refutations no longer live only in the unposted reasoning, so a refuted cause cannot quietly come back. It also works once fullsend-ai/fullsend#9399 posts every result as a new comment.

Changes

  • Schema (schemas/triage-result.schema.json): triage_summary.open_causes (non-empty when present, at most 10) and triage_summary.ruled_out (may be empty, at most 25). The shipped prompt always emits both on sufficient. The schema does not require them yet: fullsend's behaviour tests run against agents main, and its triage fixture and recorded result carry neither list, so requiring them would break those tests whichever repository merged first. A sufficient result without open_causes is posted without a triage state. A follow-up makes them required once fullsend's fixtures carry them. Each cause has cause (up to 200 characters), evidence (up to 300) and verified. root_cause_hypothesis is unchanged and is the first open cause.

  • Post-script (scripts/post-triage.src.sh, new scripts/lib/triage-state.lib.sh, scripts/lib/jira-triage-ops.lib.sh): on sufficient, the post-script lists the causes under the agent's comment, one line per cause. Unverified causes are marked, and Ruled out is left out when empty. It then stores the state:

    • GitHub and GitLab: <!-- triage-state-v1:<base64 of {"open_causes":[...],"ruled_out":[...]}> --> at the end of the comment.
    • Jira: the comment entity property fullsend.triage-state, set over REST after the comment is posted.

    The 4000-character limit covers everything posted except the hidden marker: the agent's comment, the lists and the footers. When the whole does not fit, it shrinks in this order:

    1. Ruled-out evidence is dropped.
    2. All evidence is dropped.
    3. The oldest ruled-out lines are dropped, and one line counts them.
    4. Open cause names are cut to 80 characters.
    5. The agent's comment is cut, with a note saying so.

    The stored state keeps every cause and stays under 30000 characters measured as JSON with every non-ASCII character escaped, below Jira's 32768-character property limit, so it fits whether Jira counts the characters sent or an escaped form (TRIAGE_STATE_MAX_CHARS may lower the cap). When non-ASCII text pushes it over, it drops ruled-out evidence first, then open evidence, then cuts cause text by whole characters. It never drops a cause. If the names alone still do not fit, the run fails before any label, comment or property is changed. A cause the state cannot keep (an empty name, or past the list limits; the schema also rejects whitespace-only names and evidence) is reported as a warning. The prompt keeps the agent's comment under 2500 characters, so the lists and footers fit and the cut stays a last resort. A sufficient result whose triage_summary is not an object (the schema rejects it) fails the run before any label or comment, as on main. A state marker the agent wrote, in any action's comment, is escaped, whatever its case, extra dashes or spacing. On the comment that carries the state, every <summary opener in the agent's comment, the cause lists and the footers is escaped too, so no Previous run fold can sit above the marker; elsewhere only a fold's summary is escaped, so the post-script's own <details> blocks still render. On Jira the triage account needs the "Edit own comments" project permission to set the state property, and a scoped token needs write:jira-work (granular: write:comment.property:jira) for the write and read:jira-work (granular: read:comment.property:jira with the comment-listing scopes) for the read; docs/triage.md lists them. Step 2e accepts only the exact form the post-script writes: once, as the last line of the comment's own text. Footers other than Next steps are held to 1000 characters and cut at a line end, label and component reasons before the "Not applied in Jira" notice, so Next steps is always posted whole. When the agent's comment is cut inside a fenced code block, the block is closed before the cut note, within the cap, so the lists after it still render. The comment and its footers are split by length, never by using the agent's text as a pattern. Line-end and footer offsets are found by splitting on the delimiter and counting characters, not with jq's index/rindex, because jq before 1.8.0 (1.7.1, the default runner image, included) returns byte offsets there while slicing counts characters (jq #3065).

  • Prompt (agents/triage.md): step 2e is now a short procedure:

    1. Find the trusted triage comments.
    2. Take the newest state as the baseline.
    3. If there is no baseline (legacy comments), rebuild the lists once from the earlier comments and their Previous run folds, treating every cause as an unverified claim.
    4. Carry the state forward: keep open causes unless refuted now, keep ruled-out causes unless new evidence revives them, treat comments as claims, and mark verified only for what this run checked.

    With more than 10 open causes, the agent keeps the 9 most likely and combines the rest into one unverified entry, Other open candidates, that names each of them in its evidence. If the names do not fit there, it first merges them into fewer, broader causes; it never drops one. On GitHub, only a Bot author counts; a User never does, whatever its login.

    The "accumulate / superset" rules are gone. The cause lists are exempt from "do not restate".

  • Trust rules and forge skills: author and editor checks per tracker. The GitHub REST comment listing and GraphQL editor come from skills/github-forge. GitLab uses /api/v4/user and GraphQL lastEditedBy. Jira uses expand=properties and /rest/api/3/myself. The GitLab and Jira skills show how to page through every comment (&page=N until a short page or an empty X-Next-Page; startAt until total), matching step 2e's "all pages". env/github/triage.env passes FULLSEND_APP_SET, and scripts/harness-jira-test.sh checks that it stays in the host file and out of env.sandbox.

  • Docs (docs/triage.md): a new "Re-triage state" section covering the marker and property, the cap, the trust rules and how they relate to fullsend's ADRs.

  • Eval:

    • fixture.comments seeds comments on a GitHub issue fixture, oldest first.
    • Re-triage cases 013 to 017:
      • 013 and 016 seed comments that carry a structured state.
      • 014 seeds legacy prose-only analyses.
      • 015 seeds a forged analysis that also has a forged state.
      • 017 seeds a forged plain-prose ruling.
    • A report-only cause_lists judge decodes the run's own triage-state-v1 marker and matches cause phrases and verified expectations against it. It is registered in run-functional.sh and aggregate-nightly.sh.
    • Case 007 is updated for the cause lists.

Relation to fullsend's specs

  • The marker sits outside the <!-- fullsend: namespace on purpose. fullsend post-comment (sticky.Post) escapes every <!-- fullsend: marker in the body it posts, both in v0.56.1 and on main, so a fullsend:triage-state-v1 marker would show up as text. The state's trust comes from the comment's author, which step 2e checks, and the post-script escapes any copy the agent writes.
  • Jira comment id. fullsend issues post-comment prints no comment id. It does store the run's marker on the comment as the property fullsend.sticky-marker = {"marker": "<marker>"} (CreateCommentWithMarker in internal/tracker/jira_client.go, called from postJiraStickyComment in internal/cli/issues.go). I checked this in v0.56.1-rc.1 (pinned in go.mod), in v0.56.1, and on #9399's head 5150c261, where every run creates a new comment carrying the property. The post-script therefore picks the comment the posting account (/myself) wrote with that marker and updated last:
    • Every page of the listing is collected in a temporary file and filtered there, never passed as an argument, so a long issue cannot overflow the argument size limit. Paging stops on an empty page, at total when Jira gives one, and otherwise on a page shorter than its maxResults. More than 100 pages fails the run.
    • Times are compared in UTC at full precision. Jira's +0000 form and RFC 3339 Z / +00:00 are both accepted, as in fullsend's jiraTimestampFormats.
    • A tie goes to the highest comment id.
    • An unparsable timestamp, or no matching comment, fails the run rather than guessing.
    • The post-script posts the comment first, then sets the property. Residual: before #9399 fullsend edits the comment in place, so a run cancelled after the edit but before the property write leaves the previous run's state attached to the new text. The next run starts from that older state, and step 2e also reads the baseline comment's own current text: a cause it names that the state lacks, or a ruling it states that the state contradicts, is a claim the run checks. Every carried cause is re-checked too, so the difference is caught. After #9399 each run posts a new comment, so this cannot happen. Overlapping runs storing an older state last is a residual too; serializing runs is ADR 0106's job in fullsend.
  • GitHub trust is interim. The App-name list (<owner>-triage, fullsend-ai-triage, ${FULLSEND_APP_SET}-triage) is a naming convention that ADR 0107 does not accept as bot identity. It is to be replaced by bot_role == "triage" once Let harness scripts resolve a bot's registered role (ADR 0107) fullsend#9602 lets harness scripts resolve it. fullsend's triage job exports FULLSEND_APP_SET since fix(#9568): export FULLSEND_APP_SET to the triage agent step fullsend#9575, which is not in a release yet: v0.56.1 and earlier do not export it.
  • GitLab and Jira trust is exact. Their own-account checks compare exact identities, pending confirmation in Let harness scripts resolve a bot's registered role (ADR 0107) fullsend#9602.
  • ADR 0133. Every comment, a trusted state included, is data the agent checks against the code, never instructions.
  • ADR 0141. The entity-context-snapshot and immutable agent-run receipts are the eventual canonical history. This comment state bridges until then.

Trade-offs

  • The state relies on the agent reading it back. No host-side script reads comments. The agent finds and decodes the baseline itself, and on GitHub the author check rests on App names until #9602.
  • Legacy issues are rebuilt once, as claims. Causes from comments written before this change all start as verified: false until a run checks them.
  • Long histories lose detail in the readable text first. Once ruled_out reaches 25 entries, the agent must merge its oldest entries. Before that, the readable list may show only a count of older rulings, while the stored state keeps them.
  • Breaking: Jira needs a new permission and scopes. A sufficient run on Jira stores its state as the comment property fullsend.triage-state, so the triage account needs the "Edit own comments" project permission, and a scoped token needs write:jira-work (granular: write:comment.property:jira) and read:jira-work (granular: read:comment.property:jira with the comment-listing scopes). Without them the run fails after posting its comment. The schema is not stricter: the cause lists are optional for now (see Schema above). The first commit's BREAKING CHANGE: trailer still describes the earlier required lists; 97dd677 relaxed that, and this section is the current description.
  • Jira property writes bypass the edit check. A Jira user with the "Edit all comments" permission can set fullsend.triage-state on the bot's comment without changing updated or updateAuthor. Only users with that admin-level permission can do it. On GitHub and GitLab the marker sits inside the body, so the edit checks cover it. Step 2e treats any state as claims and re-checks every cause, so a planted state cannot settle a cause by itself.
  • The eval cases take the rebuild path. The eval account is not a triage bot, so every seeded state is untrusted. A bot-authored baseline case is tracked in eval(triage): cover reviving, folding and non-GitHub paths of the carried cause lists #2043. cause_lists stays report-only until the cases have run live.

Testing

  • scripts/post-triage-test.sh: new tests for all three trackers.
    • GitHub: rendered lists; the marker decodes to the state; an empty ruled-out list is left out; forged markers are escaped in sufficient and other actions; a result too large for the cap is condensed while the marker keeps all 25 entries; over-long strings are cut; a result without open causes is posted without a state; a too-large state fails with no gh or fullsend call; glob characters in the comment do not move the lists; marker variants are escaped; a footer longer than the cap keeps Next steps; an empty cause name is warned about; multibyte text before the comment cut and the footer split is still cut at a line end with the footer whole (passes under jq 1.8.2 and 1.7.1, and fails when offsets are counted in bytes, as index/rindex do before jq 1.8.0); a sufficient result whose triage_summary is not an object fails before posting or labelling; TRIAGE_STATE_MAX_BYTES is read in base 10; a comment cut inside a code block gets the block closed; footer trimming keeps the Jira notice whole; a multibyte worst case (35 CJK and emoji entries at the schema limits) keeps every cause under 30000 characters of escaped JSON by emptying evidence and cutting names by whole characters; under a smaller cap the cause text is cut by whole characters with every cause kept, and with too little room the state fails rather than dropping a cause.
    • GitLab: lists and marker in the note.
    • GitHub worst case: a 16384-character comment with 10 open and 25 ruled-out causes at their maximum lengths stays within 4000 characters. All 10 open causes are listed, a count line replaces the ruled-out ones, the comment is cut with a note, the footer survives, and the marker keeps everything.
    • Jira:
      • The property lands on the newest own marked comment, ignoring other authors and other markers.
      • Timestamps in the Z, +02:00 and +0200 forms are compared correctly, and fractional seconds count.
      • A same-second tie goes to the highest comment id.
      • An unparsable timestamp fails the run.
      • Every page is read.
      • The run fails when no own comment matches.
      • The too-large case is condensed, while the property keeps every entry.
      • A run with no state sets nothing, even when an earlier comment has a state.
      • A comment listing that fails fails the run, and nothing is stored.
      • A page without total does not end the listing; paging goes on until a page is shorter than its maxResults.
      • A long issue (250 comments of about 5 KB over three pages) is read without passing the listing as arguments, and the state lands on the own comment on the last page.
  • scripts/validate-output-schema-test.sh: new cases for the cause lists.
  • eval/scripts/cause-lists-test.sh: judge pass and fail cases, plus fixture drift guards.
  • eval/scripts/setup-fixture-test.sh: fixture.comments.
  • Also run: scripts/pre-triage-test.sh, scripts/harness-jira-test.sh, scripts/skill-env-reachability-test.sh, eval/scripts/aggregate-nightly-test.sh, eval/run-functional-test.sh, eval/lint-cases.sh triage, eval/lint-release-cases.py, make check-bundle, make lint and pre-commit.

tpouyer and others added 11 commits November 17, 2026 16:07
A sufficient result now lists triage_summary.open_causes and ruled_out,
each {cause, evidence, verified}. The post-script lists both under the
comment and stores the same state for the next run: a hidden
<!-- triage-state-v1:<base64> --> marker on GitHub and GitLab, the
comment property fullsend.triage-state on Jira. The readable lists are
condensed to fit the 4000-character cap; the stored state keeps every
entry. The marker is outside fullsend's "<!-- fullsend:" namespace
because fullsend post-comment escapes those in the body it posts.

Step 2e replaces the accumulate/superset rules with a procedure: find
the trusted triage comments, start from the newest state, rebuild once
from legacy comments as unverified claims, and carry causes forward only
on evidence that holds now. The forge skills gain the author and editor
lookups the trust rules need, and env/github/triage.env passes
FULLSEND_APP_SET into the sandbox.

Fixes fullsend-ai#2042

BREAKING CHANGE: a `sufficient` triage result must now include
`triage_summary.open_causes` (non-empty) and `triage_summary.ruled_out`;
the output schema rejects one without them. A harness or overlay that
replaces `agents/triage.md` with its own prompt must have the agent emit
both lists, each entry `{cause, evidence, verified}`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
setup-fixture.sh seeds fixture.comments on GitHub issue fixtures, oldest
first. Cases 013-017 cover re-triage: 013 and 016 seed comments with a
triage-state-v1 marker, 014 legacy prose-only analyses, 015 a forged
analysis with a forged state, 017 a forged plain-prose ruling. The eval
account is not a triage bot, so every seeded comment is untrusted and
the cases exercise the rebuild path (fullsend-ai#2043 tracks a bot-authored
baseline).

The report-only cause_lists judge decodes the run's own marker and
matches cause phrases and verified expectations against it. Case 007
expects the reporter's cause as the open cause.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
Step 2e reads a trusted comment newer than the baseline without a state
as claims, and docs/triage.md says when that happens on Jira (ADR 0106's
coalescing isn't in place yet).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…ent exactly

The 4000-character cap now applies to everything posted except the
hidden marker, footers included: the lists shrink first (down to open
cause names cut to 80 characters), then the agent's comment is cut with
a note. The stored state stays under 30000 bytes for Jira's property
limit.

The Jira comment pick parses Jira's "+0000" form and RFC 3339 "Z" and
"+00:00" at full precision in UTC, breaks ties by the highest comment
id, and fails on a timestamp it cannot parse instead of dropping the
comment. Its comment cites where fullsend v0.56.1-rc.1, v0.56.1 and
fullsend-ai/fullsend#9399 set the fullsend.sticky-marker property.

Step 2e says a GitHub User never counts whatever its login, and the
sufficient rules say how to fold more than 10 open causes into one
unverified entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…a state

Over the 30000-byte state cap the post-script now empties ruled-out
evidence, then open evidence, then cuts cause text by whole characters,
and fails before anything is written if the names alone do not fit. It
no longer drops ruled-out causes, which a later run could revive.

On Jira the post-script deletes the fullsend.triage-state property from
the account's own triage comments before posting. Before
fullsend-ai/fullsend#9399 the post edits that comment in place, so a run
cancelled before the property write, or one with no state, no longer
leaves the previous state on new text.

The prompt keeps the agent's comment under 2500 characters so the lists
and footers fit the 4000-character limit, names an "Other open
candidates" entry for more than 10 open causes, and says a trusted state
is still claims. The docs record that a Jira admin can set the property
without editing the comment. The Jira skill shows comment paging, and the
GitHub skill cites where the GraphQL editor login was observed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…footers literally

A state that cannot be stored now fails the run with an explicit error
before the issue is touched, and the other new command substitutions in
the post path and the Jira lookups check their status. Causes the state
cannot keep are reported as a warning, and the schema rejects
whitespace-only names.

The agent's comment and the footers are split by length, so glob
characters in the comment cannot move the lists. The neutralizer
escapes marker variants with extra dashes, any case or spacing, and step
2e accepts only the exact form the post-script writes. Footers other
than Next steps are held to 1000 characters and cut at a line end, so
Next steps is always posted whole.

On Jira the state is cleared only from the comment an edit in place
would rewrite (the oldest own marked comment, as fullsend v0.56.1-rc.1
lists and picks it). If the post created a new comment
(fullsend-ai/fullsend#9399), the cleared state is put back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
The Jira flow is now: post the comment, then set fullsend.triage-state
on the newest-updated own triage-agent comment, keeping the UTC
timestamp parsing, the id tie-break, the all-pages listing and the
fail-closed paths. The clear-before-post and restore logic is removed.

The residual is documented: before fullsend-ai/fullsend#9399 fullsend
edits the comment in place, so a run cancelled after the edit but before
the property write leaves the previous run's state on the new text. The
next run starts from that older state, and step 2e re-checks every
carried cause and reads newer trusted text as claims, so the difference
is caught. After #9399 each run posts a new comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
The Jira comment listing collected every page in a shell variable and
passed it to jq as an argument, which overflows the argument size limit
on a long issue. Pages now go to a temporary file that jq reads.

The GitLab forge skill shows how to page through every note, matching
step 2e's "all pages", and the warning for a result with no named open
cause now says that instead of reporting dropped causes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…ndex

In jq 1.6, string rindex returns a byte offset while slices count
characters, so on non-ASCII text the comment cut and the Next steps split
could land in the wrong place. fullsend's default runner ships jq 1.7.1,
but runner_image can be overridden and GitLab runners bring their own jq.
A last_at helper now splits on the delimiter and counts characters, which
behaves the same on jq 1.6, 1.7 and 1.8. A test puts multibyte text
before both split points.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…ra without total

Step 2e now also reads the baseline comment's own current text: a cause
it names that the state lacks, or a ruling the state contradicts, is a
claim to check. That is what catches a cancelled pre-#9399 Jira run whose
property still holds the previous state, and the docs say so.

The schema rejects whitespace-only evidence. A triage_summary that is
not an object is treated as no state instead of aborting the post. Jira
paging no longer stops on a page without "total": it stops on an empty
page, at total when given, or on a page shorter than its maxResults, and
fails past 100 pages. TRIAGE_STATE_MAX_BYTES is read in base 10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…tice

When the agent's comment is cut inside a fenced code block (``` or ~~~),
the block stayed open and the cause lists after it rendered as code. The
cut now closes it before the cut note, with room reserved within the
cap. Trimming the other footers cuts the label and component reasons
before the "Not applied in Jira" notice, which is kept whole where it
fits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
@qodo-code-review

qodo-code-review Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Preserve structured causes across triage runs

🐞 Bug fix ✨ Enhancement 🧪 Tests 📝 Documentation 🕐 40+ Minutes

Grey Divider

AI Description

• Require structured open and ruled-out causes so re-triage can preserve and re-check prior
 findings.
• Publish readable cause lists and persist their state in forge comments or a Jira comment property.
• Add trust rules, size limits, and regression coverage for legacy, forged, and repeated analyses.
Merge Risk 🟡 Medium

Blast radius 🟢 Low 💥 1 capability

  • 1 affected end-to-end capability after fault-specific containment; implementation boundaries do not widen its functional scope.
  • The prompt contract, output schema, state serializer, comment renderer, and tracker-specific storage all serve one bounded outcome: carrying verified open and ruled-out causes into the next triage run.
  • The new schema/documentation transition changes whether a baseline is emitted, but does not create a separate user outcome or independent functional scope.
  • GitHub/GitLab/Jira remain delivery mechanisms for the same continuity behavior.
  • The Jira comment API and comment-property API are implementation hops in the same bounded triage state-continuity integration.
  • The user/system outcome is one persistent baseline for subsequent re-triage, not separate Jira capabilities.
Behavioral complexity 🔴 High 🧩 Multiple interactions

  • Before: Jira comment posting did not require this additional state-property transaction.
  • After: comment creation, sticky-marker assignment, all-page comment discovery, account matching, timestamp normalization, newest-comment selection, and property PUT must agree.
  • New correctness condition: the state must be attached to exactly the comment produced by this run despite in-place-edit versus new-comment deployments, pagination, timestamp ties, and failures between comment and property operations.
  • This ordering and coordination protocol is unchanged by the incremental schema relaxation.
Potential damage 🟡 Medium 🩹 Recoverable

  • The plausible failure is an incorrect future triage analysis or loss of historical cause continuity, not corruption of customer data or an external business transaction.
  • The new optional-schema path can intentionally leave a sufficient result without persisted state, causing the next run to fall back to older state or legacy claim reconstruction.
  • Reverting the code stops new bad state generation but does not automatically repair comments or Jira properties already written; recovery requires a subsequent trusted triage run to re-check the code and reconstruct the state, or manual correction of the affected comment/property.
  • Equal business importance is assumed because no business-criticality declaration is supplied; the consequence is assessed from the concrete triage behavior.
  • Usually recoverable by rerunning triage against the current source and manually correcting stale or missing state.
  • Recovery is weaker when a ruled-out cause was revived or an open cause was dropped because the next run may inherit the incorrect or absent baseline and must independently re-check the evidence.
  • Existing persisted comments/properties remain wrong after code rollback.
Assessed commit 97dd677
Diagram

graph TD
  C["Issue comments"] --> T{"Trusted triage?"} --> B["State or legacy"] --> A["Triage agent"] --> S["Result schema"] --> P["Post-triage script"] --> F["Forge comment"]
  P --> J["Jira property"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Canonical server-side run history
  • ➕ Provides durable, attributable state without parsing comments or resolving edited comment identity.
  • ➖ Requires upstream infrastructure not yet available; cannot address current re-triage behavior independently.
2. Rebuild from all comments every run
  • ➕ Avoids tracker-specific state storage and migration logic.
  • ➖ Repeatedly interprets prose, making omissions, stale refutations, and forged analyses harder to distinguish.

Recommendation: Use the PR’s comment-backed structured state as a bridge to canonical run history. Its tracker-specific persistence adds complexity, but retaining evidence and explicit refutations is materially safer than reconstructing every run from prose; reviewers should pay particular attention to Jira’s post-then-property-write gap.

Files changed (43) +2794 / -51

Enhancement (9) +949 / -21
triage.mdDefine structured re-triage procedure +34/-11

Define structured re-triage procedure

• Replaces prose accumulation with provenance checks, a trusted-state baseline or legacy reconstruction, and evidence-based cause transitions. Requires cause lists in sufficient results and reserves comment space for their rendering.

agents/triage.md

aggregate-nightly.shAggregate cause-list behavior when configured +3/-3

Aggregate cause-list behavior when configured

• Includes cause_lists among behavior checks eligible for nightly pass-rate aggregation.

eval/scripts/aggregate-nightly.sh

setup-fixture.shSeed prior comments in GitHub issue fixtures +25/-0

Seed prior comments in GitHub issue fixtures

• Validates optional comment bodies and posts them oldest first before the agent runs.

eval/scripts/setup-fixture.sh

triage-result.schema.jsonRequire bounded causes for sufficient triage +31/-1

Require bounded causes for sufficient triage

• Makes non-empty open_causes and ruled_out mandatory on sufficient results and validates each cause’s name, evidence, and verification flag.

schemas/triage-result.schema.json

jira-triage-ops.lib.shPersist state on the matching Jira comment +97/-0

Persist state on the matching Jira comment

• Pages through comments, identifies the posting account’s marked comment by UTC update time and ID, then writes its state property.

scripts/lib/jira-triage-ops.lib.sh

triage-state.lib.shBuild bounded, readable, persistent cause state +203/-0

Build bounded, readable, persistent cause state

• Normalizes and size-bounds structured state, renders condensed cause lists within the comment cap, and creates or neutralizes markers.

scripts/lib/triage-state.lib.sh

post-triage.shBundle structured-state posting logic +362/-6

Bundle structured-state posting logic

• Regenerates the deployable post-script with Jira property operations, state helpers, and the new sufficient-result posting path.

scripts/post-triage.sh

pre-code-jira.shRefresh bundled Jira operations for pre-code +97/-0

Refresh bundled Jira operations for pre-code

• Includes the shared Jira comment-selection and state-property helpers in the generated script.

scripts/pre-code-jira.sh

pre-triage.shRefresh bundled Jira operations for pre-triage +97/-0

Refresh bundled Jira operations for pre-triage

• Includes the shared Jira comment-selection and state-property helpers in the generated script.

scripts/pre-triage.sh

Bug fix (1) +62 / -6
post-triage.src.shAttach cause state to sufficient comments +62/-6

Attach cause state to sufficient comments

• Builds state before issue mutations, inserts readable lists before footers, and attaches a forge marker or Jira property after posting.

scripts/post-triage.src.sh

Tests (26) +1597 / -12
MakefileRun cause-list regression tests +1/-0

Run cause-list regression tests

• Adds the new offline cause-list test to the script-test target.

Makefile

sufficient.jsonBring sufficient fixture into the new contract +5/-1

Bring sufficient fixture into the new contract

• Adds an open cause and an empty ruled-out list to the sample result.

behaviour/fixtures/triage/sufficient.json

run-functional-test.shKeep functional threshold tests current +3/-1

Keep functional threshold tests current

• Adds cause_lists to the test configuration and updates the expected threshold count.

eval/run-functional-test.sh

aggregate-nightly-test.shExercise nightly cause-list aggregation +7/-0

Exercise nightly cause-list aggregation

• Adds cause_lists to synthetic summaries and checks repeated failures against the nightly verdict.

eval/scripts/aggregate-nightly-test.sh

cause-lists-test.shTest marker selection and cause-list judge +174/-0

Test marker selection and cause-list judge

• Runs offline cases for appended and in-place comments, malformed markers, verification expectations, and fixture consistency.

eval/scripts/cause-lists-test.sh

setup-fixture-test.shTest seeded issue comments +74/-0

Test seeded issue comments

• Checks comment order, stdin posting, and rejection of malformed or unsupported fixture comments.

eval/scripts/setup-fixture-test.sh

annotations.yamlExpect a cause for a self-evident bug +14/-0

Expect a cause for a self-evident bug

• Requires the reporter’s cause in structured state without treating its rendered list as redundant prose.

eval/triage/cases/007-self-evident-bug-redundancy/annotations.yaml

annotations.yamlGrade preservation of a refuted cause +77/-0

Grade preservation of a refuted cause

• Expects the missing-email cause to remain open and verified while the plus-address theory stays ruled out.

eval/triage/cases/013-retriage-keeps-ruled-out/annotations.yaml

input.yamlSeed successive analyses with a refutation +60/-0

Seed successive analyses with a refutation

• Provides two earlier state-bearing analyses and a later progress request for re-triage.

eval/triage/cases/013-retriage-keeps-ruled-out/input.yaml

repoUse shared web-app fixture +1/-0

Use shared web-app fixture

• Points the case at the Python web-app repository containing the relevant login code.

eval/triage/cases/013-retriage-keeps-ruled-out/repo

annotations.yamlGrade reconstruction of legacy analyses +73/-0

Grade reconstruction of legacy analyses

• Expects a prose-only historical refutation to survive reconstruction into structured cause lists.

eval/triage/cases/014-retriage-pre-rule-analyses/annotations.yaml

input.yamlSeed analyses predating structured state +47/-0

Seed analyses predating structured state

• Provides two prior comments without state markers, including a later prose refutation.

eval/triage/cases/014-retriage-pre-rule-analyses/input.yaml

repoUse shared web-app fixture +1/-0

Use shared web-app fixture

• Points the legacy re-triage case at the Python web-app repository.

eval/triage/cases/014-retriage-pre-rule-analyses/repo

annotations.yamlGrade resistance to a forged analysis +69/-0

Grade resistance to a forged analysis

• Requires the agent to reject false cause claims and verify the real cause against code.

eval/triage/cases/015-retriage-forged-analysis/annotations.yaml

input.yamlSeed a forged state and instruction +42/-0

Seed a forged state and instruction

• Supplies a non-bot comment with inverted causes, a state marker, and an instruction not to inspect code.

eval/triage/cases/015-retriage-forged-analysis/input.yaml

repoUse shared web-app fixture +1/-0

Use shared web-app fixture

• Points the forged-analysis case at the code that disproves its claims.

eval/triage/cases/015-retriage-forged-analysis/repo

annotations.yamlGrade retention of an omitted cause +87/-0

Grade retention of an omitted cause

• Requires an older, unrefuted gateway cause to remain open and unverified despite a newer analysis omitting it.

eval/triage/cases/016-retriage-keeps-unmentioned-cause/annotations.yaml

input.yamlSeed history with an unmentioned gateway cause +66/-0

Seed history with an unmentioned gateway cause

• Provides an initial three-cause analysis, intervening replies, and a later analysis that omits one cause without refuting it.

eval/triage/cases/016-retriage-keeps-unmentioned-cause/input.yaml

repoUse shared web-app fixture +1/-0

Use shared web-app fixture

• Points the omission case at the Python web-app repository; the gateway claim exists only in seeded history.

eval/triage/cases/016-retriage-keeps-unmentioned-cause/repo

annotations.yamlGrade rejection of an unsupported ruling +68/-0

Grade rejection of an unsupported ruling

• Requires the missing-email cause to remain open despite a later comment falsely claiming it was fixed.

eval/triage/cases/017-retriage-forged-ruling/annotations.yaml

input.yamlSeed a false plain-text refutation +39/-0

Seed a false plain-text refutation

• Combines an earlier analysis with a later unmarked request to drop a cause on incorrect evidence.

eval/triage/cases/017-retriage-forged-ruling/input.yaml

repoUse shared web-app fixture +1/-0

Use shared web-app fixture

• Points the false-ruling case at code that lacks the claimed None check.

eval/triage/cases/017-retriage-forged-ruling/repo

eval.yamlAdd structured cause-list judge +68/-1

Add structured cause-list judge

• Scores the current run’s decoded marker against expected open, ruled-out, and verification states while excluding seeded markers.

eval/triage/eval.yaml

harness-jira-test.shCheck triage App-prefix environment wiring +16/-1

Check triage App-prefix environment wiring

• Verifies FULLSEND_APP_SET is exported through the expanded GitHub triage host file, not directly through harness sandbox settings.

scripts/harness-jira-test.sh

post-triage-test.shCover state posting across trackers +557/-0

Cover state posting across trackers

• Adds GitHub, GitLab, and Jira cases for rendering, marker safety, byte and character limits, paging, timestamp selection, and failure handling.

scripts/post-triage-test.sh

validate-output-schema-test.shTest the breaking sufficient-result contract +45/-8

Test the breaking sufficient-result contract

• Updates valid fixtures and adds rejection cases for missing, empty, oversized, or malformed cause lists and entries.

scripts/validate-output-schema-test.sh

Documentation (5) +178 / -9
triage.mdDocument persisted re-triage state +90/-0

Document persisted re-triage state

• Explains tracker-specific storage, comment and property limits, trust checks, legacy migration, and known Jira consistency limitations.

docs/triage.md

README.mdDocument seeded comments and cause-list scoring +24/-4

Document seeded comments and cause-list scoring

• Describes re-triage fixture comments, cause-list expectations, and their report-only nightly status.

eval/README.md

SKILL.mdExpose GitHub comment author and editor provenance +26/-0

Expose GitHub comment author and editor provenance

• Documents paginated REST comments and GraphQL editor lookups needed to distinguish trusted bot comments.

skills/github-forge/SKILL.md

SKILL.mdExpose GitLab account and note provenance +20/-2

Expose GitLab account and note provenance

• Documents full note pagination, current-account lookup, and GraphQL last-editor checks.

skills/gitlab-forge/SKILL.md

SKILL.mdExpose Jira comment identity and properties +18/-3

Expose Jira comment identity and properties

• Documents property-expanded comment pagination, posting-account lookup, and previous-run folds in ADF.

skills/jira-forge/SKILL.md

Other (2) +8 / -3
triage.envExpose GitHub App prefix to triage +5/-0

Expose GitHub App prefix to triage

• Passes FULLSEND_APP_SET into the sandbox so the agent can recognize installation-specific triage bots.

env/github/triage.env

run-functional.shTreat cause lists as a report-only live check +3/-3

Treat cause lists as a report-only live check

• Removes the cause_lists threshold from runtime gating while retaining the judge’s results.

eval/run-functional.sh

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 4:37 AM UTC · Completed 4:45 AM UTC

Commit: 9ab6317 · View workflow run →

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

@qodo-code-review

qodo-code-review Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (8) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Jira triage can lose its saved state ✓ Resolved

Resolving commit: 881d2a3

Resolution reason
Documented the "Edit own comments" requirement for the triage account in docs/triage.md and added an
explicit error message naming that permission when the comment property write fails in
tracker_store_triage_state, across the Jira scripts.
Description
tracker_store_triage_state writes the Jira comment property only after
tracker_post_sticky_comment succeeds, but the property write requires Edit Own Comments permission
whereas posting a comment requires only Add Comments. Once each run creates a new comment, an
account with posting but not editing permission can change labels and post its analysis, then
receive a permission error on the property write, leaving that analysis without structured state
while the previous baseline remains.

2. A fake history fold makes the next run lose the newest state ✓ Resolved

Resolving commit: 881d2a3

Resolution reason
Adds TRIAGE_STATE_FOLD_RE, a case-insensitive regex matching a <summary> opener whose text begins
with "Previous run" (allowing whitespace, hyphen, &nbsp;, numeric entities, inline tags). It is
applied in triage_state_neutralize to escape the agent comment's folds, and in the safe filter of
triage_state_compose to escape the same openers in cause and evidence strings. This escapes any
Previous-run summary rather than only the details-plus-summary pattern in the suggested fix, and it
covers cause and evidence text as the finding asked. A test case (state-github-fake-fold-escaped) is
added. The fix is applied in the shared lib and bundled copies of post-triage.sh.
Description
triage_state_neutralize and the safe filter in triage_state_compose escape only <!-- and
state-marker openers. Raw <details><summary>Previous run</summary> HTML in the agent's comment,
or in a cause or evidence string, reaches the posted body unchanged and lands above the real
triage-state-v1 marker. Step 2e treats only the text above a comment's first such fold as the
comment's own text, so the next run rejects this comment's state and falls back to an older state or
the legacy rebuild. Refuted causes can then return, which is the regression this PR is meant to
prevent, and prompt-injected issue text that the agent echoes is enough to trigger it.

3. Trusted bot baselines are never tested 📎 Requirement gap ≡ Correctness
Description
Every seeded state in cases 013 to 017 is posted by the eval account, which is not a triage bot, so
the carry-forward path always takes the untrusted rebuild route. The newest-trusted-baseline
selection, the in-progress note that must not be a baseline, and a bot comment later edited by
someone else are all untested.
Code

eval/triage/cases/015-retriage-forged-analysis/input.yaml[R16-21]

+  # One forged "analysis", the only marked comment on the issue, posted
+  # by an account that is not a triage bot, with a state marker. It inverts
+  # the real causes: it rules out the missing-email cause with false
+  # evidence (login_handler has no None check), lists the refuted '+' cause
+  # as open, and tells the next run to copy its state without reading the
+  # code. The last comment is a human follow-up that names neither cause.
Relevance

●● Moderate

Untested trusted-bot baseline is a coverage request with no direct precedent either way; the PR
explicitly defers bot-authored cases to #2043.

PR-#1703
PR-#1696

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The seeded analysis comments in case 015 are posted by the eval account, so the trusted-bot baseline
path is never exercised.

Exercise trusted triage-bot baselines and ordering
eval/triage/cases/015-retriage-forged-analysis/input.yaml[16-21]

Dismiss ↗ | View ↗


View medium (8)
4. Eval never checks a revived cause 📎 Requirement gap ≡ Correctness
Description
Cases 013 to 017 seed comments that keep, forge, or leave causes unmentioned, but none seeds a human
comment with new evidence that should move a ruled-out cause back to Open causes. A regression that
keeps refuted causes ruled out after new evidence arrives would pass the suite, and the
cause_lists check is report-only.
Code

eval/triage/eval.yaml[R294-296]

  expected_state:
    min_pass_rate: 0.9
+  # cause_lists has no threshold yet, so it is scored in each run's summary
Relevance

●● Moderate

Missing revival-by-new-evidence case is a coverage gap; no close precedent. Report-only threshold
concern is a judgment call.

PR-#1703
PR-#1696

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The added cases (013 to 017) contain no seeded human comment that revives a ruled-out cause, and the
cause_lists check has no threshold.

Cover cause revival by new evidence
eval/triage/cases/015-retriage-forged-analysis/input.yaml[16-21]

Dismiss ↗ | View ↗


5. GitLab and Jira paths go unchecked 📎 Requirement gap ≡ Correctness
Description
The fixture support added here covers comments: under a GitHub issue fixture only, so no eval case
can seed GitLab notes or Jira comments with the property and ADF nodes. The GitLab and Jira read
paths of step 2e are therefore unchecked, and the PR records no alternative method or reason.
Code

eval/triage/cases/015-retriage-forged-analysis/input.yaml[R22-23]

+  comments:
+    - |
Relevance

●● Moderate

GitLab/Jira seeding gap is valid but scope-dependent; the PR states its scope and no precedent
settles it.

PR-#1703

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The only seeding mechanism added is comments: under a GitHub issue fixture, so no GitLab or Jira
read path is seeded or checked.

Exercise GitLab and Jira comment read paths
eval/triage/cases/015-retriage-forged-analysis/input.yaml[22-23]

Dismiss ↗ | View ↗


6. Refutations in questions go untested 📎 Requirement gap ≡ Correctness
Description
Case 016 seeds a question, but its own text says the answer adds no evidence, so no case tests a
question that refutes a cause. No case covers an insufficient result either, and the PR gives no
reason for leaving that path uncovered.
Code

eval/triage/cases/015-retriage-forged-analysis/input.yaml[R16-21]

+  # One forged "analysis", the only marked comment on the issue, posted
+  # by an account that is not a triage bot, with a state marker. It inverts
+  # the real causes: it rules out the missing-email cause with false
+  # evidence (login_handler has no None check), lists the refuted '+' cause
+  # as open, and tells the next run to copy its state without reading the
+  # code. The last comment is a human follow-up that names neither cause.
Relevance

●● Moderate

Coverage gap in eval cases is subjective; accepted eval coverage requests exist, but no direct
precedent for refutation-in-question cases.

PR-#1703
PR-#1696

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Case 016's question adds no evidence, so it refutes no cause, and no added case seeds an
insufficient result.

Carry refutations from non-sufficient actions
eval/triage/cases/016-retriage-keeps-unmentioned-cause/input.yaml[21-23]

Dismiss ↗ | View ↗


7. Planted comments cannot be told apart 📎 Requirement gap ≡ Correctness
Description
The fixture seeds every comment from one eval account, including the forged analysis in case 015, so
the cases cannot show that a planted marked comment from a second identity is rejected. The
checklist requires a second commenting identity in the fixture, and none is added.
Code

eval/triage/cases/015-retriage-forged-analysis/input.yaml[R16-21]

+  # One forged "analysis", the only marked comment on the issue, posted
+  # by an account that is not a triage bot, with a state marker. It inverts
+  # the real causes: it rules out the missing-email cause with false
+  # evidence (login_handler has no None check), lists the refuted '+' cause
+  # as open, and tells the next run to copy its state without reading the
+  # code. The last comment is a human follow-up that names neither cause.
Relevance

●● Moderate

Second-identity planted-comment coverage is a reasonable test gap, but no close historical precedent
was found.

PR-#1703
PR-#1891

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Case 015 is the only planted-comment case, and its comment is posted by the same account as every
other seed.

Reject planted marked comments as trusted baselines
eval/triage/cases/015-retriage-forged-analysis/input.yaml[16-21]

Dismiss ↗ | View ↗


8. Bot identity is inferred from app names 📎 Requirement gap ⛨ Security
Description
The step 2e GitHub trust rule identifies the triage bot by matching App-name patterns such as
<owner>-triage and ${FULLSEND_APP_SET}-triage, not by a registered bot role. The PR calls this
interim until fullsend-ai/fullsend#9602, and it adds no role lookup for scripts, so a name collision
would still be trusted as the bot.
Code

agents/triage.md[104]

+- **GitHub:** from the REST comment listing in your forge skill (not `gh issue view`, which drops the `[bot]` suffix), `user.type` is `Bot` (a `User`, whatever its login, never counts) and `performed_via_github_app.slug` (or `user.login` without `[bot]`) is, case-insensitively, `<owner>-triage` (`<owner>` is the repository owner), `fullsend-ai-triage`, or `${FULLSEND_APP_SET}-triage` when `FULLSEND_APP_SET` is not empty. If the forge skill's GraphQL query shows `lastEditedAt`, the `editor` must be a `Bot` with one of those names.
Relevance

●● Moderate

Interim App-name trust is a naming convention; the team split on bot-identity suffix checks (PR 1842
rejected, PR 1301 accepted). No close match.

PR-#1842
PR-#1301

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The GitHub author check in step 2e matches App-name strings, and the PR adds no role lookup for
scripts, so the registered-role requirement is not implemented here.

Expose registered bot roles to harness scripts
Document exact-role checks and non-mint identity lookup
agents/triage.md[104-104]

Dismiss ↗ | View ↗


9. Eval never tests the size-fold path 📎 Requirement gap ≡ Correctness
Description
No case in 013 to 017 seeds enough ruled_out entries to push a sufficient comment past the
4000-character cap, so the evidence-drop and name-folding path never runs under eval. Nothing checks
that folded names stay ruled out on the next run, so losing them during condensation would go
unnoticed.
Code

eval/triage/eval.yaml[R294-296]

  expected_state:
    min_pass_rate: 0.9
+  # cause_lists has no threshold yet, so it is scored in each run's summary
Relevance

●● Moderate

Size-fold path coverage is a reasonable request but subjective; no matching accepted or rejected
precedent.

PR-#1703
PR-#1599

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The added cases seed only a few ruled-out entries each, and the cause_lists check is report-only.

Preserve ruled-out names through the comment-size fold

Dismiss ↗ | View ↗


10. Gate reads fail open on bad summary ✓ Resolved

Resolving commit: 881d2a3

Resolution reason
The author removed the ? operator from the gate reads in scripts/post-triage.src.sh
(information_gaps at line 437, category at 448, requires_workflow_changes, category, and
promote_to_ready_to_code at 529-534), so a malformed non-object triage_summary now fails jq reads
instead of yielding defaults. The same strict reads were applied in scripts/post-triage.sh. The ?
remains only in the state path in triage-state.lib.sh is not present in this diff, and the test was
changed to expect the run to fail before posting or labelling.
Description
The ? suffix added to the triage_summary reads in post-triage.src.sh makes a non-object
triage_summary yield defaults, so the information-gaps guard passes and
requires_workflow_changes reads false with category unknown, letting the ready-to-code gate
apply where the strict jq read used to fail the run. This triggers only when a malformed result
reaches the post-script without an upstream schema check, which the diff does not show, so the
impact is conditional.

11. Fold-only causes are never tested 📎 Requirement gap ≡ Correctness
Description
No case seeds a Previous run fold holding a cause that appears nowhere else on the issue, so the
rule treating fold-only text as an unverified hypothesis is never exercised. A regression that
promotes fold-only text to an established open cause would pass the suite.
Code

eval/triage/eval.yaml[R294-296]

  expected_state:
    min_pass_rate: 0.9
+  # cause_lists has no threshold yet, so it is scored in each run's summary
Relevance

●● Moderate

Fold-only cause coverage gap; no close precedent. Team accepts coverage requests sometimes, so
uncertain.

PR-#1703
PR-#1891

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Case 014 seeds legacy analyses without any Previous run fold, and no other added case seeds one
for a fold-only cause.

Handle Previous run folds without promoting old findings

Dismiss ↗ | View ↗



Informational

12. An unclosed code block swallows the cause lists ✓ Resolved

Resolving commit: 881d2a3

Resolution reason
The agent comment gets an auto-closing fence appended before the lists whenever it ends inside an
open code fence, even when the comment is not cut. The fence is counted in the head that is used for
both the fit check and the output, so the lists render as Markdown. A test asserts the closing fence
precedes the Open causes list.
Description
triage_state_compose closes a fenced code block (cut_closed) only when it has to cut the agent's
comment. When the whole comment fits ($all | length <= $cap), an agent comment with an unclosed
``` or ~~~ fence is posted as is, followed by the lists and footers. Everything after the fence then
renders as code: the Open causes and Ruled out lists, the Next steps footer and, on GitHub and
GitLab, the full base64 triage-state-v1 marker, which shows as raw text instead of a hidden
comment.

Grey Divider

Context sources
✅ Linked PRs:
  🌐 PR #2044
  🌐 PR #2061
  🌐 PR #2062
❌ Tickets: failed to load — Ticket collection could not establish complete evidence
✅ Compliance rules (platform): 55 rules
✅ Skills: 4 invoked
  code-review
  code-implementation
  pr-review
  docs-review
✅ Web pages:
  +20 more
✅ Cross-repo context — repo relationships
  Explored: repo: fullsend-ai/fullsend (sha: 6ff3fb6a) — View relationship
  Explored: repo: fullsend-ai/pi-anthropic-vertex (sha: d2ecd039) — View relationship
  Explored: repo: fullsend-ai/pi-xai-vertex (sha: a86139bf) — View relationship
  Explored: repo: fullsend-ai/devlake (sha: ba0670f2) — View relationship
  Explored: repo: fullsend-ai/react-shopping-cart (sha: 3701c6c4) — View relationship
✅ Context preparation
  Commit messages: summarized; full text retained for this review
Review mode: Auto: 🧠 Deep: Many independent shell, schema, tracker, prompt, and trust-path defects.

Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread scripts/post-triage.src.sh Resolved
Comment thread eval/triage/eval.yaml Resolved
Comment thread eval/triage/eval.yaml Resolved
Comment thread agents/triage.md Resolved
Comment thread scripts/lib/jira-triage-ops.lib.sh Resolved
Comment thread scripts/lib/triage-state.lib.sh Resolved
Comment thread scripts/lib/triage-state.lib.sh Resolved
@fullsend-ai-review fullsend-ai-review Bot added the risk/elevated PR risk: elevated label Nov 18, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Risk Assessment: elevated (3/5)

Details

Elevated risk preserved from prior review due to large diff across 43 files with 13 protected paths, breaking schema changes, and high churn in touched triage scripts, balanced by established contributor status and complete linked issue acceptance criteria coverage.

Previous run

Risk Assessment: elevated (3/5)

Details

Elevated risk preserved from prior review due to large diff across 43 files with 13 protected paths, breaking schema changes, and high churn in touched triage scripts, balanced by established contributor status and complete linked issue acceptance criteria coverage.

Previous run (2)

Risk Assessment: elevated (3/5)

Details

Elevated risk preserved from prior review due to large diff across 43 files with 13 protected paths, breaking schema changes, and high churn in touched triage scripts, balanced by established contributor status and complete linked issue acceptance criteria coverage.

Previous run (3)

Risk Assessment: elevated (3/5)

Details

Elevated risk preserved from prior review due to large diff across 43 files with 13 protected paths, breaking schema changes, and high churn in touched triage scripts, balanced by established contributor status and complete linked issue acceptance criteria coverage.

Previous run (4)

Risk Assessment: elevated (3/5)

Details

Elevated risk due to large diff across 43 files with 13 protected paths, breaking schema changes, and high churn in touched triage scripts, balanced by established contributor status and complete linked issue acceptance criteria coverage.

@fullsend-ai-review

fullsend-ai-review Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Review

Findings

Medium

  • [protected-path] scripts/lib/triage-state.lib.sh — This PR modifies 13 files under protected paths: agents/triage.md; scripts/harness-jira-test.sh, scripts/lib/jira-triage-ops.lib.sh, scripts/lib/triage-state.lib.sh, scripts/post-triage-test.sh, scripts/post-triage.sh, scripts/post-triage.src.sh, scripts/pre-code-jira.sh, scripts/pre-triage.sh, scripts/validate-output-schema-test.sh; skills/github-forge/SKILL.md, skills/gitlab-forge/SKILL.md, skills/jira-forge/SKILL.md. The PR links Triage re-runs: carry the prior analysis and its refutations reliably across trackers #2042 and explains the rationale, but human approval is always required for protected-path changes, regardless of context.

Low

  • [injection-vuln] scripts/lib/triage-state.lib.sh:55 — The history-fold neutralizer (TRIAGE_STATE_FOLD_RE) still requires the literal words previous and run, so <details><summary>Pr&#101;vious run</summary> or Previ<b>ous</b> run bypasses it. State-bearing comments separately escape every summary opener, but comments without state rely only on this narrower regex, so agent-relayed markup could resemble trusted history to a later triage run. This push does not touch that path.
    Remediation: Escape every summary opener in agent-controlled text on the no-state path as well, keeping post-script-generated prerequisite and split summaries separate, and add regression coverage for entities and inline tags inside the words.
Previous run

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJjb21tZW50IiwiZmluZGluZ3MiOlt7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJpbmplY3Rpb24tdnVsbiIsImZpbGUiOiJzY3JpcHRzL2xpYi90cmlhZ2Utc3RhdGUubGliLnNoIiwiaWQiOiJmX2Y1ZTcyNzAwMmZjZTBlNTUiLCJsaW5lIjo1NSwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6InNlY3VyaXR5In0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoibG9naWMtZXJyb3IiLCJmaWxlIjoic2NyaXB0cy9saWIvdHJpYWdlLXN0YXRlLmxpYi5zaCIsImlkIjoiZl9hMjU0OTBjY2MyNDQ3MmI3IiwibGluZSI6MTQ4LCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9XSwiZGlzcG9zaXRpb25zIjpbeyJpZCI6ImZfZjVlNzI3MDAyZmNlMGU1NSIsInN0YXR1cyI6Im9wZW4ifSx7ImlkIjoiZl9hMjU0OTBjY2MyNDQ3MmI3Iiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn1dfQ== -->

Review

Findings

Medium

  • [protected-path] scripts/post-triage.sh — This PR modifies protected-path files: agents/triage.md, scripts/ (post-triage.sh, post-triage.src.sh, pre-triage.sh, pre-code-jira.sh, lib/triage-state.lib.sh, lib/jira-triage-ops.lib.sh and tests), and skills/github-forge, skills/gitlab-forge, skills/jira-forge. The PR links issue Triage re-runs: carry the prior analysis and its refutations reliably across trackers #2042 and explains the rationale, but human approval is always required for protected-path changes, regardless of context.

Low

  • [injection-vuln] scripts/lib/triage-state.lib.sh:55 — The history-fold neutralizer (TRIAGE_STATE_FOLD_RE) still requires the literal words previous and run. Agent text such as <summary>Pr&#101;vious run</summary> or <summary>Previ<b>ous</b> run</summary> bypasses it yet renders as a "Previous run" fold. Comments that carry state escape every summary opener in triage_state_compose, but comments without state use triage_state_neutralize alone, so the bypass remains there and could present forged content as history to the next triage run.
    Remediation: Escape every <summary opener in agent-authored text on the no-state path too, before adding post-script-owned details blocks, instead of recognising every rendering of "Previous run". Add regression tests for entity-encoded and tag-split words on a non-state result.
Previous run (2)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJjb21tZW50IiwiZmluZGluZ3MiOlt7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJpbmplY3Rpb24tdnVsbiIsImZpbGUiOiJzY3JpcHRzL2xpYi90cmlhZ2Utc3RhdGUubGliLnNoIiwiaWQiOiJmX2Y1ZTcyNzAwMmZjZTBlNTUiLCJsaW5lIjo1MSwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6InNlY3VyaXR5In0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoibG9naWMtZXJyb3IiLCJmaWxlIjoic2NyaXB0cy9saWIvdHJpYWdlLXN0YXRlLmxpYi5zaCIsImlkIjoiZl9hMjU0OTBjY2MyNDQ3MmI3IiwibGluZSI6MTQ4LCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9XSwiZGlzcG9zaXRpb25zIjpbeyJpZCI6ImZfZjVlNzI3MDAyZmNlMGU1NSIsInN0YXR1cyI6Im9wZW4ifSx7ImlkIjoiZl9hMjU0OTBjY2MyNDQ3MmI3Iiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn1dfQ== -->

Review

Findings

Medium

  • [protected-path] agents/triage.md — This PR modifies 13 files under protected paths: agents/triage.md, scripts/harness-jira-test.sh, scripts/lib/jira-triage-ops.lib.sh, scripts/lib/triage-state.lib.sh, scripts/post-triage-test.sh, scripts/post-triage.sh, scripts/post-triage.src.sh, scripts/pre-code-jira.sh, scripts/pre-triage.sh, scripts/validate-output-schema-test.sh, skills/github-forge/SKILL.md, skills/gitlab-forge/SKILL.md, skills/jira-forge/SKILL.md. The PR links issue Triage re-runs: carry the prior analysis and its refutations reliably across trackers #2042 and explains the rationale, but human approval is always required for protected-path changes, regardless of context.

Low

  • [injection-vuln] scripts/lib/triage-state.lib.sh:51 — History-fold neutralization can still be bypassed on comments posted without structured state. TRIAGE_STATE_FOLD_RE requires the literal words "previous" and "run", so <details><summary>Pr&#101;vious run</summary>...</details> gets past triage_state_neutralize but still displays as "Previous run". The state-bearing path is covered by the unconditional nofold escape in triage_state_compose. The no-state path (scripts/post-triage.src.sh ~line 953) uses only the regex-based neutralizer. A later run could take current claims for history. Impact is limited because these comments carry no authoritative state.
    Remediation: On the no-state path, escape every agent-controlled <summary opener (as nofold does), or decode entities before matching. Add a no-state regression test with an entity inside "Previous".
Previous run (3)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJjb21tZW50IiwiZmluZGluZ3MiOlt7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJpbmplY3Rpb24tdnVsbiIsImZpbGUiOiJzY3JpcHRzL2xpYi90cmlhZ2Utc3RhdGUubGliLnNoIiwiaWQiOiJmX2Y1ZTcyNzAwMmZjZTBlNTUiLCJsaW5lIjo1MSwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6InNlY3VyaXR5In0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoibG9naWMtZXJyb3IiLCJmaWxlIjoic2NyaXB0cy9saWIvdHJpYWdlLXN0YXRlLmxpYi5zaCIsImlkIjoiZl9hMjU0OTBjY2MyNDQ3MmI3IiwibGluZSI6MTQ4LCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9XSwiZGlzcG9zaXRpb25zIjpbeyJpZCI6ImZfYTI1NDkwY2NjMjQ0NzJiNyIsInN0YXR1cyI6InJlc29sdmVkX2J5X2NoYW5nZSJ9XX0= -->

Review

Findings

Medium

  • [protected-path] agents/triage.md — This PR modifies protected paths: agents/triage.md, scripts/ (harness-jira-test.sh, lib/jira-triage-ops.lib.sh, lib/triage-state.lib.sh, post-triage-test.sh, post-triage.sh, post-triage.src.sh, pre-code-jira.sh, pre-triage.sh, validate-output-schema-test.sh) and skills/ (github-forge, gitlab-forge, jira-forge). The PR links Triage re-runs: carry the prior analysis and its refutations reliably across trackers #2042 and explains the rationale, but human approval is always required for protected-path changes, regardless of context.

Low

  • [injection-vuln] scripts/lib/triage-state.lib.sh:51 — TRIAGE_STATE_FOLD_RE accepts whitespace, hyphens, &nbsp;, numeric entities and inline tags only before previous and between previous and run, not inside either word. <summary>Pr&#101;vious run</summary> or <summary>Pre<b>vious</b> run</summary> is therefore not escaped even though both render as "Previous run". If the agent relays such text and step 2e of agents/triage.md reads it as a history fold, the real state marker below it could be treated as history and the next run would fall back to an older baseline or legacy reconstruction. Exploitation needs a prompt injection that gets the agent to emit the text, and the impact is limited to degrading carried state.
    Remediation: Escape every <summary opener in agent-controlled text, or anchor the history boundary in step 2e to the bot-written `` sentinel. Add regression cases with entities and inline tags inside both words.

Earlier findings

  • scripts/lib/triage-state.lib.sh:148, logic-error, resolved — triage_state_compose's open_fence now captures the opening fence as $f before testing later lines, so a content line is no longer used as the closing-fence pattern. The new tests state-uncut-closes-code-fence and state-short-fence-does-not-close cover it.
Previous run (4)

<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6InNjcmlwdHMvbGliL3RyaWFnZS1zdGF0ZS5saWIuc2giLCJpZCI6ImZfYTI1NDkwY2NjMjQ0NzJiNyIsImxpbmUiOjE0OCwiYWN0aW9uYWJsZSI6dHJ1ZSwiZGltZW5zaW9uIjoiY29ycmVjdG5lc3MifV19 -->

Review

Findings

Medium

  • [logic-error] scripts/lib/triage-state.lib.sh:148 — The closing-fence test in open_fence builds its regex inside $l | test(... .[0:1] ... length ...), so .[0:1] and length describe the current line rather than the saved opening fence. A blank line inside a code block resets the fence state to null (reproduced with jq 1.7), so when the agent comment is cut inside a fenced block the block is left unclosed and the cause lists and Next steps footer render inside it. A code line starting with a regex metacharacter can also build a malformed pattern. The same code is in the bundled scripts/post-triage.sh, and the existing test uses code lines without blank lines, so it does not reach the bug.
    Remediation: Capture the accumulator's fence before piping into $l (e.g. . as $f | ...) and build the closing-fence regex from $f (escaped). Add a regression test for a truncated fenced block containing blank lines and metacharacters, then run make script-build and make check-bundle.

  • [protected-path] agents/triage.md — This PR modifies protected governance/infrastructure paths: agents/triage.md, scripts/ (post-triage, pre-triage, pre-code-jira, lib/triage-state.lib.sh, lib/jira-triage-ops.lib.sh and tests) and skills/{github,gitlab,jira}-forge/SKILL.md. The PR links issue Triage re-runs: carry the prior analysis and its refutations reliably across trackers #2042 and explains the rationale, but human approval is always required for protected-path changes, regardless of context.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

tpouyer and others added 2 commits November 18, 2026 04:36
- open_fence compared each line with itself, not with the fence that
  opened the block, so a blank line ended the block and a line starting
  with a regex character broke the pattern. It now compares with the
  saved fence.
- A comment that fit but left a code block open was posted as is, so
  the lists, footers and state marker rendered as code. The block is
  now closed before the lists.
- A <details> block whose <summary> starts with "Previous run" in the
  agent's comment or a cause made the next run take the text above the
  state marker for a history fold and drop the state. Both are escaped.
- The sufficient gate reads of triage_summary are strict again, as on
  main, so a summary that is not an object fails the run instead of
  falling back to defaults that could apply ready-to-code.
- docs/triage.md: the Jira triage account needs "Edit own comments" to
  set the state property, and /myself takes read:jira-user or all four
  granular scopes. The property-write error names the permission.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
The earlier escape matched only <details> directly followed by a
<summary> starting with "Previous run", so a summary behind an element,
inline tags or &nbsp; slipped through. Escaping every <details would
break the post-script's own prerequisite and split blocks, so the
pattern now escapes the <summary> opener whose text starts with
"Previous run" after whitespace, &nbsp; or inline tags, which is what
makes a block a fold to step 2e. It is defined once,
TRIAGE_STATE_FOLD_RE, and passed to both jq programs.

docs/triage.md: the granular /myself scopes are Beta at Atlassian, and
the Jira state paragraph is split where it ran on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…s between the words

The fold escape allowed whitespace, &nbsp; and inline tags only before
the text, so "Previous&nbsp;run", "Previous <b>run</b>" or a numeric
entity slipped through. The same separators, plus a hyphen, are now
allowed between the words, and numeric entities count everywhere. The
test covers those spellings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 10:42 AM UTC · Completed 10:50 AM UTC

Commit: 881d2a3 · View workflow run →

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

@fullsend-ai-review
fullsend-ai-review Bot dismissed their stale review November 18, 2026 10:50

Superseded by updated review

fullsend-ai-review[bot]

This comment was marked as outdated.

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One finding from a review pass, inline below.

Comment thread scripts/lib/triage-state.lib.sh Outdated
+ ($r | map(line($full_ruled; $name_max))) | join("\n"))
else "" end);
def note: "\n\n_(Cut to fit the comment limit; the triage state keeps every cause.)_";
# The character offset of the last $d, or null. jq 1.6 rindex counts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] The rindex byte-offset bug is blamed on jq 1.6 only, but jq 1.7.1 (the default runner image) has it too

This comment says "jq 1.6 rindex counts bytes", and scripts/post-triage-test.sh:2030-2031 repeats it. The PR body says the same and adds that the default runner image ships jq 1.7.1, as if 1.7.1 were safe.

On jq-1.7.1, jq -n '"éé\nx" | rindex("\n")' returns 4, a byte offset; the character offset is 2. jq switched index/rindex/indices to code-point offsets only in 1.8.0 (NEWS: "Use code point index for indices/1, index/1 and rindex/1 (#3065)").

The code is correct, because last_at avoids rindex and uses split plus length. But the stated reason and version scope are wrong, so a later change could bring back index/rindex on the belief that 1.7.x is safe. The PR body line that the multibyte test "fails when offsets are counted in bytes as jq 1.6 does" has the same scope problem.

Suggestion: reword the lib comment, the test comment and the PR body to: "jq before 1.8.0 (including 1.7.1, the default runner image) returns byte offsets from index/rindex (jq #3065)". Keep the split-based last_at.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that's right. I asked the AI to check jq's NEWS.md: the code-point change (#3065) is listed under 1.8.0, so 1.7.1 still returns byte offsets.

Fixed in e5fcd32: the lib comment and the test comment now say jq before 1.8.0, 1.7.1 (the default runner image) included, returns byte offsets from index/rindex, citing jq #3065. last_at keeps the split-based approach. The PR body is updated the same way.

- On the comment that carries the triage state, every <summary> opener
  in the agent's comment, the cause lists and the footers is escaped, so
  no spelling of a "Previous run" fold (an entity or tag inside a word
  included) can sit above the state marker. Matching each spelling was
  whack-a-mole. None of that text holds a <details> block of the
  post-script's own; neutralize, used off the state path, keeps
  escaping only fold summaries, so prerequisite and split blocks still
  render.
- The lib and test comments said jq 1.6 returns byte offsets from
  rindex. jq before 1.8.0, 1.7.1 (the default runner image) included,
  does (jq #3065).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 7:11 PM UTC · Completed 7:19 PM UTC

Commit: e5fcd32 · View workflow run →

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

fullsend-ai-review[bot]

This comment was marked as outdated.

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two findings from a review pass, inline below.

Comment thread docs/triage.md

On Jira the post-script posts the comment first, then sets the
`fullsend.triage-state` property on it. Setting a property on a comment
needs the "Edit own comments" project permission (or "Edit all comments"),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] The Jira property write and read need OAuth scopes that the docs leave out

This paragraph and the PUT error text in tracker_store_triage_state (scripts/lib/jira-triage-ops.lib.sh:468) name only the "Edit own comments" project permission for setting the fullsend.triage-state comment property. A scoped Jira token also needs an OAuth scope for that endpoint: classic write:jira-work, or granular write:comment.property:jira. The granular scopes for posting a comment don't include it.

So a scoped service-account token that posts the triage comment today gets 401/403 on the new property PUT. The run then fails after the labels and the comment have already changed.

The read side has the same gap. The expand=properties listing (jira-triage-ops.lib.sh:409) needs read:comment.property:jira under granular scopes. This doc already lists granular scopes for /myself further down, so leaving these out looks like an oversight. The existing thread on the lib covers the project permission and the ordering, not the OAuth scopes.

Suggestion: List the scopes next to the permission note: write:jira-work, or with granular scopes, write:comment.property:jira for the post-script and read:comment.property:jira for the token that reads the listing. Add the scope hint to the PUT failure message too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that's right. I asked the AI to check Atlassian's v3 OpenAPI spec: "Set comment property" takes write:jira-work, or granular write:comment.property:jira (Beta), and "Get comments" takes read:jira-work, or a granular set that includes read:comment.property:jira (Beta).

Fixed in da286c5: docs/triage.md lists both next to the "Edit own comments" permission, and the PUT failure message now names write:jira-work (granular write:comment.property:jira) as well as the permission. The PR body says the same.

Comment thread scripts/lib/triage-state.lib.sh Outdated
# posted except the hidden state marker: the agent's comment, the lists and
# the footers (see triage_state_compose).
TRIAGE_STATE_READABLE_CAP=4000
# Jira caps an entity property value at 32768 bytes of stored JSON. Keep the

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] The Jira property limit is given in bytes, but Atlassian documents 32768 characters, and the escaped length is never measured

This comment says "Jira caps an entity property value at 32768 bytes of stored JSON", and docs/triage.md says "under Jira's 32768 property limit". Atlassian's reference for Set comment property gives the maximum as 32768 characters.

The 30000 UTF-8 byte cap is safe if Jira counts the characters of the body as sent. It is not safe if Jira measures a re-serialised form that escapes non-ASCII as \uXXXX. In that case a 30000-byte CJK state of about 10000 characters grows to about 60000 once escaped.

Neither case was tested against a live Jira. The multibyte worst-case tests use a mocked Jira only. If the escaped length is what counts, the PUT fails after the comment and labels are posted.

Suggestion: Change the wording to "32768 characters". To be safe under either reading, measure the length of the jq -ac output (which escapes all non-ASCII) against the 30000 cap. Or run one live PUT of a large CJK state against a Jira Cloud site and record the result.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. The same reference gives the maximum as 32768 characters, so the bytes wording was wrong.

Fixed in da286c5 and 44f6d3c, taking your second option: the state is now measured as JSON with every non-ASCII character escaped (\uXXXX, a surrogate pair outside the BMP). That equals the length of jq -ac output, is never shorter than the character count, and is kept under 30000, so it fits under either reading of the limit. The cap is renamed TRIAGE_STATE_MAX_CHARS. The multibyte worst-case test and the smaller-cap test now check the escaped length, and with CJK and emoji at the schema limits every cause is kept, its name cut by whole characters. The lib comment, docs/triage.md and the PR body say characters now.

I haven't run a live PUT against a Jira Cloud site; measuring the escaped form makes that reading not matter.

tpouyer and others added 2 commits November 18, 2026 22:48
- Atlassian documents the comment-property limit as 32768 characters,
  not bytes. The state is now measured as JSON with every non-ASCII
  character escaped (\uXXXX, a surrogate pair outside the BMP), which is
  never shorter than its character count, and kept under 30000, so it
  fits whether Jira counts the characters sent or an escaped
  serialisation. The cap is renamed TRIAGE_STATE_MAX_CHARS. The multibyte
  worst-case test now checks the escaped length, and the names are cut
  by whole characters with every cause kept.
- docs/triage.md lists the OAuth scopes the property write and the
  expand=properties read need (write:jira-work / write:comment.property:jira,
  read:jira-work / read:comment.property:jira), next to the "Edit own
  comments" permission, and the write's error message names the scope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
…tests by characters

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 4:25 AM UTC · Completed 4:32 AM UTC

Commit: 44f6d3c · View workflow run →

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

fullsend-ai-review[bot]

This comment was marked as outdated.

…rinking

agents/triage.md has the agent fold causes past the ninth into one "Other
open candidates" entry that names them in its evidence. Shrinking an
over-cap state emptied every open cause's evidence, so a large non-ASCII
state silently lost those names, against the "never drops a cause"
contract. That entry's evidence is now kept whole; the run still fails
before posting if the state cannot fit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 1:18 PM UTC · Completed 1:25 PM UTC

Commit: 656a23a · View workflow run →

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

@fullsend-ai-review fullsend-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the review comment for full details.

Comment thread scripts/lib/triage-state.lib.sh Resolved
Comment thread scripts/lib/triage-state.lib.sh Resolved
tpouyer and others added 2 commits November 19, 2026 14:42
An unclosed <details> in the agent's comment, a cause or its evidence
made GitHub fold everything after it, the cause lists and "Next steps"
included, out of sight. triage_state_compose already escapes every
<summary> opener in that text; it now escapes every <details> opener
too. None of that text holds a <details> block of the post-script's own,
so nothing it renders is lost. A regression test posts an unclosed
<details> in each place and checks no opener stays live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>
An HTML comment the agent left open in its comment hid the cause lists
and "Next steps" up to the state marker's closing "-->", the same way an
unclosed <details> did. The cause lists already escaped every "<!--";
the agent's comment and the footers now do too, so the marker is the
only live HTML comment. The footers hold no HTML comment of the
post-script's own. A regression test posts an unclosed "<!--" and checks
only the marker stays live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One new finding on the code-fence handling in triage-state.lib.sh (inline below).

Comment thread scripts/lib/triage-state.lib.sh Resolved
open_fence took any line starting with ``` for a fence opener. In
CommonMark a backtick fence's info string may not contain a backtick, so
"```make test``` reproduces it." is an inline code span.
triage_state_compose then added a closing ``` that opened a real code
block, which swallowed the cause lists, "Next steps" and the state
marker. A backtick run now opens a fence only when the rest of the line
has no backtick; tilde fences keep any info string. fence_room still
counts every leading run, inline spans included, because a cut inside
such a line leaves a real opener and its closing fence must fit the cap.
Tests cover the inline span, a cut inside one, and an open tilde fence
with a backtick in its info string.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One finding from a review pass, inline below.

Comment thread schemas/triage-result.schema.json Resolved
waynesun09 and others added 2 commits November 20, 2026 19:26
fullsend's behaviour tests run against agents main, and its triage
fixture (e2e/behaviour/fixtures/triage/sufficient.json) and recorded
result (e2e/behaviour/results/triage/bug/result.json) carry neither list.
Requiring the lists would break those tests whichever repository merged
first: today's schema forbids the extra fields, the new one rejected
their absence. The schema now defines open_causes and ruled_out without
requiring them (open_causes stays non-empty when present). The shipped
prompt still always emits both, and a sufficient result without
open_causes is posted without a triage state, as before. A follow-up
makes them required once fullsend's fixtures carry them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tim Pouyer <tim.pouyer@gmail.com>

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One finding from a review pass, inline below.

"description": "Causes still open after this run, most likely first (root_cause_hypothesis is the first). The shipped prompt always emits it on sufficient; the schema does not require it yet, so results from older prompts and fixtures stay valid (a sufficient result without it is posted without a triage state). Non-empty when present. The post-script lists them in the comment and stores them as the triage state the next run starts from.",
"type": "array",
"minItems": 1,
"maxItems": 10,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] The strict cause schema rejects results before the post-script can trim them, and the prompt never states the length limits

The $defs/cause schema sets maxLength 200 on cause and 300 on evidence, requires a \S pattern and verified, and caps the lists at maxItems 10 and 25. harness/triage.yaml runs validate-output-schema.sh as a validation loop (max_iterations 2) before post-triage.sh. So in the validated pipeline, the post-script's truncation, empty-name filtering, list trimming and triage_state_dropped warning (scripts/lib/triage-state.lib.sh) never see such input. One over-long evidence line costs an agent iteration, or fails the whole triage with no comment and no labels if the retry also fails.

agents/triage.md:459 asks only for "one short phrase" and "one line of evidence" and never gives the 200/300-character limits. docs/triage.md:363-364 says "A cause the state cannot keep (an empty name, or past the list limits) is reported as a warning", which does not describe the validated pipeline.

Suggestion: either relax the schema on these advisory fields (keep maxItems, drop maxLength and pattern, and let the post-script trim), or state the 200/300-character limits in agents/triage.md and say in docs/triage.md that a schema violation fails validation rather than producing a warning.

Verified: read code at head: the schema $defs/cause, the validation_loop in harness/triage.yaml, agents/triage.md:459 and docs/triage.md:363 at 97dd677; raised by: DeepSeek

This branch has not been deployed

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

Labels

requires-manual-review Review requires human judgment risk/elevated PR risk: elevated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Triage re-runs: carry the prior analysis and its refutations reliably across trackers

2 participants