Skip to content

ci: separate the end-user Node floor from the development Node floor - #339

Merged
oekazuma merged 11 commits into
mainfrom
claude/node-floor-smoke
Aug 1, 2026
Merged

oekazuma merged 11 commits into
mainfrom
claude/node-floor-smoke

Conversation

@oekazuma

@oekazuma oekazuma commented Jul 31, 2026 •

Copy link
Copy Markdown
Owner

Why

The published packages declare engines.node: >=22.13.0, and the dev toolchain is
pinned separately by devEngines.runtime. CI ignored that distinction: the test
matrix pinned the published floor and ran the whole vitest suite on it, so every dev
dependency was held to the end users' Node version
.

That coupling has been silently load-bearing for a while — vite 8, oxlint and oxfmt all
sit at >=22.12.0, one patch below the floor. #332 (jsdom 29 -> 30) is the first dev
dependency to cross it: jsdom 30's only breaking change is raising its requirement to
^22.22.2 || ^24.15.0 || >=26.0.0. Nothing warns about the mismatch, because pnpm's
engine-strict is off by default.

The failure this sets up is a dev dependency using a newer API and breaking exactly one
matrix job, with a runtime error that has no visible connection to the Node floor.

What changed

Job Claim Node
check build / typecheck / publint / attw dev
test the vitest suite, on the lines the toolchain supports 22, 24.16.0, 26
floor-smoke the built dist under a bare node, no test runner 22.13.0
  • The test matrix moves 22.13.0 -> 22 (latest 22.x). It now tracks release lines
    the dev toolchain supports, so the 22 line keeps full unit-test coverage while no
    longer pinning the published floor.
  • scripts/floor-smoke.mjs (new, pnpm smoke) asserts the end-user contract against
    the built dist: exit codes, a well-formed JSON report, and that every published
    entry point imports. Node builtins only — importing a test runner would recreate the
    coupling this removes.
  • One vitest test is deleted as superseded. It asserted Node's behaviour for a .ts
    config on old Node and branched so it passed either way. The smoke asserts the CLI's
    guided error instead — a branch no vitest test can reach, because vitest's module
    runner transforms in-process dynamic import(), so a .ts config always loads inside
    vitest regardless of the host Node.

The smoke runs in both jobs: floor-smoke covers the old-Node side of that contract,
the test matrix covers the modern-Node side.

What this does not claim

floor-smoke still runs pnpm install on 22.13.0, so pnpm itself and the build
toolchain remain floor-bound. AGENTS.md states the rule with that qualification rather
than as an absolute, and the workflow re-records the "22.13.0 is the minimum the pinned
pnpm can run on" constraint that the old matrix comment carried.

engines.node is unchanged, and engine-strict is deliberately not enabled — turning it
on would fail the install on the floor Node because of a dev dependency, which is the
coupling being removed.

Verification

pnpm lint, pnpm build, pnpm typecheck, pnpm test (2152 tests), pnpm smoke all
pass locally. The smoke's checks were each break-tested to confirm they can fail.

Design doc: docs/superpowers/specs/2026-07-31-floor-smoke-design.md
Plan: docs/superpowers/plans/2026-07-31-node-floor-smoke.md

No changeset: CI and tooling only, no published-package code changes.

Relationship to #332

Independent — #332 can merge before or after. The floor mismatch predates jsdom 30; that
bump only made it visible.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a smoke test command to validate built packages at the supported Node.js version floor.
    • Added checks for CLI behavior, entry-point imports, reports, invalid projects, and TypeScript configuration handling.
  • Bug Fixes

    • Improved CI coverage across supported Node.js versions with a dedicated floor compatibility check.
  • Documentation

    • Documented Node.js support policies, smoke testing, CI jobs, and verification commands.

oekazuma and others added 10 commits July 31, 2026 23:44
CI's `test (22.13.0)` job runs the whole vitest suite, so every dev
dependency is held to the published packages' `engines.node` floor.
jsdom 30 (^22.22.2 || ^24.15.0 || >=26.0.0) is the first to cross it;
vite and oxlint sit 0.01 above. The mismatch is silent because pnpm's
engine-strict is off, so the eventual failure would surface as an
unexplained error in one matrix job.

Design: keep the full suite on the release lines the toolchain supports
(22 / 24.16.0 / 26) and add a `floor-smoke` job that runs the built dist
under a bare 22.13.0 `node`. That job also covers `loadConfigFile`'s
guided error for a `.ts` config on old Node — a branch vitest can never
reach, since its module runner transforms in-process dynamic import().

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Run scripts/floor-smoke.mjs on the test job's matrix Node too, since
floor-smoke itself is pinned to 22.13.0 and only ever takes the
old-Node branch of the .ts config contract check — nothing was
covering the modern-Node side. Also harden the smoke script itself:
preserve failure evidence (exit code, stderr, stack) instead of
discarding it, add a `pnpm build` preflight, stop conflating a signal
kill with exit 1, accept version prereleases, clean up its temp dirs,
and rename a check to stop overclaiming mcp bin coverage. Qualify
AGENTS.md's floor-separation claim to the dependencies the smoke
actually executes, restore the pnpm version constraint as a CI
comment, add the smoke's local-run caveat to AGENTS.md and pnpm smoke
to CONTRIBUTING.md, and record the floating '22' tradeoff in the
design doc's Risks section.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8d096de6-0a4c-4ff8-884c-ce944d794d0c

📥 Commits

Reviewing files that changed from the base of the PR and between 317474f and 5d27b77.

📒 Files selected for processing (3)
  • AGENTS.md
  • CONTRIBUTING.md
  • scripts/floor-smoke.mjs
🚧 Files skipped from review as they are similar to previous changes (2)
  • CONTRIBUTING.md
  • AGENTS.md

📝 Walkthrough

Walkthrough

The change separates the published Node.js floor from the development matrix. It adds built-package smoke checks, a root command, dedicated Node 22.13.0 CI coverage, matrix execution, and documentation updates.

Changes

Node floor validation

Layer / File(s) Summary
Node floor contract and verification design
docs/superpowers/specs/..., docs/superpowers/plans/..., AGENTS.md
The documentation defines separate published and development Node floors, smoke requirements, CI jobs, validation criteria, and implementation constraints.
Built-artifact smoke execution
scripts/floor-smoke.mjs
The smoke script checks built CLI behavior, JSON output, published entry-point imports, and TypeScript configuration handling.
Local command and test migration
package.json, CONTRIBUTING.md, packages/cli/test/config-file.test.ts
The repository adds the smoke command. The previous Vitest child-process test now points to the standalone smoke script.
Matrix and floor-smoke CI integration
.github/workflows/ci.yml
The test matrix uses Node 22, 24.16.0, and 26. A dedicated Node 22.13.0 job restores or builds package artifacts and runs the smoke script.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CI as GitHub Actions
  participant Build as Package build artifacts
  participant Smoke as floor-smoke.mjs
  participant CLI as Built CLI
  participant Entry as Published entry points

  CI->>Build: Restore or build dist artifacts
  CI->>Smoke: Run smoke checks
  Smoke->>CLI: Execute CLI scenarios
  CLI-->>Smoke: Return output and exit codes
  Smoke->>Entry: Import published entry points
  Entry-->>Smoke: Return module exports
  Smoke-->>CI: Return aggregate success or failure
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: separating the published end-user Node.js floor from the development Node.js floor.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Line 16: Document that pnpm smoke requires built packages/cli/dist/bin.js:
update AGENTS.md line 16’s verification-table note to instruct users to run pnpm
build first or use pnpm build && pnpm smoke, and update CONTRIBUTING.md line 25
to show the same prerequisite beside the common command.

In `@scripts/floor-smoke.mjs`:
- Around line 116-122: Update the comment above the temporary SvelteKit fixture
setup in the smoke test to reflect that the CLI invokes loadConfigFile before
detectProject: the project only needs to resemble a SvelteKit app after the .ts
config loads so execution can proceed to project detection. Leave the test
behavior unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fe4c1a27-425f-4d4a-bcd4-cfdb47bf230e

📥 Commits

Reviewing files that changed from the base of the PR and between 47e025d and 317474f.

📒 Files selected for processing (8)
  • .github/workflows/ci.yml
  • AGENTS.md
  • CONTRIBUTING.md
  • docs/superpowers/plans/2026-07-31-node-floor-smoke.md
  • docs/superpowers/specs/2026-07-31-floor-smoke-design.md
  • package.json
  • packages/cli/test/config-file.test.ts
  • scripts/floor-smoke.mjs

Comment thread AGENTS.md Outdated
Comment thread scripts/floor-smoke.mjs
…d prerequisite

CodeRabbit review on #339: loadConfigFile runs before detectProject
(index.ts:174 vs :188), so the comment on the .ts-config check had the
control flow backwards. Also record that pnpm smoke needs a prior
pnpm build, since its preflight exits 1 on a fresh checkout.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@oekazuma
oekazuma merged commit 059959a into main Aug 1, 2026
8 checks passed
@oekazuma
oekazuma deleted the claude/node-floor-smoke branch August 1, 2026 01:44
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