Skip to content

feat(checks): move pull request failure diagnosis into Go #794

Description

@tbhb-agent

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

  1. AC1: Given a PR number or the current branch's open PR, agentrepo checks diagnose diagnoses that target; missing repository context, GitHub access or discoverable PR produces a diagnosis refusal with status 2.
  2. AC2: Given readable PR metadata and local checkout state, the report preserves the existing PR identity and checkout-context report.
  3. AC3: Non-functional: diagnosis performs no automatic retry.
  4. AC4: Given check results, the failure report includes exactly checks in FAILURE, TIMED_OUT, CANCELLED or ACTION_REQUIRED, retaining each job name and link, and finishes with status 1 when any such check is present.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. AC9: Non-functional: diagnosis is read-only and suggestion-only: it never executes a reproducer or changes repository content, Git state or remote state.
  10. AC10: Non-functional: diagnosis retains stable target selection and report text despite the environment values currently neutralized by the shell.
  11. AC11: Non-functional: diagnosis produces the same observable outcomes on Linux, macOS and Windows.
  12. 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

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-check and mise run cover-py-check. Run mise run generate-skills, then mise run skill-tokens, then apm install; inspect all resulting changes and run mise run check-generated-skills. Separately verify deployed entry points, token metadata, lock output and docs. Document the command and safety difference in docs/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

