Skip to content

Fix failed validation lifecycle retry output - #2046

Merged
bradygaster merged 2 commits into
devfrom
bradygaster-issue-4-validation
Sep 15, 2026
Merged

bradygaster merged 2 commits into
devfrom
bradygaster-issue-4-validation

Conversation

@bradygaster

Copy link
Copy Markdown
Collaborator

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 /squad command, 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-dev must refresh and compile the installed workflows from @dev before validation is rerun.

Validation

  • 98 targeted tests passed
  • Strict gh aw compile: passed
  • Compiled lock inspected for the anchored lifecycle validator
  • npm run build: passed
  • git diff --check: passed

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>
Copilot AI lite review requested due to automatic review settings September 15, 2026 08:17
@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 56a970d

PR Scope: 🔧 Infrastructure

⚠️ 4 item(s) to address before review

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.

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Impact Analysis — PR #2046

Risk tier: 🟡 MEDIUM

📊 Summary

Metric Count
Files changed 5
Files added 0
Files modified 5
Files deleted 0
Modules touched 2

🎯 Risk Factors

  • 5 files changed (≤5 → LOW)
  • 2 modules touched (2-4 → MEDIUM)

📦 Modules Affected

root (2 files)
  • workflows/shared/squad.md
  • workflows/squad.md
tests (3 files)
  • test/gh-aw-lifecycle-upsert.test.ts
  • test/gh-aw-plan-lifecycle.test.ts
  • test/gh-aw-quality.test.ts

This report is generated automatically for every PR. See #733 for details.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 High severity

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.

Comment thread workflows/shared/squad.md
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>
@bradygaster
bradygaster merged commit 8c83511 into dev Sep 15, 2026
18 checks passed
@bradygaster
bradygaster deleted the bradygaster-issue-4-validation branch October 3, 2026 00:11
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.

2 participants