Repository navigation
fix(hosting,core,create-blocks-app): refuse SvelteKit 3 before the build runs - #1713
Draft
osama-rizk wants to merge 1 commit into
Draft
osama-rizk wants to merge 1 commit into
osama-rizk wants to merge 1 commit into
Conversation
…ild runs Hosting supports SvelteKit 2 only. Synth used to run the app's buildCommand first and only then refuse SvelteKit 3 in the adapter. Hosting now runs the adapter's build-free version check (assertFrameworkSupported) before buildCommand, the error names the SvelteKit 2 versions to pin, and create-blocks-app stops before it writes anything in a SvelteKit 3 project. The Hosting README states the supported range.
osama-rizk
temporarily deployed
to
agent-bench
November 20, 2026 11:29 — with
GitHub Actions
Inactive
osama-rizk
temporarily deployed
to
agent-bench
November 20, 2026 11:29 — with
GitHub Actions
Inactive
osama-rizk
temporarily deployed
to
agent-bench
November 20, 2026 11:29 — with
GitHub Actions
Inactive
osama-rizk
temporarily deployed
to
agent-bench
November 20, 2026 11:29 — with
GitHub Actions
Inactive
osama-rizk
temporarily deployed
to
agent-bench
November 20, 2026 11:29 — with
GitHub Actions
Inactive
osama-rizk
temporarily deployed
to
agent-bench
November 20, 2026 11:29 — with
GitHub Actions
Inactive
osama-rizk
temporarily deployed
to
agent-bench
November 20, 2026 11:29 — with
GitHub Actions
Inactive
osama-rizk
temporarily deployed
to
agent-bench
November 20, 2026 11:29 — with
GitHub Actions
Inactive
osama-rizk
temporarily deployed
to
agent-bench
November 20, 2026 11:29 — with
GitHub Actions
Inactive
osama-rizk
temporarily deployed
to
agent-bench
November 20, 2026 11:29 — with
GitHub Actions
Inactive
| assert.strictEqual(result.exitCode, 1, result.stdout); | ||
| assert.match(result.stderr, /SvelteKit 3 is not supported yet/); | ||
| assert.ok(result.stderr.includes('@sveltejs/kit@^2 @sveltejs/adapter-node@^5 @sveltejs/vite-plugin-svelte@^5 vite@^6'), result.stderr); | ||
| assert.ok(result.stderr.includes('https://github.com/aws/cdk-blocks/issues/984'), result.stderr); |
osama-rizk
temporarily deployed
to
agent-bench
November 20, 2026 12:19 — with
GitHub Actions
Inactive
Contributor
📖 Glossary & notes — scoring, indicators, per-metric thresholds (click to expand)
Results — PR vs
|
| Task | Template | Tests | Judge | Cost | Turns | Score | Stop reason |
|---|---|---|---|---|---|---|---|
| async-word-counter | bare | ✅ 13/13 (0) | ✅ 9.4 (0) | ✨ $3.69 (-$4.13) | ✨ 18 (-16) | ✨ 26.4 (+13.9) | endTurn |
| auth-notes | demo | ✅ 11/11 (0) | ✨ $24.68 (-$11.88) | ✅ 67 (-2) | ✅ 3.9 (+1.2) | endTurn | |
| cognito-profile | auth | ✅ 10/10 (0) | ✅ 8.4 (+0.2) | ✨ $17.53 (-$16.56) | ✨ 51 (-25) | ✅ 5.3 (+2.6) | endTurn |
| collab-presence-board | default | ✅ 11/11 (0) | ✨ 9.6 (+0.6) | ❌ $13.27 (+$7.07) | ❌ 50 (+20) | endTurn | |
| email-digest | demo | ✅ 12/12 (0) | ✅ 9.4 (+0.2) | ✨ $3.36 (-$2.3) | ✨ 20 (-4) | ✨ 29.1 (+12) | endTurn |
| file-gallery | bare | ✅ 12/12 (0) | ✅ 9.6 (+0.2) | ✅ $2.81 (+$0.25) | ✅ 13 (+1) | ✅ 35.1 (-3.1) | endTurn |
| kb-chat-agent | demo | ✅ 9/9 (0) | ✅ 9.2 (+0.2) | ✨ $29.61 (-$13.93) | ✨ 59 (-20) | ✅ 3.3 (+1.1) | endTurn |
| observability-api | backend | ✅ 18/18 (0) | ✨ $4.26 (-$1.16) | ✨ 20 (-12) | ✅ 22.3 (+4.3) | endTurn | |
| oidc-dsql-notes | react | ✅ 2/11 (0) | ❌ 6.6 (-1.8) | ✨ $24.73 (-$14.84) | ✨ 54 (-24) | ✅ 1.2 (+0.3) | endTurn |
| sql-kb-catalog | nextjs | ✅ 9/9 (0) | ❌ $32.53 (+$18.02) | ❌ 81 (+38) | ✅ 3 (-3.7) | endTurn |
Merge verdict
✅ This bench run does not block the PR.
- ✅ Absolute floor — mean composite 90.1 >= floor 65.
- ✅ Regression vs
main— mean composite delta -0.5 pts vs main is within the 10-pt limit.
The Δ vs base ball above is a fixed ±5-pt display band; the regression gate uses BENCH_MAX_REGRESSION. The ball is cosmetic — the gate threshold is what blocks.
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A project scaffolded with
npx sv createtoday uses SvelteKit 3 (@sveltejs/kit ^3, Vite 8, config invite.config.ts). Hosting supports SvelteKit 2 only (>=2.0.0 <3.0.0), but nothing said so up front:Hostingran the app'sbuildCommandfirst, and only then did the SvelteKit adapter refuse the project withUnsupportedSvelteKitVersionError, so the user waited for a full build that was then rejected.create-blocks-app .added the backend to a SvelteKit 3 project without a word, leaving a project that could not deploy.Full SvelteKit 3 support stays with #984. This change makes the limit visible and fail fast.
Changes
@aws-cdk-blocks/hosting: newassertFrameworkSupported(framework, projectDir)in@aws-cdk-blocks/hosting/adapters. It runs a built-in adapter's build-free checks and writes nothing; today that is the SvelteKit version check (unknown frameworks and frameworks without a check pass through). The SvelteKit 3 error now readsSvelteKit 3.x is not supported yet: Hosting supports SvelteKit 2 (>=2.0.0 <3.0.0), and its resolution names@sveltejs/kit@^2 @sveltejs/adapter-node@^5 @sveltejs/vite-plugin-svelte@^5 vite@^6, the config insvelte.config.js, and Migrate test apps and templates to Vite 8, SvelteKit 3 and TypeScript 6 #984. The SvelteKit 1 message is unchanged.@aws-cdk-blocks/core:HostingcallsassertFrameworkSupportedright after it resolves the framework, beforebuildCommand. AcustomAdapterskips it (it owns its own checks).@aws-cdk-blocks/create-blocks-app: add-to-existing mode stops before it writes anything when the project's@sveltejs/kitis major 3 or later (the installed version whennode_moduleshas it, else the lowest version of thepackage.jsonrange; a range with no version such aslatestpasses through to the synth check). It prints the versions to pin and exits 1. It refuses rather than warns because that is how the CLI treats the other "this can't work" cases in this mode (an npm workspace that doesn't listcdk-blocks/, an existingcdk-blocks/): stop, say why, write nothing.UnsupportedSvelteKitVersionErrorrow in the Hosting README, the range on thesveltekitAdapterrow, a sentence in the core README on the check beforebuildCommand, and a paragraph in the create-blocks-app README.Behaviour change: a SvelteKit 3 (or not-installed SvelteKit) project now fails at the start of synth instead of after
buildCommand; the error is the sameUnsupportedSvelteKitVersionError.create-blocks-app .now exits 1 in a SvelteKit 3 project where it used to scaffold.Testing
Red first, on origin/main:
packages/coreHosting — unsupported framework version: 2 failing (buildCommand should not run; the log showsBuilding frontend (sveltekit)before the refusal).packages/hostingassertFrameworkSupported(no such export) andtells a SvelteKit 3 user which versions to pin: failing.packages/create-blocks-apprefuses an existing SvelteKit 3 project before it writes anythingandreads the installed SvelteKit version over the package.json range: 2 failing (exit 0, backend written).Green:
packages/hostingnpm test: 1878/1878 pass.packages/corenpm test: 3308 pass, 0 fail (2 skipped).packages/create-blocks-appnpm test: 406/407 pass. The one failure,refuses to scaffold into an npm workspace that does not list the app's cdk-blocks/ folder, is the fresh-project path on macOS (/private/vartemp dirs) and fails the same way without this change; CI on Linux must cover it.npm run build,npm run lint,npm run lint:deps,npm run check:api(no API report change).npx sv@latest createproject (@sveltejs/kit3.4.0, with@sveltejs/adapter-node): synth on origin/main rannpm run build(about 2 s) and then refused; with this change it refuses in 2 ms and nobuild/is written.create-blocks-app . --yesin the same project exits 1 with the pin instructions, and the directory listing andpackage.jsonare unchanged.CI must cover: the full unit suites on Linux (including the create-blocks-app workspace test above) and e2e.
Overlap: will conflict with #1674 (
packages/hosting/README.md, both add text before "SSR compute";sveltekit.tsandsveltekit.test.tsauto-merge) and with #1669 (packages/core/README.md, thebuildCommandparagraph;core/src/hosting.ts,create-blocks-app/src/index.tsand its README auto-merge). Merges cleanly with #1680.Deployed verification
Redeployed an existing SvelteKit 2.70 test app (
@sveltejs/adapter-node5, Vite 6, CloudFront door, Lambda Web Functions compute, productionnpm run deploy) with packages packed from this branch. The deploy completed (43 resources) and the new build was confirmed live. A Playwright run against it (sign-up, sign-in, board create/move/delete, realtime updates between two browsers, attachments, SSR page) passed 37/37 with no failed requests, so SvelteKit 2 still deploys.SvelteKit 3 was verified at synth level only (see Testing): the refusal happens before any build or AWS call.