Skip to content

[WIP] Change default allowed extensions in cache-memory to empty#15263

Merged
pelikhan merged 3 commits intomainfrom
copilot/update-cache-memory-extensions
Feb 13, 2026
Merged

[WIP] Change default allowed extensions in cache-memory to empty#15263
pelikhan merged 3 commits intomainfrom
copilot/update-cache-memory-extensions

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

Summary: Change default allowed extensions in cache-memory to empty (allow all files)

All tasks completed successfully:

  • Update constants.go - Changed DefaultAllowedMemoryExtensions from []string{".json", ".jsonl", ".txt", ".md", ".csv"} to []string{} (empty slice)
  • Update cache.go - Skip validation step generation when AllowedExtensions is empty
    • Modified generateCacheMemoryValidation() to skip when empty
    • Modified generateUpdateCacheMemorySteps() to skip when empty
  • Update validate_memory_files.cjs - Changed behavior when allowedExtensions is empty to allow all files
    • Removed fallback to default extensions
    • Skip validation when empty array is provided
  • Update tests
    • Updated JavaScript tests in validate_memory_files.test.cjs (all 21 tests passing)
    • Verified Go tests still pass
  • Run tests to validate changes
  • Recompile all workflows - Removed validation steps from 77 lock files
  • Manual testing - Verified workflows compile correctly with and without explicit allowed-extensions

Key Changes:

  1. Default behavior: When cache-memory: true is specified without explicit allowed-extensions, all file types are now allowed
  2. No validation step: When allowed-extensions is empty, the validation step is not emitted in the compiled workflow
  3. Explicit restrictions still work: When allowed-extensions is explicitly specified, validation is still performed and the validation step is generated
  4. Backward compatibility: Workflows with explicit allowed-extensions continue to work as before

Files Changed:

  • pkg/constants/constants.go: Changed default to empty array
  • pkg/workflow/cache.go: Added logic to skip validation when empty
  • actions/setup/js/validate_memory_files.cjs: Updated to allow all files when empty
  • actions/setup/js/validate_memory_files.test.cjs: Updated all tests to reflect new behavior
  • 77 .lock.yml files: Recompiled to remove validation steps

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…les) and skip validation step when empty

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@github-actions
Copy link
Contributor

Smoke Codex results
Merged PRs: #15249 Remove unused generateMaxWithRequiredFieldsConfig function; #15247 [WIP] Fix emission of --enable-chroot for awf call
GitHub MCP ✅
Serena MCP ✅
Playwright ✅
File write ✅
Bash cat ✅
Build gh-aw ✅
Overall: PASS

AI generated by Smoke Codex

…moves validation steps)

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review February 13, 2026 01:07
Copilot AI review requested due to automatic review settings February 13, 2026 01:07
@pelikhan pelikhan merged commit 9689964 into main Feb 13, 2026
@pelikhan pelikhan deleted the copilot/update-cache-memory-extensions branch February 13, 2026 01:07
Copilot stopped work on behalf of pelikhan due to an error February 13, 2026 01:08
Copilot AI requested a review from pelikhan February 13, 2026 01:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 DefaultAllowedMemoryExtensions from a list of 5 file types to an empty array
  • Updated Go compiler logic to skip validation step generation when AllowedExtensions is 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-repos field to the close-issue and add-labels configurations 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.

Comment on lines +2763 to +2769
# 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
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
- **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.
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants