Skip to content

feat: camelCase-only TestPlan Node API with includeGlob - #764

Open
jonathanong wants to merge 6 commits into
mainfrom
feat/testplan-js-contract
Open

feat: camelCase-only TestPlan Node API with includeGlob#764
jonathanong wants to merge 6 commits into
mainfrom
feat/testplan-js-contract

Conversation

@jonathanong

@jonathanong jonathanong commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Node testsPlan() / testsImpact() and nested analyzeProject plan reports return camelCase only (changedFiles, executionTargets, fallbackTriggered).
  • CLI JSON stays snake_case.
  • executionTargets.name is the longest matching Swift package prefix.
  • --include-glob / includeGlob keeps only selected tests whose relative path matches.

Test plan

  • plan_finish name/prefix tests
  • includeGlob filter in changed inventory
  • CI green

Made with Cursor

Shepherd Journal

  • Rate-limit / review-guide comments only; no code change this tick.
  • PRRT_kwDOSaSRXM6baq45: defer includeGlob vs fallback_triggered comment wording to a follow-up; filter still applies after fallback selection.
  • P1 string planJson, analyzeProject document reports, and testsWhy path keys shipped in 965b137. Remaining P2s (includeGlob vs fallback_triggered comment, group remaining after filter, Swift ./ and . prefixes) stay deferred follow-ups; stop retrying includeGlob comment wording.
  • Load camelCase TestPlan files through plan, camelize batched testsTargets/testsGraph/testsWhy, and update Node docs/README to camelCase. Remaining P2s (includeGlob comment wording, group remaining, Swift prefixes) stay deferred.
  • testsWhy keeps plan (native has no planJson); camelCase saved plans are materialized to a temp snake_case file. P2 optional changedFiles on SavedTestPlan deferred.

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>
@chatgpt-codex-connector

This comment has been minimized.

sourcery-ai[bot]

This comment was marked as resolved.

@jonathanong
jonathanong enabled auto-merge (squash) August 22, 2026 18:50
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 22, 2026
@coderabbitai

This comment has been minimized.

@sourcery-ai

This comment has been minimized.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@codecov

This comment has been minimized.

@codspeed-hq

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>
@chatgpt-codex-connector

This comment has been minimized.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

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>
@chatgpt-codex-connector

This comment has been minimized.

jonathanong added a commit that referenced this pull request Aug 22, 2026
chatgpt-codex-connector[bot]

This comment was marked as resolved.

jonathanong and others added 2 commits August 22, 2026 12:47
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>
@chatgpt-codex-connector

This comment has been minimized.

@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: 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".

Comment thread packages/no-mistakes/planning.js Outdated
Comment thread packages/no-mistakes/test-types.d.ts
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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@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: 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`,

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant