Skip to content

Commit 2c24e3d

Browse files
committed
test(symbiont): live-cycle NaN census at scale (kanban run-NaN, #580 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
1 parent 52edeb0 commit 2c24e3d

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

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)