Skip to content

Commit 6c5b792

Browse files
committed
fix: clippy deny-level errors + LOC audit doc
- Fix 4× `#[deprecated(since = "next")]` invalid semver in context_chain.rs — drop `since` field (G3 refactor artifact) - Fix `actor.role <= u8::MAX` tautological comparison in lance_membrane.rs:768 — replace with meaningful `< 32` guard - Document Wave-1 LOC audit in EPIPHANIES.md: recovery (#275-#283) = +8,728; Wave 1 (#300-#306) = +3,156; combined = +11,807; zero LOC lost from G1 rebase cargo fmt --check: clean cargo clippy (4 crates): warnings only, 0 errors https://claude.ai/code/session_01NYGrxVopyszZYgLBxe4hgj
1 parent 40718e4 commit 6c5b792

3 files changed

Lines changed: 28 additions & 5 deletions

File tree

.claude/board/EPIPHANIES.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,24 @@ stay as historical references.
6565

6666
## Entries (reverse chronological)
6767

68+
## 2026-04-30 — FINDING: Wave-1 follow-up shipped (PRs #300-#306) — 3,156 LOC, full LOC audit confirms 0 lost from #275-#283 recovery
69+
70+
**Status:** FINDING
71+
72+
Session 2026-04-30 shipped the grammar-foundry-followup-v1 plan: 7 PRs (S1, F1, F3, F6, G1, G3, G4) closing the explicit stubs left behind by recovery-merge #299. Each PR went through a brutally-honest reviewer agent that surfaced 12+ defects (G1 fabricated qualia dim labels — later softened to "PAD-model sanitization"; F1 had a WHERE/JOIN/AGG leak that only rewrote Projection; G4 broadcast 12 priors across 12 tenses producing the illusion of 144 unique values; S1 introduced an `id: 0` landmine across 4 callers; F3 had a non-temporal Int64 timestamp + lossy column round-trip; G3's "real fp" was passthrough-only with no caller). All defects closed via 7 follow-up refactor commits with failing-test-first regression tests.
73+
74+
**LOC audit (verified `git diff --shortstat`):**
75+
- Recovery (#275-#283 via #299): `71fad59..77c6292` = +8,728 / -334 across 41 files
76+
- Wave 1 (#300-#306): `77c6292..40718e4` = +3,156 / -107 across 18 files
77+
- Combined: `71fad59..40718e4` = +11,807 / -364 across 48 files
78+
- The G1 rebase (`--force-with-lease`) dropped only commit `460329f` (a stray F6 dn_path cherry-pick of ~124 LOC, NOT recovery code) and the plan commit `18240ec`. Math validated: 8,728 + 3,156 - 77 (file overlap) = 11,807. Zero recovery LOC lost.
79+
80+
**Clippy gate (post-merge):** 2 deny-level errors fixed — 4× `#[deprecated(since = "next")]` invalid semver in context_chain.rs (G3); 1× `actor.role <= u8::MAX` tautology in lance_membrane.rs (pre-existing). Warnings only remain (pre-existing `len_zero`, `err_expect`, `useless_vec`, `manual_div_ceil`, `manual_repeat_n` in contract/planner/callcenter/deepnsm). `cargo fmt --check` clean.
81+
82+
**Process lesson:** "tests pass" alone is not a quality signal for agent-authored PRs. The reviewer-then-refactor loop is the correction.
83+
84+
Cross-ref: `.claude/plans/grammar-foundry-followup-v1.md`; PRs #300-#306.
85+
6886
## 2026-04-29 — FINDING: M1/P2-P4 route through existing Lab infra, not new standalone probes
6987

7088
**Status:** FINDING

crates/lance-graph-callcenter/src/lance_membrane.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,12 @@ mod tests {
765765

766766
let actor = m.current_actor.read().unwrap();
767767
assert_eq!(actor.role, ExternalRole::Agent as u8);
768-
assert!(actor.role <= u8::MAX, "ExternalRole stays clamped within u8");
768+
// ExternalRole repr is u8; storing as u8 is enforced by the type system.
769+
// Highest currently defined variant = 7 (Agent), reserve room for growth.
770+
assert!(
771+
actor.role < 32,
772+
"ExternalRole repr stays well below u8::MAX to leave room for growth"
773+
);
769774
}
770775

771776
/// E2: seal() smoke test — empty registry seals without error.

crates/lance-graph-contract/src/grammar/context_chain.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ impl ContextChain {
323323
/// code in the cypher bridge.
324324
/// - **Single candidate**: `margin = 0.0`, `dispersion = 0.0`,
325325
/// `escalate_to_llm = true`.
326-
#[deprecated(since = "next", note = "use disambiguate_with(opts)")]
326+
#[deprecated(note = "use disambiguate_with(opts)")]
327327
pub fn disambiguate<I>(
328328
&self,
329329
i: usize,
@@ -345,7 +345,7 @@ impl ContextChain {
345345
///
346346
/// When `chosen_fingerprint` is `None`, falls back to the original
347347
/// zero-sentinel behaviour (backwards compatible).
348-
#[deprecated(since = "next", note = "use disambiguate_with(opts)")]
348+
#[deprecated(note = "use disambiguate_with(opts)")]
349349
pub fn disambiguate_with_fingerprint<I>(
350350
&self,
351351
i: usize,
@@ -368,7 +368,7 @@ impl ContextChain {
368368
/// Kernel-aware variant of `disambiguate`. Identical contract; the
369369
/// supplied `kernel` is used when scoring each candidate replay via
370370
/// `total_coherence_with_kernel`.
371-
#[deprecated(since = "next", note = "use disambiguate_with(opts)")]
371+
#[deprecated(note = "use disambiguate_with(opts)")]
372372
pub fn disambiguate_with_kernel<I>(
373373
&self,
374374
i: usize,
@@ -399,7 +399,7 @@ impl ContextChain {
399399
/// When `chosen_fingerprint` is `None`, the sentinel falls back to
400400
/// the zero `Binary16K` — preserving backwards compatibility with
401401
/// all existing callers.
402-
#[deprecated(since = "next", note = "use disambiguate_with(opts)")]
402+
#[deprecated(note = "use disambiguate_with(opts)")]
403403
pub fn disambiguate_with_kernel_and_fingerprint<I>(
404404
&self,
405405
i: usize,

0 commit comments

Comments
 (0)