feat(assets): address packs by content and resolve them through a manifest - #750
Conversation
…fied bytes out of the cache
…of the build tarball
|
You have reached your Codex usage limits. You can see your limits in the Codex usage dashboard. |
Bundle ReportChanges will increase total bundle size by 49.68kB (0.15%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: exo-full-iife-min-Exo-iifeAssets Changed:
view changes for bundle: exo-esm-esmAssets Changed:
Files in
view changes for bundle: exo-iife-Exo-iifeAssets Changed:
Files in
view changes for bundle: exo-esm-modules-esmAssets Changed:
Files in
Files in
Files in
Files in
Files in
Files in
Files in
Files in
view changes for bundle: exo-iife-min-Exo-iifeAssets Changed:
Files in
view changes for bundle: exo-full-iife-Exo-iifeAssets Changed:
|
Stage three of the
.exoablock container: content-addressed pack names and a manifest, which turns "only changed blocks are fetched" into something that can be shipped. The container format is unchanged.A pack is written as
<name>.<first 16 hex of its SHA-256>.exoa, so its URL changes exactly when its bytes do and the file can be served with immutable caching. The manifest is the one mutable URL: a small JSON document listing each pack under its logical name with its file, full hash, byte length, block count and the entries it carries, plus its own version, which is refused rather than migrated when it is not the one this build reads.exo assets pack <description> --manifest <path>writes the pack under its content-addressed name and creates or merges the manifest atomically (temp file and rename); superseded pack files are kept for deploys still serving them. At runtimeAssetManifest.open(url)orLoader.loadManifest(url)fetches the manifest without HTTP caching, andloadContaineraccepts aManifestPack; through the block store, keyed by block hash, a re-pack with one changed asset fetches the head and the changed block and serves the rest from the store, which the test asserts over the wire.Verification: the whole-file path checks the digest before anything is cached, so a truncated download is never persisted under the content-addressed key; the block path holds no whole file and checks the length. Pack containment is decided on the resolved URL, so
%2e%2ecannot escape the manifest's directory; a__proto__pack name is data; transport failures areAssetNetworkErroron both paths and shape failuresAssetDecodeError. In development the loader warns when a pack is served whole instead of by range, naming the reason (no206, or a content-encoded response whose offsets address the encoded stream).Design note in
.workspace/specs; guide section, API reference and the CLI README updated. The@codexo/exojs-buildtarball bound moves to 40 KiB with its guarding purpose stated: the new module costs 5.6 KB three times over (emitted JS with JSDoc, declarations, inlined source map), and stripping comments would strip the declaration docs too.