Skip to content

Commit 2106be2

Browse files
committed
fix(causal-edge): test_build_fast boundary <→<= (256 KB c_levels=1 floor) — red on main resolved
The standing 47/1 red (flagged by 4 parallel sessions, ridden through ~46 PRs): test_build_fast asserted byte_size() < 256*1024, but the c_levels=1 fast path is EXACTLY 256 KB (1 revision table + 1 deduction table, 256·256·2 = 128 KB each). `262144 < 262144` is false → impossible to satisfy. Fix: `<=` (the floor is 256 KB, not under it). causal-edge now 48/48 lib green. Scoped to the test bound (tables.rs, fmt-clean). The crate's separate pre-existing crate-wide clippy (15) + fmt debt (edge.rs, v2_layout_tests.rs) is NOT from this fix and is CI-invisible (causal-edge is not a workspace member) — tracked as TD-CAUSAL-EDGE-LINT for a follow-up `cargo fmt`+`clippy --fix` pass. https://claude.ai/code/session_01D2WSmezQBNC3bUdHuGfGmo
1 parent b348265 commit 2106be2

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

.claude/board/TECH_DEBT.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515

1616
## Open Debt
1717

18+
### TD-CAUSAL-EDGE-LINT — `causal-edge` crate-wide pre-existing clippy (15) + fmt drift (2026-06-15)
19+
20+
**Surfaced by** fixing the long-standing `test_build_fast` red (2026-06-15, this commit: `tables.rs:144` `<``<=`, the `c_levels=1` 256 KB floor — test now **48/48 green**). With the test green, `cargo clippy --manifest-path crates/causal-edge/Cargo.toml --lib -- -D warnings` still fails with **15 errors** (edge.rs `to_mantissa`/`from_mantissa`/`plasticity` — match-arm + needless-block lints) and `cargo fmt --check` shows **crate-wide drift** (edge.rs, v2_layout_tests.rs — arm spacing, long `assert_eq!` lines, nested if/else). **Pre-existing, NOT from the test-bound fix** (one line, tables.rs, fmt-clean). **CI-invisible**`causal-edge` is not a lance-graph workspace member, so the workspace gate never clippy/fmt-checks it (same class as helix `probe_mantissa_fill`).
21+
22+
**Pay it by** `cargo fmt --manifest-path crates/causal-edge/Cargo.toml` + `cargo clippy --fix` + manual residual-lint resolution. Mechanical (~30 min); deferred to keep the test-red fix scoped. The 15 lints are quality (formatting / needless blocks), not correctness — the crate's logic is tested (48 lib green).
23+
1824
### TD-HELIX-PROBE-CLIPPY — `helix` `tests/probe_mantissa_fill.rs` pre-existing clippy + fmt drift (2026-06-15)
1925

2026
**Surfaced by** the helix `Signed360` work (2026-06-15): `cargo clippy --manifest-path crates/helix/Cargo.toml --all-targets -- -D warnings` fails on `tests/probe_mantissa_fill.rs:170``clippy::needless_range_loop` (`for b in 0..BINS*BINS` indexing `counts`), under clippy 1.95.0. The same file has pre-existing `cargo fmt` drift (the `SEEDS` const + several `assert_eq!`/`assert!` calls exceed the width, unwrapped). **Pre-existing, NOT caused by the `Signed360` addition** (that's all in `src/`, additive; this integration test was never touched). **CI-invisible** because `helix` is a root-`exclude`d crate — the lance-graph workspace gate never builds it. Same class as the standing `causal-edge` 47/1 red (`test_build_fast`) on main.

crates/causal-edge/src/tables.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,11 @@ mod tests {
141141
fn test_build_fast() {
142142
let tables = NarsTables::build(1); // fast path: single c-level
143143
assert_eq!(tables.revision.len(), 1);
144-
assert!(tables.byte_size() < 256 * 1024); // < 256 KB
144+
// 256 KB is the c_levels=1 FLOOR: 1 revision table + 1 deduction table,
145+
// 256·256·2 = 128 KB each. The bound is ≤, not < (the prior `<` was
146+
// impossible to satisfy — a boundary-by-one bug, red on main since the
147+
// deduction table landed).
148+
assert!(tables.byte_size() <= 256 * 1024);
145149
}
146150

147151
#[test]

0 commit comments

Comments
 (0)