S1: scaffold squad-deps-worker (fail-closed dependency-manifest worker) - #1882
Conversation
Part of #1748 Adds a dedicated squad-deps-worker.md workflow_dispatch worker with narrow Wave 1 (npm/yarn/pnpm, NuGet CPM, Go) manifest/lockfile-only allowed-files authority. No protected-files exclusions are added yet -- every manifest write still falls back to a review issue, identical to squad-implement-worker, which remains unchanged. Adds structural, compiled, and fail-closed tests for this scaffold. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🟡 Impact Analysis — PR #1882Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (1 file)
tests (1 file)
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 | 0 active Copilot thread(s) resolved (1 outdated skipped) |
| ✅ | CI passing | All checks passing |
Files Changed (2 files, +508 −0)
| File | +/− |
|---|---|
test/gh-aw-deps-worker-workflow.test.ts |
+336 −0 |
workflows/squad-deps-worker.md |
+172 −0 |
Total: +508 −0
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.
🟡 Changes recommended
One of the new contract tests uses a non-null assertion during lockfile heredoc parsing, which can produce a runtime throw instead of a diagnostic assertion on format changes.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Scaffolds a new, narrowly-scoped squad-deps-worker agentic workflow intended for dependency manifest/lockfile work (Wave 1) while remaining fail-closed (no protected-files.exclude yet), and adds structural + compiled-contract tests to ensure the worker stays inert and the general implement worker doesn’t accidentally gain manifest authority.
Changes:
- Add
workflows/squad-deps-worker.mdas a standaloneworkflow_dispatchworker with a strict manifest/lockfile-onlyallowed-fileslist and structuralexcluded-filesguardrails. - Add
test/gh-aw-deps-worker-workflow.test.tsto assert the worker remains unreachable from the dispatcher (until S3), stays fail-closed (until S2), and that compilation bakes in the expected protected/allowed/excluded contract.
File summaries
| File | Description |
|---|---|
| workflows/squad-deps-worker.md | New dependency-focused worker scaffold with narrow allowed-files, fail-closed protected-files, and structural excluded-files guardrails. |
| test/gh-aw-deps-worker-workflow.test.ts | New tests covering scaffold invariants and compiled safe-output contract for fail-closed behavior and regression protection. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…worker test Replace the non-null-asserted delimiter/configEnd extraction in 'does not change squad-implement-worker.md at all' with the same guarded delimiter/configEnd lookup and explicit diagnostic expect() messages already used by compileDepsWorker() in this file, so a missing/changed heredoc marker fails with a useful assertion instead of a runtime TypeError. Addresses PR #1882 review comment 3856969140. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This is Slice S1 of #1748
Part of #1748
Scaffolds a dedicated
squad-deps-workeragentic workflow with narrow, fail-closed dependency-manifest/lockfile authority, per Flight's APPROVED — IMPLEMENTATION-READY decision comment on #1748. This slice is deliberately inert: it adds structure and tests only, with no new PR-producing capability beyond whatsquad-implement-workeralready has today.What this PR does
workflows/squad-deps-worker.md(new) — a standaloneworkflow_dispatch-only worker, not yet wired intosquad.md'sdispatch-workflowlist (that's S3).allowed-filesis narrowly scoped to Wave 1 (npm/yarn/pnpm, NuGet CPM, Go) manifest/lockfile basenames only:package.json,package-lock.json,npm-shrinkwrap.json,yarn.lock,pnpm-lock.yaml,Directory.Packages.props,go.mod,go.sum. No broad source-file globs — this worker's entire reason to exist is that it can touch nothing else.protected-files.policy: fallback-to-issuewith noexcludelist — every manifest write still falls back to a review issue today, identical tosquad-implement-worker, which is completely unchanged by this PR.excluded-filesstructurally strips vendored/generated content (node_modules/**,vendor/**, build output dirs) and the standard governance paths (.github/workflows/**,.github/agents/**,.github/aw/**,.squad/**) from any patch this worker could ever produce.NuGet.Config,bunfig.toml,.npmrc,.yarnrc.yml), SDK/tool pins (global.json), and governance docs (CODEOWNERS,SECURITY.md,CONTRIBUTING.md,CHANGELOG.md,CODE_OF_CONDUCT.md,DESIGN.md,AGENTS.md) are never inallowed-filesat all, and remain in gh-aw's compiled defaultprotected-filescatalog.test/gh-aw-deps-worker-workflow.test.ts(new) — 8 structural/compiled/fail-closed tests:go.mod,go.sum,yarn.lock) appear inallowed-files.allowed-files.protected-files.excludeentries yet (S2 has not landed).excluded-files.squad-implement-worker.mdretains its unchangedexclude: [README.md]-only contract (regression guard against the general path silently gaining manifest authority).gh aw compile --strict) contract: Wave 1 manifest basenames and always-protected registry/governance basenames both still resolve tofallback-to-issuein the generated.lock.yml.squad-implement-worker.md) was run manually during development and confirmed both regression tests fail as expected, then reverted — proving these tests are not vacuous.Explicitly deferred to follow-up slices (NOT in this PR)
protected-files.excludeentries (the actual manifest-unprotect step) onsquad-deps-worker.md.squad-deps-workerintosquad.md'sdispatch-workflowlist and thesquadDepsopt-out key in.squad/config.json.deps:title prefix,dependency-changelabel + provisioning, PR body evidence requirements (new-vs-update classification, frozen-install evidence, no-vendored-content confirmation).Validation
gh aw compile squad-deps-worker --strict --no-check-update— succeeds (gh-aw v0.86.2), only the pre-existing shared-bootstrap secret warning common to every workflow importingshared/squad.md(verified identical forsquad-implement-workertoo).gh aw compile squad-implement-worker --strict --no-check-update— succeeds, unchanged.npx vitest run test/gh-aw-deps-worker-workflow.test.ts test/gh-aw-implement-workflow.test.ts test/gh-aw-review-workflow.test.ts— 32/32 pass (node v24.16.0, npm v11.13.0, vitest v4.1.11).npx tsc --noEmitfor bothpackages/squad-sdkandpackages/squad-cli(afternpm run build -w packages/squad-sdk) — clean.git diff --check— clean.test/gh-aw-quality.test.ts("preserves a committed cast rather than re-running init") reproduces identically with this PR's files removed — not caused by this change.Environment note: the corporate npm proxy (
packagefeedproxy.microsoft.io) does not yet mirrorvite@8.2.2pinned inpackage-lock.json(npm ci/npm install404 on that exact tarball). Test validation above was completed in an earlier pass using a temporary, non-committed lockfile bypass that was fully reverted (git diffshowed zero changes topackage.json/package-lock.jsonbefore committing); the final commit does not touch either file. This is a pre-existing environment gap, unrelated to this change.No merge requested — please review.