arigraph: remove the S1 similarity probe; add EpisodicMemory::basins() (structure, not similarity)#722
Conversation
📝 WalkthroughWalkthroughAdds a Schema.org edge extraction script and a Rust probe that computes taxonomy basins, per-relation-plane alignment, cross-context bridges, and pure-context versus pooled community agreement. Documentation records the corrected interpretation and retracts the earlier pooled measurement. ChangesSchema.org structured measurement
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Ontology
participant Extractor
participant RustProbe
participant Metrics
Ontology->>Extractor: parse Schema.org Turtle
Extractor->>RustProbe: provide schemaorg_edges.tsv
RustProbe->>Metrics: compute taxonomy basins and relation-plane statistics
RustProbe->>Metrics: compare pure-context and pooled community agreement
Metrics-->>RustProbe: return correlations, bridges, and verdict
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_e65d3c64-38e2-474c-a7d5-773c47bca099) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bdb6656db8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let mut familied: HashSet<&str> = HashSet::new(); | ||
| for (s, r, o) in &raw { | ||
| if is_taxonomic(r) { | ||
| isa_parent.entry(s.clone()).or_insert_with(|| o.clone()); |
There was a problem hiding this comment.
Canonicalize multi-parent taxonomy basins
When schema.org classes have multiple is_a parents, this keeps only whichever parent appears first in the TSV; the committed fixture has many such subjects (for example classes with two or three parents), and the extractor/RDF iteration is not ordered, so regenerating or merely reordering the same ontology can change the depth-1 family assignments and therefore all intra/cross plane counts for identical data. Please choose a deterministic canonical parent or account for all parents before deriving the basin labels.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
crates/lance-graph/examples/p_community_basin_agree_real.rs (1)
379-379: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd missing unit tests for algorithmic helpers.
As per coding guidelines, "Add Rust unit tests alongside implementations via
#[cfg(test)]modules". Please add a basic test module at the end of the file for the deterministic functions to ensure correctness and prevent regressions.🧪 Proposed test module
println!( "\nVERDICT (structured): the data is STRUCTURED, not dissimilar. Aligned planes\n\ stay inside taxonomy families (the within-context identity leg); crossing\n\ planes are TYPED, NAMED family→family contexts — the horizontal basin:role\n\ frame the (8:8) register carries — not evidence for an opaque community-id\n\ lane. The mint question goes back to the council WITH this decomposition:\n\ what the taxonomy does not organize is carried by typed cross-contexts, so\n\ the candidate carrier is the horizontal 6-context frame, not a new blob id." ); } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_comembership_empty() { + let co = comembership(&[]); + assert!(co.is_empty()); + } + + #[test] + fn test_depth1_family() { + let mut p = HashMap::new(); + p.insert("child".to_string(), "parent".to_string()); + p.insert("parent".to_string(), "root".to_string()); + assert_eq!(depth1_family("child", &p), "parent"); + assert_eq!(depth1_family("parent", &p), "root"); + assert_eq!(depth1_family("root", &p), "root"); + } +}🤖 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/examples/p_community_basin_agree_real.rs` at line 379, Add a #[cfg(test)] module at the end of the file covering the deterministic algorithmic helper functions defined in the example, with basic assertions for expected outputs and key edge cases. Keep the tests alongside the existing implementations and avoid testing nondeterministic or external-resource behavior.Source: Coding guidelines
crates/lance-graph/examples/data/extract_ontology_edges.py (1)
15-42: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winFormat the script and use
pathlib.Path.The script contains multiple statements per line, which degrades readability and triggers static analysis warnings. Additionally, constructing file paths with string formatting can be cleanly replaced by
pathlib.Pathto natively resolve the path traversal warning.♻️ Proposed refactor
-import sys, rdflib +import sys +import rdflib +from pathlib import Path from rdflib import RDFS, URIRef + def local(u): s = str(u) for sep in ('#', '/'): - if sep in s: s = s.rsplit(sep, 1)[-1] + if sep in s: + s = s.rsplit(sep, 1)[-1] return s.strip() + SCH = rdflib.Namespace("https://schema.org/") -g = rdflib.Graph(); g.parse("data/ontologies/schemaorg.ttl", format="turtle") +g = rdflib.Graph() +g.parse("data/ontologies/schemaorg.ttl", format="turtle") edges = [] + for s, o in g.subject_objects(RDFS.subClassOf): if isinstance(s, URIRef) and isinstance(o, URIRef): a, b = local(s), local(o) - if a and b and a != b: edges.append((a, "is_a", b)) + if a and b and a != b: + edges.append((a, "is_a", b)) + dom, rng = {}, {} -for p, c in g.subject_objects(SCH.domainIncludes): dom.setdefault(p, []).append(c) -for p, c in g.subject_objects(SCH.rangeIncludes): rng.setdefault(p, []).append(c) +for p, c in g.subject_objects(SCH.domainIncludes): + dom.setdefault(p, []).append(c) +for p, c in g.subject_objects(SCH.rangeIncludes): + rng.setdefault(p, []).append(c) + for p in set(dom) & set(rng): pn = local(p) for d in dom[p]: for r in rng[p]: if isinstance(d, URIRef) and isinstance(r, URIRef): a, b = local(d), local(r) - if a and b and a != b: edges.append((a, pn, b)) -out = sys.argv[1] if len(sys.argv) > 1 else "." -with open(f"{out}/schemaorg_edges.tsv", "w") as f: - for s, r, o in edges: f.write(f"{s}\t{r}\t{o}\n") -print(f"{len(edges)} edges -> {out}/schemaorg_edges.tsv") + if a and b and a != b: + edges.append((a, pn, b)) + +out = Path(sys.argv[1]) if len(sys.argv) > 1 else Path(".") +out_file = out / "schemaorg_edges.tsv" +with out_file.open("w") as f: + for s, r, o in edges: + f.write(f"{s}\t{r}\t{o}\n") + +print(f"{len(edges)} edges -> {out_file}")🤖 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/examples/data/extract_ontology_edges.py` around lines 15 - 42, Reformat the script by placing each statement and control-flow action on its own line, including imports, assignments, conditionals, appends, and file writes. Update the output-path handling around out and the schemaorg_edges.tsv write to use pathlib.Path, joining the directory and filename via Path operations instead of string formatting, while preserving the existing default directory and output behavior.Source: Linters/SAST tools
🤖 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.
Inline comments:
In @.claude/board/AGENT_LOG.md:
- Around line 1-7: Update the 2026-07-18 “OPERATOR CORRECTION” entry in
AGENT_LOG.md to include the commit identifier and commit message for the
documented changes. Preserve the existing deliverables, test status, and
outcome, and add the commit details in the ledger’s established format.
In @.claude/board/EPIPHANIES.md:
- Around line 1-10: Correct the φ comparison labels across the measurement
record: in .claude/board/EPIPHANIES.md lines 1-10, explicitly identify .199 as
pooled best-depth φ retained as a negative control and .468 as the structured
pure is_a-plane result, without framing them as comparable before/after
measurements; apply the same labels in .claude/board/AGENT_LOG.md lines 3-4; and
update the harness annotation in
.claude/plans/graphrag-doc-retrieval-soa-integration-v1.md lines 490-500 to
distinguish the pooled negative control from the structured result.
In `@crates/lance-graph/examples/p_community_basin_agree_real.rs`:
- Around line 166-175: Update comembership to avoid underflow when labels is
empty by using a saturating subtraction for the capacity calculation. Preserve
the existing pairwise iteration and output behavior for non-empty slices.
---
Nitpick comments:
In `@crates/lance-graph/examples/data/extract_ontology_edges.py`:
- Around line 15-42: Reformat the script by placing each statement and
control-flow action on its own line, including imports, assignments,
conditionals, appends, and file writes. Update the output-path handling around
out and the schemaorg_edges.tsv write to use pathlib.Path, joining the directory
and filename via Path operations instead of string formatting, while preserving
the existing default directory and output behavior.
In `@crates/lance-graph/examples/p_community_basin_agree_real.rs`:
- Line 379: Add a #[cfg(test)] module at the end of the file covering the
deterministic algorithmic helper functions defined in the example, with basic
assertions for expected outputs and key edge cases. Keep the tests alongside the
existing implementations and avoid testing nondeterministic or external-resource
behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4da4c3ab-5a13-4c6a-bd88-c02c33a4b834
⛔ Files ignored due to path filters (1)
crates/lance-graph/examples/data/schemaorg_edges.tsvis excluded by!**/*.tsv
📒 Files selected for processing (5)
.claude/board/AGENT_LOG.md.claude/board/EPIPHANIES.md.claude/plans/graphrag-doc-retrieval-soa-integration-v1.mdcrates/lance-graph/examples/data/extract_ontology_edges.pycrates/lance-graph/examples/p_community_basin_agree_real.rs
| ## 2026-07-18 — OPERATOR CORRECTION absorbed: pooled-flattening retraction → structured per-plane probe (E-S1-STRUCTURED-DECOMP-1) — main thread | ||
|
|
||
| - **The correction:** "you made a fatal error throwing everything black box accumulated... instead of being happy that we can structure the data you do low IQ similarity." Exactly right: the first real-corpus run pooled 1452 typed relation planes + is_a into ONE adjacency blob and read a scalar φ off the mush — Frankenstein flattening + similarity reflex. Verdict retracted (E-S1-SCHEMAORG-VERDICT-1 Status → RETRACTED). | ||
| - **The rewrite:** `p_community_basin_agree_real.rs` is now the STRUCTURED measurement: [1] per-plane intra/cross decomposition, [2] aggregate (taxonomy organizes 20.9% of familied relational mass; 227 aligned / 987 bridge planes), [3] cross-context family→family matrix (~6 role families emerge: Text/Intangible/Person/Number/URL/Place — the horizontal basin:role frame FROM data), [4] pure-context leg (is_a-only φ=0.468 vs 0.199 pooled — agreement doubles when the context is pure), [5] pooled number demoted to labeled NEGATIVE CONTROL. | ||
| - **Mint implication corrected:** cross-context structure is typed/named → candidate carrier = the horizontal (8:8) frame, not an opaque community-id lane; decision to the council with the decomposition. | ||
| - **Board:** EPIPHANIES E-S1-STRUCTURED-DECOMP-1 (+ Status flip on the retracted entry); plan §6 both probe annotations corrected. Same branch/PR #722; fmt+clippy clean. | ||
|
|
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Record the commit identifier in the board entry.
This entry includes deliverables and test status but omits the required commit SHA/message. Add it so the append-only ledger remains auditable.
As per coding guidelines, .claude/board/AGENT_LOG.md entries must include deliverables, commit, tests, and outcome.
🤖 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 @.claude/board/AGENT_LOG.md around lines 1 - 7, Update the 2026-07-18
“OPERATOR CORRECTION” entry in AGENT_LOG.md to include the commit identifier and
commit message for the documented changes. Preserve the existing deliverables,
test status, and outcome, and add the commit details in the ledger’s established
format.
Source: Coding guidelines
| ## 2026-07-18 — E-S1-STRUCTURED-DECOMP-1 — OPERATOR CORRECTION: the schema.org "DISTINCT → mint" verdict was a POOLED-FLATTENING ARTIFACT ("throwing everything black box accumulated... low IQ similarity"). Restructured probe: decompose by TYPED relation plane instead of pooling → 227 taxonomy-aligned planes + 987 typed bridge planes; pure-context φ RISES 0.199→0.468; the cross-context matrix converges on ~6 named role families (Text/Intangible/Person/Number/URL/Place) — the horizontal basin:role frame EMERGING FROM DATA | ||
|
|
||
| **Status:** SHIPPED (`examples/p_community_basin_agree_real.rs` rewritten as the structured measurement; pooled number demoted to negative control). E-S1-SCHEMAORG-VERDICT-1 Status flipped to RETRACTED. | ||
|
|
||
| - **The error (own it precisely):** the first real-corpus run pooled ALL relation planes (`author`/`location`/`recipient`/… — 1452 DISTINCT typed contexts) + the is_a rail into ONE undirected weight-summed adjacency, ran Leiden on the blob, and compared the mush to the taxonomy with a single scalar φ. That is black-box accumulation + the System-1 similarity reflex — the exact Frankenstein flattening the `(8:8)` substrate forbids (every relation is its own context:role plane; family-codec-smith's "don't blur unlike functions into one codec" is the same rule). Of course a mongrel of hundreds of contexts mismatches one rail; φ=0.01 measured MY destruction of structure, not the data's semantics. "DISTINCT → community-id earns the mint" is RETRACTED. | ||
| - **The structured measurement (what the data actually says, schema.org 961 entities):** | ||
| - Per-plane decomposition: 227 planes ≥80% intra-family (taxonomy-ALIGNED contexts — the within-context identity leg holds there); 987 planes ≤20% intra (TYPED bridges, e.g. `actor: CreativeWork→Organization`, `recipient: Action→Intangible`); taxonomy organizes 20.9% of familied relational mass directly. | ||
| - **Pure-context leg: φ = 0.468 @ k=1 on the is_a plane ALONE (vs 0.199 pooled)** — agreement more than doubles the moment the context is pure. The pooled number is kept in the example as a labeled NEGATIVE CONTROL. | ||
| - **The horizontal frame emerges:** the cross-context matrix's top pairs converge on ~6 role families — Text, Intangible, Person, Number, URL, Place — i.e. the operator's "6 context / episodic-witness basin:role" frame (E-CONTEXT-ROLE-TISSUE-1 horizontal orientation) shows up FROM data, named and typed, not imposed. | ||
| - **Mint implication (corrected):** what the taxonomy does not organize is carried by TYPED, NAMED cross-contexts — the natural carrier is the horizontal `basin:role` frame the `(8:8)` register already sanctions, NOT an opaque community-id blob lane. The mint question returns to the council WITH this decomposition; no "community-id earns the mint" claim survives. |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Correct the φ baseline labeling across the measurement record.
The .199 value is the pooled depth-sweep result retained as a negative control; .468 is the structured pure is_a-plane result. Do not describe this as a pure-context before/after increase unless both values come from comparable measurements.
.claude/board/EPIPHANIES.md#L1-L10: label the comparison as pooled best-depth φ=.199 versus pure-is_a φ=.468..claude/board/AGENT_LOG.md#L3-L4: use the same explicit labels in the operator-correction entry..claude/plans/graphrag-doc-retrieval-soa-integration-v1.md#L490-L500: update the harness annotation to distinguish the pooled negative control from the structured result.
📍 Affects 3 files
.claude/board/EPIPHANIES.md#L1-L10(this comment).claude/board/AGENT_LOG.md#L3-L4.claude/plans/graphrag-doc-retrieval-soa-integration-v1.md#L490-L500
🤖 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 @.claude/board/EPIPHANIES.md around lines 1 - 10, Correct the φ comparison
labels across the measurement record: in .claude/board/EPIPHANIES.md lines 1-10,
explicitly identify .199 as pooled best-depth φ retained as a negative control
and .468 as the structured pure is_a-plane result, without framing them as
comparable before/after measurements; apply the same labels in
.claude/board/AGENT_LOG.md lines 3-4; and update the harness annotation in
.claude/plans/graphrag-doc-retrieval-soa-integration-v1.md lines 490-500 to
distinguish the pooled negative control from the structured result.
| fn comembership(labels: &[u32]) -> Vec<f64> { | ||
| let n = labels.len(); | ||
| let mut v = Vec::with_capacity(n * (n - 1) / 2); | ||
| for i in 0..n { | ||
| for j in (i + 1)..n { | ||
| v.push(if labels[i] == labels[j] { 1.0 } else { 0.0 }); | ||
| } | ||
| } | ||
| v | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Fix potential integer underflow on empty slices.
If labels is empty, n = 0, causing n - 1 to underflow usize and panic. Using saturating_sub safely handles this edge case.
🐛 Proposed fix
fn comembership(labels: &[u32]) -> Vec<f64> {
let n = labels.len();
- let mut v = Vec::with_capacity(n * (n - 1) / 2);
+ let mut v = Vec::with_capacity(n * n.saturating_sub(1) / 2);
for i in 0..n {
for j in (i + 1)..n {
v.push(if labels[i] == labels[j] { 1.0 } else { 0.0 });📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| fn comembership(labels: &[u32]) -> Vec<f64> { | |
| let n = labels.len(); | |
| let mut v = Vec::with_capacity(n * (n - 1) / 2); | |
| for i in 0..n { | |
| for j in (i + 1)..n { | |
| v.push(if labels[i] == labels[j] { 1.0 } else { 0.0 }); | |
| } | |
| } | |
| v | |
| } | |
| fn comembership(labels: &[u32]) -> Vec<f64> { | |
| let n = labels.len(); | |
| let mut v = Vec::with_capacity(n * n.saturating_sub(1) / 2); | |
| for i in 0..n { | |
| for j in (i + 1)..n { | |
| v.push(if labels[i] == labels[j] { 1.0 } else { 0.0 }); | |
| } | |
| } | |
| v | |
| } |
🤖 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/examples/p_community_basin_agree_real.rs` around lines 166
- 175, Update comembership to avoid underflow when labels is empty by using a
saturating subtraction for the capacity calculation. Preserve the existing
pairwise iteration and output behavior for non-empty slices.
The S1 community-basin probe pooled ~1450 typed relation planes into one undirected similarity graph and read a scalar phi as a "community-id earns the mint" verdict — a flattening artifact (structure != similarity) that was retracted. jc is the scientific crate; this empirical probe does not belong coupled to it. - delete crates/lance-graph/examples/p_community_basin_agree.rs - remove the jc dev-dependency from crates/lance-graph/Cargo.toml + Cargo.lock (jc was reachable only via that dev-dep) - the #722-only real-corpus variant + its schema.org data blob + python extractor never merged; dropped by resetting this branch to clean main G0 harness (#716, no jc) is untouched. Board: EPIPHANIES E-S1-PROBE-REMOVED-1. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
bdb6656 to
941aba7
Compare
The S1 community-basin probe pooled ~1450 typed relation planes into one undirected similarity graph and read a scalar phi as a "community-id earns the mint" verdict — a flattening artifact (structure != similarity) that was retracted. jc is the scientific crate; this empirical probe does not belong coupled to it. - delete crates/lance-graph/examples/p_community_basin_agree.rs - remove the jc dev-dependency from crates/lance-graph/Cargo.toml + Cargo.lock (jc was reachable only via that dev-dep) - the #722-only real-corpus variant + its schema.org data blob + python extractor never merged; dropped by resetting this branch to clean main G0 harness (#716, no jc) is untouched. Board: EPIPHANIES E-S1-PROBE-REMOVED-1. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
941aba7 to
5e1393a
Compare
Adds the experiential complement to communities(): entities grouped by
co-occurrence in stored episodes (what was observed together) rather than
by structural graph connectivity (what is linked).
- EpisodicBasins { entities, labels, num_basins } with basin_of / members,
same accessor shape as Communities so the two partitions read alike and a
caller can compare them directly.
- EpisodicMemory::basins(): deterministic union-find over per-episode entity
co-occurrence, parsing each "subject - relation - object" triplet; sorted
entities + union-by-lower-root give a stable partition.
- Re-exported from arigraph/mod.rs.
Structure only, no similarity pooling. This is NOT the le-contract 6-slot
horizontal basin:role register frame (that stays EVENTUAL); it is the plain
experiential grouping the operator asked for as usable code.
16/16 episodic lib tests green (5 new); clippy clean on the additions.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_312faee6-d180-4407-bf4e-f7de1826960d) |
…lready frozen atoms The #719 spec proposed a new Cognition 0x03 ConceptDomain with a cognitive_<verb> CODEBOOK block. That duplicated types that already exist: the cognitive task types (inference/deduction/induction/abduction/ counterfactual/extrapolation/syllogism/synthesis/fan-out) are global frozen atoms in holograph::dntree — epistemic verbs 72-95 (INFERS=74, DEDUCES=82, INDUCES=83, ABDUCES=84, PREDICTS=89, HYPOTHESIZES=81) and frameworks 0x80-0x8F (COUNTERFACTUAL=0x84, ABDUCTION=0x85, CAUSALITY=0x83); syllogism is the shipped NARS syllogize() op; synthesis/fan-out are orchestration ops. Corrections: - §2 rewritten: reference the frozen atoms, never mint a Cognition domain; byte 0x03 stays reserved (RESERVE-DON'T-RECLAIM). A thinking/task row carries classid=its domain, task-type=a frozen atom index in a lane, thinking-lane materialisation=a read-mode property (ValueSchema::Thinking). - §2a added: persona/play-style modeling is per-consumer opt-in + its own mint (chess play-style nice-to-have; business consumers not conform). - §0c: cognitive_* and cognitive_board classid rows removed; only chess 0x06 remains a concept mint; BoardAggregates@188 is a value tenant only. - §0/§4/§5/§6/§7: Cognition origination removed; community-id does not mint (S1 retracted by #722); one open knob left (BoardAggregates width). No bytes were ever minted (the spec was a proposal), so this is a pre-mint correction with zero on-chain reclaim. Records E-COGNITIVE-ATOMS-ALREADY-FROZEN (EPIPHANIES prepend) and updates the D-TRI-1 STATUS_BOARD row. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Awg6TXocHcwTtc6eGsHcdD
Two commits, one theme: the probe collapsed typed structure into a similarity scalar; this replaces it with the real, structural episodic-basin code.
1 — Remove the S1 community-basin probe + jc dev-coupling (commit
5e1393a)The probe pooled ~1450 typed relation planes into one undirected similarity graph and read a scalar φ as a "community-id earns the mint" verdict — a flattening artifact (structure ≠ similarity, which the
(8:8)/ClassView substrate exists to enforce). The verdict was retracted; rather than iterate a probe that misused the substrate and sat coupled to the scientificjccrate, the whole line is removed.crates/lance-graph/examples/p_community_basin_agree.rsjcdev-dependency fromcrates/lance-graph/Cargo.toml+Cargo.lock(jc was reachable only via that dev-dep)The G0 harness (
g0_graph_loadbearing.rs, #716) is untouched — it uses no jc.2 — Add
EpisodicMemory::basins()(commit5a5bc4c)The usable episodic-witness basin partition, done the right way — structure only, no similarity pooling. AriGraph had
communities()(structural, #714) but no experiential partition; this is the complement.EpisodicBasins { entities, labels, num_basins }+basin_of/members, the same accessor shape asCommunitiesso a caller can read and compare the two partitions directly.EpisodicMemory::basins(): deterministic union-find over per-episode entity co-occurrence (parse each"subject - relation - object"triplet; union all entities seen together in one episode). Sorted entities + union-by-lower-root → a stable partition.arigraph/mod.rs.Honest scope: this is the experiential complement to
communities()(entities grouped by what was observed together), not the le-contract 6-slot horizontalbasin:roleregister frame — that stays EVENTUAL percontext-role-traversal-tissue.md.Record
EPIPHANIES.mdE-S1-PROBE-REMOVED-1;AGENT_LOG.md(both entries).Verification
cargo build -p lance-graph --examplesgreen without jc.cargo test -p lance-graph --lib -- graph::arigraph::episodic→ 16/16 (5 new basin tests: co-occurrence grouping, shared-entity merge, single-episode union, empty-safe, deterministic); clippy clean on the additions.🤖 Generated with Claude Code
https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1