Repository navigation
Description
Problem
Part of #588. This is the failure-diagnosis portion of #325, delivered in one PR.
On origin/main at a0347a715fab580ece45edfcb3d13509620459a8, diagnosis is shell: PR selection and identity reporting at packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:43, checkout comparison at packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:60, failure selection at packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:82, reproducer suggestions at packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:97, and log reporting at packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:122.
The only dedicated diagnosis test checks task mappings by invoking shell (tests/skills/fix-pr/scripts/test_diagnose.py:18); there is no dedicated fix-pr Bats suite (docs/script-inventory.md:195). Report-level behavior therefore needs explicit coverage before migration. The shell also masks failed check reads and can print “Nothing is failing” with status 0 (packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:82). The Go command must honor #588's requirement that unreadable or empty checks cannot become success.
Acceptance criteria
- AC1: Given a PR number or the current branch's open PR,
agentrepo checks diagnosediagnoses that target; missing repository context, GitHub access or discoverable PR produces a diagnosis refusal with status 2. - AC2: Given readable PR metadata and local checkout state, the report preserves the existing PR identity and checkout-context report.
- AC3: Non-functional: diagnosis performs no automatic retry.
- AC4: Given check results, the failure report includes exactly checks in
FAILURE,TIMED_OUT,CANCELLEDorACTION_REQUIRED, retaining each job name and link, and finishes with status 1 when any such check is present. - AC5: Given a readable nonempty check set containing none of those failure states, the report says nothing is failing, shows the current checks and exits 0 without claiming all checks passed.
- AC6: Given any job name, the report preserves the existing case-insensitive, first-match reproducer suggestion, including the explicit no-mapping message for unknown jobs.
- AC7: Given failed checks, the report preserves bounded failing-step log output with at most one log read per distinct workflow run and the existing notices for non-workflow links, repeated runs and unavailable logs.
- AC8: Given missing, unreadable or malformed PR/check data, diagnosis reports the inability to diagnose and exits 2 instead of producing a successful no-failure result.
- AC9: Non-functional: diagnosis is read-only and suggestion-only: it never executes a reproducer or changes repository content, Git state or remote state.
- AC10: Non-functional: diagnosis retains stable target selection and report text despite the environment values currently neutralized by the shell.
- AC11: Non-functional: diagnosis produces the same observable outcomes on Linux, macOS and Windows.
- AC12: Non-functional: the existing consumer-facing diagnosis entry point ends this PR as a thin shell wrapper that probes the Go subcommand, forwards unchanged arguments, output and status when supported, and falls back to the frozen shell when the binary or subcommand is unavailable throughout the N-2 window; a failed supported invocation never triggers fallback.
Scope and non-goals
Moves into agentrepo checks: target and access checks, PR and checkout reporting, failure selection, reproducer suggestions, run/log retrieval and bounded report output. This is a read-only diagnosis command; repair remains the skill's subsequent work.
Preserve these observable details from the pinned source:
| Behavior | Evidence |
|---|---|
| Root-relative execution; stable locale, disabled pager/prompts and neutralized repository-retargeting variables | packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:20, packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:35 |
| Explicit or inferred PR, missing-tool/authentication refusals, PR report header | packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:38, packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:46, packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:53 |
| Branch mismatch takes precedence over commit mismatch; warnings do not prevent the diagnostic report; dirty paths remain visible | packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:64, packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:68, packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:77 |
| Failure-state selection and no-failure check display | packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:82 |
| Failure report separators, job/task/link labels, one log per run, non-workflow and empty-log notices, closing advice | packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:122, packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:132, packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:138, packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:159 |
Last 80 log lines by default; FIX_PR_LOG_LINES override |
packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:33, packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:148 |
The reproducer contract is the following ordered, case-insensitive first match, evidenced by packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:97. Suggestions remain suggestions; they are not evidence that a failure reproduces locally.
| Job-name text, in precedence order | Suggested command |
|---|---|
| prose or vale | mise run lint-prose |
| spell | mise run devtools:lint-spelling |
| markdown or rumdl | mise run devtools:lint-markdown |
| shell | mise run devtools:lint-shell && mise run devtools:lint-shell-fmt |
| yaml | mise run devtools:lint-yaml |
| toml | mise run devtools:lint-toml |
| workflow or actionlint | mise run devtools:lint-workflows |
| editorconfig | mise run lint-editorconfig |
| arch | mise run devtools:lint-go-arch |
| deadcode | mise run devtools:lint-go-deadcode |
| lint | mise run lint |
| race | mise run devtools:test-go-race |
| cover | mise run devtools:cover-go-check |
| test | mise run test |
| vendor | mise run devtools:vendor-check |
| vuln | mise run devtools:vuln |
| gitleaks or secret | mise run devtools:gitleaks |
| apm or validate | apm install --frozen && apm audit --ci |
| fuzz | mise run fuzz |
| none of the above | (no local task maps to this job; read the log) |
Deliberate safety difference: an empty or unreadable check response and missing required PR metadata are inconclusive with status 2. Do not preserve the shell's error masking as a success path. Usable failure records returned with a check-status exit remain diagnostic evidence; a failed command's partial or invalid output is not proof of a clean PR. Unavailable failing-step logs retain the existing notice and failure status 1 when failures themselves are known. The frozen compatibility fallback is unchanged, so this safety difference must be documented.
Non-goals:
- Watching, latest-attempt selection or evaluator policy changes; diagnosis currently reports the selected failure states directly. This port does not make diagnosis a merge-readiness decision.
- New task mappings, workflow-aware reproducer inference, automatic reproduction, reruns, edits, rebase, commit/amend, push, description revision/publication or merge. These are separate skill steps (
packages/agents/source/skills/fix-pr/SKILL.codex.md:21,packages/agents/source/skills/fix-pr/SKILL.codex.md:25,packages/agents/source/skills/fix-pr/SKILL.codex.md:29,packages/agents/source/skills/fix-pr/SKILL.codex.md:47). - Description restoration: it is shared PR-draft behavior, not check diagnosis. Its existing fix-pr and merge-pr entry points require the separate restoration split of Move watch-pr and fix-pr scripts into agentrepo checks #325 and the PR transaction boundary in Move the pr, write-pr-description and agent-pr scripts into agentrepo pr #323/Move the merge-pr, merge policy and agent-merge-pr scripts into agentrepo merge #324.
- Porting or broadening the fix-pr guard (
packages/agents/source/skills/fix-pr/claude/scripts/guard-fix.sh:42), or adding watcher-specific quota statuses to diagnosis. Neither is part of the existing diagnosis command contract. - Preserving shell parsing-tool dependencies on the Go path; they remain prerequisites only for the frozen fallback where used.
Approach
Characterize the complete report with local scripted PR/check/log responses and disposable repository fixtures before moving the behavior. Compare output, status, read counts and unchanged repository state with the pinned shell on all parity cases. Keep the AC8 safety differences explicit in tests and documentation rather than asserting byte-for-byte parity for them.
Transfer every reproducer mapping assertion from the Python test into Go coverage, retaining the check that suggestions name defined tasks and prefer the shared task names. Replace the source-text-dependent test when those assertions are covered. Deliver the command, compatibility wrapper, generated skill output and consumer guidance together.
Dependencies
- Move watch-pr and fix-pr scripts into agentrepo checks #325: parent scope for this diagnosis split.
- Replace complex shell with tested Go, starting with gates and merging #588: empty/unreadable-check safety contract.
- Port the shared skill library (lib.sh, agent.sh, signing.sh, gates.py) to Go #321: not required. The diagnosis script makes its own direct prerequisite and read calls (
packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:43-44) and does not use the shared GitHub access and quota helpers (packages/agents/source/lib/lib.sh:823,packages/agents/source/lib/lib.sh:875) that the watcher needs; watcher-specific quota statuses are out of scope here, so this split lands independently of Port the shared skill library (lib.sh, agent.sh, signing.sh, gates.py) to Go #321. - Ship the Go binaries as release assets installed through mise's github backend #333 and feat(distribution): migrate consumer tool pins to release assets #544: binary delivery and consumer installation before later fallback retirement; neither blocks landing with probe-and-fallback.
- Move the pr, write-pr-description and agent-pr scripts into agentrepo pr #323 and Move the merge-pr, merge policy and agent-merge-pr scripts into agentrepo merge #324 own the broader PR-description and merge transactions; this split performs neither transaction and does not wait for their unrelated phases.
Size
M. One PR for read-only diagnosis, full report coverage, reproducer parity and the compatibility entry point.
Verify plan
- Failing test first: add command regressions for missing Go diagnosis and for the shell's false-success path on failed/empty check reads; show the new contract fails before the port and passes after it. All PR/run/log data is local test input.
- AC1: Test explicit and inferred targets, nested/root invocation, absent repository/PR/tool/authentication and failed discovery; assert refusal text, streams and status 2.
- AC2: Compare the PR number, title, URL, branch and full head identity with the shell. Test in-sync, wrong branch, wrong commit, both mismatches, dirty tracked/untracked paths and detached checkout; assert warning precedence, continued diagnosis and unchanged Git state.
- AC3: Count requests after metadata, check and log failures; assert no failed request is retried.
- AC4: Cover all four failure states and every excluded state; assert each selected name/link, report ordering, closing advice and status 1. Include usable failure output with a check-status exit and unavailable logs.
- AC5: Cover nonempty passing, skipped and unfinished-only responses; assert existing no-failure text/current-check display and status 0 without an all-green claim.
- AC6: Port every pattern from
tests/skills/fix-pr/scripts/test_diagnose.py:18, including both shell commands, mixed case, overlapping matches, platform-suffixed test names and unknown names. Assert exact suggestions, precedence, defined tasks and shared-name preference. - AC7: Cover distinct runs, two failing jobs sharing a run, a non-workflow link, empty/unavailable logs, and more than 80 lines. Assert exactly one log read per run, the expected notices, default/overridden tail lengths, output shape and status 1.
- AC8: Test failed metadata reads, malformed/truncated/empty check data, nonzero reads with misleading partial stdout and successful empty responses; assert status 2, a useful diagnosis error and no successful no-failure report. Verify known failures plus an unavailable log still produce the AC7 notice and status 1.
- AC9: Reject any write in the command fixtures; assert no reproducer executes and compare repository files, index and refs before and after every outcome.
- AC10: Set the locale, pager, prompt, repository override and directory environment values neutralized at
packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:20; assert the same target and report as the baseline case. - AC11: Run the targeted Go regressions on Linux, macOS and Windows, wrapper integration checks,
mise run check,mise run cover-go-checkandmise run cover-py-check. Runmise run generate-skills, thenmise run skill-tokens, thenapm install; inspect all resulting changes and runmise run check-generated-skills. Separately verify deployed entry points, token metadata, lock output and docs. Document the command and safety difference indocs/agent-skills-migration.md. - AC12: Test a supporting binary, absent binary, N-2 binary without the subcommand, and supported-command statuses 0, 1 and 2. Assert a side-effect-free capability probe, exact forwarding, frozen fallback only for unsupported capability, and no second diagnosis on operational failure. Inspect that the wrapper contains forwarding/probe logic only.
- D1–D10: Verify every AC on the merged head and cite its evidence in the PR; obtain independent exact-head approval and passing required checks; complete gitleaks, the repository leak scan and the review of every content post; sign commits and squash; update docs; include Assisted-by trailers and the provenance:agent-assisted label; check actual PR size limits; file follow-ups with Problem and numbered ACs, list them in PR Related and link deferred code to them; close the issue with a closing reference, move it to Done and record the merge commit in the final Status comment.
Risks
Job-name matching is heuristic and order-sensitive. Error masking currently hides missing data, so parity fixtures must distinguish known failures with missing logs from a diagnosis with no readable check data. Report coverage is largely new; the mapping test alone cannot establish correctness. The N-2 fallback retains the old error behavior until its retirement condition is met. Undo: revert this PR, without changing unrelated fix-pr workflow policy.
Operator authority
None
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Work type
Projects
- StatusShow more project fieldsDone
Activity
tbhb-agent commentedon Oct 26, 2026
Refinement: NOT READY — Dependencies omits #321 classification from parent #325
Model: gemini-4-argon-high
Checked
tbhb-dev/devtools#794(0 comments) and the issues it names (#325,#588,#323,#324,#333,#544), plus#321and#793referenced by parent#325and its check-watching split.origin/main(a0347a715fab580ece45edfcb3d13509620459a8):packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:38,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:43,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:46, andpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:53.packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:60,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:64,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:68, andpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:77.FAILURE,TIMED_OUT,CANCELLED,ACTION_REQUIRED) and masked check-read error handling (2>/dev/null || true) atpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:82.packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:97(all 19 patterns and the fallback line matchpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:98-118).FIX_PR_LOG_LINES:-80), run-ID extraction, once-per-run deduplication, non-workflow/empty-log notices, and closing advice atpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:33,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:122,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:132,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:138,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:148, andpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:159.packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:20and root-relative execution atpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:35.tests/skills/fix-pr/scripts/test_diagnose.py:18,docs/script-inventory.md:168, anddocs/script-inventory.md:195.packages/agents/source/skills/fix-pr/SKILL.codex.md:21,packages/agents/source/skills/fix-pr/SKILL.codex.md:25,packages/agents/source/skills/fix-pr/SKILL.codex.md:29,packages/agents/source/skills/fix-pr/SKILL.codex.md:47, andpackages/agents/source/skills/fix-pr/claude/scripts/guard-fix.sh:42.#588AC5 fail-closed safety difference on unreadable or empty checks (AC8), and non-functional requirements (AC3 no retry, AC9 read-only/suggestion-only, AC10 environment neutrality, AC11 cross-platform parity, AC12 N-2 capability probe and frozen shell fallback).mise.toml:291,mise.toml:462,mise.toml:470,mise.toml:478,mise.toml:542,mise.toml:685,mise.toml:707,mise.toml:792).None) matches.agents/agent-skills.conf:4-9:packages/agents/source/skills/fix-pr/shared/scripts/diagnose.shand its generated copies do not matchgolden_paths,constitutional_paths,gate_config_paths, orowner_paths(packages/agents/source/skills/fix-pr/claude/scripts/guard-fix.sh:42is explicitly out of scope).Gaps
## Dependenciesdoes not classify parent#325's dependency on#321or state whether#794needs the same#321pieces as#793(shared GitHub access and quota behavior).#325declaresDepends on: #321 (shared library port) and #333 (binary distribution). In#793(the check-watching split of#325),## Dependenciesexplicitly classifies#321becausepackages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:47sourceslib.shand usesdt_gh_login(packages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:63,packages/agents/source/lib/lib.sh:875) anddt_gh(packages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:68,packages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:83,packages/agents/source/lib/lib.sh:823). By contrast,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.shnever sourcespackages/agents/source/lib/lib.sh(tools/generate-skills.sh:111deploys nolib.shintofix-pr), checkscommand -v ghandgh auth statusdirectly atpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:43-44, invokesghdirectly atpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:49,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:54,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:64-65,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:82,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:88, andpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:148, and## Scope and non-goalsexcludes watcher-specific quota statuses. However,## Dependenciesin#794only states that it does not wait for#323or#324and omits#321entirely.#321bullet under## Dependenciesstating whether#794needs the same#321shared GitHub access and quota behavior pieces (packages/agents/source/lib/lib.sh:823,packages/agents/source/lib/lib.sh:875) as#793, or does not depend on#321becausepackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:43-44uses directghprerequisite and read calls and keeps watcher-specific quota statuses out of scope.Split
Single M-sized PR is appropriate (
packages/agents/source/skills/fix-pr/shared/scripts/diagnose.shis 112 source lines / 162 physical lines, withpopulate-description.shandguard-fix.shcleanly excluded as separate non-goals). No further split needed.Definition of done
The definition of done for #794 (Feature). Tick each item and give its evidence. Ticked boxes below indicate planning coverage in the issue's acceptance criteria and verify plan, not completed implementation work.
## Verify planlists dedicated verification steps forAC1–AC12and explicitly requires verifying every AC on the merged head and citing its evidence in the PR underD1–D10.## Verify plan(D1–D10) requires independent exact-head approval and filing any follow-ups.## Verify plan(AC11andD1–D10) requires passingmise run check, coverage checks, generated-skill checks, and required checks on the merged head.check-leaks.shwith the repository's private-strings list, and the leak review of each post. — Planning coverage:## Verify plan(D1–D10) explicitly requires completing gitleaks, the repository leak scan, and the leak review of every content post.## Verify plan(D1–D10) requires signing all commits and the squash commit.docs/, CHANGELOG or help text), or the Verification section says "No doc impact" and why. — Planning coverage:## Verify plan(AC11andD1–D10) requires documenting the command and safety difference indocs/agent-skills-migration.mdand verifying docs match the change.provenance:agent-assistedlabel. — Planning coverage:## Verify plan(D1–D10) explicitly requiresAssisted-bytrailers and theprovenance:agent-assistedlabel.## Sizescopes the work to a single M PR and## Verify plan(D1–D10) requires checking actual PR size limits.## Verify plan(D1–D10) requires filing follow-ups with Problem and numbered ACs, listing them in PR Related, and linking deferred code to them.Status:comment names the merge commit. — Planning coverage:## Verify plan(D1–D10) requires closing the issue with a closing reference, moving it to Done, and recording the merge commit in the finalStatus:comment.Round: 1 of 3
tbhb-agent commentedon Oct 26, 2026
Refinement: READY — Failure diagnosis Go migration contract and #321 independence verified
Model: gemini-4-argon-high
Checked
tbhb-dev/devtools#794and its Round 1 comment, plus the issues named in the body (#325,#588,#321,#323,#324,#333,#544) and sibling check-watching split#793.#321dependency classification againstorigin/main(a0347a715fab580ece45edfcb3d13509620459a8):## Dependenciesnow explicitly classifies#321as not required becausepackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:43-44runs directcommand -v ghandgh auth statusprerequisite checks andpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:49,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:54,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:64-65,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:82,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:88, andpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:148invokeghdirectly rather than sourcingpackages/agents/source/lib/lib.sh(tools/generate-skills.sh:111does not copylib.shintofix-pr).#793sourceslib.shatpackages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:47and callsdt_gh_login(packages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:63,packages/agents/source/lib/lib.sh:875) anddt_gh(packages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:68,packages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:83,packages/agents/source/lib/lib.sh:823). With watcher-specific quota statuses explicitly out of scope under## Scope and non-goals,#794accurately states that it lands independently of#321.origin/main(a0347a715fab580ece45edfcb3d13509620459a8):packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:38,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:43,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:46, andpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:53.packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:60,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:64,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:68, andpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:77.FAILURE,TIMED_OUT,CANCELLED,ACTION_REQUIRED) and masked check-read error handling (2>/dev/null || true) atpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:82.packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:97(all 19 patterns and the fallback line matchpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:98-118).FIX_PR_LOG_LINES:-80), run-ID extraction, once-per-run deduplication, non-workflow/empty-log notices, and closing advice atpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:33,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:122,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:132,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:138,packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:148, andpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:159.packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:20and root-relative execution atpackages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:35.tests/skills/fix-pr/scripts/test_diagnose.py:18,docs/script-inventory.md:168, anddocs/script-inventory.md:195.packages/agents/source/skills/fix-pr/SKILL.codex.md:21,packages/agents/source/skills/fix-pr/SKILL.codex.md:25,packages/agents/source/skills/fix-pr/SKILL.codex.md:29,packages/agents/source/skills/fix-pr/SKILL.codex.md:47, andpackages/agents/source/skills/fix-pr/claude/scripts/guard-fix.sh:42.AC1–AC12), Verify plan, Risks, and Operator authority:AC1–AC12state single observable, testable outcomes free of internal implementation detail, covering functional parity, the#588AC5 fail-closed safety difference on unreadable or empty checks (AC8), and non-functional requirements (AC3no retry,AC9read-only/suggestion-only,AC10environment neutrality,AC11cross-platform parity,AC12N-2 capability probe and frozen shell fallback).## Verify planmapsAC1–AC12andD1–D10to concrete local fixture checks and repository gates (mise.toml:291,mise.toml:462,mise.toml:470,mise.toml:478,mise.toml:542,mise.toml:685,mise.toml:707,mise.toml:792).## Operator authority(None) matches.agents/agent-skills.conf:4-9:packages/agents/source/skills/fix-pr/shared/scripts/diagnose.shand its generated copies do not matchgolden_paths,constitutional_paths,gate_config_paths, orowner_paths(packages/agents/source/skills/fix-pr/claude/scripts/guard-fix.sh:42is explicitly out of scope).Gaps
None
Split
Single M-sized PR is appropriate (
packages/agents/source/skills/fix-pr/shared/scripts/diagnose.shis 112 source lines / 162 physical lines, withpopulate-description.shandguard-fix.shcleanly excluded as separate non-goals). No further split needed.Definition of done
The definition of done for #794 (Feature). Tick each item and give its evidence. Ticked boxes below indicate planning coverage in the issue's acceptance criteria and verify plan, not completed implementation work.
## Verify planlists dedicated verification steps forAC1–AC12and explicitly requires verifying every AC on the merged head and citing its evidence in the PR underD1–D10.## Verify plan(D1–D10) requires independent exact-head approval and filing any follow-ups.## Verify plan(AC11andD1–D10) requires passingmise run check, coverage checks, generated-skill checks, and required checks on the merged head.check-leaks.shwith the repository's private-strings list, and the leak review of each post. — Planning coverage:## Verify plan(D1–D10) explicitly requires completing gitleaks, the repository leak scan, and the leak review of every content post.## Verify plan(D1–D10) requires signing all commits and the squash commit.docs/, CHANGELOG or help text), or the Verification section says "No doc impact" and why. — Planning coverage:## Verify plan(AC11andD1–D10) requires documenting the command and safety difference indocs/agent-skills-migration.mdand verifying docs match the change.provenance:agent-assistedlabel. — Planning coverage:## Verify plan(D1–D10) explicitly requiresAssisted-bytrailers and theprovenance:agent-assistedlabel.## Sizescopes the work to a single M PR and## Verify plan(D1–D10) requires checking actual PR size limits.## Verify plan(D1–D10) requires filing follow-ups with Problem and numbered ACs, listing them in PR Related, and linking deferred code to them.Status:comment names the merge commit. — Planning coverage:## Verify plan(D1–D10) requires closing the issue with a closing reference, moving it to Done, and recording the merge commit in the finalStatus:comment.Round: 2 of 3
feat(checks): diagnose failures in Go
feat(checks): diagnose failures in Go
feat(checks): route diagnosis through the Go command