feat: camelCase-only TestPlan Node API with includeGlob - #764
feat: camelCase-only TestPlan Node API with includeGlob#764jonathanong wants to merge 6 commits into
Conversation
CLI JSON stays snake_case. Node testsPlan/testsImpact and analyzeProject plan reports now camelize keys, expose optional executionTargets.name, and filter selected tests with includeGlob/--include-glob. Co-authored-by: Cursor <cursoragent@cursor.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Decamelize planJson for comment/graph APIs, camelize testsTargets/testsWhy/ testsGraph results, name Swift prefixes only on Swift runners, and align the declaration tests plus includeGlob docs with testsPlan-only. Co-authored-by: Cursor <cursoragent@cursor.com>
This comment has been minimized.
This comment has been minimized.
JSON.stringify(testsPlan()) must round-trip through comment/graph APIs, analyzeProject document reports need the same conversion, and testsWhy must not camelize changed-file map keys. Co-authored-by: Cursor <cursoragent@cursor.com>
This comment has been minimized.
This comment has been minimized.
Saved testsPlan JSON loaded via plan must decamelize like planJson, and analyzeProject must camelize testsTargets, testsGraph, and testsWhy. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0975ed2561
ℹ️ 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".
Native TestsWhyOptions rejects planJson. Materialize camelCase saved plans to a snake_case temp file and pass that as plan for both standalone and batched why reports. Co-authored-by: Cursor <cursoragent@cursor.com>
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dfab19c1cf
ℹ️ 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".
| if (document == null) return next; | ||
| const tmp = path.join( | ||
| os.tmpdir(), | ||
| `no-mistakes-why-plan-${process.pid}-${Date.now().toString(36)}.json`, |
There was a problem hiding this comment.
Give each materialized why plan a unique path
When analyzeProject() batches two testsWhy reports with different saved plans, reports.map() materializes both synchronously before invoking the native API, and calls occurring in the same millisecond generate the same PID/timestamp filename here. The later write overwrites the earlier plan, so both reports can silently analyze the second document; use an exclusively created random temporary file or directory per call and clean it up after completion.
Useful? React with 👍 / 👎.
Summary
testsPlan()/testsImpact()and nestedanalyzeProjectplan reports return camelCase only (changedFiles,executionTargets,fallbackTriggered).executionTargets.nameis the longest matching Swift package prefix.--include-glob/includeGlobkeeps only selected tests whose relative path matches.Test plan
plan_finishname/prefix testsMade with Cursor
Shepherd Journal