Repository navigation
Description
Outcome
agentrepo checks watch replaces the shell watcher's behavior in Go, and the consumer-facing watcher routes to it with a safe fallback to the frozen shell. The watcher contract is unchanged: same target selection, per-pair events, final summary, statuses, wait settings and quota behavior. Part of #588, and the check-watching portion of #325.
Three child issues deliver it, each in its own pull request:
- feat(checks): add the Go pull request watch command #976 delivers the Go command and parent criteria AC1 through AC11, with direct regression evidence for each.
- feat(checks): route the watch wrapper to the Go command #977 delivers the thin consumer wrapper, the capability probe and the frozen fallback, which is parent criterion AC12.
- test(checks): prove watch command parity against the pinned shell #978 delivers the cross-implementation proof: the command and the frozen shell produce identical stdout, stderr, status and check-read counts on the same scripted responses. It adds no behavioral criterion and keeps every parent AC ID intact.
On origin/main at a0347a715fab580ece45edfcb3d13509620459a8, watching is shell behavior at packages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:53. The existing Go command evaluates saved rollups and doesn't watch live checks (internal/agentrepo/command.go:40). Its input, rerun ordering and statuses differ (docs/checks-evaluator.md:3), so the watcher contract must move as it stands.
Done when
Evidence for each criterion lives in the child that owns it, and the epic closes only when all three children are merged and their evidence is recorded.
- AC1: explicit or inferred pull request targeting with the existing refusals. Owner: feat(checks): add the Go pull request watch command #976.
- AC2: only the newest attempt per workflow/job pair counts. Owner: feat(checks): add the Go pull request watch command #976.
- AC3: each settled check streams once per pair without waiting for slower jobs. Owner: feat(checks): add the Go pull request watch command #976.
- AC4: watching changes no repository content, Git state or remote state. Owner: feat(checks): add the Go pull request watch command #976.
- AC5: closing summary and status reflect the final snapshot. Owner: feat(checks): add the Go pull request watch command #976.
- AC6:
NO CHECKSand status 2 after the appearance bound. Owner: feat(checks): add the Go pull request watch command #976. - AC7:
TIMEOUTand status 2 at the settling bound, with existing settings. Owner: feat(checks): add the Go pull request watch command #976. - AC8: failed reads, malformed JSON and non-arrays exit 2 without green. Owner: feat(checks): add the Go pull request watch command #976.
- AC9: quota exhaustion stops with status 76 and the original error. Owner: feat(checks): add the Go pull request watch command #976.
- AC10: one check read per snapshot. Owner: feat(checks): add the Go pull request watch command #976.
- AC11: same observable outcomes on Linux, macOS and Windows. Owner: feat(checks): add the Go pull request watch command #976.
- AC12: thin wrapper with probe and frozen fallback through the N-2 window, never falling back after a failed supported run. Owner: feat(checks): route the watch wrapper to the Go command #977, as its AC1.
The cross-implementation proof in #978 (identical outcomes against the frozen shell, #978 AC1 and AC2) is a closing condition for the epic alongside AC1 through AC12. A difference it finds becomes its own issue and can block wrapper delivery.
Verify plan: AC1 through AC11 by the matching checks in #976's verify plan, AC12 by #977's AC1 check, and parity by #978's AC1 and AC2 checks. The epic closes once #976, #977 and #978 are merged and their evidence is recorded.
Children
- feat(checks): add the Go pull request watch command #976 (command, size M): no blocker.
- feat(checks): route the watch wrapper to the Go command #977 (wrapper, size S): blocked by feat(checks): add the Go pull request watch command #976.
- test(checks): prove watch command parity against the pinned shell #978 (parity proof, size S): blocked by feat(checks): add the Go pull request watch command #976.
Dependencies outside the children: #321 for shared GitHub access and quota behavior, #242 for the saved-check evaluator whose contract stays as it is, and #333 and #544 before any later fallback retirement. Probe-and-fallback lets the wrapper land before that rollout.
Out of scope
- Workflow-qualified labels (watch-checks.sh prints job names without their workflow, so same-named jobs look like duplicates #310), backoff or event-based waiting (watch-pr: default 30s poll interval multiplies across concurrent agents #370), accepting more GitHub CLI exit statuses (watch-pr reports pending checks as unreadable because gh pr checks exits 8 #375), changing appearance guidance (watch-pr ends with NO CHECKS after an undocumented 120-second bound that PR_CHECKS_TIMEOUT does not control #430), stalled-analysis classification (watch-pr names a stalled code-scanning analysis instead of reporting a generic timeout #465) and transient retries (watch-checks.sh retries a transient 5xx once before reporting ERROR #515). The children preserve the pinned baseline, including ordinary nonzero-read refusal.
- Changing bucket or run-link semantics, final-status policy, or the saved-rollup evaluator.
- Porting the watching guard, changing how callers display the stream, fixing checks, publishing or merging.
- Retiring the frozen shell fallback and its parity oracle, which wait on 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.
Risks: the saved-rollup evaluator and the watcher disagree on ordering and status semantics, and a fallback after an operational Go failure could repeat reads. Undo: revert #977 to restore shell watching, then #976 to remove the command. Size is L across three children, and no pull request carries the whole epic.
Owner
devtools coordination session. Operator authority: None.
Metadata
Metadata
Assignees
Labels
Type
Fields
Work type
Projects
- StatusShow more project fieldsBacklog
Activity
tbhb-agent commentedon Oct 26, 2026
Refinement: READY —
agentrepo checks watchparity port and N-2 wrapper requirements are complete and verified againstorigin/mainModel: gemini-4-argon-high
Checked
tbhb-dev/devtools#793(feat(checks): move pull request watching into Go, open,change:feat, typeFeature, 0 comments) and all referenced issues (#242,#310,#321,#325,#333,#370,#375,#430,#465,#515,#544,#588).origin/mainata0347a715fab580ece45edfcb3d13509620459a8):gh/jqchecks,dt_gh_login, anddt_gh pr listbranch lookup matchpackages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:53-70.dt_gh pr checks <number> --json name,bucket,link,workflow), quota exit76passthrough, literalno checks reportedempty-array treatment, JSON array check, and numeric run-linksort_idgrouping by.workflow, .namematchpackages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:82-104.PR_CHECKS_APPEAR_TIMEOUT:-120andNO CHECKS #<number> registered after <timeout>swith exit2) matchespackages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:49-51andpackages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:106-121.cancelemission whilepending != 0, once-per-workflow:nameseen-set emission (PASS,SKIP,FAILwith link, and literal fallback bucket),PR_CHECKS_INTERVAL:-30spacing, andPR_CHECKS_TIMEOUT:-1800bound matchpackages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:128-175.prevandALL GREEN(exit0) /FAILED(exit1) summary lines matchpackages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:177-187.LC_ALL=C,GH_PAGER=cat,GH_PROMPT_DISABLED=1,PYTHONUTF8=1, unsettingCDPATH,GH_REPO,GH_HOST,GREP_OPTIONS) matchespackages/agents/source/skills/watch-pr/shared/scripts/watch-checks.sh:33-44.76guidance matchpackages/agents/source/lib/lib.sh:823-872.internal/agentrepo/command.go:40-84,internal/checks/checks.go:18-26,internal/checks/checks.go:257-276, anddocs/checks-evaluator.md:3-25(stdin/--filestatusCheckRollupinput, timestamp-based selection, and exit statuses0–6).docs/compatibility.md:3-6.agentrepo checksand excludes the Claude PreToolUse guard (packages/agents/source/skills/watch-pr/claude/scripts/guard-watch.sh:42),fix-prscripts (#325), and behavior-changing follow-ups (#310,#370,#375,#430,#465,#515).#321(shared GitHub access and quota behavior used by the watcher, without blocking on unrelated shared-library migrations), preserves#242's saved-check evaluator contract, and classifies#333and#544as prerequisites for later fallback retirement rather than landing this PR.AC1–AC12) to concrete checks, transfers all nine Bats cases fromtests/skills/watch-pr/scripts/watch-checks.bats:41-140(41,55,64,74,85,95,106,116,126), and accounts fortools/generate-skills.sh:25,tools/generate-skills.sh:126, andtools/generate-skills.sh:142excludingtokens.jsonand deployed skill copies frommise run check-generated-skills.Operator authority: Noneis accurate: retaining the frozen fallback inpackages/agents/source/skills/watch-pr/shared/scripts/watch-checks.shkeeps itslib.shreference (tools/generate-skills.sh:111), leavinglib.sh,agent.sh,signing.sh, andguard-watch.shuntouched, and no touched path matchesgolden_paths,constitutional_paths,gate_config_paths, orowner_pathsin.agents/agent-skills.conf:4-9.Gaps
None
Split
Size
Mfits a single pull request covering thewatch-prportion of#325under#588(fix-prdiagnosis and description population remain separate). No further split or AC trimming is needed.Definition of done
The definition of done for #793 (Feature). Tick each item and give its evidence. (Ticked boxes below indicate planning coverage in the issue's acceptance criteria and verification plan, not completed implementation work.)
## Verify planspecifies concrete verification steps forAC1–AC12andD1–D10requires verifying every AC on the merged head and citing the evidence in the PR.## Verify plan(D1–D10) requires independent exact-head approval and filing any follow-ups.## Verify plan(AC11andD1–D10) requiresmise run check, coverage checks, generated-skill checks, and passing 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) requires completing gitleaks, the repository leak scan, and the 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 recording consumer migration steps indocs/agent-skills-migration.mdand updating documentation to match the change.provenance:agent-assistedlabel. — Planning coverage:## Verify plan(D1–D10) requiresAssisted-bytrailers on commits and the squash and theprovenance:agent-assistedlabel on the PR.## Sizescopes the change toM(one PR for the watcher only) and## Verify plan(D1–D10) requires checking actual PR size limits.## Scope and non-goalsand## Dependenciesenumerate existing follow-up issues (#310,#370,#375,#430,#465,#515), and## Verify plan(D1–D10) requires filing any new follow-ups with a 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 finalStatuscomment.Round: 1 of 3
tbhb-dev-reviews commentedon Oct 31, 2026
Refinement: NOT READY — stacked delivery needs consistent issue scope, verification ownership, and undo
Checked
Read the amended body, the prior READY comment (#793 (comment)), and both PR titles, bodies, bases, file lists and raw sizes:
Counts are relative to each PR's base; they do not establish size-gate exemptions or passes. Accepted the supplied mechanical PASS without rerunning it. No tests ran; this is readiness review, not implementation approval.
All AC1–AC12 IDs and outcomes remain stable: nothing is struck or renumbered, and every ID still maps to concrete checks in Verify plan. AC12 explicitly assigns delivery to #962. The existing risks about saved-rollup semantics, nonzero reads, generated-output blind spots and operational-failure fallback remain relevant.
Gaps
Split
The Go-command/consumer boundary is useful: #961 can deliver a separately testable command while consumers retain shell, then #962 adopts it with the N-2 wrapper, generated outputs and migration guidance. The current body has not completed that allocation. Use an Epic and two independently refined child issues; Size L is not acceptable as an exception to the one-PR rule. Estimate each child using its actual reviewed diff and applicable exclusions. The prior READY comment's single-PR size and undo rationale no longer holds.
Definition of done
Ticks mean planning coverage in the current ACs and Verify plan, not completed implementation or approval. The gaps above still need correction. This is the base Feature checklist; conversion requires an Epic checklist for the parent and these PR obligations on its children.
Round: 1 of 3
feat(checks): watch pull requests in Go
feat(checks): watch pull requests in Go
feat(checks): watch pull requests in Go