Skip to content

cognitive-shader-driver: emit CE64 from the SPOFC record (follow-up to #1293) - #1294

Merged
AdaWorldAPI merged 4 commits into
claude/llvm-codegen-polyfill-gni3cwfrom
claude/llvm-codegen-polyfill-gni3cw-ce64-spofc
Sep 25, 2026
Merged

AdaWorldAPI merged 4 commits into
claude/llvm-codegen-polyfill-gni3cwfrom
claude/llvm-codegen-polyfill-gni3cw-ce64-spofc

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #1293 (merged); retargeted to main.

This is the follow-up to #1293. #1293 collects each row's supporting relationships into one SPOFC record, but that record never reaches the emitted CausalEdge64 (CE64). This PR writes it into the CE64 (leg A). It also verifies what the cross-cycle learning would rest on, and records what is missing for the rest rather than inventing substitutes.

Leg A: emit CE64 from the SPOFC record

Stage [5] used to pack every edge from the hit alone. Each field changes as follows:

field before now
S / O row%256, (row/4)%256 (a row id placed in palette-address space) palette256 indices: S is the row's stored archetype (the value the cascade queries with); O is the partner's (a P64 target, or a row partner's stored archetype)
P 0 0 (no predicate palette exists)
f / c resonance, resonance SPOFC truth: c = m·255/(m+k) counts supporting relationships
Pearl mask predicates & 0b111 inverse of p64_bridge::edge_to_layer_mask's causal half
topology (bits 59–60) implicit 0 = Direct, for every edge Direct for a P64 target, Unknown for a content-similarity partner

A bug fixed on the way. p64 plane 2 is SUPPORTS, but edge_to_layer_mask reads Pearl bit 2 as CONTRADICTS. So every supporting relation was emitted as a contradiction.

Tests. Each was checked by disabling what it protects and confirming it goes red:

test what it pins disable that turns it red
emitted_edge_carries_the_p64_target_and_its_evidence S = stored archetype, O = the P64 target, evidence confidence, a SUPPORTS plane sets no Pearl bit S from the row id; c = resonance; raw mask at the call site
content_partner_edges_do_not_claim_a_direct_topology content partners are Unknown and carry evidence confidence topology forced to Direct; c = resonance
causal_mask_round_trips_through_p64_layers all 256 predicate masks round-trip through edge_to_layer_mask raw mask inside the helper

The fixture stores archetype 2 rather than 0, because row 0's row%256 is also 0 and would pass by accident.

Effect. Emitted edges change in every dispatch. cycle_fp and top-k are unchanged, since they read the candidates, not the edges.

Verified for the cross-cycle legs (not implemented)

tests/ce64_recount_probe.rs characterises current behaviour:

  • learn() pools a repeated observation as fresh evidence. Confidence rises again on the second revision with the same observation.
  • The driver emits with plasticity ALL_FROZEN, so learn() can never move S/P/O on those edges.

More, all read in code:

  • Nothing in run writes an edge back. persist_cycle writes only emitted_edges[0], has test-only callers, and targets an Arc<BindSpace> that run cannot mutate.
  • Stage [3] computes tables.revise(...) and throws the result away.
  • arm-discovery conventions: the SPOFC confidence convention matches; the frequency does not. SPOFC f is the best resonance; arm-discovery's f is cooccur/antecedent, and a dispatch has no antecedent count to compute that ratio from.
  • R2IL: it has no frequency/confidence code. ogar-r2il and r2il-mask-abi-probe have zero hits. "r2il SPOFC" appears only in docs.
  • The EWA sandwich (jc::ewa_sandwich) is covariance push-forward and counts no evidence. Its only epistemic use is the PROPOSED mul-ewa-trust-propagation-v1.md, which names the circularity (Σ → trust → gate → Σ). A completion it supplies is a prior, never an observation.
  • Shared upstream. fusion.rs (shared_roots/inherited_roots) and nars::belief::revise_at already treat two supports from one root as one witness. The dispatch path has no carrier for that.

Missing dependencies (named in the plan, not substituted)

  1. W4a owner write path. COMPONENT-MAP.md §6 has persist_cycle BLOCKED→W4a. Write-back must go through cast(on_behalf = mailbox_owner()).
  2. A per-edge evidence-identity carrier. The W-slot is a witness corpus root, not a per-observation source set, and le-contract.md forbids new awareness semantics in CE64 bits. Where the stamp lives is undecided.
  3. A predicate palette, for the P byte.
  4. A production feed into the planes. update_planes has no production caller, and convergence.rs addresses with %64 where p64-bridge uses /4.

Plan: .claude/plans/ce64-spofc-learning-v1.md.

  • Legs B–F: evidence identity, write-back, cross-cycle revision, the "Sudoku" completions probe, and support entropy.
  • It also sets out the framing: bits 59–60 as the grid recording how each cell was obtained, and 8× support as 8× evidence only if the eight are independent.

Checks

  • cognitive-shader-driver: all test binaries pass (115 lib tests plus the new probe); clippy -D warnings and fmt are clean.
  • Board: INTEGRATION_PLANS.md updated (new entry prepended); SUPERSESSION-INDEX.md regenerated.

🤖 Generated with Claude Code

https://claude.ai/code/session_019HnekoM1EidTwQLS3oFVFm


Generated by Claude Code


Generated by Claude Code

Stage [5] packed every edge from the hit alone: S = row%256, O =
(row/4)%256 (a row id in palette-address space), f = c = resonance, the
p64 predicate bits raw as the Pearl mask, and topology left at the packed
default Direct.

Now each edge is packed from its candidate's SPOFC record:
- S / O are palette256 indices: the row's stored archetype (the value the
  cascade queries with) and the partner's (a P64 target, or a row
  partner's stored archetype). P stays 0: no predicate palette exists.
- f / c are the SPOFC truth; confidence counts supporting relations.
- The Pearl mask is the inverse of edge_to_layer_mask's causal half.
  `predicates & 7` put SUPPORTS on bit 2, which reads back as CONTRADICTS.
- Topology says how the relation was found: a P64 target is Direct, a
  content-similarity partner is Unknown.

Adds ce64_recount_probe: learn() pools a repeated observation as fresh
evidence, and the driver's ALL_FROZEN emission plasticity stops learn()
moving S/P/O. Both are characterisations for the cross-cycle work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019HnekoM1EidTwQLS3oFVFm
The round-trip test covered layers_to_causal_mask, but emission could
still pass the raw bits: the CAUSES fixture maps to bit 0 either way.
Moved the fixture to a SUPPORTS plane, which has no Pearl bit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019HnekoM1EidTwQLS3oFVFm
@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: 13d3e1eb-e665-40b5-97dc-bc7925f06306

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@cursor

cursor Bot commented Sep 25, 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_f8072d30-9f16-4d49-aefc-a4c6a3694564)

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review September 25, 2026 19:30
@cursor

