epiphany/crates/epiphany-bundle/src
Levi Neuwirth 4598f30ddd Schema major 1 Phase D2: CreateRegion op-block major + cross-major read-only
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
2026-07-06 12:09:30 -04:00
..
block.rs Pushes 1+3: fix the MUST-level violations, wire the types-only machinery 2026-07-02 17:10:50 -04:00
bundle.rs Schema major 1 Phase D2: CreateRegion op-block major + cross-major read-only 2026-07-06 12:09:30 -04:00
chunk.rs Pushes 1+3: fix the MUST-level violations, wire the types-only machinery 2026-07-02 17:10:50 -04:00
codec.rs Pushes 1+3: fix the MUST-level violations, wire the types-only machinery 2026-07-02 17:10:50 -04:00
crc.rs A B C D F 2026-06-19 12:42:31 -04:00
error.rs Schema major 1 Phase D2: CreateRegion op-block major + cross-major read-only 2026-07-06 12:09:30 -04:00
fuzz.rs A B C D F 2026-06-19 12:42:31 -04:00
header.rs A B C D F 2026-06-19 12:42:31 -04:00
ids.rs Schema major 1 Phase D2: CreateRegion op-block major + cross-major read-only 2026-07-06 12:09:30 -04:00
lib.rs Pushes 1+3: fix the MUST-level violations, wire the types-only machinery 2026-07-02 17:10:50 -04:00
manifest.rs Item 6 (part 2): operation-block summaries (D-B, C/D integration) 2026-06-21 19:26:17 -04:00
opindex.rs Pushes 1+3: fix the MUST-level violations, wire the types-only machinery 2026-07-02 17:10:50 -04:00
store.rs A B C D F 2026-06-19 12:42:31 -04:00
superblock.rs Pass 11 follow-up: golden-lock the ratified discriminant tables; fix three spec-text inaccuracies 2026-06-22 09:22:55 -04:00