epiphany/crates/epiphany-ops/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
..
anomaly.rs Phase 2 (Agent K) M1: value-typed operation payloads + Operation Catalog scaffold 2026-06-24 11:52:02 -04:00
causal.rs Pass 11: ratify provisional byte choices into normative spec text 2026-06-21 22:30:06 -04:00
conflict.rs Pass 11: consolidated byte-layout appendix + pin ObjectKind/ResolutionAction discriminants 2026-06-22 13:16:20 -04:00
decode.rs Phase 3 tranche 1: casting-off, K1 schema-fill, value-restoring undo 2026-07-02 21:55:26 -04:00
effect.rs Phase 3 tranche 1: casting-off, K1 schema-fill, value-restoring undo 2026-07-02 21:55:26 -04:00
encode.rs A B C D F 2026-06-19 12:42:31 -04:00
envelope.rs Schema major 1 Phase D2: CreateRegion op-block major + cross-major read-only 2026-07-06 12:09:30 -04:00
fuzz.rs Phase 3 tranche 1: casting-off, K1 schema-fill, value-restoring undo 2026-07-02 21:55:26 -04:00
lib.rs Phase 3 tranche 1: casting-off, K1 schema-fill, value-restoring undo 2026-07-02 21:55:26 -04:00
migrate.rs Phase 3 tranche 1: casting-off, K1 schema-fill, value-restoring undo 2026-07-02 21:55:26 -04:00
opset.rs Phase 2 (Agent K) M1: value-typed operation payloads + Operation Catalog scaffold 2026-06-24 11:52:02 -04:00
payload.rs Schema major 1 Phase D2: CreateRegion op-block major + cross-major read-only 2026-07-06 12:09:30 -04:00
reduce.rs Phase 3 tranche 1: casting-off, K1 schema-fill, value-restoring undo 2026-07-02 21:55:26 -04:00
slot.rs A B C D F 2026-06-19 12:42:31 -04:00
stamp.rs A B C D F 2026-06-19 12:42:31 -04:00
support.rs Pass 11 follow-up: golden-lock the ratified discriminant tables; fix three spec-text inaccuracies 2026-06-22 09:22:55 -04:00
undo.rs A B C D F 2026-06-19 12:42:31 -04:00
v0.rs Phase 3 tranche 1: casting-off, K1 schema-fill, value-restoring undo 2026-07-02 21:55:26 -04:00
validate.rs Schema major 1 Phase D1: Instrument.range + Region flag (snapshot side) 2026-07-06 11:14:52 -04:00
valuegen.rs Schema major 1 Phase D1: Instrument.range + Region flag (snapshot side) 2026-07-06 11:14:52 -04:00