cursor Bot commented Sep 25, 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_5c84e4c7-9e66-4669-9e99-580ea9a8f2f8)

@AdaWorldAPI
AdaWorldAPI merged commit fa9a9b0 into claude/llvm-codegen-polyfill-gni3cw Sep 25, 2026
12 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 04315c7432

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

spofc.truth.confidence,
layers_to_causal_mask(spofc.predicates),
0,
style_ord_to_inference(style_ord),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Derive the emitted predicate from the SPOFC relation

For a SUPPORTS-only dispatch using analytical style, as in the new Ordinal(1) fixture, layers_to_causal_mask emits zero while style_ord_to_inference emits Deduction; consequently p64_bridge::edge_to_layer_mask reconstructs CAUSES rather than SUPPORTS. Other non-Pearl predicate layers are similarly preserved only when the unrelated thinking style happens to select the matching inference type, so feeding emitted edges back through the documented bridge silently moves relationships between planes. Encode relation-derived inference or emit the predicates separately instead of using the style for this field.

Useful? React with 👍 / 👎.

0,
o_palette,
spofc.truth.frequency,
spofc.truth.confidence,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep confidence scoped to the emitted object

When a candidate has supports for different partners—the normal cascade returns up to four distinct targets, as the new test demonstrates—spofc.object names only the best target while this confidence counts every target in c.support. The resulting CE64 therefore asserts one specific S/P/O statement with the evidence weight of unrelated alternative objects, and downstream revision or ranking will treat those alternatives as repeated confirmation of the chosen edge. Compute confidence from supports matching the emitted statement or emit separate edges for the distinct relationships.

Useful? React with 👍 / 👎.

AdaWorldAPI added a commit that referenced this pull request Sep 25, 2026
…l-gni3cw

cognitive-shader-driver: emit CE64 from the SPOFC record (land #1294 on main)
This was referenced Sep 26, 2026
AdaWorldAPI added a commit that referenced this pull request Sep 26, 2026
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