| … | … | @@ -71,6 +71,17 @@ function entryDataCid (e) { |
| 71 | 71 | // block the frame ITSELF carries (buildCommitWrite puts them in newBlocks). Race-free: it depends on |
| 72 | 72 | // nothing but the frames. Returns the mutated map, or null if a referenced block is absent — a |
| 73 | 73 | // partially-replicated log we must NOT pretend to have reconstructed. |
| 74 | // |
| 75 | // ⚠ LOAD-BEARING ASSUMPTION: a #commit frame carries the record bytes for its own create/update ops, |
| 76 | // and __commit__ entries replicate whole (blocks included) as autobase values. That is what lets this |
| 77 | // reconstruct a complete record set with NO byte resolution and no live view — so a co-owner whose |
| 78 | // overlay bytes have not arrived can still serve a complete, self-consistent repo for any head whose |
| 79 | // frames it holds. SwarmDevice.restore/_recordsFromFirehose already depend on the same property. |
| 80 | // hyper-proto-peer's swarm-device.js:78 muses about a future step where "the firehose no longer |
| 81 | // carries them" (record bytes move wholly to the overlay files). Doing that would break BOTH this |
| 82 | // projection and restore(); it would need the projection to resolve bytes through the record store |
| 83 | // first, and would give up the no-byte-resolution property above. Not a plan of record anywhere — |
| 84 | // noted so it is a decision rather than a surprise. |
| 74 | 85 | function applyFrames (byPath, frames) { |
| 75 | 86 | for (const e of frames) { |
| 76 | 87 | const blocks = new Map((e.blocks || []).map((b) => [b.cid, b.bytes])) |