Repository navigation
Post a failed Run's Recovery, and a waiting Spec's reasons, as a generated issue comment - #1940
Merged
Merged
Conversation
…rated issue comment
…ec PR caveat, scrub joined paths, share the attribution line
A failed session's diagnostic is model output and goes into the Recovery comment's cause. Check the comment against the stored private Security reports, captured before the run's sessions and again at its end, and post a withheld comment in its place when it includes any of their text.
…ment's pull request Clippy's wildcard_enum_match_arm lint rejects the catch-all arm.
This was referenced Nov 10, 2026
Closed
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Run that ends
agent-failednow posts its Recovery on the issue as one generated comment. A Spec run that ends only waiting posts one comment on its Spec, naming each undone Ticket and what it waits on. The Claim ending decides whether a comment is owed, so the posting rule sits next to the label rule:src/recovery.rs: renders the comment from factory-owned facts only, with no continue command. Local paths in the cause become<local path>. If the Spec PR changed under the Spec run, the retry line says to decide the Base branch and Spec branch first. A Run with no Recovery saysStopped at: Start, before any work began.src/run.rsandsrc/processes.rs: Ticket runs, Spec runs and Custom processes pass the comment to the Claim's ending. A Custom process that fails before its Steps names its Issue branch, and the pull request when it is a Continuation with one open.src/claim.rs: before posting, the Claim checks the comment against this repository's stored private Security review reports. It captures them before the run's sessions and again at the end. If the comment includes any of their text, a withheld comment is posted in its place. A failed session's diagnostic is model output, and it appears in the cause.src/github.rs: the AI-attribution line is now one constant,GENERATED, which Triage runs use as well.docs/guide.md(regenerated intosite/docs/index.html) and the hand-writtensite/index.html,site/how-it-works/,site/architecture/describe the comment.Closes #1904
Evidence
Execution evidence
src/(git checkout origin/issue-1901 -- src, thencargo test --test failed_run a_failed_run_left_agent_failed_posts):cargo test --test failed_run:cargo test --test spec_run -- waiting failed_ticket blocking_cyclecovers the waiting Spec comment and the failed Spec run's Recovery comment:ok. 15 passed.cargo test --test processcovers the failed Custom process comment:ok. 237 passed; 1 ignored.cargo test --test security_run the_security_run_ends_as_a_failed_fixchecks that a failed Security fix posts no comment:ok. 1 passed.npm run docs:check --prefix sitepasses.cargo test --test failed_run a_recovery_comment_never_posts_private_security_report_material_its_cause_quotedfailed on this branch before the fix: the comment's cause quoted a planted private report line. It passes after the fix. Afterwardscargo test --test failed_rungaveok. 18 passed; 1 ignoredandcargo test --test processgaveok. 237 passed; 1 ignored.scripts/affected-tests mainwas run, but rustc was OOM-killed (SIGKILL) while compiling the unit-test binary, the same host limit described below.cargo clippy --all-targetstypechecks it.cargo test --bin thirdshift) never finished compiling. rustc was OOM-killed on every attempt, including-j 1,CARGO_INCREMENTAL=0and debuginfo off, with about 2 GB free on a host shared with other sessions. So the new inline tests insrc/claim.rsandsrc/recovery.rshave only been typechecked (cargo check --tests, clean); CI will be their first run. That includes the three tests taken from the Spec review.scripts/affected-testswas not run, for the same reason.Visual evidence
None. The site changes only add sentences inside existing paragraphs and list items, and no screenshots were taken.
Merge Danger
Door: two-way
Posted comments stay on issues after a revert, but reverting stops new ones.
Blast Radius: issue-comments
Every
agent-failedfailure, except a failed Security fix, now writes a public comment as the operator'sghaccount. A cause with a local path in an unusual form, such as one containing spaces or a relative path, could still slip past the scrubbing.Unaddressed findings
Standards
recovery::comment's five parameters. Declined.machineis a parameter so the tests stay deterministic, which the codebase-design skill endorses ("Accept dependencies"). The free function is the single entry point for both the Recovery and no-Recovery cases (src/recovery.rs,pub fn comment).bool. Partly addressed: the hard-to-parse doc comment onClaim::endis rewritten. Moving the comment intoEndingis declined.EndingisCopyand compared by value in the existing Claim, Run and process tests (src/run.rsCall::EndClaim(claim::Ending)). The rule for whether a comment is owed already lives in one place,Claimed::endinsrc/claim.rs. Building a string that is never posted costs nothing that matters.TicketsNotDone::commentlives insrc/spec_run.rs. Declined. It renders thenot_donefield private toTicketsNotDone. Moving it torecovery.rswould expose that field for no gain. The two comments share only the attribution line, which is nowcrate::github::GENERATED.Security
None. The one introduced finding, private Security review material reaching the public Recovery comment through a failed session's diagnostic, is fixed and covered by a regression test.
Spec
Stopped at: Start, before any work began), and a Custom process that fails before its Steps on a Continuation names that Continuation's open pull request (before_steps_commentinsrc/processes.rs). The remaining case is a Run with no Recovery and no recordedpr_url. Its comment names the Issue branch but no pull request, because none was observed and looking one up would add a GitHub call to a failure path.Every changed file was read by both reviewers except
site/docs/index.html. It is generated fromdocs/guide.md, andnpm run docs:check --prefix sitepassed. The Standards reviewer inspected its diff, and the Spec reviewer excluded it as generated output.Built with claude 2.1.314 · claude-opus-5-5 · medium
Security review outcome
No unaddressed introduced findings.