Skip to content

Store mixed media and build public Storage delivery URLs - #649

Open
kvz wants to merge 6 commits into
mainfrom
storage-assets
Open

kvz wants to merge 6 commits into
mainfrom
storage-assets

Conversation

@kvz

@kvz kvz commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Why

Our blog examples need to store images, video, audio, RAW, documents and archives without a second importer or pretending every file is a Viewer image. Extend the existing Storage pipeline and catalog so the same primitives work for mixed-media applications.

What

  • storeAsset() and getStoredAssetReceipt() verify original size/MD5 and retain completed-write recovery evidence. Existing storeImage() shares the pipeline but still deliberately accepts transformed images.
  • storage store handles mixed local files, checkpoints each completed receipt and skips byte-matching replays. Changed bytes require a fresh name or explicit overwrite. Byte mismatches preserve the actual receipt before stopping; they are not blindly retried. Hashless recovery guidance no longer promises that sync can generate a checksum.
  • New uploads and sync require explicit image/* MIME and dimensions for images; everything else goes in optional files. Kevin explicitly chose this strict classification. Existing catalogs remain readable. Viewer is not widened and file-only catalogs need no Viewer dependency.
  • Mixed-prefix sync stays atomic, accepts native file paths independently of Viewer renderer restrictions, and preserves catalog order on refresh/overwrite. Category changes remove only the obsolete category entry.
  • Pure getPublicStoredAssetUrl() builds version-pinned original/download and bounded auto/frame/icon still-preview URLs. It never changes publication or authorization. Preview option types and runtime validation share their definitions.
  • Document metadata opt-in costs, local-catalog replay assumptions and API2-first adoption; include package changesets and the generated CLI-wrapper README.

Validation

  • Full yarn check passes, including workspace unit tests and TypeScript; generated-wrapper parity passes.
  • Focused store/sync/public-URL tests: 178 passed. New MIME, hashless-recovery, native-path and ordering regressions were observed red before their fixes.
  • Both packed CLI distributions, scaffold installation, strict consumer types without Viewer, mocked failure handling and repeat-demo reuse pass with Node 26.12.0 / npm 11.20.0. No production credentials or uploads were used.
  • The unchanged onboarding harness fails with npm 12's keyed npm pack --json output before exercising SDK behavior; tracked separately in #651. Temporary diagnostic edits were removed.
  • Council: 7 total rounds, final 2 consecutive rounds clean on the full local diff. Fixes covered completed-write recovery, generated declarations, MIME classification, native file paths and catalog ordering. The conflicting null-MIME recommendation was explicitly resolved by Kevin before implementation. Final-head CI pending; old-head green checks are not substituted.

Release boundary

The new Utils URLs require API2 #11099's public-serve@0.0.3 / public-preview@0.0.4 deployment and real origin/CDN header acceptance before adoption. This PR does not migrate Content assets, publish directories, change existing S3 links or authorize a package release. Independently owned signed-catalog work in #648 is not adopted or changed here.

🤖 Claimed by kvz on studio1/api2-clone-8, framework1/node-sdk since 2026-11-11 · resume: codex resume 019fa2ee-f994-79d0-9d50-071bf2cb7ad6

@kvz kvz self-assigned this Nov 11, 2026
@kvz

kvz commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

Final head 90b7f0b91e36eddecece279917f1165fde45bf25 has passed the local full check, 178 focused tests and two consecutive clean council rounds. CI run 43098810497 was created at 20:55:08 UTC during the GitHub Actions outage. It still reports queued with zero jobs and an unchanged updated_at, after GitHub's status page marked recovery.

One normal cancellation request, intended to permit a same-head CI retry after recovery, returned HTTP 409: Cannot cancel a workflow run that has not been queued yet. Readback still says queued, attempt 1. No terminal cancellation is proven, so no rerun or additional push was performed. The existing native watcher remains attached; this is incomplete CI, not a passing result or a demonstrated code failure. No release or deployment is being attempted.

This branch has not been deployed

No deployments
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.

1 participant