Skip to content

Commit 716ff84

Browse files
authored
Merge pull request #584 from AdaWorldAPI/claude/symbiont-run-nan-census
test(symbiont): run-NaN cognitive half proven green + fix ogar_codebook drift
2 parents 52edeb0 + d75f53b commit 716ff84

3 files changed

Lines changed: 55 additions & 0 deletions

File tree

.claude/board/AGENT_LOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
## 2026-06-21 (cont.³⁶) — run-NaN COGNITIVE half PROVEN green (#580 handoff) + fixed the ogar_codebook drift that blocked it
2+
3+
**Main thread (Opus), cognitive-compilation session.** Picked up the cognitive
4+
half #580 explicitly handed to this session: instrument `symbiont::kanban_loop::
5+
run_to_absorbing` for a live-cycle NaN%. Added `run_nan_census_live_cycle_is_zero_at_scale`
6+
— drives the FULL Rubicon arc (incl. the BF16 Domino sweep through CognitiveWork)
7+
over a **4096-row SoA**, censuses the energy column: **0% NaN / 0% Inf, non-trivial
8+
finite energy. PROVEN green** (`cargo test --manifest-path crates/symbiont kanban_loop`,
9+
4/4). The phase/i4 path is integer-only + the sweep is NaN-projection-guarded.
10+
11+
**Blocker found + fixed en route:** the symbiont build (and cognitive-stack)
12+
failed at the `lance-graph-ogar` const parity guard — OGAR main advanced
13+
`class_ids::ALL` 32→39 (added the 0x09XX **Health** domain) but the contract wire
14+
mirror `ogar_codebook::CODEBOOK` was stale at 32. The mirror was already prepped
15+
for health (`ConceptDomain::Health`, `0x09 => Health`, the `0x0901==Health` test);
16+
only the 7 entries were missing. Synced CODEBOOK→39 (verbatim, stable ids);
17+
contract codebook tests green. This unblocks symbiont + cognitive-stack
18+
workspace-wide (the golden image builds on current OGAR main again). Branch
19+
`claude/symbiont-run-nan-census` (2 commits). Coordination note for the OGAR
20+
session: keep the contract mirror in lockstep when advancing `class_ids::ALL`
21+
the const guard is the discipline.
22+
123
## 2026-06-21 (cont.³⁵) — run-NaN actor-side half PROVEN green — run_to_absorbing drives a full Rubicon cycle, lance-free
224

325
**Main thread (Opus), self-directed ("what do you choose next").** Chose the highest-value LIGHT move over forcing a disk-heavy lance build: answered the buildable half of the capstone's **run-NaN HYPOTHESIS**. New `lance-graph-supervisor::kanban_actor::run_to_absorbing(actor, max_ticks)` — repeatedly `drive_version_tick` until the owner reports an absorbing column (`Commit`/`Prune`), returning the forward-arc `KanbanMove` trace; `max_ticks` is a defensive non-termination guard (pure forward arc always reaches `Commit`). This is the actor-side, lance-free, symbiont-free analog of `symbiont::kanban_loop::run_to_absorbing`. **+1 test (14 total green):** `run_to_absorbing_drives_a_full_rubicon_cycle_no_nan_no_panic` — a mailbox runs `Planning → CognitiveWork → Evaluation → Commit`, terminates, every move is a legal Rubicon edge, no panic, no spurious `Illegal`, idempotent at rest (second run empty, phase unchanged). The phase/i4 path is integer-only ⇒ **NaN is structurally impossible on this half**, so green IS the actor-side run-NaN answer. clippy + fmt clean; light build, no lance/disk/symbiont gate. **Remaining run-NaN (symbiont/disk-gated):** the cognitive half — instrument `symbiont::kanban_loop::run_to_absorbing` over the energy column for a live-cycle NaN% (other session owns symbiont; coordinate). Plan run-NaN status annotated "actor-side half PROVEN". Rides a PR on jirak. Capstone actor-side substrate now complete: S4 (#576/#577) + S2 (#578) + S3 (#579) + run-to-absorbing (this).

crates/lance-graph-contract/src/ogar_codebook.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,14 @@ pub const CODEBOOK: &[(&str, u16)] = &[
138138
("billing_party", 0x0204),
139139
("payment_record", 0x0205),
140140
("currency_policy", 0x0206),
141+
// ── 0x09XX — Health domain (MedCare; OGIT NTO/Healthcare promotion) ──
142+
("patient", 0x0901),
143+
("diagnosis", 0x0902),
144+
("lab_value", 0x0903),
145+
("medication", 0x0904),
146+
("treatment", 0x0905),
147+
("visit", 0x0906),
148+
("vital_sign", 0x0907),
141149
];
142150

143151
/// Resolve a **canonical-concept** string to its stable `u16` codebook id via

crates/symbiont/src/kanban_loop.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,31 @@ mod tests {
249249
assert!(board.energy().iter().any(|&e| e != 0.0));
250250
}
251251

252+
#[test]
253+
fn run_nan_census_live_cycle_is_zero_at_scale() {
254+
// The cognitive-half run-NaN answer (#580 handoff). Drive the FULL Rubicon
255+
// forward arc — including the BF16 Domino sweep burned through CognitiveWork
256+
// — over a large SoA, then census the energy column. The phase/i4 path is
257+
// integer-only and the sweep is guarded by the NaN-projection surface, so a
258+
// live-cycle census must read 0% NaN / 0% Inf.
259+
let mut board = SymbiontBoard::spawn(4096, 13);
260+
let trail = board.run_to_absorbing(&NextPhaseScheduler);
261+
262+
assert!(board.phase().is_absorbing(), "must reach the absorbing Commit");
263+
assert!(!trail.is_empty(), "the arc must have advanced");
264+
265+
let energy = board.energy();
266+
let total = energy.len();
267+
let nan = energy.iter().filter(|e| e.is_nan()).count();
268+
let inf = energy.iter().filter(|e| e.is_infinite()).count();
269+
let nonzero = energy.iter().filter(|&&e| e != 0.0).count();
270+
271+
assert_eq!(nan, 0, "live-cycle NaN census: {nan}/{total} NaN over the arc");
272+
assert_eq!(inf, 0, "live-cycle Inf census: {inf}/{total} Inf over the arc");
273+
// The sweep must have produced real, finite energy (not a no-op all-zeros).
274+
assert!(nonzero > 0, "the BF16 Domino sweep produced no finite energy");
275+
}
276+
252277
#[test]
253278
fn illegal_skip_is_rejected_no_mutation() {
254279
let mut board = SymbiontBoard::spawn(16, 2);

0 commit comments

Comments
 (0)