Skip to content

fix(#1551): require terminal-state coverage for wait/poll loops - #1553

Closed
fullsend-ai-coder[bot] wants to merge 2 commits into
mainfrom
agent/1551-poll-loop-terminal-states
Closed

fullsend-ai-coder[bot] wants to merge 2 commits into
mainfrom
agent/1551-poll-loop-terminal-states

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Add an explicit correctness-review checklist item for wait/poll loops over child-process, subprocess, or sub-agent status.

The correctness sub-agent's runtime-mechanism checklist already asked reviewers to trace producer/consumer contracts and check whether a component failure is handled. That was not enough: on PR #1542, a completed-empty child was treated as still-running, so it could never close and never received its failure fallback. Five review rounds missed it.

The new item requires the reviewer to enumerate every status the loop can observe (running, errored, shutdown/killed, not-found, timed-out, completed-with-result, completed-empty) and confirm each has a defined handling path, rather than stopping at the happy-path / nonempty-result case.

The change is in skills/pr-review/sub-agents/correctness.md (included verbatim in the correctness spawn prompt). It is not in the orchestrator SKILL.md: the orchestrator does not evaluate code, and that file is already over the skillsaw context-budget ceiling.

This is complementary to #768 (missing poll loops). This item covers poll loops whose terminal-state enumeration is incomplete.

Testing

  • scan-secrets on the changed file: passed
  • Direct equivalents of applicable pre-commit hooks (trailing-whitespace, end-of-file, merge-conflict, mixed-line-ending, large-files, detect-private-key, gitleaks): passed. pre-commit run itself could not fetch hook repos (git HTTP 403).
  • uv tool run --from skillsaw==0.18.0 skillsaw --strict: passed (0 errors, 0 warnings). make lint could not run because uvx is not on PATH in this sandbox.
  • No targeted unit tests exist for this markdown-only skill change.

Closes #1551

Post-script verification

  • Branch is not main/master (agent/1551-poll-loop-terminal-states)
  • Secret scan passed (gitleaks — 513b6e41444d36b8bdd6a9cee7b84c8f447bd433..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

Add an explicit runtime-mechanism checklist item to the correctness
sub-agent so reviewers enumerate every status a wait/poll loop over
child-process, subprocess, or sub-agent status can observe, and
confirm each has a handling path.

The existing "check failure paths" bullet only asked whether a
component failure is handled. That missed the class of bug seen on
PR #1542: a completed-empty child treated as still-running, so it
never closed and never received a failure fallback. Five review
rounds did not catch it.

The item lives in skills/pr-review/sub-agents/correctness.md (the
definition included in the correctness spawn prompt), not in the
orchestrator SKILL.md. The orchestrator does not evaluate code, and
SKILL.md is already over the skillsaw context-budget ceiling.

Note: pre-commit run could not fetch hook repos (git HTTP 403).
Equivalent hooks were run directly and passed. make lint failed
because uvx is not on PATH; uv tool run --from skillsaw==0.18.0
skillsaw --strict passed. No targeted unit tests exist for this
markdown-only skill change.

Closes #1551
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team September 29, 2026 14:26
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Sep 29, 2026
@fullsend-ai-review

Copy link
Copy Markdown

🤖 Review · ⚠️ Cancelled · Ended 2:28 PM UTC

Commit: 96c69d7 · View workflow run →

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 2:30 PM UTC · Completed 2:43 PM UTC

Commit: 96c69d7 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $2.78

@fullsend-ai-review fullsend-ai-review Bot added the risk/low PR risk: low label Sep 29, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: low (1/5)

Details

This is a 1-file, 10-line docs-only edit to a review sub-agent skill file by a bot author addressing a narrowly scoped follow-up issue with no risk labels, no security-sensitive or dependency changes, and low git churn, with the single elevating signal being that the file sits in a protected path and has moderate multi-author/fix-commit history, keeping the composite just under 2 and rounding down to a low (1) risk score.

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Review

Findings

Medium

Previous run

Review

Findings

Medium

Low

  • [incomplete-spec] skills/pr-review/sub-agents/correctness.md:40 — The new wait/poll checklist item tells reviewers to enumerate every status the loop can observe, then immediately parenthesizes seven names with no example marker: running, errored, shutdown/killed, not-found, timed-out, completed-with-result, completed-empty. Sibling bullets in the same checklist use "e.g." for illustrative parentheticals; this one does not, so a literal reader can treat the seven names as a closed set and skip any other status the loop under review actually produces. Two further prompt-correctness nits: (1) running is non-terminal (correct path is keep polling) but is listed homogeneously with terminal outcomes; (2) the hang consequence is phrased as the dispatch-specific "child never closes and never receives its failure fallback" (the feat(#1500)!: support native Codex review and retro dispatch #1542 incident) rather than the general failure mode (the wait never terminates). The lead-in rule ("every status the loop can observe") is right; the parenthetical undercuts it.
    Remediation: Restore an explicit example marker ("e.g.") so the list is illustrative, not exhaustive. Split non-terminal (running → continue polling) from terminal outcomes that must stop the wait. Phrase the hang failure as "the wait never terminates" and treat missing close/fallback as an additional check when that mechanism exists.

Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 2:45 PM UTC · Completed 2:51 PM UTC

Commit: 96c69d7 · View workflow run →

Runtime: claude · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $0.77

…-agent

Address review feedback on PR #1553: mark the status list as
illustrative ("e.g.") instead of a closed set, separate the
non-terminal `running` status from terminal outcomes, and generalize
the hang consequence to "the wait never terminates" instead of the
dispatch-specific child-close wording, treating the
close/failure-fallback check as conditional on that mechanism
existing.

Addresses #1553
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (bot-triggered)

Fixed the incomplete-spec finding by clarifying the terminal-state checklist item in correctness.md (illustrative example marker, non-terminal vs terminal split, generalized hang wording). Left the protected-path finding for human approval as designed. Inspected project CI: lint (skillsaw --strict) and script-test's core suites pass; the Functional Tests roll-up failure and harness-jira-test.sh failures are unrelated to this markdown-only diff (CI workflow gating race and a missing yq binary in the sandbox respectively).

Fixed (1):

  1. incomplete-spec: terminal-state list reads as a closed set and mixes running with terminal outcomes (skills/pr-review/sub-agents/correctness.md): Added an 'e.g.' marker so the status list is illustrative rather than exhaustive, split the non-terminal 'running' status (keep polling) from the terminal outcomes that must stop the wait, reworded the hang consequence as the general 'the wait never terminates' instead of the dispatch-specific child-close wording, and made the close/failure-fallback verification conditional on that mechanism existing.

Disagreed (1):

  1. protected-path: skills/pr-review/sub-agents/correctness.md is under a protected path and requires human approval: This finding is the mandatory protected-path merge gate itself (category protected-path) — per the fix-agent scope rules it only demands human approval and never prescribes a content edit, so no code change is made for it. It is accurate and remains in effect: this PR still needs a human approval before merge regardless of the other fix applied in this run.

Tests: passed

CI inspections (9):

  1. CI / test (passing, success): Passed.
  2. CI / skillsaw (passing, success): Passed; reproduced locally with skillsaw 0.18.0 --strict (0 errors, 0 warnings).
  3. CI / commit-lint (passing, success): Passed.
  4. Script tests / script-test (passing, success): Passed on the forge run; local re-run of the same suite also passes except for the pre-existing yq-dependent harness-jira-test.sh failures noted below.
  5. Vouch Check / vouch-gate (passing, success): Passed.
  6. DCO (passing, success): Passed.
  7. Functional Tests / functional-tests-complete (transient-infra, failure): The roll-up job mirrors the prior completed verdict for this commit whenever a labeling event skips the real gate/detect/tests jobs. The one run that could have produced a real verdict for this commit was itself cancelled (gate/detect/functional-tests all show 'cancelled'), apparently racing a concurrent labeled-event run for the same SHA, so there is no real success to mirror and every later labeled-triggered run fails closed. This is a CI-workflow concurrency artifact, not something introduced by this PR's markdown-only diff. Recommend the user rerun the Functional Tests workflow for this commit (e.g. push a trivial update or re-trigger the workflow) so gate/detect/functional-tests get an uncontended run and produce a real verdict to mirror. No code change made — the workflow files are a protected path and the cause is CI infra, not this PR's diff.
  8. Behaviour Tests / behaviour (unrelated, skipped): Skipped by the same label-gating mechanism as Functional Tests; not caused by this PR's diff.
  9. script-test (local) / harness-jira-test.sh (unrelated, failure): Several sub-tests fail locally with 'yq: command not found'. Reproduced the identical failures on the pre-fix commit (96c69d7) before making any change, confirming this is a missing-tool gap in this sandbox rather than a regression from this PR's markdown-only diff. No action needed from this fix agent; install yq in the sandbox image or run this suite in an environment that has it.
Decision points
  • Left the protected-path finding to the human-approval merge gate instead of attempting a code change (alternatives: Treat the finding as fixable and edit around it, Leave it for the merge gate as designed; rationale: The finding's own category (protected-path) is defined as the non-actionable merge-gate signal; it does not prescribe any content change, so acting on it would be out of the fix agent's authorized scope.)

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 2:53 PM UTC · Completed 3:03 PM UTC

Commit: 5992d91 · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $1.90

@fullsend-ai-review fullsend-ai-review Bot removed the risk/low PR risk: low label Sep 29, 2026
@fullsend-ai-review
fullsend-ai-review Bot dismissed their stale review September 29, 2026 15:03

Superseded by updated review

@fullsend-ai-review fullsend-ai-review Bot added the requires-manual-review Review requires human judgment label Sep 29, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity in the last month. It will be closed in 2 weeks if no further activity occurs. Remove the stale label to reset the inactivity timer.

@github-actions github-actions Bot added the stale label Oct 30, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been closed due to inactivity. Feel free to reopen it if the changes are still needed.

@github-actions github-actions Bot closed this Nov 21, 2026
@github-actions
github-actions Bot deleted the agent/1551-poll-loop-terminal-states branch November 21, 2026 01:35

This branch was previously deployed

1 inactive deployment
dev — 5992d91f Deployed Sep 29, 2026 by fullsend-ai-coder[bot] via behaviour #207
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Triggers review agent dispatch requires-manual-review Review requires human judgment stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review skill: add terminal-state enumeration check for wait/poll loops over child/subprocess/agent status

0 participants