fix(worker): use fallback-to-issue for protected files - #1747
Merged
bradygaster merged 2 commits intoAug 20, 2026
Conversation
`protected-files: request_review` is incompatible with signed
create-pull-request writes. The PR handler classifies it as a soft
action and logs it that way, then the signed-push path re-validates the
synthesized GraphQL payload and rejects anything but `allow`, failing
with "Signed-commit payload violates file-protection policy". The run
announces soft handling and then hard-fails, which blocked the live
end-to-end continuation test.
Switch to the object form so a protected write routes to a review issue
instead, and exclude README.md from gh-aw's inherited default list.
README.md is high-frequency, low-control-plane work that ordinary PR
review already covers; leaving it protected would turn every docs task
into an issue rather than a PR. Everything load-bearing stays protected:
dependency manifests, lockfiles, CODEOWNERS, SECURITY.md,
CONTRIBUTING.md, CHANGELOG.md, and top-level dot folders.
Note that gh-aw matches protected files by basename at any depth
(manifest_file_helpers.cjs does file.split("/").pop()), which is a
different matcher from allowed-files globs where `*` does not cross `/`.
Existing excluded-files rules are unchanged — they strip paths from the
patch before protected-file evaluation and remain independent.
Closes #1746
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 26891f18-3f78-4cda-801b-ee668fecae33
Contributor
🟡 Impact Analysis — PR #1747Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedroot (1 file)
tests (1 file)
This report is generated automatically for every PR. See #733 for details. |
Contributor
🛫 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 | 1 unresolved Copilot thread(s) — fix and resolve before merging |
| ✅ | CI passing | All checks passing |
Files Changed (2 files, +103 −7)
| File | +/− |
|---|---|
test/gh-aw-implement-workflow.test.ts |
+91 −6 |
workflows/squad-implement-worker.md |
+12 −1 |
Total: +103 −7
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Squad implementation worker’s safe-outputs configuration to use the protected-files object form with fallback-to-issue, preserving protection for high-risk files while exempting README.md to avoid routing routine docs edits into review issues.
Changes:
- Replaces
protected-files: request_reviewwithprotected-files.policy: fallback-to-issue. - Excludes
README.mdfrom the default protected-file set to keep common docs updates flowing through PRs.
Show a summary per file
| File | Description |
|---|---|
| workflows/squad-implement-worker.md | Switches protected-file handling to fallback-to-issue with an explicit README.md exclusion. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
Comment on lines
+178
to
+181
| protected-files: | ||
| policy: fallback-to-issue | ||
| exclude: | ||
| - README.md |
Closes #1746 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bradygaster
deleted the
bradygaster-1746-protected-files-fallback-to-issue
branch
August 20, 2026 01:54
This was referenced Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1746
What
Replaces
protected-files: request_reviewwith the object form inworkflows/squad-implement-worker.md:Why
request_reviewis unusable for signedcreate-pull-requestwrites. Verified against gh-aw v0.86.2 source:create_pull_request.cjscallscheckFileProtection(...), classifiesrequest_reviewas a soft action, and logs that it will open the PR with a caution and a request-changes review.pushSignedCommits(...).push_signed_commits.cjssynthesizes the GraphQLcreateCommitOnBranchpayload and callscheckFileProtectionPostApply(...), which throws on anything other thanallow.So the run announces soft handling and then hard-refuses with
Signed-commit payload violates file-protection policy. This blocked the live end-to-end continuation test inbradygaster/aspiregregator-squad-test(finding F).fallback-to-issuetakes a different route — the signed push still rejects, but the PR handler hasmanifestProtectionFallbackset, catches the failure, and opens a protected-file review issue instead.Why README.md is excluded
gh-aw's default protected list (
runtime_definitions.go:206-214) includesREADME.md, matched by basename at any depth —manifest_file_helpers.cjs:301-305doesfile.split("/").pop(). That's a different matcher fromallowed-filesglobs, where*does not cross/.Under plain
fallback-to-issue, every README task would produce a review issue rather than a PR. README updates are one of the most common task classes there is, and the worker's output is always a reviewable PR — which is the actual safety mechanism. Protecting everyREADME.mdat every depth is inherited from gh-aw's generic manifest-safety model, not from Squad's product model.Everything genuinely load-bearing stays protected: dependency manifests and lockfiles,
CODEOWNERS,SECURITY.md,CONTRIBUTING.md,CHANGELOG.md, and top-level dot folders.CHANGELOG.mdspecifically stays protected because in adopting repos it is often generated, is release provenance, and may satisfy a release gate — a false entry can misstate shipped behavior.Not
protected-files: allowed, which would let the worker rewrite protected manifests and security docs outright.Scope
excluded-filesis unchanged. It strips.github/workflows/,.github/agents/,.github/aw/, and.squad/from the patch before protected-file evaluation, so it solves a different problem and is independent of this change.Validation
node scripts/check-workflow-input-interpolation.mjs— passed, 5 prompt files scannednpx vitest run test/gh-aw-quality.test.ts— 81 passed / 13 skipped, matching thedevbaselinepackages/*/src/changes, so no changeset requiredworkflows/squad-implement-worker.mdis not duplicated into the template directories)gh aw compilecannot validate this file from the repo root —workflows/*.mdare source that install into consuming repos, sodispatch-workflowcan't resolvesquadin.github/workflows/. That failure is structural and pre-existing.Follow-ups (not this PR)
fallback-to-issueas a deliberate safety handoff rather than a failed worker. When a task legitimately needs to touch a manifest ("add the Serilog package"), the user gets an issue instead of a PR — defensible as a supply-chain decision, but it needs to read as intentional..lock.ymlrecompiled before this takes effect there.