Skip to content

receipt: type_complexity exposed a memory-ABI escape — BeliefArena is a second physical cognitive universe - #1004

Merged
AdaWorldAPI merged 2 commits into
mainfrom
claude/snapshot-aos-census
Aug 23, 2026
Merged

receipt: type_complexity exposed a memory-ABI escape — BeliefArena is a second physical cognitive universe#1004
AdaWorldAPI merged 2 commits into
mainfrom
claude/snapshot-aos-census

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Aug 23, 2026

Copy link
Copy Markdown
Owner

⚠ RECUT — this PR is a discovery receipt, not a fix

type_complexity exposed 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

BeliefArena { entries: Vec<Belief> }      // belief.rs:129
Belief { stmt, truth, stamp, rung,
         premises: Vec<u32>, .. }         // belief.rs:89 — nested heap in a population row

BeliefArena is an independent AoS cognitive population owner outside the canonical memory ABI (16-byte classid(4) + 6×(8:8) LE docks, SoA lanes, zero-copy views). The reasoning path escaped the ABI: canonical substrate → object conversion → Vec<Belief> → nested Vec<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)

  1. The hash witness is DELETED. It was polish on the violation. G4 now compares the arena's rung-0 lane against the probe's own authored fixture — the four observations the probe wrote — bit-exact via to_bits, borrowed iteration, zero allocation, zero hash, zero snapshot. 7/7 gates green, clippy type_complexity = 0.
  2. The escape notice lives in the probe, in place: its measured G1..G7 coexistence results hold for the arena's object model; restating them over ABI-resident state is the restoration charter's job.
  3. Retracted framing: "BeliefArena is not yet the canonical substrate" implied an SoA rewrite is the fix. The real question is whether BeliefArena should 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)

  • DOCK ABI vs ROUTE ABI: every tenant rides the same 16-byte railway; deep traversal semantics are selected by the class's route contract (G6D2/G4D3/G3D4/G24N4/Varnode's typed drill). Classid chooses the reading. The route chooses the traversal. The bytes never change shape.
  • Evidence tiers kept separate: heterogeneous carvings in one dock PROVEN (the G24N4 witness lane); V4 as dock tenant STRONGLY SUPPORTED (VarnodeFacet = the envelope, independently converged on G3D4); V4 persistence NOT YET PROVEN (provisional classid, mint gated on O5).
  • B is removed from the architectural alphabet. A = address/mask/traversal law; C = pair-field compute law; a materialized rotation must earn existence by measurement — re-carving the dock is already an unmaterialized rotation.
  • Scoped-difference potholes are a conservative candidate-unknown mask (P*), never an exact epistemic hole.
  • FlatFact.a/b are not free dock capacity; an effect facet becomes another addressed row.
  • FNV residual grouping stays diagnostic bookkeeping — if it ever becomes an address, key, identity, token, or route, kill it.

What this PR does NOT claim

The architecture is not physically corrected. BeliefArena is untouched (no optimization, no SoA-split, no V2). 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; the view does).

🤖 Generated with Claude Code

https://claude.ai/code/session_01KCGhDYoQBXs3poaR7sFuqp

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
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7ee0cfe4-8c86-478f-9e7c-1a986cd47e5a


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Aug 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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
@cursor

cursor Bot commented Aug 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@AdaWorldAPI AdaWorldAPI changed the title probe: replace an AoS population snapshot with a borrowed lane witness receipt: type_complexity exposed a memory-ABI escape — BeliefArena is a second physical cognitive universe Aug 23, 2026
@AdaWorldAPI
AdaWorldAPI merged commit 167331a into main Aug 23, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants