receipt: type_complexity exposed a memory-ABI escape — BeliefArena is a second physical cognitive universe - #1004
Conversation
Microscopic follow-up to the type_complexity warning on probe_parallel_rung::snapshot(). No type alias: a type alias can hide type complexity, it cannot repair memory geometry. WHAT THE WARNING ACTUALLY MARKED. snapshot() built an AoS copy of the whole population -- twice -- to compare ONE lane, then discarded 6 of 10 rows through a filter. The sort existed only to stabilise comparison order. Silencing the lint with `type SnapshotRow = ...` would have changed zero physical properties. THE DEEPER FINDING IS IN THE OWNER. BeliefArena is `entries: Vec<Belief>` (belief.rs:130) -- already AoS. There are no physical lanes to borrow, so the probe was making a second AoS copy of an AoS owner. Splitting it into five owned Vecs would replace one allocation with five and still move the population: SoA-looking, not SoA. Recorded plainly in the probe's own doc: BeliefArena is not (yet) the canonical 4+12 LE SoA substrate. THE CORRECTION. rung_lane_witness(&arena, rung) -> (usize, u64): a borrowed, allocation-free fold over the rung lane. No Vec, no sort, no tuple row. The XOR fold is order-independent -- which is what removes the sort -- and it is sound BECAUSE CStmt is unique in the arena by construction (Belief::stmt: "The statement (UNIQUE in the arena -- S2)"). Uniqueness licenses the commutative fold; without S2 a pair could cancel. PROVEN FALSIFIABLE, NOT ASSUMED. A sabotage run perturbing one rung-0 belief's truth between the two witnesses drove G4 FAIL -- while the count stayed 4. The digest half is load-bearing; a count-only check would have missed it. The sabotage was reverted; it is not committed. Clippy type_complexity across the planner examples is now 0 for a PHYSICAL reason (the Vec is gone), not a naming one. cargo fmt --check clean. All five probes green: parallel_rung, first_particle, revision_attention_view, view_edit_trace, revision_kanban_hinge. CENSUS of sibling sites in #1000..#1003, so this is not re-litigated: exactly one violation existed. visible() -> Vec<usize> is scalar result ids; gates/histogram/per_band/blame are terminal report rows (<=20); picks is a bounded 20-row fixture map; trace.steps is 3 entries; the kanban-hinge Vecs are the 81-cell Sudoku domain fixture, not the cognitive population. One noted and deliberately untouched: rungs_present() collects a population-sized single u32 lane before sort+dedup to <=7 values -- reducible to a fold, but a single lane is not the multi-field AoS reconstruction this rule targets, and widening the fix would exceed the stated scope. No production type introduced. No BeliefArena redesign. No new abstraction. Board hygiene same commit: EPIPHANIES entry E-A-TYPE-ALIAS-CANNOT-REPAIR-MEMORY-GEOMETRY-1. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KCGhDYoQBXs3poaR7sFuqp
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 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 |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_45367afc-c436-44a1-8ac7-d2aea2cb08f9) |
… memory-ABI escape
Operator STOP applied. The prior interpretation (an accidental AoS copy,
fixed with a borrowed digest witness) was too small twice over: the copy was
inside an owner that is itself the escape. BeliefArena { entries: Vec<Belief> }
with Belief.premises: Vec<u32> is an independent AoS cognitive population
owner OUTSIDE the canonical V3 LE SoA substrate. Removing the snapshot
removed a copy inside the wrong representation; the hash witness that
replaced it was polish on the violation.
What changed in this commit:
- rung_lane_witness DELETED. G4 now compares the arena's rung-0 lane against
the probe's own AUTHORED FIXTURE -- the four observations the probe wrote --
bit-exact on truth via to_bits, borrowed iteration, zero allocation, zero
hash, zero snapshot. 7/7 gates green, clippy type_complexity 0.
- The probe carries the escape notice IN PLACE where the witness doc was:
this probe runs INSIDE an acknowledged memory-ABI escape and repairs
nothing; its measured coexistence results hold for the arena's object
model; restating them over ABI-resident state is the restoration
charter's job. The banned framing ("not yet the canonical substrate",
which implies an SoA rewrite is the fix) is retracted -- the question is
whether BeliefArena should physically exist at all.
- EPIPHANIES entry rewritten in place (branch unmerged, entry never landed):
E-TYPE-COMPLEXITY-EXPOSED-A-MEMORY-ABI-ESCAPE-1, carrying the DOCK/ROUTE
ABI separation (classid chooses the reading, the route chooses the
traversal, the bytes never change shape), the three evidence tiers
(heterogeneous carvings in one dock PROVEN via the G24N4 witness lane; V4
as tenant STRONGLY SUPPORTED; V4 persistence NOT YET PROVEN -- provisional
classid, mint gated on O5), the demotion of B from the architectural
alphabet (a materialized rotation must EARN existence; re-carving the dock
is already an unmaterialized rotation), the P* conservative-candidate-
unknown label for scoped-difference potholes, the FlatFact.a/b
not-free-capacity ruling (an effect facet is another addressed row), the
FNV diagnostic-only red line, and the note that TripletGraph
(Vec<Triplet> + HashMap<String,..>) is the same escape shape -- so "move
belief into AriGraph" as shipped today would move it between two
violations.
- Verdict C: #1004 is a finding-only plateau. It does NOT claim the
architecture is corrected. The bounded ABI-restoration follow-up is
chartered separately with falsifiers F1-F10 (no Vec<RowStruct> population
owner, no nested Vec in a row, reasoning over immutable ABI views, index
delete/rebuild leaves state intact, premises without per-belief heap
vectors, no conversion membrane, classid+ClassView interpretation, shared
resident bytes across contracts, no hash as representation, the
population does not move).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KCGhDYoQBXs3poaR7sFuqp
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_09dea322-0d2e-490d-a98c-4474856b94c7) |
⚠ RECUT — this PR is a discovery receipt, not a fix
type_complexityexposed a memory-ABI escape. The original body below-the-fold claimed an AoS copy was the problem and a borrowed digest witness the fix. Operator STOP: both readings were too small. The copy was inside an owner that is itself the escape.The real finding
BeliefArenais an independent AoS cognitive population owner outside the canonical memory ABI (16-byteclassid(4) + 6×(8:8)LE docks, SoA lanes, zero-copy views). The reasoning path escaped the ABI: canonical substrate → object conversion →Vec<Belief>→ nestedVec<u32>→ reasoning. Removing the snapshot removed a copy inside the wrong representation.And the near-identical sibling:
TripletGraph { triplets: Vec<Triplet>, entity_index: HashMap<String, Vec<usize>> }(triplet_graph.rs:86-93) — the same escape shape, so "move belief into AriGraph" as shipped today would move it between two violations.What this PR now does (verdict C — finding-only plateau)
to_bits, borrowed iteration, zero allocation, zero hash, zero snapshot. 7/7 gates green, clippytype_complexity= 0.BeliefArenashould physically exist at all — the substrate already expresses relation (node/edge, SPO), support (Locus::{SupportedBy,Supports}), contradiction (Locus::Contradiction), provenance (witness lanes), causal reading (CE64), attention scope (focus facets). Only the residue with no ABI-native home deserves a new tenant.Standing rulings this PR records (board entry
E-TYPE-COMPLEXITY-EXPOSED-A-MEMORY-ABI-ESCAPE-1)G6D2/G4D3/G3D4/G24N4/Varnode's typed drill). Classid chooses the reading. The route chooses the traversal. The bytes never change shape.G24N4witness lane); V4 as dock tenant STRONGLY SUPPORTED (VarnodeFacet= the envelope, independently converged onG3D4); V4 persistence NOT YET PROVEN (provisional classid, mint gated on O5).FlatFact.a/bare not free dock capacity; an effect facet becomes another addressed row.What this PR does NOT claim
The architecture is not physically corrected.
BeliefArenais untouched (no optimization, no SoA-split, no V2). The bounded ABI-restoration follow-up is chartered separately with falsifiers F1–F10 (noVec<RowStruct>population owner · no nestedVecin a row · reasoning over immutable ABI views · index delete/rebuild leaves state intact · premises without per-belief heap vectors · no conversion membrane · classid+ClassView interpretation · shared resident bytes across contracts · no hash as representation · the population does not move; the view does).🤖 Generated with Claude Code
https://claude.ai/code/session_01KCGhDYoQBXs3poaR7sFuqp