Skip to content

fix(plugins): reject unknown filename directives - #281

Open
nightcityblade wants to merge 1 commit into
griddynamics:mainfrom
nightcityblade:fix/issue-272
Open

fix(plugins): reject unknown filename directives#281
nightcityblade wants to merge 1 commit into
griddynamics:mainfrom
nightcityblade:fix/issue-272

Conversation

@nightcityblade

Copy link
Copy Markdown

Summary

  • validate parsed filename directives against the existing allowlist
  • continue accepting dynamic <target>-only directives and trailing tilde fences
  • add regression coverage for typo rejection and update the collision fixture to use a valid directive

Why

KNOWN_DIRECTIVES was defined but never consulted, so a typo such as ~overwrit was silently carried into the VFS as an inert condition. Failing fast with the filename and bad token prevents broken plugin bundles from shipping while preserving the repository's supported target-only and fenced filename forms.

Validation

  • npm --prefix src/rosettify-plugins test -- tests/unit/vfs/directives.test.ts --reporter=verbose — passed
  • ROSETTIFY_PLUGINS_LOG_LEVEL=warn npm --prefix src/rosettify-plugins test -- --reporter=minimal — 574 passed
  • npm --prefix src/rosettify-plugins run typecheck — passed
  • npm --prefix src/rosettify-plugins run build — passed
  • ROSETTIFY_PLUGINS_LOG_LEVEL=warn venv/bin/python scripts/pre_commit.py — passed

Checklist

  • Scope is narrow and explicit
  • Backward-compatible directive forms are preserved
  • New behavior has regression coverage
  • Local validation passes
  • Commit includes the required DCO sign-off

AI assistance was used to inspect the issue, implement the focused change, and run validation. I reviewed every changed line.

Closes #272

Signed-off-by: nightcityblade <nightcityblade@gmail.com>
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.

[ROSETTA] rosettify-plugins KNOWN_DIRECTIVES allowlist defined but never enforced

1 participant