Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion skills/pr-review/sub-agents/correctness.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ assertion loosening or coverage reduction that coincides with production
changes — this is a security-adjacent concern (split-payload pattern).

**Runtime mechanism checklist:** For any guard, flag, dispatch mechanism,
or inter-component contract in the diff:
wait/poll loop, or inter-component contract in the diff:

- Trace the full path from producer to consumer and verify the mechanism
will function at runtime (e.g., is a "flag" actually an env var that
Expand All @@ -37,6 +37,17 @@ or inter-component contract in the diff:
- Check failure paths: if the mechanism's component fails or is
unavailable, does the caller handle it or silently proceed as if it
succeeded?
- When the diff introduces or modifies a wait/poll loop over

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[low] incomplete-spec

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 #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.

Suggested fix: 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.

child-process, subprocess, or sub-agent status, enumerate every
status the loop can observe — both non-terminal (e.g., running,
which should keep polling) and terminal (e.g., errored,
shutdown/killed, not-found, timed-out, completed-with-result,
completed-empty) — and confirm each has a defined handling path. Do
not stop at the happy-path / nonempty-result case. Treating a
terminal status as "still running" is a logic error: the wait never
terminates. Where the loop's target has an associated close or
failure-fallback mechanism, additionally verify that errored and
completed-empty statuses trigger it.

**Consumer completeness:** If the diff adds new values to an enum,
dispatch table, JSON schema enum, or case/switch structure, identify all
Expand Down
Loading