Skip to content

feat(probe): P-COMMUNITY-BASIN-AGREE (S1) — empirical community≡basin agreement via jc#720

Draft
AdaWorldAPI wants to merge 1 commit into
mainfrom
claude/happy-hamilton-0azlw4
Draft

feat(probe): P-COMMUNITY-BASIN-AGREE (S1) — empirical community≡basin agreement via jc#720
AdaWorldAPI wants to merge 1 commit into
mainfrom
claude/happy-hamilton-0azlw4

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

The S1 gate the #719 D-TRI-1 classid-half mint explicitly hands off ("the other session runs S1; the council mints"). An empirical probe that measures whether the operator's identity ruling holds — is_a category ≡ Leiden community ≡ episodic-witness basin (plan §3b.1).

The layer boundary (operator, this session)

"JC is a scientific crate. Yours are empirical."

jc is the certified scientific surface (reliability::{pearson, spearman, cronbach_alpha, icc}, weyl, jirak, …) — this probe consumes it, never extends it. The empirical construction (two partitions → pairwise co-membership vectors) is the probe's; the statistic is jc's. A partition metric jc lacks (Rand/ARI/NMI) is an observation reported to the scientific track, not a bolt-on from the empirical side. So the probe lives on the empirical side (lance-graph/examples/) and dev-depends jc (lib untouched).

The probe

crates/lance-graph/examples/p_community_basin_agree.rs:

  • Community partition — TripletGraph::communities() (Louvain + Leiden refinement) over the whole relational field.
  • Basin partition — connected components under only the is_a/part_of edges (the plan's basin rail), via a deterministic union-find.
  • Agreement — φ = jc::reliability::pearson of the two partitions' pairwise co-membership vectors (φ=1 iff identical up to relabeling); names the bridges (a community that crosses a basin = revision candidate).

Result (synthetic mechanism)

Scenario φ (jc::pearson) reading
aligned 1.0000 IDENTITY — community ≡ basin, no bridges
one cross-basin entity (robot is_a pet, structurally in the tree cluster) 0.5500 DISTINCT — robot named as the single bridge

Mechanism proven; the S1 verdict needs a real is_a-annotated corpus (like G0's KILL/PASS). That verdict decides the mint: identity (φ→1) ⇒ community-id collapses into the is_a rail, no tenant minted; distinct (φ<1) ⇒ community-id earns the batched D-TRI-1 mint.

Verification

  • cargo run -p lance-graph --example p_community_basin_agree runs clean (output above).
  • cargo fmt clean; cargo clippy clean on the example.
  • jc added as a dev-dependency only (light: lance-graph-contract + optional sigker); the lance-graph lib and its 945 tests are untouched. Cargo.lock updated for the dev-dep.

Board

EPIPHANIES E-EMPIRICAL-VS-SCIENTIFIC-JC-1 (the boundary + the S1 result); STATUS_BOARD graphrag §6 S1 row; stale (this PR) labels on the merged D-GR rows corrected to #716.

Not in this PR

  • The S1 verdict (needs a real is_a corpus) — and therefore the community-id mint decision — stay open, as designed.

🤖 Generated with Claude Code

https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1


Generated by Claude Code

… agreement via jc

The S1 gate the D-TRI-1 classid-half mint waits on (#719 handoff). An
EMPIRICAL probe (not scientific — it consumes jc, never extends it):
measures whether the operator's identity ruling holds — is_a category ≡
Leiden community ≡ episodic basin (plan §3b.1).

- crates/lance-graph/examples/p_community_basin_agree.rs — two partitions of
  one entity set: Leiden communities() over all edges vs basin = connected
  components under only is_a/part_of edges; agreement = phi = jc::pearson of
  their pairwise co-membership vectors (phi=1 iff identical up to relabeling).
  Names the bridges (a community that crosses a basin = revision candidate).
- jc added as a dev-dependency (light: contract + optional sigker) so the
  empirical example consumes the certified scientific statistic. Lib untouched
  (dev-only).

Result (synthetic mechanism): aligned -> phi=1.0000 (identity); one cross-basin
entity (robot is_a pet, structurally in the tree cluster) -> phi=0.5500, robot
named as the single bridge. Mechanism proven; the S1 VERDICT needs a real
is_a-annotated corpus (identity => community-id collapses into the is_a rail,
no mint; distinct => community-id earns the batched D-TRI-1 mint).

Layer boundary (operator): jc is the scientific crate, consumed not extended;
a missing partition metric (Rand/ARI/NMI) is an observation for the scientific
track, not a bolt-on.

fmt + clippy clean.

Board: EPIPHANIES E-EMPIRICAL-VS-SCIENTIFIC-JC-1; STATUS_BOARD S1 row.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d3d8f4c0-5f8c-4e73-9b75-1b9993ead47b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Jul 17, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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_e84473ec-eaa3-4e9b-9a12-ef2c6800b270)

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.

2 participants