Skip to content

Fail closed on corrupted KV reads#26

Merged
johnny-emp merged 1 commit into
mainfrom
codex/fail-closed-kv-reads
May 21, 2026
Merged

Fail closed on corrupted KV reads#26
johnny-emp merged 1 commit into
mainfrom
codex/fail-closed-kv-reads

Conversation

@johnny-emp
Copy link
Copy Markdown
Contributor

Summary

  • route production KV read paths through fallible try_* APIs so value-store and segment corruption return structured errors
  • remove the non-PK foreign-key runtime scan fallback and fail with an integrity error when unique index state is missing
  • add regression coverage for spilled value hash mismatch, KV segment corruption, secure scan fail-closed behavior, and missing FK runtime index state

Tests

  • cargo check
  • cargo test --lib corruption_fails_closed -- --nocapture
  • cargo test --lib non_pk_foreign_key_fails_closed_when_runtime_unique_index_missing -- --nocapture
  • cargo test --test read_assertions
  • cargo test --test kv_updates_preflight
  • cargo test --test query_integration

@johnny-emp johnny-emp mentioned this pull request May 21, 2026
@johnny-emp johnny-emp merged commit d2b5c13 into main May 21, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant