Conversation
…allback Co-authored-by: DanWahlin <1767249+DanWahlin@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix course updater workflow failure due to protected files
Scope Course Updater edits to course content and fall back to an issue on protected files
Sep 23, 2026
This branch has not been deployed
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.
The weekly
Course Updaterrun failed because the agent's patch touched.github/agents/pytest-helper.agent.mdand.github/agents/python-reviewer.agent.md. gh-aw protects the.github/path prefix, and with noprotected-filespolicy set the default is a hard block, socreate_pull_requestwas refused and the run failed.Two root issues: the prompt never told the agent which files are in scope, and there was no graceful degradation when it strayed.
.github/workflows/course-updater.mdREADME.mdfiles (00–07), rootREADME.md,GLOSSARY.md,appendices/,samples/. Editing.github/,.agents/, or package manifests is called out as forbidden, with instructions to describe such a change in the PR body instead.protected-files: fallback-to-issueon thecreate-pull-requestsafe output, so a future protected-file edit opens a review issue rather than failing the run. Thesafe_outputsjob already hasissues: write..github/workflows/course-updater.lock.ymlRegenerated by hand — the
gh awextension can't be installed in the sandbox (API 403). Three lines:"protected_files_policy":"fallback-to-issue"added to bothcreate_pull_requesthandler config blobs, in alphabetical key order matching what gh-aw v0.68.1 emits fortraffic-updater.frontmatter_hashin thegh-aw-metadataheader updated. The workflow's "Check workflow lock file" step fails the run on a mismatch; the new hash was produced with gh-aw's ownfrontmatter_hash_pure.cjs, after confirming it reproduced the prior hash for the unmodified source. Worth re-runninggh aw compileon review to confirm byte-for-byte equivalence.The prompt body is
runtime-imported rather than embedded in the lock, so the Step 4 wording required no lock change.Note on the alternative
allowed-fileswas considered and rejected: incheckFileProtectionan allowlist miss is a harddenywith no fallback path, which would reintroduce the same failure mode instead of degrading to an issue.