Repository navigation
Conversation
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>
PR Summary by QodoPreserve structured causes across triage runs
AI Description
Merge Risk
|
|
🤖 Finished Review · ✅ Success · Started 4:37 AM UTC · Completed 4:45 AM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.03 |
Code Review by Qodo
1.
|
|
Risk Assessment: elevated (3/5) DetailsElevated 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 runRisk Assessment: elevated (3/5) DetailsElevated 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) DetailsElevated 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) DetailsElevated 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) DetailsElevated 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. |
ReviewFindingsMedium
Low
Previous run<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJjb21tZW50IiwiZmluZGluZ3MiOlt7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJpbmplY3Rpb24tdnVsbiIsImZpbGUiOiJzY3JpcHRzL2xpYi90cmlhZ2Utc3RhdGUubGliLnNoIiwiaWQiOiJmX2Y1ZTcyNzAwMmZjZTBlNTUiLCJsaW5lIjo1NSwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6InNlY3VyaXR5In0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoibG9naWMtZXJyb3IiLCJmaWxlIjoic2NyaXB0cy9saWIvdHJpYWdlLXN0YXRlLmxpYi5zaCIsImlkIjoiZl9hMjU0OTBjY2MyNDQ3MmI3IiwibGluZSI6MTQ4LCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9XSwiZGlzcG9zaXRpb25zIjpbeyJpZCI6ImZfZjVlNzI3MDAyZmNlMGU1NSIsInN0YXR1cyI6Im9wZW4ifSx7ImlkIjoiZl9hMjU0OTBjY2MyNDQ3MmI3Iiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn1dfQ== --> ReviewFindingsMedium
Low
Previous run (2)<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJjb21tZW50IiwiZmluZGluZ3MiOlt7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJpbmplY3Rpb24tdnVsbiIsImZpbGUiOiJzY3JpcHRzL2xpYi90cmlhZ2Utc3RhdGUubGliLnNoIiwiaWQiOiJmX2Y1ZTcyNzAwMmZjZTBlNTUiLCJsaW5lIjo1MSwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6InNlY3VyaXR5In0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoibG9naWMtZXJyb3IiLCJmaWxlIjoic2NyaXB0cy9saWIvdHJpYWdlLXN0YXRlLmxpYi5zaCIsImlkIjoiZl9hMjU0OTBjY2MyNDQ3MmI3IiwibGluZSI6MTQ4LCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9XSwiZGlzcG9zaXRpb25zIjpbeyJpZCI6ImZfZjVlNzI3MDAyZmNlMGU1NSIsInN0YXR1cyI6Im9wZW4ifSx7ImlkIjoiZl9hMjU0OTBjY2MyNDQ3MmI3Iiwic3RhdHVzIjoicmVzb2x2ZWRfYnlfY2hhbmdlIn1dfQ== --> ReviewFindingsMedium
Low
Previous run (3)<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJjb21tZW50IiwiZmluZGluZ3MiOlt7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJpbmplY3Rpb24tdnVsbiIsImZpbGUiOiJzY3JpcHRzL2xpYi90cmlhZ2Utc3RhdGUubGliLnNoIiwiaWQiOiJmX2Y1ZTcyNzAwMmZjZTBlNTUiLCJsaW5lIjo1MSwiYWN0aW9uYWJsZSI6ZmFsc2UsImRpbWVuc2lvbiI6InNlY3VyaXR5In0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoibG9naWMtZXJyb3IiLCJmaWxlIjoic2NyaXB0cy9saWIvdHJpYWdlLXN0YXRlLmxpYi5zaCIsImlkIjoiZl9hMjU0OTBjY2MyNDQ3MmI3IiwibGluZSI6MTQ4LCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9XSwiZGlzcG9zaXRpb25zIjpbeyJpZCI6ImZfYTI1NDkwY2NjMjQ0NzJiNyIsInN0YXR1cyI6InJlc29sdmVkX2J5X2NoYW5nZSJ9XX0= --> ReviewFindingsMedium
Low
Earlier findings
Previous run (4)<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6ImxvZ2ljLWVycm9yIiwiZmlsZSI6InNjcmlwdHMvbGliL3RyaWFnZS1zdGF0ZS5saWIuc2giLCJpZCI6ImZfYTI1NDkwY2NjMjQ0NzJiNyIsImxpbmUiOjE0OCwiYWN0aW9uYWJsZSI6dHJ1ZSwiZGltZW5zaW9uIjoiY29ycmVjdG5lc3MifV19 --> ReviewFindingsMedium
Next steps:
|
- 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 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, 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, and inline tags only before the text, so "Previous 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>
|
🤖 Finished Review · ✅ Success · Started 10:42 AM UTC · Completed 10:50 AM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.07 |
Superseded by updated review
waynesun09
left a comment
There was a problem hiding this comment.
One finding from a review pass, inline below.
| + ($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 |
There was a problem hiding this comment.
[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.
There was a problem hiding this comment.
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>
|
🤖 Finished Review · ✅ Success · Started 7:11 PM UTC · Completed 7:19 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.83 |
waynesun09
left a comment
There was a problem hiding this comment.
Two findings from a review pass, inline below.
|
|
||
| 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"), |
There was a problem hiding this comment.
[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.
There was a problem hiding this comment.
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.
| # 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 |
There was a problem hiding this comment.
[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.
There was a problem hiding this comment.
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.
- 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>
|
🤖 Finished Review · ✅ Success · Started 4:25 AM UTC · Completed 4:32 AM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.48 |
…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>
|
🤖 Finished Review · ✅ Success · Started 1:18 PM UTC · Completed 1:25 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.55 |
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
left a comment
There was a problem hiding this comment.
One new finding on the code-fence handling in triage-state.lib.sh (inline below).
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
left a comment
There was a problem hiding this comment.
One finding from a review pass, inline below.
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
left a comment
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
[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
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
sufficientresult listsopen_causesandruled_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 unpostedreasoning, 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) andtriage_summary.ruled_out(may be empty, at most 25). The shipped prompt always emits both onsufficient. The schema does not require them yet: fullsend's behaviour tests run against agentsmain, and its triage fixture and recorded result carry neither list, so requiring them would break those tests whichever repository merged first. Asufficientresult withoutopen_causesis posted without a triage state. A follow-up makes them required once fullsend's fixtures carry them. Each cause hascause(up to 200 characters),evidence(up to 300) andverified.root_cause_hypothesisis unchanged and is the first open cause.Post-script (
scripts/post-triage.src.sh, newscripts/lib/triage-state.lib.sh,scripts/lib/jira-triage-ops.lib.sh): onsufficient, 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:<!-- triage-state-v1:<base64 of {"open_causes":[...],"ruled_out":[...]}> -->at the end of the comment.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:
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_CHARSmay 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'scommentunder 2500 characters, so the lists and footers fit and the cut stays a last resort. Asufficientresult whosetriage_summaryis 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<summaryopener in the agent's comment, the cause lists and the footers is escaped too, so noPrevious runfold 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 needswrite:jira-work(granular:write:comment.property:jira) for the write andread:jira-work(granular:read:comment.property:jirawith the comment-listing scopes) for the read;docs/triage.mdlists 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'sindex/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:Previous runfolds, treating every cause as an unverified claim.verifiedonly 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 aBotauthor counts; aUsernever 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
editorcome fromskills/github-forge. GitLab uses/api/v4/userand GraphQLlastEditedBy. Jira usesexpand=propertiesand/rest/api/3/myself. The GitLab and Jira skills show how to page through every comment (&page=Nuntil a short page or an emptyX-Next-Page;startAtuntiltotal), matching step 2e's "all pages".env/github/triage.envpassesFULLSEND_APP_SET, andscripts/harness-jira-test.shchecks that it stays in the host file and out ofenv.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.commentsseeds comments on a GitHub issue fixture, oldest first.cause_listsjudge decodes the run's owntriage-state-v1marker and matches cause phrases andverifiedexpectations against it. It is registered inrun-functional.shandaggregate-nightly.sh.Relation to fullsend's specs
<!-- 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 afullsend:triage-state-v1marker 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.fullsend issues post-commentprints no comment id. It does store the run's marker on the comment as the propertyfullsend.sticky-marker={"marker": "<marker>"}(CreateCommentWithMarkerininternal/tracker/jira_client.go, called frompostJiraStickyCommentininternal/cli/issues.go). I checked this in v0.56.1-rc.1 (pinned ingo.mod), in v0.56.1, and on #9399's head5150c261, 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:totalwhen Jira gives one, and otherwise on a page shorter than itsmaxResults. More than 100 pages fails the run.+0000form and RFC 3339Z/+00:00are both accepted, as in fullsend'sjiraTimestampFormats.<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 bybot_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 exportsFULLSEND_APP_SETsince 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.Trade-offs
verified: falseuntil a run checks them.ruled_outreaches 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.sufficientrun on Jira stores its state as the comment propertyfullsend.triage-state, so the triage account needs the "Edit own comments" project permission, and a scoped token needswrite:jira-work(granular:write:comment.property:jira) andread:jira-work(granular:read:comment.property:jirawith 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'sBREAKING CHANGE:trailer still describes the earlier required lists; 97dd677 relaxed that, and this section is the current description.fullsend.triage-stateon the bot's comment without changingupdatedorupdateAuthor. 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.cause_listsstays report-only until the cases have run live.Testing
scripts/post-triage-test.sh: new tests for all three trackers.sufficientand 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, asindex/rindexdo before jq 1.8.0); asufficientresult whosetriage_summaryis not an object fails before posting or labelling;TRIAGE_STATE_MAX_BYTESis 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.Z,+02:00and+0200forms are compared correctly, and fractional seconds count.totaldoes not end the listing; paging goes on until a page is shorter than itsmaxResults.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.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 lintandpre-commit.