Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0aee5f3685
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| mkdir -p archive/$(date +%Y-%m-%d)/auto | ||
|
|
||
| # Convert allowed list into grep pattern | ||
| PATTERN=$(printf "%s\n" "${ALLOWED[@]}" | paste -sd "|" -) |
There was a problem hiding this comment.
Escape allowed names before regex matching
Building PATTERN by joining raw filenames makes grep -E treat metacharacters in allowed names as regex operators, so entries like README.md and .gitignore match unintended names (for example READMEXmd), which lets non-canonical root items bypass archiving. Quote or escape each allowed literal before composing the alternation so matching stays exact.
Useful? React with 👍 / 👎.
Motivation
archive/<date>/auto/without deleting anything.ubuntu-latestusingactions/checkout@v4to match the v4.2 rules.Description
.github/workflows/auto-archive.ymlcontents with the provided AI-HPP v4.2 workflow that installsactions/setup-python@v5and runs a shell auto-archive script.PATTERN, moves unexpected items intoarchive/$(date +%Y-%m-%d)/auto/, and writes a.reasonfile next to each moved item.archiveand added aCommit & Pushstep that configures author identity and pushes changes if any root items were archived.Testing
ls -1 .github/workflowsto confirm detected files before modification and ensure no unexpected files were targeted. (succeeded)YAML.load_filewhich parsed.github/workflows/auto-archive.ymlsuccessfully. (succeeded)pyyamlvalidation butpipinstallation failed due to environment package/proxy restrictions, so Ruby validation was used instead. (pip/pyyaml install failed, YAML parse via Ruby succeeded)git status --shortto verify that the only pending change was the updatedauto-archive.ymlworkflow file. (succeeded)Codex Task