The canonical op-block side of Region.permits_spanning_slurs: CreateRegion now encodes at schema major 1, blocks carrying one are stamped major 1, the reader admits them per-role, and a bundle whose op history is beyond this reader's accept-set opens read-only. The migrate-on-read primitive is deferred (op payloads are never reconstructed-to-values from bytes, so it has no consumer). - ops: CreateRegionOp::encode_canonical embeds the region's full (v1) canonical bytes; OperationKind/OperationPayload/OperationEnvelope::schema_major report the payload's binary-format major (CreateRegion => 1, else 0). Removed D1's transitional Region::canonical_bytes_v0 (dec_region_v0 stays for snapshots). - bundle: max_supported_major(kind) raises the OperationEnvelopeBlock role to [0,1] (every other role stays exact-0); the read gate is now major > max_supported_major(r.kind). StagedChunk::operation_block_versioned + SchemaVersion::for_major project a derived block major to a version. - bundle: commit-time canonical-root validation checks structure without the accept-set (a newer writer's higher-major root is publishable); the accept-set is a read concern. Both open and commit consult unsupported_operation_root_major and go read-only (+ the new IntegrityAnomaly::UnsupportedCanonicalChunkMajor) when a canonical op root exceeds the accept-set, so the live bundle refuses further commits at once. - testkit: stage_operation_block derives a block's schema version from its operations (max schema_major); staged_envelope_blocks routes through it so a generated CreateRegion stream is never mis-stamped v0. Tests: CreateRegion payload is v1 and carries the flag; the op reports major 1; a derived CreateRegion block stamps V1 and reopens read-write; a major-2 block opens read-only (open and post-commit); the per-role accept-set shape. Full gate green (workspace tests, clippy -D warnings, fmt, rustdoc -D warnings). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NEs4aYiu8MXjdYdMxw8PTd |
||
|---|---|---|
| .. | ||
| block.rs | ||
| bundle.rs | ||
| chunk.rs | ||
| codec.rs | ||
| crc.rs | ||
| error.rs | ||
| fuzz.rs | ||
| header.rs | ||
| ids.rs | ||
| lib.rs | ||
| manifest.rs | ||
| opindex.rs | ||
| store.rs | ||
| superblock.rs | ||