wdbx

Memory-edge resolution provenance implementation plan

Approved contract: abi/docs/superpowers/specs/2026-09-16-spec-memory-edge-episodes.md section 4. The ecosystem completion request authorizes closing this existing gap.

Goal: when a caller reads a quarantine or contradiction edge, expose the canonical episode digest that resolved that exact edge, including after reopen. Complete the WDBX query, ABI gateway projection and CLI readout as one slice. This does not claim complete candidate-level edge history or retrieval scoring.

Invariants

Ownership and files

One implementation worker owns the WDBX store query and regression tests, ABI abi-wdbx-gateway episode lookup/service projection, proto/gateway.proto, ABI CLI episode output and their existing integration tests. Root owns this plan, ecosystem records and heavy gates. Preserve existing dirty work, including WDBX’s cross-language pipe fixes and ABI’s training changes.

Likely seams (inspect current source before editing): wdbx/crates/abi-wdbx/src/v3/episode/store.rs, wdbx/crates/abi-wdbx/tests/v3_memory_edge.rs, abi/crates/abi-wdbx-gateway/src/episodes.rs, gateway service projection, abi/crates/abi-wdbx-gateway/proto/gateway.proto, abi/crates/abi-cli/src/wdbx/episode.rs, abi/crates/abi-wdbx-gateway/tests/episodes.rs, abi/crates/abi-cli/tests/episode_gateway.rs. Keep every Rust file below the repository limit; split sibling test modules if needed. Do not modify generated bindings by hand.

Steps

Acceptance commands

From ABI using its pinned sibling-aware wrapper:

./tools/cargo.sh test --manifest-path ../wdbx/Cargo.toml -p abi-wdbx --test v3_memory_edge --test v3_memory_candidate --test v3_cross_language_episode < /dev/null
./tools/cargo.sh test -p abi-wdbx-gateway --test episodes < /dev/null
./tools/cargo.sh test -p abi-cli --test episode_gateway < /dev/null

Then from WDBX, with its pinned compiler/system tools first: bash tools/check.sh. From ABI: ./tools/check.sh. A green source gate does not qualify deployed adapters, full constitutional memory conformance, retrieval weighting or candidate-level history.

Qualified result — 2026-10-03

Independent Standards and Spec reviews passed. Root full gates passed with source, HEAD and index unchanged: WDBX 647 Rust executions; ABI 988 Rust plus 144 Python. The initial ABI invocation selected Apple Python 3.9 and failed before compilation; a process-local Python 3.14.8 shim corrected the environment, and the complete gate then passed. No repository or global toolchain configuration changed.

Frozen receipts and logs: .superpowers/sdd/2026-10-03-ecosystem/evidence/ resolution-final-gates/ and resolution-abi-python314/. Source-derived claims now describe only per-edge resolution provenance. The broader ecosystem plan remains Partial.