Skip to content

Preserve content references in shared snapshots - #306

Merged
caoergou merged 1 commit into
mainfrom
agent/issue-266-snapshot-contentrefs
Jul 29, 2026
Merged

caoergou merged 1 commit into
mainfrom
agent/issue-266-snapshot-contentrefs

Conversation

@caoergou

Copy link
Copy Markdown
Owner

Summary

  • inline successfully read contentRef bodies into shared snapshots
  • retain the originating content-pack ID and deterministic asset-manifest fingerprint for unread references
  • reject imports atomically with structured, named errors when a pack, manifest, or asset is missing
  • keep the public ContentResolver contract backward compatible through a read-aware extension
  • document the portability and trust semantics

Why

A shared save previously retained lazy content references without enough information to reproduce what the sender had already read or diagnose an unavailable unread asset. This made saves dependent on ambient content-pack state.

Validation

  • npm run typecheck
  • focused ESLint and Prettier checks on all changed source/test files
  • 37 focused snapshot and ContentRef tests
  • 40 scenario, deep-link, persistence, and ContentRef regression tests
  • npm run schema:check
  • npm run knip
  • npm run guard:nocheck
  • npm run guard:purity
  • npm run scenario:ci
  • npm run build:lib
  • npm run scenario:build
  • npm run size:check

Closes #266

@caoergou
caoergou merged commit c7dc7a2 into main Jul 29, 2026
4 checks passed
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.

[P2] Snapshot contentRef semantics: read-content inlining, pack fingerprint, missing-asset diagnostics

1 participant