[WIP] Change default allowed extensions in cache-memory to empty#15263
[WIP] Change default allowed extensions in cache-memory to empty#15263
Conversation
…les) and skip validation step when empty Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
Smoke Codex results
|
…moves validation steps) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This pull request changes the default behavior for cache-memory file validation from restricting files to specific extensions (.json, .jsonl, .txt, .md, .csv) to allowing all file types by default. When allowed-extensions is empty or not specified, no validation step is generated in compiled workflows, and all file types are accepted.
Changes:
- Changed
DefaultAllowedMemoryExtensionsfrom a list of 5 file types to an empty array - Updated Go compiler logic to skip validation step generation when
AllowedExtensionsis empty - Modified JavaScript validation function to return early (success) when allowedExtensions is empty or undefined
- Recompiled 77 workflow lock files to remove validation steps and update ALLOWED_EXTENSIONS to empty string
Note: The PR also includes unrelated documentation changes adding allowed-repos field to close-issue and add-labels safe outputs.
Reviewed changes
Copilot reviewed 80 out of 80 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/constants/constants.go | Changed default from specific file types to empty array (allow all) |
| pkg/workflow/cache.go | Added logic to skip validation step generation when AllowedExtensions is empty |
| actions/setup/js/validate_memory_files.cjs | Updated to return early with success when allowedExtensions is empty/undefined |
| actions/setup/js/validate_memory_files.test.cjs | Updated 21 tests to reflect new "allow all" behavior when no restrictions specified |
| docs/src/content/docs/reference/frontmatter-full.md | Added unrelated allowed-repos documentation for close-issue and add-labels |
| .github/workflows/*.lock.yml (77 files) | Removed validation steps, changed ALLOWED_EXTENSIONS from specific list to empty string |
Comments suppressed due to low confidence (1)
docs/src/content/docs/reference/frontmatter-full.md:2395
- The changes to add
allowed-reposfield to theclose-issueandadd-labelsconfigurations appear to be unrelated to the stated purpose of this PR, which is to "Change default allowed extensions in cache-memory to empty". This suggests scope creep - these changes should ideally be in a separate PR focused on the allowed-repos feature for safe outputs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # List of additional repositories in format 'owner/repo' that labels can be added | ||
| # to. When specified, the agent can use a 'repo' field in the output to specify | ||
| # which repository to add labels to. The target repository (current or | ||
| # target-repo) is always implicitly allowed. | ||
| # (optional) | ||
| allowed-repos: [] | ||
| # Array of strings |
There was a problem hiding this comment.
The changes to add allowed-repos field to the add-labels configuration appear to be unrelated to the stated purpose of this PR, which is to "Change default allowed extensions in cache-memory to empty". This suggests scope creep - these changes should ideally be in a separate PR focused on the allowed-repos feature for safe outputs.
This issue also appears on line 2389 of the same file.
| - **Merge Strategy**: In case of conflicts, your changes (current version) win | ||
| - **Persistence**: Files persist across workflow runs via git branch storage | ||
| - **Allowed File Types**: Only the following file extensions are allowed: `.json`, `.jsonl`, `.txt`, `.md`, `.csv`. Files with other extensions will be rejected during validation. | ||
| - **Allowed File Types**: Only the following file extensions are allowed: ``. Files with other extensions will be rejected during validation. |
There was a problem hiding this comment.
The generated documentation message now shows empty backticks for the allowed file types: "Only the following file extensions are allowed: ``." This creates confusing user-facing documentation. Since the default is now to allow all file extensions, this prompt text should either be removed entirely or updated to state "All file extensions are allowed" when the allowed-extensions list is empty.
Summary: Change default allowed extensions in cache-memory to empty (allow all files)
All tasks completed successfully:
constants.go- ChangedDefaultAllowedMemoryExtensionsfrom[]string{".json", ".jsonl", ".txt", ".md", ".csv"}to[]string{}(empty slice)cache.go- Skip validation step generation whenAllowedExtensionsis emptygenerateCacheMemoryValidation()to skip when emptygenerateUpdateCacheMemorySteps()to skip when emptyvalidate_memory_files.cjs- Changed behavior whenallowedExtensionsis empty to allow all filesvalidate_memory_files.test.cjs(all 21 tests passing)Key Changes:
cache-memory: trueis specified without explicitallowed-extensions, all file types are now allowedallowed-extensionsis explicitly specified, validation is still performed and the validation step is generatedallowed-extensionscontinue to work as beforeFiles Changed:
pkg/constants/constants.go: Changed default to empty arraypkg/workflow/cache.go: Added logic to skip validation when emptyactions/setup/js/validate_memory_files.cjs: Updated to allow all files when emptyactions/setup/js/validate_memory_files.test.cjs: Updated all tests to reflect new behavior.lock.ymlfiles: Recompiled to remove validation steps💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.