docs(witness): B2 — document the two-witness-arc boundary (no WitnessArcEvaluator trait)#528
Conversation
…ArcEvaluator trait The parked B2 item (wire perturbation-sim witness arc into contract witness_table) was put through the 5+3 critical-decision council. Unanimous: do NOT build the trait. The two 'witness arc' notions are different objects — perturbation-sim's is a numeric standing-wave inner product over &[f64] (particle==wave via Parseval/FWHT); the contract's is a W-slot index -> (mailbox_ref, spo_fact_ref) identity table. Welding them is an AP6 one-impl trait + AGI-as-glove 'never a new trait' violation + a dep-direction inversion (zero-dep contract would gain a perturbation-sim dep). Real wiring is downstream D-MBX-A3, gated on D-MBX-A2 + OQ-11.2 + a dep-direction ruling. Deliverable is doc + board only (no type/dep change): - witness.rs: 'NOT the same witness arc' section; corrected per-arc complexity overclaim (q*O(N) -> q*O(N log N) as implemented; q*O(N) only for precomputed arc spectra) flagged by truth-architect + brutally-honest-tester. - witness_table.rs: reciprocal 'different object' section; any future wiring is a consumer-side free function over a borrowed &[f64] column, never a trait. - EPIPHANIES E-WITNESS-ARC-TWO-OBJECTS-1; TECH_DEBT TD-WITNESS-EVAL-WIRING-1; AGENT_LOG run entry. Math validated (reviewer-only): Parseval particle==wave PROVEN, NaN-safety PROVEN; only the doc asymptotic bookkeeping was off. No code/test behavior changed. contract witness_table 3/3, perturbation-sim witness 4/4, fmt clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
|
Warning Review limit reached
More reviews will be available in 45 minutes and 48 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDocumentation-only PR on the ChangesWitness Arc Boundary Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@crates/perturbation-sim/src/witness.rs`:
- Around line 18-23: The documentation comment in witness.rs now describes the
asymptotic cost as O(N log N) per arc, but the example file
crates/perturbation-sim/examples/witness.rs still documents the old cost model
as O(N) per arc. Update the cost model description in the example file to match
the corrected documentation, ensuring both explain that each arc transformation
costs O(N log N) and the total for q arcs is O(N log N) + q·O(N log N), or O(N
log N) + q·O(N) when optimized with precomputed arc spectrum or
structured/sparse patterns.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 1cf32eea-0efc-4cea-ba37-af95c2f204bf
📒 Files selected for processing (5)
.claude/board/AGENT_LOG.md.claude/board/EPIPHANIES.md.claude/board/TECH_DEBT.mdcrates/lance-graph-contract/src/witness_table.rscrates/perturbation-sim/src/witness.rs
…deRabbit #528) The example crates/perturbation-sim/examples/witness.rs still described the wave path as O(N) per arc; bring it in line with the module-doc correction — per-arc is O(N log N) as implemented (the arc is transformed), narrowing to O(N) only for precomputed/structured arc spectra; the amortized quantity is the single field transform. Example builds; fmt clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
…aph test link) No code change. The linux-build job hit the same intermittent linker bus error seen on #525 — rust-lld crashing in llvm::parallelFor during the final link of the heavy lance-graph test binaries (collect2: ld terminated with signal 7). #528 is doc + board only and does not touch lance-graph code, so this is a runner resource flake, not a regression. API rerun-failed-jobs is 403 for this token; empty commit re-triggers the workflow. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
Summary
Resolves the parked B2 item — "wire the perturbation-sim witness arc into the contract
WitnessTable" — which was deferred because it appeared to need a newWitnessArcEvaluatortrait (crossing the no-new-trait iron rule). Put through the 5+3 critical-decision council (5 analyst agents + 3 brutal critics, all reading both files in full). Unanimous verdict: do NOT build the trait. The resolution is documentation, not code.The finding
"witness arc" names two genuinely different objects:
perturbation-sim::witnesslance-graph-contract::witness_table&[f64]weight vector∑ field·arc(particle == wave via Parseval/FWHT)WitnessEntry { mailbox_ref:u32, spo_fact_ref:Option<u64> }identity resolutionThey share only the word and the Markov-reference-chain shape. Welding them under a
WitnessArcEvaluatortrait would be:perturbation-simdep /f64field semantics (baton-handoff-auditor: CATCH-CRITICAL);I-VSA-IDENTITIES).integration-leadconfirmed the genuine wiring is the downstream deliverable D-MBX-A3, gated on D-MBX-A2 (the plan's current gating gap) + OQ-11.2 + a §0 dependency-direction ruling — i.e. not unblocked yet.Council (unanimous)
convergence-architect DROP · iron-rule-savant REJECT-trait · dto-soa-savant FITS-COLUMN-as-free-fn · dilution-collapse-sentinel KEEP-SEPARATE · truth-architect PROVEN-math · brutally-honest-tester Option-B-LAND · baton-handoff-auditor CATCH-CRITICAL · integration-lead DEFER.
What changed (doc + board only — no type or dependency change)
crates/perturbation-sim/src/witness.rs— added a "NOT the same witness arc ascontract::witness_table" section; corrected a doc overclaim thattruth-architect+brutally-honest-testerboth caught: per-arc cost was statedq·O(N)butwitness_from_spectrumre-transforms each arc, so the honest figure isq·O(N log N)(narrows toq·O(N)only for precomputed/structured arc spectra). The amortized quantity is the field transform.crates/lance-graph-contract/src/witness_table.rs— reciprocal "different object" section; states any future wiring is a consumer-side free function over a borrowed&[f64]column, never a trait on the zero-dep crate.E-WITNESS-ARC-TWO-OBJECTS-1(EPIPHANIES),TD-WITNESS-EVAL-WIRING-1(TECH_DEBT, with the three gating prerequisites + paid-when), AGENT_LOG run entry.Math validated (reviewer-only, no behavior change)
truth-architectindependently re-proved the Parsevalparticle == waveidentity (FWHT is the symmetric involution-up-to-N the identity requires; tested to 1e-9) and the NaN/degenerate safety as PROVEN-in-code. Only the asymptotic doc bookkeeping was off; now fixed. No code or test behavior changed.Tests
cargo test -p lance-graph-contract --lib witness_table— 3/3cargo test --manifest-path crates/perturbation-sim/Cargo.toml witness— 4/4cargo fmt --check(both crates) — clean🤖 Generated with Claude Code
https://claude.ai/code/session_01CcpLeEC3XK8Eye53GKBVvi
Generated by Claude Code
Summary by CodeRabbit