Activity

  1. added
    change:featPR adds or changes a feature (Conventional Commit type feat)
    on Oct 26, 2026
  2. tbhb-agent commented on Oct 26, 2026

    @tbhb-agent
    ContributorAuthor

    Refinement: NOT READY — Dependencies omits #321 classification from parent #325
    Model: gemini-4-argon-high

    Checked

    • Live issue and referenced issues: Read live tbhb-dev/devtools#794 (0 comments) and the issues it names (#325, #588, #323, #324, #333, #544), plus #321 and #793 referenced by parent #325 and its check-watching split.
    • Problem and baseline citations against origin/main (a0347a715fab580ece45edfcb3d13509620459a8):
      • PR selection, prerequisite checks, and identity header at 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, and packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:53.
      • Checkout state and branch/commit mismatch precedence at 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, and packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:77.
      • Failure-state selection (FAILURE, TIMED_OUT, CANCELLED, ACTION_REQUIRED) and masked check-read error handling (2>/dev/null || true) at packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:82.
      • Case-insensitive ordered reproducer table at packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:97 (all 19 patterns and the fallback line match packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:98-118).
      • Log tail bound (FIX_PR_LOG_LINES:-80), run-ID extraction, once-per-run deduplication, non-workflow/empty-log notices, and closing advice at packages/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, and packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:159.
      • Environment hardening at packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:20 and root-relative execution at packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:35.
      • Existing test coverage and inventory claims at tests/skills/fix-pr/scripts/test_diagnose.py:18, docs/script-inventory.md:168, and docs/script-inventory.md:195.
      • Non-goal boundary citations at 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, and packages/agents/source/skills/fix-pr/claude/scripts/guard-fix.sh:42.
    • Acceptance criteria (AC1–AC12): Each criterion states a single observable, testable outcome free of internal implementation detail, covering functional parity, the #588 AC5 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).
    • Verify plan, Risks, and Operator authority:
      • Verify plan maps AC1–AC12 and D1–D10 to concrete offline/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.sh and its generated copies do not match golden_paths, constitutional_paths, gate_config_paths, or owner_paths (packages/agents/source/skills/fix-pr/claude/scripts/guard-fix.sh:42 is explicitly out of scope).

    Gaps

    1. [Medium] ## Dependencies does not classify parent #325's dependency on #321 or state whether #794 needs the same #321 pieces as #793 (shared GitHub access and quota behavior).
      • Evidence: Parent issue #325 declares Depends on: #321 (shared library port) and #333 (binary distribution). In #793 (the check-watching split of #325), ## Dependencies explicitly classifies #321 because packages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:47 sources lib.sh and uses dt_gh_login (packages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:63, packages/agents/source/lib/lib.sh:875) and dt_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.sh never sources packages/agents/source/lib/lib.sh (tools/generate-skills.sh:111 deploys no lib.sh into fix-pr), checks command -v gh and gh auth status directly at packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:43-44, invokes gh directly at packages/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, and packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:148, and ## Scope and non-goals excludes watcher-specific quota statuses. However, ## Dependencies in #794 only states that it does not wait for #323 or #324 and omits #321 entirely.
      • Action: Add an explicit #321 bullet under ## Dependencies stating whether #794 needs the same #321 shared 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 #321 because packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:43-44 uses direct gh prerequisite 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.sh is 112 source lines / 162 physical lines, with populate-description.sh and guard-fix.sh cleanly 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.

    • D1 The author verified each AC on the merged head, and the Verification section of the pull request cites each AC ID with its evidence: the command and its result, or a link. — Planning coverage: ## Verify plan lists dedicated verification steps for AC1–AC12 and explicitly requires verifying every AC on the merged head and citing its evidence in the PR under D1–D10.
    • D2 An independent reviewer approved the exact merged head, and the author resolved each finding or filed it as a follow-up. — Planning coverage: ## Verify plan (D1–D10) requires independent exact-head approval and filing any follow-ups.
    • D3 The required checks pass on that head, and any loosened gate has the owner's approval of that exact head. — Planning coverage: ## Verify plan (AC11 and D1–D10) requires passing mise run check, coverage checks, generated-skill checks, and required checks on the merged head.
    • D4 The leak scans come back clean: gitleaks, devtools' check-leaks.sh with 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.
    • D5 The author signed each commit, the squash included. — Planning coverage: ## Verify plan (D1–D10) requires signing all commits and the squash commit.
    • D6 The docs match the change (README, docs/, CHANGELOG or help text), or the Verification section says "No doc impact" and why. — Planning coverage: ## Verify plan (AC11 and D1–D10) requires documenting the command and safety difference in docs/agent-skills-migration.md and verifying docs match the change.
    • D7 The commits and the squash have Assisted-by trailers, and the pull request has the provenance:agent-assisted label. — Planning coverage: ## Verify plan (D1–D10) explicitly requires Assisted-by trailers and the provenance:agent-assisted label.
    • D8 The pull request stays within the size limits, or the owner approved its exact head over the hard limit. — Planning coverage: ## Size scopes the work to a single M PR and ## Verify plan (D1–D10) requires checking actual PR size limits.
    • D9 The author files follow-ups and deferred findings as issues with at least a Problem and numbered AC and lists them under the Related section of the pull request. Any work left in the code links its issue. — Planning coverage: ## Verify plan (D1–D10) requires filing follow-ups with Problem and numbered ACs, listing them in PR Related, and linking deferred code to them.
    • D10 The merge closes the issue through a closing reference and the board shows Done. The final 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 final Status: comment.

    Round: 1 of 3

  3. tbhb-agent commented on Oct 26, 2026

    @tbhb-agent
    ContributorAuthor

    Refinement: READY — Failure diagnosis Go migration contract and #321 independence verified
    Model: gemini-4-argon-high

    Checked

    • Live issue and referenced issues: Read live tbhb-dev/devtools#794 and its Round 1 comment, plus the issues named in the body (#325, #588, #321, #323, #324, #333, #544) and sibling check-watching split #793.
    • Round 2 #321 dependency classification against origin/main (a0347a715fab580ece45edfcb3d13509620459a8):
      • ## Dependencies now explicitly classifies #321 as not required because packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:43-44 runs direct command -v gh and gh auth status prerequisite checks and packages/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, and packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:148 invoke gh directly rather than sourcing packages/agents/source/lib/lib.sh (tools/generate-skills.sh:111 does not copy lib.sh into fix-pr).
      • By contrast, the watcher in #793 sources lib.sh at packages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:47 and calls dt_gh_login (packages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:63, packages/agents/source/lib/lib.sh:875) and dt_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, #794 accurately states that it lands independently of #321.
    • Problem and baseline citations against origin/main (a0347a715fab580ece45edfcb3d13509620459a8):
      • PR selection, prerequisite checks, and identity header at 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, and packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:53.
      • Checkout state and branch/commit mismatch precedence at 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, and packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:77.
      • Failure-state selection (FAILURE, TIMED_OUT, CANCELLED, ACTION_REQUIRED) and masked check-read error handling (2>/dev/null || true) at packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:82.
      • Case-insensitive ordered reproducer table at packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:97 (all 19 patterns and the fallback line match packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:98-118).
      • Log tail bound (FIX_PR_LOG_LINES:-80), run-ID extraction, once-per-run deduplication, non-workflow/empty-log notices, and closing advice at packages/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, and packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:159.
      • Environment hardening at packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:20 and root-relative execution at packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh:35.
      • Existing test coverage and inventory claims at tests/skills/fix-pr/scripts/test_diagnose.py:18, docs/script-inventory.md:168, and docs/script-inventory.md:195.
      • Non-goal boundary citations at 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, and packages/agents/source/skills/fix-pr/claude/scripts/guard-fix.sh:42.
    • Acceptance criteria (AC1–AC12), Verify plan, Risks, and Operator authority:
      • AC1–AC12 state single observable, testable outcomes free of internal implementation detail, covering functional parity, the #588 AC5 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).
      • ## Verify plan maps AC1–AC12 and D1–D10 to 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.sh and its generated copies do not match golden_paths, constitutional_paths, gate_config_paths, or owner_paths (packages/agents/source/skills/fix-pr/claude/scripts/guard-fix.sh:42 is explicitly out of scope).

    Gaps

    None

    Split

    Single M-sized PR is appropriate (packages/agents/source/skills/fix-pr/shared/scripts/diagnose.sh is 112 source lines / 162 physical lines, with populate-description.sh and guard-fix.sh cleanly 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.

    • D1 The author verified each AC on the merged head, and the Verification section of the pull request cites each AC ID with its evidence: the command and its result, or a link. — Planning coverage: ## Verify plan lists dedicated verification steps for AC1–AC12 and explicitly requires verifying every AC on the merged head and citing its evidence in the PR under D1–D10.
    • D2 An independent reviewer approved the exact merged head, and the author resolved each finding or filed it as a follow-up. — Planning coverage: ## Verify plan (D1–D10) requires independent exact-head approval and filing any follow-ups.
    • D3 The required checks pass on that head, and any loosened gate has the owner's approval of that exact head. — Planning coverage: ## Verify plan (AC11 and D1–D10) requires passing mise run check, coverage checks, generated-skill checks, and required checks on the merged head.
    • D4 The leak scans come back clean: gitleaks, devtools' check-leaks.sh with 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.
    • D5 The author signed each commit, the squash included. — Planning coverage: ## Verify plan (D1–D10) requires signing all commits and the squash commit.
    • D6 The docs match the change (README, docs/, CHANGELOG or help text), or the Verification section says "No doc impact" and why. — Planning coverage: ## Verify plan (AC11 and D1–D10) requires documenting the command and safety difference in docs/agent-skills-migration.md and verifying docs match the change.
    • D7 The commits and the squash have Assisted-by trailers, and the pull request has the provenance:agent-assisted label. — Planning coverage: ## Verify plan (D1–D10) explicitly requires Assisted-by trailers and the provenance:agent-assisted label.
    • D8 The pull request stays within the size limits, or the owner approved its exact head over the hard limit. — Planning coverage: ## Size scopes the work to a single M PR and ## Verify plan (D1–D10) requires checking actual PR size limits.
    • D9 The author files follow-ups and deferred findings as issues with at least a Problem and numbered AC and lists them under the Related section of the pull request. Any work left in the code links its issue. — Planning coverage: ## Verify plan (D1–D10) requires filing follow-ups with Problem and numbered ACs, listing them in PR Related, and linking deferred code to them.
    • D10 The merge closes the issue through a closing reference and the board shows Done. The final 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 final Status: comment.

    Round: 2 of 3

  4. moved this from Backlog to In progress in devtoolson Oct 27, 2026
  5. moved this from In progress to Done in devtoolson Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    change:featPR adds or changes a feature (Conventional Commit type feat)refinement:readyPassed the Definition of Ready; may be picked up

    Fields

    Priority

    None yet

    Work type

    None yet

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions