Skip to content

fix: enforce the supported Node train in generated apps - #1431

Merged
kang-heewon merged 2 commits into
trunkfrom
fix/1320-node-runtime-contract
Jul 21, 2026
Merged

fix: enforce the supported Node train in generated apps#1431
kang-heewon merged 2 commits into
trunkfrom
fix/1320-node-runtime-contract

Conversation

@kang-heewon

@kang-heewon kang-heewon commented Jul 18, 2026

Copy link
Copy Markdown
Member

Outcome

Generated Croco applications now use the repository's canonical Node.js train as an executable contract:

  • generation fails before writing files when the active Node.js version is unsupported, with stable Problem metadata and actionable nvm recovery
  • every generated root declares engines.node, includes .nvmrc, and documents the install/build requirement
  • browser and Cloudflare Workers output explicitly preserves its non-Node deployment-runtime contract
  • CLI success output, first-success verification, generated-app smoke tests, and public Problem recovery docs all derive from the same canonical version
  • published Astryx UI components bind the React runtime explicitly so the generated SSR smoke remains executable on the supported Node train

Verification

  • pre-push repository tests — 226/226 tasks passed
  • pre-push repository typecheck — 225/225 tasks passed
  • pnpm check
  • pnpm --filter create-croco-app test — 115/115 tests passed
  • pnpm --filter @croco/ui-astryx test — 4/4 tests passed
  • Node 22 pnpm create-croco-app:smoke -- graphql-vite-spa-astryx
  • pnpm docs:api:check
  • pnpm problem-registry:check — 440/440 codes passed
  • pnpm changeset-required:check -- --base origin/trunk --head HEAD

Review gates

  • correctness/regression: supported and unsupported Node fixtures, early no-write failure, generated-app smoke, full repository tests, and Astryx CJS/ESM SSR pass
  • API/security/compatibility/release: additive CLI result fields, stable Problem code, public registry recovery, Cloudflare/browser runtime distinction, and patch changesets for both affected packages verified
  • maintainability/minimality: one canonical version source and one generated-root writer; independent adversarial review approved all 25 changed files with no findings

Residual risk is limited to package-manager behavior around engines.node; .nvmrc, early CLI validation, and explicit recovery provide deterministic remediation.

Fixes #1320

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@kang-heewon, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 12 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 933333bc-5aee-4018-8de7-bde00730a881

📥 Commits

Reviewing files that changed from the base of the PR and between fd5f126 and 770bf9a.

⛔ Files ignored due to path filters (2)
  • packages/problems-core/src/generated/problem-code-registry.ts is excluded by !**/generated/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (29)
  • .changeset/early-pandas-use-node.md
  • .changeset/secure-jaeger-propagation.md
  • docs/problem-code-registry.json
  • examples/quick-start-lambda/README.md
  • packages/create-croco-app/package.json
  • packages/create-croco-app/src/cli-result.ts
  • packages/create-croco-app/src/generator.ts
  • packages/create-croco-app/src/libs/problems/UnsupportedNodeVersionProblem.ts
  • packages/create-croco-app/src/node-runtime.ts
  • packages/create-croco-app/src/tests/NodeRuntime.spec.ts
  • packages/create-croco-app/src/tests/cli-result.spec.ts
  • packages/create-croco-app/src/tests/e2e-generation.spec.ts
  • packages/create-croco-app/src/tests/options.spec.ts
  • packages/create-croco-app/src/verification.ts
  • packages/docs/src/content/docs/api/problems-core/src/variables/CROCO_PROBLEM_CODE_REGISTRY.md
  • packages/docs/src/content/docs/en/reference/problem-recovery-cookbook.md
  • packages/telemetry-api/package.json
  • packages/telemetry-sdk-node/package.json
  • packages/telemetry-sdk-node/src/tests/PublishedTypes.spec.ts
  • packages/ui-astryx/src/libs/AstryxAppShell.tsx
  • packages/ui-astryx/src/libs/AstryxAuthState.tsx
  • packages/ui-astryx/src/libs/AstryxProblemView.tsx
  • packages/ui-astryx/src/libs/AstryxProvider.tsx
  • pnpm-workspace.yaml
  • scripts/create-croco-app-generated-smoke.mts
  • scripts/first-success-verify.mts
  • scripts/problem-registry.mts
  • scripts/static-misuse-raw-error-allowlist.json
  • tsconfig/contract-strict.baseline.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/1320-node-runtime-contract

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions

github-actions Bot commented Jul 18, 2026

Copy link
Copy Markdown

📊 Benchmark Results

✅ All benchmarks passed

Benchmark p75 Threshold Baseline vs Baseline Status Notes
CrocoApp constructor 8.7μs 30.0ms 8.2μs +6.5% -
CrocoApp lambdaHandler (10 controllers) 268.0μs 50.0ms 258.4μs +3.7% -
Lambda cold-start simulation 432.3μs 80.0ms 418.1μs +3.4% -
Lambda cold-start with headers 382.9μs 80.0ms 369.7μs +3.6% -
Lambda cold-start with binary body 358.6μs 80.0ms 339.1μs +5.7% -
Lambda cold-start with query params 298.0μs 80.0ms 301.3μs -1.1% -
Lambda cold-start with authorizer context 296.0μs 80.0ms 299.8μs -1.3% -
Lambda cold-start realistic scenario 295.6μs 80.0ms 299.2μs -1.2% -
EventBusConfig.start (10 handlers) 1.7μs 10.0ms 1.4μs +21.6% -
EventPublisher.publishNow single event 2.0μs 2.0ms 1.7μs +18.4% -
DefaultHandlerResolver.resolve × 10 0.1μs 5.0ms 0.1μs +0.0% -
Container.get singleton (cold) 60.8μs 5.0ms 70.3μs -13.5% -
Container.register × 50 components 3.2ms 10.0ms 3.2ms -1.5% -
Container.validate (50 components) 3.6ms 20.0ms 3.4ms +6.5% -
Container.get singleton (warm) 1.6μs 500.0μs 1.6μs -1.3% -
TelemetryRuntime.init (lambda preset) 2.4μs 200.0ms 1.1ms -99.8% -
lambdaPreset config creation 1.5μs 2.0ms 1.4μs +2.1% -

Updated: 2026-07-21T21:41:58.105Z · Commit: 30e3a24

@kang-heewon
kang-heewon force-pushed the fix/1320-node-runtime-contract branch from 9b77935 to b2e3a7d Compare July 21, 2026 10:53
@kang-heewon

Copy link
Copy Markdown
Member Author

CI is currently blocked by a repository-wide dependency audit baseline failure, not by this PR's changes.

  • this run: validate stops at dependency-audit-policy with 30 blocking paths for newly reported brace-expansion, js-yaml, and axios advisories
  • latest trunk run has the same failure: https://github.com/croco-dev/framework/actions/runs/29821373334
  • because validate exits early, the required downstream docs-sync-check is skipped
  • local repository tests (226/226), typecheck (225/225), docs:api:check, and the Node 22 Astryx generated-app smoke pass

Branch protection requires both validate and docs-sync-check, including for admins, so this PR will remain unmerged until the trunk audit baseline is repaired.

@kang-heewon
kang-heewon force-pushed the fix/1320-node-runtime-contract branch from b2e3a7d to 6efd9d0 Compare July 21, 2026 19:53
@kang-heewon
kang-heewon force-pushed the fix/1320-node-runtime-contract branch from 61c6af4 to 770bf9a Compare July 21, 2026 21:33
@kang-heewon
kang-heewon merged commit 63a4f8a into trunk Jul 21, 2026
9 checks passed
@kang-heewon
kang-heewon deleted the fix/1320-node-runtime-contract branch July 21, 2026 22:28
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.

[create-croco-app] Emit and verify the Node runtime version contract

1 participant