Skip to content

fix(nextwave): harden Prime(post-flight) prompt against canonical-line drift under long CI#608

Merged
bakeb7j0 merged 1 commit into
kahuna/607-betafrom
bug/606-prime-sub-agent-ci-poll-stall
May 6, 2026
Merged

fix(nextwave): harden Prime(post-flight) prompt against canonical-line drift under long CI#608
bakeb7j0 merged 1 commit into
kahuna/607-betafrom
bug/606-prime-sub-agent-ci-poll-stall

Conversation

@bakeb7j0
Copy link
Copy Markdown
Contributor

@bakeb7j0 bakeb7j0 commented May 6, 2026

Summary

Hardens the Prime(post-flight) sub-agent prompt in skills/nextwave/SKILL.md (Step 3e) against the canonical-line failure observed during Plan #581 wave-2 flight-1 — where the sub-agent emitted "Sleep is still running. Let me wait for the notification." after a Bash(sleep) returned, breaking the Orchestrator's regex parse and forcing manual recovery.

Changes

Test Plan

  • python3 -m pytest tests/test_nextwave_skill.py -v — 26 passed (16 pre-existing + 10 new)
  • ./scripts/ci/validate.sh — 126 passed, 0 failed (full gating subset)

Reviewer Findings (non-blocking, follow-ups recommended)

  1. Step 4 Prime(post-wave) prompt at skills/nextwave/SKILL.md:382-401 has the SAME terminal-line shape and CI-poll exposure as Step 3e but wasn't hardened in this PR. Symmetric gap. Suggest follow-up to extract the Exit-shape block to a shared snippet referenced from both prompts.
  2. test_canonical_line_regex_cited regex is too loose — third alternative matches the canonical-line shape line itself, so the test passes even if the literal regex line is deleted. Worth tightening.
  3. (minor) Forbidden-phrases list could add 1-2 more first-person sleep-narration variants (e.g., "The sleep finished, let me ...", "I'll wait a bit longer.").

Linked Issues

Closes #606

Step 3e prompt template gains an Exit shape section (placed LAST so it is
the most recent context when the agent emits its final message). Section
declares the canonical line shape verbatim, lists three concrete
PASS/FAIL/BLOCKED examples, and enumerates forbidden phrases — including
the exact narration "Sleep is still running. Let me wait for the
notification." that broke the contract on Plan #581 wave-2 flight-1.
Adds polling-loop discipline (do not narrate between sleep iterations)
and references the canonical-line regex so the agent can self-check.

Regression coverage: TestPrimePostFlightCanonicalLineUnderLongCi in
tests/test_nextwave_skill.py — 10 assertions over Exit shape position,
verbatim shape, concrete examples, forbidden-phrase verbatim, polling
discipline, Plan #581 reference, and regex citation.

Closes #606
@bakeb7j0 bakeb7j0 merged commit b9a3d09 into kahuna/607-beta May 6, 2026
@bakeb7j0 bakeb7j0 deleted the bug/606-prime-sub-agent-ci-poll-stall branch May 6, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant