test(symbiont): run-NaN cognitive half proven green + fix ogar_codebook drift#584
Conversation
…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
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughWalkthroughAdds seven Health-domain ( ChangesCodebook Parity Fix and Energy Validation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~4 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
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/lance-graph-contract/src/ogar_codebook.rs (1)
141-148: ⚡ Quick winHealth-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 incodebook_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
📒 Files selected for processing (3)
.claude/board/AGENT_LOG.mdcrates/lance-graph-contract/src/ogar_codebook.rscrates/symbiont/src/kanban_loop.rs
…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)
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
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_scaleinsymbiont::kanban_loopdrives the full Rubicon forward arc — including the BF16 Domino sweep burned throughCognitiveWork— over a 4096-row SoA, then censuses the energy column:cargo test --manifest-path crates/symbiont kanban_loop→ 4/4 passed. The cognitive half is green.2. Fix:
ogar_codebookmirror drift (the blocker)The symbiont build (and
cognitive-stack) failed at thelance-graph-ogarconst parity guard: OGAR main advancedclass_ids::ALL32 → 39 (added the0x09XXHealth domain — patient/diagnosis/lab_value/medication/treatment/visit/vital_sign, the MedCare/OGIT promotion) but the contract's wire mirrorogar_codebook::CODEBOOKwas stale at 32.The mirror was already prepped for health (
ConceptDomain::Health, the0x09 => Healthmap, the0x0901 == Healthtest) — 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).Board:
AGENT_LOGcont.³⁶.🤖 Generated with Claude Code
Generated by Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Tests