Scaffold: npm test tests the plugin — every shipped pool, each as its own labeled run (#749) - #763
Conversation
🦋 Changeset detectedLatest commit: d8fd904 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
e6ce162 to
9b833bd
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e6ce162b37
ℹ️ 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".
| "create-agent-bundle": patch | ||
| --- | ||
|
|
||
| Make the scaffolded `npm test` test the plugin: in the `mcp-server` and `cli-tool` templates the default `test` script now runs every deterministic pool the project ships — the plain module tests (`test:unit`, new), the route-unit pool (`test:routes`), and the in-memory projection pool (`test:projection`) — each as its own labeled run, so a route that stops rendering or a server that stops registering it fails the ordinary test command while domain tests stay green. `check` is now `build && typecheck && npm test`. The focused scripts remain for a tight loop and take Rstest flags after `--`; packed and native proof stays opt-in. The `minimal` template still ships no route pool; its README shows the same aggregate wiring to add with the first route (#TBD) |
There was a problem hiding this comment.
Replace the placeholder with the actual PR reference
When Changesets consumes this file, the literal (#TBD) will be copied into the public changelog even though this change already identifies itself as PR #749. Replace the placeholder with (#749) so the release note has a valid reference.
AGENTS.md reference: AGENTS.md:L167-L168
Useful? React with 👍 / 👎.
| In a scaffolded project the first three rows are the deterministic pools `npm test` runs together | ||
| (`test:unit`, `test:routes`, `test:projection`, each reported as its own run); the remaining rows | ||
| are explicit, separately labelled gates. |
There was a problem hiding this comment.
Restrict the three-pool claim to the MCP scaffold
This applies the MCP template's script layout to every scaffolded project, but the CLI template only defines test:unit and test:projection, while the minimal template defines none of the three named focused scripts. Users of those templates therefore cannot run the documented set; scope this statement to the MCP starter or describe each template separately.
AGENTS.md reference: AGENTS.md:L139-L142
Useful? React with 👍 / 👎.
|
Local Sol Max review (change-risk-reviewer): script behavior, README drift markers, focused watch/filter wiring, host catalog/tests, locale coverage, and changeset package/format all checked out; three prose-accuracy findings, fixed in d8fd904:
|
|
Re the automatic Codex review (two P1 threads, on the
Resolving both. |
Closes #749.
What
An aggregate over the existing helpers, no new runner and no flattened module conditions (Rstest's
projectscannot carry a per-projectpool, so the route pools keep their ownreact-serverfork conditions):mcp-server:test=npm run test:unit && npm run test:routes && npm run test:projection;test:unitis the formertest.check=build && typecheck && npm test.cli-tool:test=npm run test:unit && npm run test:projection;checklikewise.minimal: unchanged (no route pool — a skills-only project has nothing to render); its README shows the aggregate wiring to add with the first route.agent-bundle/testhelper stamps its proof level, so output keeps distinguishing unit, route-unit, and projection claims; nothing in-memory is labelled native/packed. Focused scripts take Rstest flags after--(npm run test:routes -- --watch).Acceptance (in
scaffold-packed-matrix.e2e.test.ts, on the packed tarball in a clean consumer)npm testpasses and shows all three pool banners; then the route's rendered text is changed andnpm testexits 1 with the unit pool green, the route-unit pool namingtests/route-unit/report-status.test.ts, and the projection pool never reached;npm run test:unitalone still passes.Docs
quick-start.mdx(leads withnpm test),troubleshooting.mdx(rewrote the "green default test" row and the check block, as the #754 coordination note asked),reuse-framework.mdx(one sentence mapping the proof table to the scaffold's pools), en + zh;create-agent-bundle/README.mdand the three template READMEs. Changeset forcreate-agent-bundle(patch).Local gate (on current
origin/main)pnpm build✅ ·pnpm typecheck✅ ·pnpm lint✅ ·pnpm test:unit4496/4496 ✅node scripts/run-packed-tests.mjs --release …/scaffold-packed-matrix.e2e.test.ts✅ (mcp-server + cli-tool templates, including the break-the-route case)node scripts/run-packed-tests.mjs …/scaffold-packed.e2e.test.ts✅pnpm docs:site:build✅ (parity ok)