Skip to main content

Index V2 secondary correctness resolution ledger

The red checkpoint was committed before production changes in 089baba1 and 4b91906f. Every retained regression now passes without an ignore, panic expectation, incorrect snapshot, or production workaround. This remediation changes the storage-version-2 secondary encoding in place. Databases written by the previous V2 secondary encoding are incompatible and must be deleted and recreated. There is intentionally no V3, version bump, V2-to-V3 migration, dual read, compatibility decoder, or shadow keyspace.

Equality

Range

Property identity and exact numeric semantics

Disabled lifecycle

process_secondary_index_lifecycle_once now uses the installed production driver, normal observation/claim/fencing/recovery/commit path, configured limits, a shared checked claim-sequence allocator, and serialized explicit steps. The lifecycle contract matrix covers CREATE, DROP, blocked work, retry, abort, delayed work, close, crash/reopen recovery, and concurrent claims.

Independent oracle

secondary_oracle_exact_numeric_and_typed_equality_are_independent, secondary_oracle_uses_typed_equality_bounds_direction_and_limit, and deterministic_secondary_workload_spans_lifecycle_mutation_drop_and_reopen pass. The oracle owns its numeric decomposition and typed comparison logic and does not import production comparison or encoding code.

Resolution

Unsupported or oversized equality/range values now produce typed errors. Builds block durably; active graph mutations fail atomically. Planner null literals remain typed while missing-index diagnostics suppress null-only index recommendations.

Validation

The full workspace test run, focused production lifecycle contracts, independent oracle tests, and all doctests pass. Storage version remains exactly 0x0002.