backlog: recut shadow assets around owner-managed readiness#142
Open
vanilla-wave wants to merge 5 commits into
Open
backlog: recut shadow assets around owner-managed readiness#142vanilla-wave wants to merge 5 commits into
vanilla-wave wants to merge 5 commits into
Conversation
… batch closure, alias retirement, capsule selective CI)
|
Netlify preview: https://pr-142--rifty-playground.netlify.app |
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.
Docs-only architectural recut of shadow-substitution delivery: ADR-0249,
ADR-0266, one ready epic, and seven implementation items.
Review changes applied
capabilityPortsinto its own ready item and ADR.npm-client/shadow-asset-storeis blocked by it; kernel owns only validation,exact-once transfer, pre-entry publication, rollback, and child-end cleanup.
13,918,738-byte esbuild member; this is extracted member size, not wire bytes.
ADR-0201 bounds bytes/no-progress, not total seconds. The store item owns the
real-Chromium STD row; Eddy may only add a matched row.
main: ADR-0258 provenance, ADR-0261's stampauthorities/root-bound claim, and ADR-0231's current esbuild URL bootstrap.
The plan now specifies v4 lockfile identity, a post-tree partial outcome,
trusted/snapshot asset hooks, and removal of
RIFTY_ESBUILD_WASM_URL.and private roots; colliding legacy inputs cannot read, clear, or delete one
another's data.
backlog/ADR diff are the source of truth.
Outcome
Applied substitutions declare exact integrity-pinned runtime assets. One
workspace-owner
ShadowAssetManagerfetches, verifies, persists, receipts, andserves them.
npm installcannot report success until the exact applied set isready for its honest storage class; child Workers never own fetch state or read
private store paths.
This separates delivery from package-specific runtime adaptation. Moving
esbuild.wasmout of the app bundle does not claim generic Sass/SWC/sharp ABI orlifecycle compatibility.
Dependency graph
kernel/worker-capability-ports— opaque namedMessagePortbootstrap, failure-atomic lifecycle (ADR-0266).
npm-client/shadow-asset-store— exact applied set,owner manager, private receipts, STD transport, v4 claim integration, cold
benchmark, remove bundled wasm URL (ADR-0249).
npm-client/eddy-batch-asset-closure— one exactmissing-set closure, learned-pin fast path, STD fallback, matched benchmark.
proof and honest lockfile provenance.
derived-runtime capsule exists.
local runtime-adapter code; ADR required before ready.
Platform contracts
cancellation, progress, terminal errors, and owner peer cleanup stay in
npm-client/Playground.
ShadowAssetManagerPortstays small:ensure,readVerified,inspectReceipt; UI administration has a separate inspect/clear port.guest VFS plus a private-store capability at
/.rifty-private/workspaces/<workspaceStorageKey>/shadow-assets/v1/. Theexact same injective key scopes the guest root; raw FsSync never escapes to
guests or ordinary
OwnerVfsAuthority.immutable receipt → acknowledged ready pointer last. No OPFS rename-atomicity
assumption.
opfs-persisted,opfs-best-effort, ormemory-session.persistedAfteris threaded from page boot; it is never inferred from OPFS.treeResult, lets the existing acquisition/stamp authorities promote theindependently valid tree, then exits nonzero as “tree ready, asset failed”.
lockfileSha256; fresh, trusted, and snapshot paths re-prove exactlockfile bytes and run the same planner/ensure before runtime.
STD/Eddy/cache provenance lives in receipt/error and never relabels lossy
InstallResult.source.User-visible behavior
cache-check → fetch → verify → persist → ready; exit 0 followsthe readiness receipt, never a background start.
Best-effort/session warnings, structured failure fields, quota usage, and the
acknowledged “Clear workspace asset cache” recovery stay visible.
Best-effort OPFS warns and claims reload only while origin storage remains;
memory is session-only.
With both stores empty and network unavailable, failure is bounded by the
configured retry/no-progress contract, named, and actionable.
bytes. No update, quota path, or project deletion silently garbage-collects
workspace assets.
Cold benchmark contract
shadowAssetColdFillMs.standarduses one discarded server/proxy warm-up and fivefresh Chromium contexts. Every sample proves empty asset/tarball caches, STD
transport, one set digest/receipt, and one storage class. It measures aggregate
cache-checkthrough acknowledged/flushedready, excluding tree install andVite boot. The artifact records samples/median, phase-local protocol evidence,
memberBytes=13918738, decoded packument/tarball response-body bytes, clientcache coldness, discarded-run origin warming, registry, and HTTP mode. Missing,
mixed, partial, cache-hit, or fallback proof is
unmeasured; no partial median.Verification
pnpm docs:checkgit diff --checkpnpm pr:checkon the final committed SHAImplementation PRs must provide Contract+RED, then Final+GREEN proof for the
ready item they implement, including each fault-matrix row and the real browser
acceptance path.