Repository navigation
Bring runtime up to the production hosted runtime source (fdb123ea) - #1075
Merged
Merged
Conversation
callumalpass
force-pushed
the
converge/runtime-fdb123ea
branch
from
October 30, 2026 05:27
893a840 to
9f1ca55
Compare
Ports the serving changes from mdbase runtime 004c642e..fdb123ea that production hosted collections and the current app SDK run but Connect's runtime lacked: byte-bounded SQL replies, full-source unindexed Blob reads, idle backoff after cold opens, versioned store schemas, bundled KMS allowlists, escrow service-device generation, SDK cold-sync and opening-progress fixes, and their contract docs. Migration-only changes are not ported; the production migration Worker is being retired. Connect's daemon, log Worker, SDK runtime pins and local build script are kept. The native test shards now require Postgres for the store-pg schema tests instead of skipping them.
callumalpass
force-pushed
the
converge/runtime-fdb123ea
branch
from
October 30, 2026 05:59
9f1ca55 to
6c396b7
Compare
callumalpass
enabled auto-merge
October 30, 2026 06:00
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.
Brings
runtime/up to the mdbase runtime source that production hosted collections run on (fdb123ea), so the next Worker and SDK releases can be built from Connect without losing production fixes. Migration-only code is left out on purpose: the production migration Worker is being retired, and Connect main's existing migration code will be deleted with it.Do not merge until the beta.148 release Worker build has run (main is frozen for it). A second PR stacked on this one brings the remaining serving fixes (
fdb123ea..f9da6acd).Merge base
origin/mainat9d8037993(#1078 on top of #1079). Source range: mdbase runtime004c642e..fdb123ea, the commits since the last runtime update in Connect.What this ports
file-content-profile) inwire.cddl, the replica client API, snapshot and overview notes, the oversized Markdown bootstrap memory and unindexed Blob read custody contracts, therecord_cbackfill wasm smoke, and the release feature denylist (staging,local-rehearsal).Not ported: migration-only code
Retirement of the production migration Worker was chosen (plan reviewed 2026-10-30), so migration-only changes are not ported. That covers
crates/hosted-worker/src/migration*,crates/migrate,crates/migrate-portable,deploy/hosted-worker/src/migration-*,src/legacy-source, the migration tests, fixtures and SQL, and the migration paths inside the shared files (worker.ts,engine.ts,control.ts,log.ts,abi.rs,lib.rs,replica/gen0.rs). These paths stay exactly as on Connect main. The serving changes in those shared files were replayed onto Connect main's versions, commit by commit.Kept from Connect
crates/daemon: unchanged. Connect's daemon (mirror import, rollout and trust work, Embed the reviewed production trust asset in the production daemon #946) is the shipped one. chore(deps): bump the npm-production group across 1 directory with 22 updates #897 (staging/production daemon trust embedding) is replaced by Connect's own trust work; staging daemon trust is on the follow-up list.deploy/cloudflare-do(log Worker): unchanged. Connect's already has Retire legacy TaskNotes reminders on native reconciliation #959's any-origin browser reads and the Port wildcard log CORS; ignore LOGSVC_CORS_ORIGINS #1037 port.runtime-methods.json,asset-pins.json), application asset loading and the local build script: Connect's. The local build keeps Connect'sruntime-local.wasmselector and output pair; a new positive test builds a local application end to end and checks both.deny.toml: Connect's advisory policy.Not ported: release tooling
mdbase-next release tooling (workflows, Worker publication, SDK packaging handoff scripts, release docs) is not ported; Connect has its own release path.
SDK size ceiling
The root
sdkbundle measures 197.1 KiB gzip here, against the 197 KiB ceiling. The growth is the ported Viewer grants, explicit-choice hold UI, bounded cold first sync and content-free opening progress, and nothing in it can be trimmed without dropping a ported fix, so the ceiling goes to 199 KiB. The stacked PR takes it back down to 176 KiB: #975 there loads the UI session runtime on activation, and the bundle drops to 173.4 KiB.Measurement scripts
packages/sdk/scripts/unindexed-client-read-browser.mjsandunindexed-client-read-heap.mjsstay manual. They measure memory for one canonical 8 MiB Blob read against a production runtime and its signed manifest that the caller builds and supplies, in a Playwright-driven Chromium, and write a report. They aren't pass/fail regression tests, and runtime CI has neither the browser nor a production runtime build to give them. The bounds they measured are recorded indocs/contracts/unindexed-blob-read-custody.mdandoversized-markdown-bootstrap-memory.md.CI for the new store-schema suites
#1078's native test shards already run every runtime crate's tests, including platform-native
sql_schema::(versioned SQLite schema and reindex on open) and store-pgschema_version::(the downgrade guard), with a Postgres 17 service andMDBN_TEST_PG_URLset. This PR addsMDBN_TEST_PG_REQUIREDto that step, so the store-pg schema tests fail instead of skipping if the URL goes missing.Changes since the
893a8409reviewbuild-local-application.mjs(selector and output bothruntime-local.wasm), and added a positive test inlocal-application-build.test.tsthat builds a local application from a temporary stack and runs its packaging step. It fails on893a8409and passes now.file-content-profileare inwire.cddlalongside Connect's API 1.3 additions, with the matching contract docs.check-wire-cddl.shmatchesclient/file-view-*fixtures, and the full CDDL check passes with all five file-view fixtures validating. The other runtime docs and scripts the first coverage pass had misfiled as release tooling are ported too (contract docs,app-wasm-smoke.mjs, the release feature denylist).Cargo.lock: restored to main; the earlier head carried a stalemdbn-migrate→mdbn-hosted-workeredge that broke--lockedbuilds.deploy/hosted-worker/test/log.test.mjs: back to main plus Portal: one searchable collection consent picker #904'sreadsassertions (the Release collection directory handles after runtime shutdown #908 tests there were migration-only).crates/hosted-worker/tests/log_cache_originals.rsgains thePRAGMA user_versionmock the schema floor needs.Known flaky tests (also on main)
test/legacy-source-bridge-workerd.test.mjs: composition tests fail under parallel load. Main53260ccdefails 8 to 10 of them per run with four suites in parallel; they pass run alone.test/app-http-log-network.test.ts, "actual loopback HTTP object transfer…": intermittent; failed in 2 of 3 runs on main.Follow-up
asset-pins.json), built from this merge commit (the Advance native staging Editor to merged main c40447e9 #939 pattern).Checks
cargo check --locked --workspace --tests: clean.crates/hosted-workerwasm builds with--locked.cargo test --workspace --no-fail-fast(excluding the unchanged daemon): passes (the two platform-native Bases fixtures that failed on main are fixed by Make native runtime tests block merge qualification #1078, which this is based on).sql_schema::7 passed, 1 ignored.schema_version::compiles and runs, but skips locally (no Postgres on the remote builder); CI runs it against Postgres.scripts/check-wire-cddl.sh: passes.public-api.txt(the only change is thecollection_not_yet_migratedoutcome); size 197.1 / 199 KiB. Tests pass exceptwasm-runtime.test, which needscargo xtask wasm(CI runs it), and the known loopback flake.hosted.wasm: 788 passed, 18 skipped (real Postgres; CI runs them); the only failures are the known legacy-source bridge flake.Per-commit coverage (
004c642e..fdb123ea)"Serving parts ported; migration parts left out" means every line from the commit that survives in
fdb123eais in this tree, except lines in migration-only code.ea4637a431b86dc73e5f49ea6a1b0e569bc110bbcb5a3afc7b3665a6464308717f4ab641c22cb642d194ac11bd96641f920b2d162fe5localBuildexport22704e9abattest-log-worker.mjsexports only serve mdbase-next’s Worker publisher)135c08130d0f84194e32a35bb7e89cb6ba08a5757dd3fcollection-mode-devicekeye5d2b87b10413be783b29f1a6ce66b24935374f32cf0ce9aad3e619cc94eb6dfe446894fdeny.tomladvisory policy keptab9c7d4d80e44e1e10192809d0e6120bcdc9ddff6d81585de89626f705122dca350db1ca52912e66c0fabaf205bd131b16cf5ede226dd54e4a861f6c91b7243b849b15ecc492f3f3f9b90e9ce18f32bd5a37fa321773e31779086ec021f604cc036746cae8e5eb7nativePendingargumentb1710dcf92cf0a920717033e7cad64ca522aff190f963330183cc4file-view-*as a globe488e0874725d72b2e05c987406f7a100b8b4000dfb92bc21d76b2a3023aee31eccc064awrangler.jsonccomments are migration-only70f09d9e1eaa4e697f991043dbbdb21c15732923b3519fadddd5ee67e2afc1bae3e738839598d138d82647c4936f8e1824c377790c590356a99c1bfdc26e382b88ffeb6483db20daa79868b82e76d7e66e3c3a50a81fdb123eac