Skip to content

test(symbiont): run-NaN cognitive half proven green + fix ogar_codebook drift#584

Merged
AdaWorldAPI merged 3 commits into
mainfrom
claude/symbiont-run-nan-census
Jun 21, 2026
Merged

test(symbiont): run-NaN cognitive half proven green + fix ogar_codebook drift#584
AdaWorldAPI merged 3 commits into
mainfrom
claude/symbiont-run-nan-census

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jun 21, 2026

Copy link
Copy Markdown
Owner

What

Proves the cognitive half of the run-NaN hypothesis that #580 explicitly handed to the cognitive-compilation session (the actor-side half was proven there), and fixes a workspace-wide build blocker found en route.

1. Run-NaN census (the #580 deliverable)

run_nan_census_live_cycle_is_zero_at_scale in symbiont::kanban_loop drives the full Rubicon forward arc — including the BF16 Domino sweep burned through CognitiveWork — over a 4096-row SoA, then censuses the energy column:

  • 0% NaN, 0% Inf, with non-trivial finite energy (not a no-op).
  • The phase/i4 path is integer-only and the sweep is NaN-projection-guarded, so a live-cycle census reads clean.

cargo test --manifest-path crates/symbiont kanban_loop → 4/4 passed. The cognitive half is green.

2. Fix: ogar_codebook mirror drift (the blocker)

The symbiont build (and cognitive-stack) failed at the lance-graph-ogar const parity guard: OGAR main advanced class_ids::ALL 32 → 39 (added the 0x09XX Health domain — patient/diagnosis/lab_value/medication/treatment/visit/vital_sign, the MedCare/OGIT promotion) but the contract's wire mirror ogar_codebook::CODEBOOK was stale at 32.

The mirror was already prepped for health (ConceptDomain::Health, the 0x09 => Health map, the 0x0901 == Health test) — only the 7 CODEBOOK entries were missing. Synced them verbatim (stable ids); contract codebook tests green, CODEBOOK.len() == 39 == class_ids::ALL.len(). This unblocks symbiont + cognitive-stack workspace-wide (the golden image builds against current OGAR main again).

Coordination note for the OGAR session: the const guard is the lockstep discipline — keep the contract mirror synced when advancing class_ids::ALL.

Board: AGENT_LOG cont.³⁶.

🤖 Generated with Claude Code


Generated by Claude Code

Summary by CodeRabbit

  • New Features

    • Added Health domain support with patient, diagnosis, lab value, medication, treatment, visit, and vital sign mappings.
  • Bug Fixes

    • Resolved data synchronization parity issue affecting system stability.
  • Tests

    • Added comprehensive validation test ensuring data integrity and reliability at scale.

claude added 3 commits June 21, 2026 16:43
…cognitive half)

The cognitive-half answer to #580's run-NaN hypothesis (the actor-side half
was proven green there). Drive the full Rubicon forward arc — including the
BF16 Domino sweep burned through CognitiveWork — over a 4096-row SoA, then
census the energy column: assert 0% NaN / 0% Inf with non-trivial finite
energy. The phase/i4 path is integer-only and the sweep is guarded by the
NaN-projection surface, so a live-cycle census reads clean.

(Validation build in flight: cargo test --manifest-path crates/symbiont
kanban_loop — the full golden-image stack.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VGXeWN4XfVjteBVcVeuLo4
…th 0x09XX)

OGAR main advanced its class_ids::ALL 32→39 (added the 0x09XX Health domain:
patient/diagnosis/lab_value/medication/treatment/visit/vital_sign) but the
contract's wire mirror CODEBOOK was still at 32 (commerce 0x0206). The
lance-graph-ogar const parity guard (mirror::CODEBOOK.len() ==
ogar_vocab::class_ids::ALL.len()) therefore failed the build of everything
that links lance-graph-ogar (symbiont, cognitive-stack).

Mirror was already prepped for health — ConceptDomain::Health, the
0x09 => Health mapping, and the 0x0901==Health test all exist; only the 7
CODEBOOK entries were missing. Added them verbatim from OGAR (stable ids).

CODEBOOK now 39 == class_ids::ALL; contract codebook tests green. Unblocks
the symbiont run-NaN census on this branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VGXeWN4XfVjteBVcVeuLo4
…ook drift fix

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VGXeWN4XfVjteBVcVeuLo4
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds seven Health-domain (0x09XX) canonical concept mappings to ogar_codebook::CODEBOOK to match the expanded class_ids::ALL (32→39 entries). Adds a unit test in kanban_loop.rs that drives a 4096-row SymbiontBoard to the absorbing Commit phase and asserts zero NaN/Inf in the energy() column with at least one non-zero finite value. An agent log entry documents both changes.

Changes

Codebook Parity Fix and Energy Validation

Layer / File(s) Summary
Health-domain CODEBOOK entries
crates/lance-graph-contract/src/ogar_codebook.rs, .claude/board/AGENT_LOG.md
Adds wire-stable u16 mappings patientvital_sign (0x0901–0x0907) to the CODEBOOK constant, syncing it with the expanded class_ids::ALL; the agent log records the parity-guard fix and build unblock.
Live-cycle NaN census test
crates/symbiont/src/kanban_loop.rs
Adds run_nan_census_live_cycle_is_zero_at_scale: drives a 4096-row board through run_to_absorbing, then asserts 0 NaN, 0 Inf, and at least one non-zero finite entry in energy().

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Poem

