Skip to content

Asset-reuse parity: canonical glb names, shared assets layout, pre-build probe - #1

Merged
eordano merged 1 commit into
mainfrom
feat/asset-reuse-canonical-naming
Jul 16, 2026
Merged

Asset-reuse parity: canonical glb names, shared assets layout, pre-build probe#1
eordano merged 1 commit into
mainfrom
feat/asset-reuse-canonical-naming

Conversation

@dalkia

@dalkia dalkia commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

What

Brings the scene path (live/JIT server + abgen-corpus) to parity with the Unity converter's asset-reuse flow, which the ab-cdn deployment has run since v49. Previously abgen tracked each glb's dependencies only inside the bundle payload (metadata.json / m_Dependencies) — dependency hashes never reached bundle names, S3 keys, or manifests.

On by default (matching the v49+ deployment); ABGEN_ASSET_REUSE=0 opts out for parity runs against pre-v49 reference trees.

Changes

  • Canonical naming — scene glb/gltf bundles are named {hash}_{depsdigest}_{platform} (textures stay {hash}_{platform}), so a glb whose dependency set changes lands at a new name/key. The JIT name parser accepts three-part names and validates the requested digest against the one computed at entity scan (mirrors the C# throw on missing digest).
  • Digest parity fixcompute_deps_digest now filters to GLB_DEP_EXTENSIONS (.bin + textures), mirroring upstream computeDepsDigest. Previously abgen hashed all resolved refs, diverging for glbs referencing e.g. .ktx2. Also corrects the wearables path.
  • Shared S3 layout — uploads move from entity-scoped {version}/{cid}/{file} to upstream's {version}/assets/{canonical_name}; reads try the shared key first with entity-scoped fallback for pre-switch objects.
  • Pre-build probe — new signed Space::head; corpus builds HEAD-probe the canonical key and list hits in the entity manifest without rebuilding (upstream checkAssetCache behavior).
  • Serving — the abcdn flat lane strips the digest before owner-entity resolution so canonical-name requests JIT correctly.
  • Missing-dep semantics — strict mode skips the glb (upstream skipped-assets behavior); ABGEN_MAGENTA_MISSING drops unresolvable deps from the digest and builds with placeholders.

Verification

  • Full workspace green (329 lib tests + suites), clippy clean.
  • New tests: digest extension filter, canonical-stem parsing, shared-layout put/get ordering with legacy fallback, HEAD probe hit/miss/legacy-off, corpus derive in legacy/reuse/strict/tolerant modes.
  • End-to-end with the real binary: default run emits Qmglbtest_4f53cda18c2baa0c0354bb5f9a3ecbe5_windows (byte-identical to the TS empty-deps digest vector) with canonical names in the manifest; ABGEN_ASSET_REUSE=0 reproduces today's Qmglbtest_windows output exactly.

Notes for review

  • --live-mode sampling of pre-v49 vintages needs ABGEN_ASSET_REUSE=0 to intersect with those reference manifests (documented in README). Per-vintage naming inside from_live_reference is a possible follow-up.
  • Probes run serially per entity (one HEAD per asset on first JIT build); parallelizing is a small follow-up if it shows in build latency.

🤖 Generated with Claude Code

…, probe

Scene glb/gltf bundles now carry the upstream converter's deps digest in
their canonical name ({hash}_{depsdigest}_{platform}) in both the live/JIT
server and abgen-corpus, matching the asset-reuse flow the ab-cdn
deployment has run since v49. On by default; ABGEN_ASSET_REUSE=0 opts out
for parity runs against pre-v49 reference trees.

- naming: filter deps digests to GLB_DEP_EXTENSIONS (.bin + textures),
  mirroring upstream computeDepsDigest — fixes digest divergence for glbs
  referencing non-texture uris (also corrects the wearables path);
  add split_bundle_stem for parsing canonical names
- live: per-entity deps-digest map (magenta-tolerant when enabled),
  canonical naming + digest validation in the JIT build path, shared
  {version}/assets/ space layout with entity-scoped read fallback,
  pre-build HEAD probe that lists space hits in the manifest without
  rebuilding
- space: signed HEAD support for the probe
- abcdn: flat lane strips the digest for owner-entity resolution
- corpus: canonical naming in derive_one_entity behind
  EffectiveToggles.asset_reuse; strict mode skips digest-less glbs
  (upstream skipped-assets semantics)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@eordano
eordano merged commit 3d806b9 into main Jul 16, 2026
1 of 2 checks passed
@eordano
eordano deleted the feat/asset-reuse-canonical-naming branch July 16, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants