EW64 cold-tier read surface + DemotionSink seam (D-EW64-3, D-EW64-4)#448
Conversation
…64-3, D-EW64-4) Plan-agent-sequenced unblocked slices toward the white-matter connectome. D-EW64-3: EpisodicEdges64::coldest() (the eviction victim, symmetric to strongest) + contains() (family-discriminating membership). Pure zero-dep bit-reads; coldest() == the edge promote() evicts (test ties the APIs). D-EW64-4: DemotionSink trait + promote_into(e, sink) — the hot->cold exit seam. promote routing the evicted (coldest) edge to the cold connectome; impls (surreal/LanceDB-LIVE wingman, E-SUBSTRATE-IS-THE-SCHEDULER) deferred + GATED on OQ-11.6 (same dependency-inversion idiom as MailboxSoaOwner). Tested with a fake VecSink: non-full -> empty; full+fresh -> exactly coldest; chain -> age order; refire-present -> untouched. Also prepends a factual CORRECTION: E-EW64-STRENGTH's "W15 0..3 plasticity" is high_heel::Heel (container field), NOT the 64-bit CausalEdge64 (3-bit-per-plane PlasticityState). The plasticity-WRITE co-fire stays GATED (model mismatch needs user decision + causal-edge offline + I-LEGACY v1/v2 minefield); the MRU slot-order strength (D-EW64-2) is unaffected. contract lib 545 green (+10); default clippy clean; episodic_edges.rs clean at pedantic+nursery. Board: EPIPHANIES correction + AGENT_LOG + STATUS_BOARD + LATEST_STATE. https://claude.ai/code/session_012SorR8UbtEvYmbX8cXftj7
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR extends ChangesEpisodicEdges64 Demotion and Cold-Tier Query Surface
Possibly related PRs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/lance-graph-contract/src/episodic_edges.rs (1)
234-246: 💤 Low valueConsider reusing the existing
iter()method.The implementation is correct, but could be more concise by leveraging the existing iterator:
pub fn contains(self, e: EdgeRef) -> bool { self.iter().any(|x| x == e) }This would reuse the
iter()logic and be slightly more idiomatic. However, the current explicit implementation is also clear and correct.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/lance-graph-contract/src/episodic_edges.rs` around lines 234 - 246, The contains method manually loops over Self::CAPACITY and calls self.edge(i) to check for equality with the EdgeRef argument; replace that manual loop by delegating to the existing iterator: use self.iter().any to test whether any yielded EdgeRef equals the provided e, keeping the method signature (pub fn contains(self, e: EdgeRef) -> bool) and its #[must_use] attribute intact and removing the explicit index loop and edge(i) calls.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@crates/lance-graph-contract/src/episodic_edges.rs`:
- Around line 234-246: The contains method manually loops over Self::CAPACITY
and calls self.edge(i) to check for equality with the EdgeRef argument; replace
that manual loop by delegating to the existing iterator: use self.iter().any to
test whether any yielded EdgeRef equals the provided e, keeping the method
signature (pub fn contains(self, e: EdgeRef) -> bool) and its #[must_use]
attribute intact and removing the explicit index loop and edge(i) calls.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3fdfdf68-9c85-46a8-8253-ababb1ff757c
📒 Files selected for processing (5)
.claude/board/AGENT_LOG.md.claude/board/EPIPHANIES.md.claude/board/LATEST_STATE.md.claude/board/STATUS_BOARD.mdcrates/lance-graph-contract/src/episodic_edges.rs
… review LAND CodeRabbit nit (low value, sound): EpisodicEdges64::contains reuses the existing iter() — self.iter().any(|x| x == e) — instead of a manual index loop. Equivalent semantics (iter yields present edges in slot order; family-discriminating via EdgeRef PartialEq), more idiomatic. Opus review verdict was LAND (no P0/P1); the two optional editorial P2s are not applied. episodic_edges tests green; default clippy -D warnings clean. https://claude.ai/code/session_012SorR8UbtEvYmbX8cXftj7
…+ gated phases + 3 decisions Consolidates the EW64<->CE64 white-matter prefetch connectome after #447/#448 merged the hot tier (D-EW64-2/3/4). Phase A SHIPPED; B (plasticity-write co-fire) GATED, C (surreal/LanceDB-LIVE wingman) GATED on OQ-11.6, D (EpisodicWitness64 SoA column) GATED offline, E (comprehension<->arcuate ±5 wire) needs-design. Frames the three decisions that unblock further code: plasticity model (Heel scalar vs PlasticityState per-plane), RawEdge mantissa scope, and the comprehension-wire sense-candidate source. The morning handover. https://claude.ai/code/session_012SorR8UbtEvYmbX8cXftj7
What
Plan-agent-sequenced unblocked slices toward the white-matter EW64 connectome (follow-on to #447's
promote/MRU).D-EW64-3 — cold-tier read surface (
episodic_edges.rs):coldest() -> Option<EdgeRef>— the least-immediate present edge (last occupied slot under the MRU invariant) = exactly the edgepromoteevicts; symmetric tostrongest(). A test ties the two APIs (coldest() == promote()eviction victim).contains(e) -> bool— family-discriminating membership (cross(3,3)≠intra(3)), matchingpromote's dedup.D-EW64-4 — the hot→cold exit seam (
episodic_edges.rs):DemotionSinktrait +promote_into(e, sink)—promoterouting the evicted (coldest) edge to the cold connectome. Zero-dep seam; impls deferred. The surreal/LanceDB-LIVE "wingman" (E-SUBSTRATE-IS-THE-SCHEDULER) implementsDemotionSink— gated on OQ-11.6 — the same dependency-inversion idiom asMailboxSoaOwner. Tested with a fakeVecSink: non-full → empty; full+fresh → exactly the coldest; chain → age order; refire-present → untouched.Honesty correction (board)
Prepends a factual fix:
E-EW64-STRENGTH's "W15 0..3 plasticity" ishigh_heel::Heel(a 128-byte container field), not the 64-bitCausalEdge64(whose plasticity is the 3-bit-per-planePlasticityState). The plasticity-write co-fire stays GATED (model mismatch needs a design decision +causal-edgedoesn't build offline + I-LEGACY v1/v2 minefield); the MRU slot-order strength (D-EW64-2) is unaffected.Tests / clippy
cargo test -p lance-graph-contract --lib→ 545 green (+10). Default clippy-D warningsclean;episodic_edges.rsclean at pedantic+nursery.Flagged for @jan (design input, NOT built unattended)
Heel-scalar vsPlasticityState-per-plane decision (above).SentenceStructurecarries no ambiguity/candidate signal; the sense-candidate source (vocabulary neighbors? similarity top-k?) is net-new + firewall-sensitive.Scope
Hot-tier read surface + the demotion seam only. NOT included (gated): the surreal/LanceDB-LIVE
DemotionSinkimpl (OQ-11.6), theEpisodicWitness64SoA column (needscognitive-shader-driver, offline-gated).https://claude.ai/code/session_012SorR8UbtEvYmbX8cXftj7
Generated by Claude Code
Summary by CodeRabbit