Skip to content

Keep invalid review fixtures out of source scans - #2795

Merged
logancyang merged 3 commits into
masterfrom
codex/issue-285-review-fixtures
Aug 10, 2026
Merged

Keep invalid review fixtures out of source scans#2795
logancyang merged 3 commits into
masterfrom
codex/issue-285-review-fixtures

Conversation

@logancyang

@logancyang logancyang commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Relates to logancyang/obsidian-copilot-preview#285

Why

The authenticated Obsidian review of master@c93ecf0 still 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 !important and :has cases.

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

Criterion Status Reason
No behavior change, or a cosmetic/copy/docs/config change visible where it renders, or deterministic tests cover the changed behavior The fixture gate deterministically asserts the same source, style, and license findings from virtual inputs
A defect would fail CI or be obvious on first use review:obsidian:fixtures fails if any required rule is no longer exercised
A revert fully restores prior state, including persisted data The change is tooling-only and writes no user or repository state
No auth, permissions, secrets, or input-handling surface changes No plugin runtime code or external input path changes
No public API, plugin API, message, or on-disk contract changes Only private review-test representation changes
No core-path concurrency, async-lifecycle, or state-machine changes The plugin runtime is untouched
No hot-path behavior lacks deterministic coverage No hot-path behavior changes; the affected fixture paths are exercised deterministically
No new dependency Dependency manifests are unchanged and the runner uses the existing ESLint package
Human-only behavior stays in one feature area and surfaces quickly The only external check is reviewer file discovery; a rerun immediately shows whether fixture errors remain

Review: inspect scripts/review-obsidian-fixtures.mjslintSourceFixture, expectEslintRules, and the Stylelint stdin calls — plus the removed fixture ignore in eslint.config.mjs, then run Verification steps 2–4.

Verification

  1. Install the locked dependencies with npm ci.
  2. Run npm run review:obsidian:fixtures and CI=true npm run review:obsidian:fixtures; expect the intentional source, style, license, and manifest failures to be exercised and both fixture gates to pass.
  3. Run npm run review:obsidian; expect no errors from src/review-fixtures. Existing warnings remain nonblocking.
  4. Run the authenticated community review for the branch; expect no errors or warnings whose path starts with src/review-fixtures/.

@logancyang
logancyang marked this pull request as ready for review August 10, 2026 01:21

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +13 to +15
// 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";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@logancyang
logancyang merged commit 7974bc0 into master Aug 10, 2026
2 checks passed
@logancyang
logancyang deleted the codex/issue-285-review-fixtures branch August 10, 2026 02:11
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.

1 participant