Repository navigation
fix: adopt parent CCR content store on anonymous fork adoption (#1340) - #1355
ranxianglei wants to merge 1 commit into
Conversation
Fork/adoption cloned blocks, blockContents and messageRefs from the parent but not the CCR content store, so every acp_retrieve on an adopted ref in the child missed (and pre-kernel-fix the first post-fork fold stored placeholder text as originals — invisible fake hits). planForkStoreAdoption ref-filters the parent's store to the ids the child's view can cite (incoming request ∪ ids covered by adopted blocks — coverage follows the view, not the adoptability gate), clones entries independently, and trims byHash to referenced payloads; null when nothing survives so a CCR-less parent creates no artifact. maybeAdoptForkBlocks adopts the result via adoptContentStore (stats + dirty flag → own companion envelope). Fixes #1340
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)npm install -g billion-context@pr-1355Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pr1355.tgz
npm install -g packageInstall instructions are refreshed on each push. |
|
Duplicate of #1361 — closing. Two parallel sessions independently implemented the same fix (#1340's Layer-1 fork-adoption gap vs #1341's identical OP): both adopt the parent CCR content-store entries into an anonymous fork at adoption time, both green on the full gate + CI. Keeping #1361, because its seed set (covered refs of adopted blocks ∪ refs cited by placeholder-shaped incoming messages) also covers the case where the placeholder message's own raw id differs from the stored original's raw id — exactly the failure mode where nothing else can restore the original. This PR's rawId-reachability filter structurally misses that case. The one test unique to this PR ("adoption disabled leaves the fork without blocks or store") has been ported into #1361 as commit |
Fixes #1340
What
Fork/adoption (src/fork-adoption.ts) cloned blocks, blockContents and messageRefs from the parent but NOT the CCR content store (*.content-store.json companion envelope). A forked child of an armed parent therefore started with an EMPTY store while its history still carried [acp-stored #mNNNNN ...] placeholders and covered-ref spans — every acp_retrieve on an adopted ref missed, and with the pinned kernel\u2019s too-narrow placeholder guard (acp-kernel#432) the first post-fork fold stored placeholder text as "originals", converting honest misses into invisible fake hits.
How
Acceptance criteria (#1340)
Behavior changes (flagged per repo policy)
Parent envelopes, non-fork sessions, and the zero-block fork path are behaviorally unchanged.
Coordination (release ordering)
Pre-flight (rebased onto current master d3c8af8)