Repository navigation
Fix failed validation lifecycle retry output - #2046
Conversation
Require lifecycle next actions to contain only a backticked Squad command and move retry guidance to a separate field. Cover the malformed output observed in run 34944550565. Refs octodemo/eshop-bradyg-dev#4 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 2 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ❌ | Branch up to date | dev is 1 commit(s) ahead — rebase recommended |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | No source files changed — changeset not required |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ❌ | Copilot threads resolved | 1 unresolved Copilot thread(s) — fix and resolve before merging |
| ✅ | CI passing | All checks passing |
Files Changed (5 files, +69 −8)
| File | +/− |
|---|---|
test/gh-aw-lifecycle-upsert.test.ts |
+40 −3 |
test/gh-aw-plan-lifecycle.test.ts |
+7 −0 |
test/gh-aw-quality.test.ts |
+4 −1 |
workflows/shared/squad.md |
+3 −3 |
workflows/squad.md |
+15 −1 |
Total: +69 −8
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
🟡 Impact Analysis — PR #2046Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (2 files)
tests (3 files)
This report is generated automatically for every PR. See #733 for details. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Lifecycle guidance and regression coverage still need updates before approval.
Get a fresh assessment by requesting another Copilot review.
Review tier: Lite
Findings: 1
Open (1)
What changed in this PR
Updates plan validation and lifecycle handling so nonterminal retry actions contain only a /squad command, with separate guidance and regression coverage.
Changes:
- Clarifies validation lifecycle output requirements.
- Tightens shared next-action validation.
- Adds tests for malformed and prose-containing actions.
| File | Description |
|---|---|
workflows/squad.md |
Updates validation lifecycle instructions. |
workflows/shared/squad.md |
Tightens lifecycle next-action validation. |
test/gh-aw-plan-lifecycle.test.ts |
Tests validation prompt requirements. |
test/gh-aw-lifecycle-upsert.test.ts |
Tests invalid lifecycle outputs. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| const hasState = /^(?:[-*]\s+)?\*\*(?:Current state|State):\*\*\s+\S+/im.test(body); | ||
| const hasLastCommand = /^(?:[-*]\s+)?\*\*Last command:\*\*\s+`\/squad\b[^`]*`/im.test(body); | ||
| const hasNextCommand = /^(?:[-*]\s+)?\*\*Next (?:action|command|recommended):\*\*\s+`\/squad\b[^`]*`/im.test(body); | ||
| const hasNextCommand = /^(?:[-*]\s+)?\*\*Next (?:action|command|recommended):\*\*\s+`\/squad\b[^`]*`[ \t]*$/im.test(body); |
Raise the authored-source regression budget by 1 KB after the command-only lifecycle next-action contract. The independently enforced ambient prompt budget remains healthy. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Plan validation can correctly fail closed but then lose its lifecycle update because the generated retry action includes explanatory prose in the command field. This reproduces the secondary safe-output failure from octodemo/eshop-bradyg-dev run 34944550565.
This change makes the validation prompt emit a command-only next action and places retry context in a separate guidance field. It also tightens the shared lifecycle writer so nonterminal next actions must consist entirely of a backticked
/squadcommand, with regression coverage for both prose-prefixed and prose-suffixed values.The target run also used a stale Squad installation from before the Fact Checker model fix. After this PR merges,
octodemo/eshop-bradyg-devmust refresh and compile the installed workflows from@devbefore validation is rerun.Validation
gh aw compile: passednpm run build: passedgit diff --check: passed