🐇 Seven new concepts hop into the book,
Health IDs in order — come take a look!
Patient and vital sign, diagnosis too,
The census reports: no NaN in the queue.
The build goes green, the rabbit cheers loud,
Finite energy blooms from the absorbing cloud! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly corresponds to the two main changes: adding a test proving the run-NaN hypothesis and fixing ogar_codebook drift that was a build blocker.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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 and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
crates/lance-graph-contract/src/ogar_codebook.rs (1)

141-148: ⚡ Quick win

Health-domain entries are correctly positioned and sequenced.

The seven Health-domain CODEBOOK entries (0x0901–0x0907) are syntactically sound and follow the established pattern. The sequential IDs, domain-qualified comment, and concept names are consistent with the codebook contract.

To strengthen test coverage, consider adding a Health-domain entry (e.g., "patient") to the spot-check assertions in codebook_ids_match_ogar_vocab (line 265–275). This would document parity and catch drift early without requiring a separate test.

📋 Suggested test enhancement
     #[test]
     fn codebook_ids_match_ogar_vocab() {
         // Drift guard: these MUST match OGAR `ogar_vocab::CODEBOOK` exactly (the
         // wire is the contract). If OGAR moves an id, update BOTH sides together.
         assert_eq!(canonical_concept_id("project"), Some(0x0101));
         assert_eq!(canonical_concept_id("project_work_item"), Some(0x0102));
         assert_eq!(canonical_concept_id("project_enabled_module"), Some(0x011A));
         assert_eq!(canonical_concept_id("commercial_line_item"), Some(0x0201));
         assert_eq!(canonical_concept_id("commercial_document"), Some(0x0202));
         assert_eq!(canonical_concept_id("currency_policy"), Some(0x0206));
+        assert_eq!(canonical_concept_id("patient"), Some(0x0901));
+        assert_eq!(canonical_concept_id("vital_sign"), Some(0x0907));
         assert_eq!(canonical_concept_id("not_a_concept"), None);
     }
🤖 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/ogar_codebook.rs` around lines 141 - 148, To
strengthen test coverage for the Health-domain codebook entries, locate the
spot-check assertions in the codebook_ids_match_ogar_vocab test function (around
lines 265-275) and add assertions for at least one Health-domain entry from the
newly added codes (0x0901-0x0907), such as verifying that "patient" maps to code
0x0901. This will document parity between the codebook and OGAR vocabulary for
the Health domain and help catch any future drift in these mappings.
🤖 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/ogar_codebook.rs`:
- Around line 141-148: To strengthen test coverage for the Health-domain
codebook entries, locate the spot-check assertions in the
codebook_ids_match_ogar_vocab test function (around lines 265-275) and add
assertions for at least one Health-domain entry from the newly added codes
(0x0901-0x0907), such as verifying that "patient" maps to code 0x0901. This will
document parity between the codebook and OGAR vocabulary for the Health domain
and help catch any future drift in these mappings.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1d9101e8-ef5b-4251-8d8f-eca071eb07ec

📥 Commits

Reviewing files that changed from the base of the PR and between 52edeb0 and d75f53b.

📒 Files selected for processing (3)
  • .claude/board/AGENT_LOG.md
  • crates/lance-graph-contract/src/ogar_codebook.rs
  • crates/symbiont/src/kanban_loop.rs

@AdaWorldAPI AdaWorldAPI merged commit 716ff84 into main Jun 21, 2026
6 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Jun 21, 2026
…re OGIT/OGAR SoC)

The operator decision (lance-graph-ogar/Cargo.toml, 2026-06-20) keeps OGIT
and OGAR cleanly separate:
  lance-graph-ontology = OGIT  — legacy TTL/RDF/OWL/DOLCE hydration cache,
                                 not ours to evolve; nothing ClassView /
                                 codebook / port-shaped belongs here.
  lance-graph-ogar     = OGAR  — Active-Record / ClassView / codebook /
                                 the AST-rail; the home for OGAR-driven code.

The UnifiedBridge<P: PortSpec> harness + the OpenProject/Redmine/Medcare
port bridges are OGAR-driven (ogar_vocab::ports + class_ids + codebook
synthesis) yet lived in lance-graph-ontology, pulling ogar-vocab into the
OGIT default build. That collapsed the boundary the contract's zero-dep
ogar_codebook mirror exists to preserve.

This moves those 4 bridge files + their 4 integration tests into
lance-graph-ogar/src/bridges (it already owns ogar-vocab) and DROPS the
ogar-vocab dependency from lance-graph-ontology entirely. OGIT keeps only
its own bridges (Ogit/Woa/SharePoint/Spear) + the NamespaceBridge trait,
and goes back to zero OGAR coupling. lance-graph-ogar gains a path dep on
lance-graph-ontology (OGAR reads the OGIT hydration cache — the correct
direction).

Consumers move lance_graph_ontology::bridges::{UnifiedBridge, MedcareBridge,
HealthcarePort, OpenProjectBridge, OpenProjectPort, RedmineBridge,
RedminePort, *_CODEBOOK} -> lance_graph_ogar::bridges::*.

ontology: cargo build + 264 lib tests green (no ogar-vocab).
ogar: bridge unit + the 4 moved integration tests green (21) once the
contract ogar_codebook mirror is at 39 (PR #584, picked up on rebase).

Generated by [Claude Code](https://claude.com/claude-code)
AdaWorldAPI pushed a commit that referenced this pull request Jun 21, 2026
Lockfile picks up the disambiguated lance-graph-contract (path + git)
from the rebased dependency graph. No source changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VGXeWN4XfVjteBVcVeuLo4
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