Repository navigation
Dreaming: set protected-files: allowed so the workflow can open its curation PR - #14369
Conversation
The Dreaming workflow's entire purpose is to curate the "learning atoms" —
AGENTS.md and the files under .github/instructions, .github/skills, and
.github/agents. Those are exactly the paths gh-aw's default file-protection
policy guards (protected_files list + protect_top_level_dot_folders), and the
default policy is request_review.
When a run edited .github/instructions/*.instructions.md, the safe-outputs
signed-commit push was refused ("Signed-commit payload violates file-protection
policy (request_review)") and the run silently fell back to opening a review
*issue* (#14368) instead of the intended PR.
Set protected-files: allowed on the create-pull-request safe output. Verified
against the pinned setup action (v0.82.9, ca8678ca): both checkFileProtection
and checkFileProtectionPostApply (the signed-push gate) short-circuit to
'allow' when the policy is 'allowed', before the manifest/dot-folder checks.
The tight allowed-files allowlist remains the real guardrail (it is enforced
independently, ahead of the protected-files check), and the PR still needs
maintainer approval before merge, so human review is preserved at the PR gate.
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 1b63f3d4-d050-4905-9e00-bee816df8a94
There was a problem hiding this comment.
Pull request overview
Enables the Dreaming agentic workflow to successfully open its weekly curation pull request when the proposed changes touch “protected” memory files (e.g., AGENTS.md and .github/instructions/**) by switching the safe-output protected-files policy to allowed while keeping the existing tight allowed-files allowlist.
Changes:
- Set
protected-files: allowedfor thecreate-pull-requestsafe-output in the Dreaming source workflow. - Regenerated the compiled lock workflow so the safe-outputs handler uses
protected_files_policy: "allowed".
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/dreaming.agent.md |
Sets protected-files: allowed for the PR-creation safe output (with rationale comment) so protected memory paths can be pushed and a PR can be opened. |
.github/workflows/dreaming.agent.lock.yml |
Regenerated compiled workflow reflecting the updated safe-outputs protected-files policy (request_review → allowed). |
There was a problem hiding this comment.
Workflow Configuration Review
Summary: This PR changes the Dreaming agent's protected_files_policy from request_review to allowed so the agent can open curation PRs that touch its target files (AGENTS.md, .github/instructions/**, etc.).
Security Analysis ✅
The policy relaxation is acceptable given the layered guardrails still in place:
allowed_filesallowlist restricts the agent to onlyAGENTS.md,.github/instructions/**,.github/skills/**,.github/agents/**— documentation/instruction files only.excluded_filesexplicitly blocks.github/workflows/**, preventing workflow self-modification.- PR merge requires human maintainer approval — the agent can propose but not land changes autonomously.
The previous request_review policy was overly restrictive for this use case: the files the agent needs to edit (AGENTS.md, .github/instructions/**) overlap with gh-aw's default protected-files list, causing silent fallback to issues instead of PRs, which defeated the workflow's purpose.
Correctness ✅
All three locations are updated consistently:
dreaming.agent.md(source of truth): addsprotected-files: alloweddreaming.agent.lock.ymlconfig.json heredoc:protected_files_policy→alloweddreaming.agent.lock.ymlhandler config env var:protected_files_policy→allowed
The frontmatter hash and heredoc EOF marker are updated as expected from the recompilation.
Comment Justification ✅
The added comment in the .md file clearly explains why the change is needed and what the remaining guardrails are. Good documentation.
No issues found. LGTM.
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
awmgmcpg
To allow these domains, add them to the
network.allowedlist in your workflow frontmatter:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
Generated by Expert Code Review (on open) for #14369 · 43.8 AIC · ⌖ 7.48 AIC · ⊞ 4.8K
…14371) ## Problem PRs that touch only `.github/**` or `documentation/**` still run full multi-minute builds on every `msbuild-pr` leg. For example, on #14369 (two `.github/workflows/*` files) the legs ran: Windows Full 12m, Windows Core 9m46s, Linux Core 8m54s, Windows Full Release 6m42s — none of which exercise anything real for a docs/workflow change. ## Root cause The `onlyDocChanged` detection (`azure-pipelines/check-documentation-only-change.yml`) already covers `.github/` and works correctly — it set `onlyDocChanged=1` for #14369. The problem is what `onlyDocChanged=1` did: - `cibuild_bootstrapped_msbuild.sh`/`.ps1` still run **both build stages** when `onlyDocChanged=1`; they only drop `--test` and bootstrap creation. - The `CI Build` steps on **Linux Core** and **macOS Core** had **no `condition`** — the `eq(variables.onlyDocChanged, 0)` line beneath them actually belonged to the *coverage* step — so they always did a full build. - Only **Linux Core Multithreaded Mode** was correctly gated with a step-level condition. - `msbuild-quarantine` hardcoded `-onlyDocChanged 0` and had no skip at all. ## Fix Gate every heavy build step on `condition: eq(variables.onlyDocChanged, 0)`, matching the one leg that already did this, and remove the now-redundant `cibuild.cmd without test` fallback in the Windows Full Release leg. Apply the same inline skip to the three `msbuild-quarantine` legs. This reuses the **existing inline `check-documentation-only-change.yml` template** in each job — no new cross-job dependency, no added latency for normal PRs, no hardcoded container definitions or Arcade-internal edits. Doc/`.github`-only PRs now finish these legs in agent + checkout time. **Note:** the arcade `Source-Build (Managed)` leg (~4 min) is intentionally left as-is. Gating it would require duplicating Arcade's default source-build platform/container definition in this repo (a drift/fragility risk), which isn't worth it for a ~4 min leg. ## Behavior for required checks Jobs still run and report success; only their build/test steps are skipped, so required status checks stay green quickly rather than being left unreported. --------- Co-authored-by: Copilot App <[email protected]>
Problem
The Dreaming workflow (added in #14357) ran end-to-end successfully for the first time after the fleet gh-aw upgrade (#14365), produced a high-quality proposal (two small "learning atom" edits to
.github/instructions/*.instructions.md) — but never opened a PR. It fell back to opening a review issue (#14368) instead.Root cause
The workflow's whole job is to curate the "learning atoms":
AGENTS.mdand everything under.github/instructions,.github/skills,.github/agents. Those are exactly the paths gh-aw's default file-protection policy guards:AGENTS.mdis in the built-inprotected_fileslist, andprotect_top_level_dot_folders: true(a v0.82.9 default) marks every.github/**path as protected.The default
protected-filespolicy isrequest_review. When a run edited the protected instruction files, the safe-outputs signed-commit push was refused:…so the run silently degraded to a review issue.
Fix
Set
protected-files: allowedon thecreate-pull-requestsafe output.Verified against the pinned setup action (
github/gh-aw-actions/setupv0.82.9,ca8678ca): bothcheckFileProtection(pre-apply) andcheckFileProtectionPostApply(the exact function the signed-push gate calls) short-circuit to{ action: "allow" }when the policy isallowed, before the manifest/dot-folder checks run.Why this is safe
allowed-filesallowlist (AGENTS.md,.github/instructions/**,.github/skills/**,.github/agents/**) is the real guardrail. It is enforced independently and ahead of the protected-files check, so the agent still cannot touch product code, tests, build manifests, or the workflow definitions.request_reviewissue fallback was redundant friction for a workflow whose only output is a PR against these files.Diff
Two files, minimal:
.github/workflows/dreaming.agent.md— oneprotected-files: allowedline (+ explanatory comment) in thecreate-pull-requestconfig..github/workflows/dreaming.agent.lock.yml— regenerated viagh aw compile dreaming.agent --approve; the only functional change isprotected_files_policy: request_review→allowed(plus the auto-generated frontmatter/EOF hashes).Once merged, a re-run should open the curation PR directly instead of issue #14368.