Keep invalid review fixtures out of source scans - #2795
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7bfe83d9d5
ℹ️ 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".
| // Negative examples must not be real source files because the authenticated | ||
| // community reviewer scans them without the repository's local ignore rules. | ||
| const invalidSourceFixture = `import "node:fs"; |
There was a problem hiding this comment.
Update the obsolete fixture-directory documentation
Moving every fixture into this script and deleting the four tracked files removes src/review-fixtures/, but designdocs/OBSIDIAN_COMMUNITY_REVIEW.md:77-85 still lists and links that directory as a key maintenance location. After this commit the link is broken and directs contributors to a fixture layout that no longer exists; replace it with the in-memory fixture location in this script.
Useful? React with 👍 / 👎.
Relates to logancyang/obsidian-copilot-preview#285
Why
The authenticated Obsidian review of
master@c93ecf0still fails because it scans physical negative fixtures as plugin code. The TypeScript fixture produces two errors for its intentionally forbidden directive, while the CSS external-URL fixture produces two more errors; the CSS warning fixture also appears in the report for its intentional!importantand:hascases.What
Keep the same negative ESLint, Stylelint, and license coverage, but store the examples as text in the fixture runner and lint them through virtual filenames. Disable TypeScript ESLint's automatic CI single-run inference for the in-memory source fixture so it cannot substitute the anchor file from disk. Delete the physical invalid source, CSS, and license files and their obsolete ESLint ignore so the authenticated reviewer cannot treat test data as shipped plugin content.
Plugin runtime behavior and UI are unchanged.
Non goal
This does not clean up nonblocking review warnings, weaken any error rule, or change providers, settings, persistence, or user-facing behavior.
Screenshot
Not applicable — this changes review-fixture representation only and has no rendered plugin UI.
Risk
Low
review:obsidian:fixturesfails if any required rule is no longer exercisedReview: inspect
scripts/review-obsidian-fixtures.mjs—lintSourceFixture,expectEslintRules, and the Stylelint stdin calls — plus the removed fixture ignore ineslint.config.mjs, then run Verification steps 2–4.Verification
npm ci.npm run review:obsidian:fixturesandCI=true npm run review:obsidian:fixtures; expect the intentional source, style, license, and manifest failures to be exercised and both fixture gates to pass.npm run review:obsidian; expect no errors fromsrc/review-fixtures. Existing warnings remain nonblocking.src/review-fixtures/.