Skip to content

fix(workflows): broaden allowed-files glob to cover flat tests/safe-outputs layout#871

Merged
jamesadevine merged 1 commit into
mainfrom
fix/recompile-fixtures-allowed-files-glob
Jun 5, 2026
Merged

fix(workflows): broaden allowed-files glob to cover flat tests/safe-outputs layout#871
jamesadevine merged 1 commit into
mainfrom
fix/recompile-fixtures-allowed-files-glob

Conversation

@jamesadevine
Copy link
Copy Markdown
Collaborator

Summary

Fixes the safe-output policy failure observed when the agent tried to open the recompile PR:

Error: Cannot create pull request: patch modifies files outside the
allowed-files list (tests/safe-outputs/add-build-tag.lock.yml, ...,
tests/safe-outputs/upload-workitem-attachment.lock.yml).

The previous allowed-files entry was tests/safe-outputs/**/*.lock.yml. The ** segment in gh-aw's glob matcher requires at least one intermediate directory level, so it only covered tests/safe-outputs/<dir>/*.lock.yml. The actual fixtures live flat at tests/safe-outputs/<name>.lock.yml, so every recompiled file was rejected and the PR creation failed.

This adds the flat glob alongside the recursive one:

allowed-files:
  - "tests/safe-outputs/*.lock.yml"
  - "tests/safe-outputs/**/*.lock.yml"

The recursive glob is kept so the policy still works if a future test fixture is moved into a subdirectory.

Test plan

  • Cross-checked the failing safe-output error message against the new glob list — every rejected file matches tests/safe-outputs/*.lock.yml.
  • Lock file regenerated with gh aw compile recompile-safe-output-fixtures.
  • Will be exercised end-to-end on the next ado-aw release.

Follows from #868 and #869.

…utputs layout

The previous allowed-files entry only matched
tests/safe-outputs/<dir>/*.lock.yml (the ** wildcard requires at least one
intermediate directory), so the flat tests/safe-outputs/<name>.lock.yml
fixtures were rejected by the create_pull_request safe-output policy.

Add the flat glob alongside the recursive one so both layouts are
covered.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine merged commit 6d3559f into main Jun 5, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant