apps/web moves to its own TanStack Start + Void + Vite+
Worker on Cloudflare. apps/web now has a separately scheduled Web 1 candidate; all existing Web routes remain on Next.js.
The retired apps/tanstack-web tree is not part of this program and is not
revived. Current hosting (Vercel, or Next.js/OpenNext Workers) stays canonical
for an app until its explicit cutover PR merges.
Mastermind build artifact delivery
mastermind-cloudflare.yaml builds the native Worker on GitHub and uploads
mastermind-cutover-<source SHA> with mastermind-native.tar.gz. The app-owned
job requires emitted-runtime smoke after uploading and has no publication steps. The archive contains the emitted Worker,
assets, Wrangler config, deployment pointer and exact-source hash receipt.
Discover its config with scripts/ci/mastermind-native-artifact.py config after
restoring the archive with that helper’s restore command. Set
MASTERMIND_SOURCE_SHA to the artifact’s full source SHA for either operation.
This build-only delivery does not admit production publication. Mastermind’s
security review and owner-only authentication remain in force. The release
operator must preserve the canonical host’s Access policy and capture the
existing route and immutable rollback target before switching it. Auth/data
adapter changes belong in separate PRs from build wiring.
Web candidate pre-publication requirements
Before publishing the separate Web 1 staging profile, verify that its Worker and staging Next origin share a staging-onlyTRUSTED_PROXY_ORIGIN_SECRET that is distinct from production’s. Origin-IP
proofs are not bound to an environment or audience. Compare SHA-256 fingerprints
privately through the approved secret store before publication and after either
key rotates; equal or unavailable fingerprints hold publication. Keep only the
verification receipt in private release evidence. The candidate has no configured
production fingerprint, so runtime admission does not enforce this distinction.
Verify the exact upstream’s Vercel team, project and immutable deployment ID
before forwarding credentials or proofs. The tuturuuu-*.vercel.app hostname
prefix is not bound to our Vercel team. The required staging Supabase identity
attestation fails closed after forwarding, and does not replace that ownership
check. These requirements must land before staging is published; source approval
alone does not authorize publication or provisioning.
Staging workflow protection preflight
The Web staging publisher and reusable native staging publisher runscripts/ci/wave1-staging-preflight.mjs before any job references a deployment
environment or provider secret. The preflight checks both
wave1-web-next-staging and wave1-web-staging for Web, or
wave1-<app>-staging for a native app. Each environment must already exist,
have required reviewers, and allow only the exact main branch through a custom
branch policy. Tags, wildcard patterns, additional policies, missing fields and
API errors refuse the run. The preflight never creates environments.
Repository WAVE1_STAGING_PUBLISH_ENABLED must equal the string true.
Web also requires a nonempty WEB_STAGING_NEXT_ADMISSION; native publication
requires a nonempty WAVE1_STAGING_PUBLICATION_ADMISSION. Existing admission
checks still validate the exact source and artifact. Empty or unset variables
refuse publication before a protected job starts.
The preflight uses only the automatic GitHub token, with actions: read for
the environment API and contents: read for checkout. Provisioning or changing
protection remains the release owner’s responsibility. Protection is checked at
run admission; owners must preserve it throughout the run.
Verify this gate with
node --test scripts/ci/wave1-staging-preflight.test.mjs. Mocked API tests cover
missing environments, reviewers and branch restrictions; workflow tests enforce
the transitive dependency on preflight for every protected or secret-bearing job.
Ownership
- One integration writer per app. Only that lane edits the app’s runtime, Worker entry, Vite/Void config and owning workflow. Other lanes hand changes to it.
next/*only through@tuturuuu/start-bridge. App source keeps its App Router modules; the Vite preset aliasesnext/*to the bridge. Do not copy shims into the app. If the bridge lacks something, extend the package (additive within its frozen v0 contract) rather than forking it locally.- Registries are generated.
start-bridge-routes checkruns in the app’s CI and fails on anyroute.*/page.*that is not generated, owned by named native code, or ignored with a reason. - Domain libraries stay framework-independent. Inject request identity, storage, navigation and localization at the adapter.
Request-scoped satellite authentication
@tuturuuu/satellite/auth-request exposes the shared satellite session and
profile helpers without importing Next request globals. Native adapters pass the
current request, the registered targetApp, and a request-bound
getSupabaseSessionUser callback. That callback must use the existing verified
Supabase session resolver; a caller-provided actor ID is not authentication.
App-session verification retains its target scope and takes precedence over the
Supabase fallback for session and user reads. Profile reads retain the existing
central API forwarding and fallback behavior.
Next callers keep @tuturuuu/satellite/auth, which obtains headers and the
Supabase resolver from the Next adapter. The shared Start preset already owns
the Next aliases, RSC/SSR ports and mount handling; apps should reuse those
ports rather than create alternate identity or navigation implementations.
packages/satellite/src/auth-request.test.ts covers explicit request/target
forwarding, rejected identities, profile fallback and interleaved requests;
auth.test.ts covers the Next adapter.
Provider requests that forbid redirects
Workers supportsredirect: 'manual' and redirect: 'follow'. The Fetch-standard
redirect: 'error' mode throws before dispatch on Workers. For credential-bearing
provider requests that must not follow redirects, use manual and reject
opaqueredirect and every 3xx before reading a response body or refreshing
credentials. Do not forward Location or retry a redirected mutation.
Calendar’s Graph sync transport retains its single-attempt cancellation budget.
Mail’s provider transport permits only its existing GET-on-401 credential refresh;
its OAuth token/profile and SNS certificate readers require a direct successful
response. Focused tests cover direct success, redirect and opaque-response denial,
and the existing retry limits. Verify the transport in local workerd with synthetic
identity boundaries and an outbound interceptor; record every attempted host and
require that a redirect never reaches its destination. Provider and production
acceptance remain separate from this local check. See the
Workers Request reference.
basePath readiness
Each app must serve both its subdomain andtuturuuu.com/<app> from the same
source. tuturuuu.com/<app> is the app root; product marketing moves to
/products/<app>. Build with TUTURUUU_BASE_PATH=/<app> to produce the
path-mounted variant. The bridge supplies the asset base, server-function base,
router basepath, Location rewriting, base-aware links and auth return URLs.
Under a base, every app uses the one shared tuturuuu.com root session,
with no per-app cookie names or paths (user decisions of 2026-10-25 and
2026-10-26: one session for every app, held server-side in an HttpOnly
cookie). Mounted apps read that session and derive their per-app claims in
memory; they never write or clear tuturuuu_app_session* or Supabase session
cookies (the mounted no-writer guard).
Users who already hold the root session stay signed in at cutover; only users
without one sign in once on the apex. There is no cross-host token handoff from
the subdomain. Subdomain hosts keep their host-only app-session cookies until
they only redirect.
Gates before cutover
An app is cutover-ready only with all of the following for the exact commit:- Exact-commit CI green: unit tests, type-check, lint, the registry check, a
real
vp build, and the app’s owning native workflow. - Sealed emitted-Worker acceptance: the built artifact is hashed, its emitted config is validated, the emitted runtime suite passes, and a fresh restore of the same archive passes the same suite with unchanged bytes.
- Staging acceptance on the owner-provisioned staging Worker: authentication
and session refresh, MFA, workspace permissions, bilingual hydration, the
app’s primary flows, and both the subdomain and
/<app>mounts. - A rollback record: the immutable prior deployment (artifact or deployment ID) and the captured routing (routes, custom domains and DNS records) that cutover replaces.
Held publication and cutover
Production publication stays held per app inproductionPublicationPolicy
(tuturuuu.ci.ts) until an explicit cutover PR admits that app. Deleting a
hold never admits publication. A cutover PR names the exact artifact, the
routing change and the rollback record, and merges only with the gates above.
Approvals:
- DNS, zone, canonical-route and staging-provider changes need release-authority approval.
- Database migrations need explicit user approval. The bridge itself needs none.
Direct cutover
Every app, including Tasks, Contacts and Finance, cuts over directly once the gates above pass. There are no staged canaries or traffic percentages. Before the flip, prepare and record an instant one-step rollback:- the immutable prior deployment (the current Vercel deployment ID, or the prior Worker version), confirmed still serving;
- the captured routing it replaces (routes, custom domains, DNS records and any zone rules), with the exact command or API call that restores it;
- who executes the rollback during the watch.
-
Run the post-deploy smoke within minutes: sign-in and session refresh,
the app’s primary flows, both the subdomain and
/<app>mounts, and a check that responses carryx-tuturuuu-runtime: native. -
Watch for 30–60 minutes. Roll back immediately, without waiting for a
diagnosis, on any regression:
- File a cutover report: the exact artifact and commit, the routing change, smoke and watch results with the baselines used, and either the confirmed cutover or the rollback with its cause.
Rollback
Rolling back an app restores the captured routing to the immutable prior deployment in one step. Never delete the prior deployment or its routing record until the native runtime has served all traffic through a full release cycle.Rewise anonymous smoke diagnostics
Rewise’s centralized auth proxy handles signed-out/ before its native page.
The redirect targets https://tuturuuu.com/login with an app-session returnUrl
pointing to /verify-token?nextUrl=... on the Rewise origin. The native /login
page instead supplies the Rewise root as its return target. Check the full return
target as well as the login origin and path; retain unknown-host, apex-host,
missing-secret and outbound-isolation probes.
The Rewise server-artifact scanner permits original process.env.NODE_ENV
branches in validated v3 source maps. Executable files still reject that text,
and both raw and JSON-decoded source maps reject development-secret prefixes.
Run node --test apps/rewise/cloudflare/server-artifact-scan.test.mjs apps/rewise/cloudflare/central-login-redirect.test.mjs for the build-free
regressions. These fixtures do not replace the emitted-Worker smoke gate.