fix(replay): preflight material occurrence coordinates - #2622
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Problem
Scoped replay is CAS-authoritative for byte-ranged occurrences, but malformed or native non-byte occurrence coordinates could be discovered only after replay work had begun. That leaves an unsafe boundary around archive/partial processing and does not provide a reusable fail-closed preflight.
Solution
validate_material_replay_contextvalidates every selected material and occurrence before the CAS route opens, reads, parses, or emits. The existing per-material checks remain in place to validate each range against the authoritative CAS length.Verification
SINEX_TEST_TMPDIR=/realm/project/sinex/.sinex/test-tmp xtask test -p sinexd -E 'test(/replay_context_preflight_rejects_(non_byte|missing)_coordinates_before_work/)' --impact-mode=off— invocation 2007874, 2 passed.xtask check --changed-strict origin/master— pre-push invocation, 1 package (sinexd) passed.git diff --cached --check— passed.Residual scope: native replay implementations for non-byte adapters and coordinator-side archive ordering remain tracked by
sinex-nbag; this change fails closed at the source replay boundary and does not claim that bead closed.