Repository navigation
fix(gh-aw): align lifecycle and serialized plan outputs with the command contract - #2202
Conversation
Closes #2201 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9cb2dad2-b638-45e5-840b-6ccc12e94499
🟡 Impact Analysis — PR #2202Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affecteddocs (2 files)
root (8 files)
tests (2 files)
This report is generated automatically for every PR. See #733 for details. |
🛫 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 | Up to date with dev |
| ❌ | 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 | No Copilot review threads |
| ❌ | CI passing | 1 check(s) failing: test |
Files Changed (12 files, +566 −65)
| File | +/− |
|---|---|
docs/demo-agentic-sdlc-walkthrough.md |
+3 −1 |
docs/src/content/docs/guide/gh-aw.md |
+32 −3 |
test/gh-aw-command-authorization.test.ts |
+425 −14 |
test/helpers/gh-aw-diagnostic-runtime.ts |
+31 −10 |
workflows/package/squad-deps-worker.md |
+1 −1 |
workflows/package/squad-implement-worker.md |
+1 −1 |
workflows/package/squad-retro.md |
+1 −1 |
workflows/package/squad.md |
+7 −2 |
workflows/shared/squad-command-contract.mjs |
+35 −7 |
workflows/shared/squad-planning-ontology.md |
+6 −1 |
workflows/shared/squad.md |
+1 −1 |
workflows/squad-workflows.manifest.json |
+23 −23 |
Total: +566 −65
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
There was a problem hiding this comment.
🟢 Approval recommended
The canonical sources, generated artifacts, documentation, and mutation-backed regression coverage consistently enforce the existing strict contract.
0 open findings
What changed in this PR
Corrects lifecycle examples to satisfy the strict command-only contract while preserving existing validation and writer behavior.
Changes:
- Separates attribution into
Updated by. - Regenerates workflow packages and integrity hashes.
- Adds compiled guard, writer, and mutation regression coverage.
| File | Description |
|---|---|
workflows/squad-workflows.manifest.json |
Updates generated integrity digests. |
workflows/shared/squad.md |
Clarifies the safe-output contract. |
workflows/shared/squad-planning-ontology.md |
Corrects the canonical lifecycle example. |
workflows/package/squad.md |
Regenerates the primary workflow package. |
workflows/package/squad-retro.md |
Regenerates the retro package. |
workflows/package/squad-implement-worker.md |
Regenerates the implementation package. |
workflows/package/squad-deps-worker.md |
Regenerates the dependency package. |
test/gh-aw-command-authorization.test.ts |
Adds template-derived and mutation tests. |
docs/src/content/docs/guide/gh-aw.md |
Corrects and explains the lifecycle example. |
docs/demo-agentic-sdlc-walkthrough.md |
Updates the terminal lifecycle walkthrough. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Closes #2201 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9cb2dad2-b638-45e5-840b-6ccc12e94499
|
Current-head validation update for Squad CI run 38184019699 passed. Full The actual hosted Copilot review covered this exact commit and reported 0 findings, but its disposition is Needs a closer look, citing the authorization boundary and then-pending CI. It is a COMMENTED review, not an approval. Independent pre-publication security review found no vulnerabilities. No inline review threads or actionable failures remain; maintainer review of the trust-boundary change is still appropriate. GitHub currently reports CLEAN, which does not substitute for review approval. This supersedes the pending-CI snapshot in the description; previous-head results were not used to establish current-head validation. No merge, auto-merge, deployment, or policy changes were performed. |
What
Keep lifecycle
Last commandfields command-only, move attribution toUpdated by, and validate the pinned adapter's serialized plan-comment metadata and matching structured-data envelope. Align canonical/generated instructions and documentation, with real pinned-adapter-to-compiled-writer regression coverage.Why
Closes #2201. Two compatible outputs were rejected by the open-mode batch guard: lifecycle examples appended attribution after the closing command backtick, and the actual pinned
add_commenttransport addedtemporary_idplus aStructured data:suffix to valid Markdown/data input. Rejecting either item prevented the whole batch from publishing. Generic synthesized inputs reproduce both failures; no captured user payloads are used.How
Working as agentic-workflows-dev (Agentic Workflows Engineer).
The lifecycle template repair remains intact. The follow-up at
91ab258d582ce784e6c9fa8cf426d9d22ce972c3changes only serialized-output compatibility in the command contract: allow the pinned adapter's validated bareaw_ID shape, independently validate the existing exact draft-data schema, then require one terminal JSON envelope semantically equal to that data. Duplicate JSON keys, unsupported fields, extra/mismatching envelopes, malformed metadata, and arbitrary JSON elsewhere remain rejected. The envelope and separatedataare preserved for downstream planning readers. Raw Markdown-only inputs remain compatible.Command/actor permissions, originating-issue targeting, roster/plan constraints, acceptance/activation restrictions, unsupported-action rejection, and lifecycle/research body protections remain in force. Metadata and markers grant no authority. Writers, credentials, permissions, rollout, and dispatch behavior are unchanged.
Regression tests execute actual pinned v0.91.5 MCP tool registration, request argument validation, handlers, NDJSON serialization, collector, compiled guard, and comment/lifecycle writers. Runtime pin:
github/gh-aw-actions/setup@16b430146d5d5646eccef5a1ceb72152333b18b9. GitHub/filesystem I/O is isolated; the adapter and processor execute unchanged. Before repair, this path failed on unsupported mutation fields; deleting onlytemporary_idstill failed the body-envelope prohibition. The repaired path passes and posts the preserved plan envelope. Negatives cover missing/malformed/tampered/mismatching/duplicate envelopes, wrong ID types/shapes, invalid state/command, foreign targets, and unauthorized actions.Independent security review of the follow-up found no vulnerabilities. Coordinator review and focused validation completed before publication. Previous hosted CI/review on
26751dc6does not validate the new head. Hosted Copilot review has been requested for91ab258d; new-head Squad CI is pending.Current-head local validation (checksum-verified isolated gh-aw v0.91.5; global compiler unchanged):
npm run gh-aw:integrity:write && npm run gh-aw:integrity:checknpm test -- test/gh-aw-command-authorization.test.ts test/gh-aw-command-parse.test.ts test/gh-aw-command-router-relay.test.ts test/gh-aw-plan-lifecycle.test.ts test/gh-aw-lifecycle-upsert.test.ts test/gh-aw-activate-roster-binding.test.ts test/gh-aw-activation-artifact-integrity.test.tsnpx vitest run test/gh-aw*.test.ts --maxWorkers=4SKIP_BUILD_BUMP=1 npm run buildnpm run lint./node_modules/.bin/eslint test/gh-aw-command-authorization.test.ts test/helpers/gh-aw-diagnostic-runtime.tsnpx markdownlint-cli2 docs/src/content/docs/guide/gh-aw.mdgit diff --checknpm testandnpm test -- --maxWorkers=4The broad gh-aw run used isolated
SQUAD_GH_AW_BIN/gh awtooling and a repo-localTMPDIRwithGIT_CEILING_DIRECTORIESto prevent scratch Git discovery reaching the parent worktree. Full local suite assumptions differ; no unrelated product fixes were made. Full-suite/new-head hosted results remain outstanding. No local docs build was run.npx changeset add/.changeset/*.md, directCHANGELOG.mdentry for maintainers, orskip-changeloglabel for no user-facing changes)N/A: no SDK/CLI source changes.
PR Readiness Checklist
Branch & Commit
dev(notmain)dev(git fetch upstream && git rebase upstream/dev)git diff --cached --stat)Fork
origin/devis the base. Two focused commits; no upstream publication or default-branch push.Build & Test
npm run buildpassesnpm testpasses (all tests green)npm run lintpasses (type check clean)npm run lint:eslintpassesTwelve cumulative files; not a migration. Old-head hosted results are not carried forward; new-head full CI is pending.
Changeset
npx changeset add(ifpackages/squad-sdk/src/orpackages/squad-cli/src/changed)CHANGELOG.mdentry (maintainers only — write-protected for external contributors)skip-changeloglabel applied (if no user-facing changes)N/A: no SDK/CLI source changes. No skip label applied.
Docs
No new feature/module/capability; existing guide and walkthrough corrected, including the tool-input/serialized-output distinction.
Exports
N/A: no SDK changes or new modules.
Breaking Changes
None. Supported transport compatibility is repaired without expanding command authority.
Waivers
None granted or requested. New-head hosted CI/review remains pending. No merge or auto-merge; maintainer disposition remains required.