Skip to content

Fix eval catalogue listing missing evals/test_*.test.ts files - #12

Open
wyvern8 wants to merge 2 commits into
mainfrom
cursor/fix-eval-static-catalogue-256b
Open

Fix eval catalogue listing missing evals/test_*.test.ts files#12
wyvern8 wants to merge 2 commits into
mainfrom
cursor/fix-eval-static-catalogue-256b

Conversation

@wyvern8

@wyvern8 wyvern8 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Problem

The eval catalogue still treated generated evals/test_*.test.ts files as coverage for primitives whose JSON suites already exist. Two bugs caused that:

  1. Discovery used the legacy path plugins/<plugin>/evals/<kind>s/<name>.json (and .cursor/evals/...). After the JSON-first migration, suites live at <kind-dir>/evals/<name>.json. Rediscovery therefore wrote empty eval_files and inventories reported hundreds of missing static tests.
  2. stampVitestPerPrimitive double-prefixed kind onto slugs from buildPrimitiveMetaFromPayload (skill_nab-testingtest_skill_skill_nab-testing.test.ts). regenerateVitest catalogued the single-kind name, so re-stamp never produced the file the catalogue listed.

Fix

  • Resolve catalogue eval_files from co-located JSON first, then the legacy tree. Never invent a path that is not on disk.
  • Emit evals/test_<kind>_<name>.test.ts from one shared vitestStaticTestBasename helper used by the stamper and regenerateVitest.
  • Refresh this host manifest so all 53 discovered targets list their real JSON suites (38 previously empty rows).

Verification

  • vitest coverage for basename helper, co-located vs legacy discovery, and stamp path.
  • eval:discover now reports with_coverage: 53 and zero evals/test_*.test.ts catalogue rows.
  • eval:update --no-analyser dry-run: 0 critical deltas.

Hosts that still use static.framework: vitest should re-stamp after this lands so files appear at the catalogued single-kind paths.

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 6, 2026 23:03
…ic tests

Discovery looked at the legacy plugins/*/evals/<kind>s/ tree, so the
manifest kept empty coverage (or expected evals/test_*.test.ts) while
JSON suites already lived next to each primitive.

stampVitestPerPrimitive also prefixed kind twice onto kind-prefixed
slugs, writing test_skill_skill_* files that regenerateVitest never
looked for.

Resolve eval_files from co-located JSON first, and emit
evals/test_<kind>_<name>.test.ts from one shared basename helper.

Co-authored-by: andrew.smartcreations <andrew.smartcreations@gmail.com>
Fill 38 empty eval_files rows with the JSON suites already on disk so
the catalogue no longer implies missing generated evals/test_*.test.ts
coverage for commands, agents, and hooks.

Co-authored-by: andrew.smartcreations <andrew.smartcreations@gmail.com>
@wyvern8
wyvern8 marked this pull request as ready for review September 6, 2026 23:04

@cursor cursor 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.

Approved. Cursor Bugbot was not running after the first check poll, so that signal was skipped; remaining checks that finished are clean and no approval policy requires human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Approver

@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: 12c70eb769

ℹ️ 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 +63 to +64
const underCursor =
ownerPosix.endsWith("/.cursor") || ownerPosix.endsWith(".cursor");

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 Identify the Cursor directory by basename

When a valid plugin directory name ends in .cursor (periods are accepted by pluginNamePattern) and only its legacy hook eval exists at plugins/<plugin>/evals/hooks/<plugin>.json, this suffix check misclassifies the plugin as the workspace .cursor directory and instead searches for hooks.json. Discovery then reports the hook as uncovered even though its eval file exists; compare the directory basename exactly with .cursor.

Useful? React with 👍 / 👎.

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.

2 participants