The one genuinely-new GF base primitive from the off-machine-web-dev investigation
Serve Vite's per-module transforms from the shared Bazel CAS — content-addressable at module granularity — so cold-start and the cold native-ESM page-load waterfall become CAS-read fan-outs instead of recomputation. This is REAPI-adjacent (module granularity, not process), and it is the one thing Codespaces/Gitpod structurally cannot copy (they cache image layers, not per-module transforms in a cross-tenant content-addressed store fed by the whole build fabric).
Context
The 2026-07-05 "off-machine cache-first web dev on GF" investigation (6 research lanes → opus synthesis → adversarial critic) decomposed the goal into three lanes:
- Feature A — web build/test on REAPI (
//app:build, //app:unit_tests, browser-RBE on pinned Chromium 138 already proved): enrollment breadth, not new.
- Feature B — remote dev session (
vite dev on a honey pod, HMR tunneled): a second control plane; vite dev as a REAPI action is a category error (structurally: no inbound port, no stdin, bounded timeout, terminal content-addressed output only). As scoped it's a worse Codespaces.
- Feature C (this) — content-addressed dev-transform cache: the genuinely-new base primitive the adversarial pass caught the synthesis naming and then discarding.
The idea
A Vite per-module transform is a pure function of (module source bytes, resolved config, plugin/dep versions) → content-addressable. A cold page load is hundreds of such pure requests. So the dev server becomes a thin front-end over a content-addressed transform store that every pod, developer, and CI build populates and shares from the CAS.
Probe-first (do NOT build a pod first)
One Vite plugin, ~1–2 weeks, no new REAPI capability, no tunnel: key each cold-load module transform by hash(source + config + deps); write outputs to the CAS on run 1; serve run 2 on a fresh pod by CAS-read. Measure: transform CAS-hit-rate, cold time-to-interactive (recompute vs CAS-read fan-out), read cost vs local recompute. Plus a half-day churning-branch kill-test (warm-incremental hit collapse).
- High hit-rate + material TTI drop → real base primitive; graduate it.
- Low hit-rate OR CAS-read no faster than local recompute → kill it, honestly rescope to "cache-first CI + tailnet-local sessions."
Scoping & honesty
Tracked separately from config/rbe-target-eligibility.json (Feature A) and the remote-session lane (Feature B) — a dev-transform cache is not a remote-executable target class. The probe is a client-side plugin talking to the CAS API; a serving integration inside gf-reapi-cell crosses the cell/CAS ownership boundary and needs coordination. Honest asterisk: the exec substrate is still a v0 local-disk proof cell — durable CAS + multi-tenant RBE are open gates.
Tracking
Doctrine: REAPI for everything that terminates and caches; a session for the one thing that stays alive; and serve the transforms from the CAS.
The one genuinely-new GF base primitive from the off-machine-web-dev investigation
Serve Vite's per-module transforms from the shared Bazel CAS — content-addressable at module granularity — so cold-start and the cold native-ESM page-load waterfall become CAS-read fan-outs instead of recomputation. This is REAPI-adjacent (module granularity, not process), and it is the one thing Codespaces/Gitpod structurally cannot copy (they cache image layers, not per-module transforms in a cross-tenant content-addressed store fed by the whole build fabric).
Context
The 2026-07-05 "off-machine cache-first web dev on GF" investigation (6 research lanes → opus synthesis → adversarial critic) decomposed the goal into three lanes:
//app:build,//app:unit_tests, browser-RBE on pinned Chromium 138 already proved): enrollment breadth, not new.vite devon a honey pod, HMR tunneled): a second control plane;vite devas a REAPI action is a category error (structurally: no inbound port, no stdin, bounded timeout, terminal content-addressed output only). As scoped it's a worse Codespaces.The idea
A Vite per-module transform is a pure function of (module source bytes, resolved config, plugin/dep versions) → content-addressable. A cold page load is hundreds of such pure requests. So the dev server becomes a thin front-end over a content-addressed transform store that every pod, developer, and CI build populates and shares from the CAS.
Probe-first (do NOT build a pod first)
One Vite plugin, ~1–2 weeks, no new REAPI capability, no tunnel: key each cold-load module transform by
hash(source + config + deps); write outputs to the CAS on run 1; serve run 2 on a fresh pod by CAS-read. Measure: transform CAS-hit-rate, cold time-to-interactive (recompute vs CAS-read fan-out), read cost vs local recompute. Plus a half-day churning-branch kill-test (warm-incremental hit collapse).Scoping & honesty
Tracked separately from
config/rbe-target-eligibility.json(Feature A) and the remote-session lane (Feature B) — a dev-transform cache is not a remote-executable target class. The probe is a client-side plugin talking to the CAS API; a serving integration insidegf-reapi-cellcrosses the cell/CAS ownership boundary and needs coordination. Honest asterisk: the exec substrate is still a v0 local-disk proof cell — durable CAS + multi-tenant RBE are open gates.Tracking
Doctrine: REAPI for everything that terminates and caches; a session for the one thing that stays alive; and serve the transforms from the CAS.