Skip to content

D-PEARL-IO-0: Pearl's ladder executed in and out of CausalEdge64 - #1390

Merged
AdaWorldAPI merged 5 commits into
mainfrom
claude/epistemicstate5-ce64-bits-3oe0dq
Oct 7, 2026
Merged

AdaWorldAPI merged 5 commits into
mainfrom
claude/epistemicstate5-ce64-bits-3oe0dq

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

A CausalEdge64 enters with one EpistemicState5. Its Pearl projection (bits 40..42) selects an existing operator, and the edge leaves with a different state only where the measurement earned it.

Inventory first

Almost everything already existed; nothing connected it.

need existing what changed
Pearl input CausalMask, simpsons_paradox_risk nothing dispatched on it before
observational and intervention obligations P7a Model folds (#1369) moved unchanged into examples/shared/certification_model.rs. certify now checks causes, then delegates to a new certify_observational. The 13 P7a tests are unchanged.
counterfactual dismech_counterfactual::counterfactual_replay used as is: one replay path, −6 tag
epistemic output EpistemicState5, project_state5, stamp used as is

The missing seam, now in the probe:

  • pearl::reason dispatches on bits 40..42 and nothing else of the edge.
  • pearl::revise writes the measurement back.
  • pearl::hydrate is the topology gate.

There is no contract change.

Operators

  • SO runs the P7a observational folds. It can earn at most CausalCandidate, and it ignores trial data even when the model holds it.
  • PO runs P7a causes on the executed randomized arms. This is the only path to Causes.
  • SPO runs counterfactual_replay with one route cut. It returns a reaction (load-bearing, truth-only or inert, with both frequencies) and never a certification.
  • SP compares the SO and PO directions. It returns a confounding diagnostic and never demotes.

Measured has private fields, so only an operator can produce one. revise raises the certification to what was earned and never lowers it. It writes bits 59..63 only.

hydrate moves IndirectUnknown to IndirectKnown only when both bindings A → B and B → Y exist in the sealed chain. Proposing a candidate changes nothing.

CUI BONO, measured

step state
start, SO IndirectUnknown × Related
propose an unbound candidate unchanged
hydrate A → B → Y IndirectKnown × Related
PO IndirectKnown × Causes
SPO cut B → Y load-bearing (frequency 185 → 120); state unchanged
SPO cut A → B truth-only (185 → 225); state unchanged

Two findings:

  • A cut can raise the truth. The replay verdict is a NARS revision over step frequencies, so cutting a weak step raises the result. The reaction therefore keeps both numbers, not just "flipped".
  • Removing one cause at a time is not the causal test. With Y = A or B, removing A where B holds changes nothing. Removing A with B disabled does change Y, and the randomized arms certify Causes. The chain replay is linear and cannot express the OR, so the contingency is a mask over the unit population.

Falsifiers (14 tests; 12 disable runs, each red)

Each disable makes the forbidden thing possible, and the named test fails:

  1. SO earns Causes by reading the trial data.
  2. SPO certifies without evidence.
  3. A load-bearing cut earns Causes.
  4. The counterfactual branch is written back to the edge.
  5. Hydration happens without the bindings.
  6. Confounding demotes Causes.
  7. A null reaction demotes.
  8. Revision changes a field other than bits 59..63.
  9. Dispatch is nondeterministic.
  10. Intervention receipts without executed arms earn Causes.
  11. Bits 59..63 select the operator.
  12. The mantissa selects the operator.

Gates: clippy -D warnings and fmt are clean. The probe passes 14/14, the P7a probe 13/13, and the epistemic reading-conflict probe 9/9.

Documentation

docs/architecture/ce64-semantic-upper-half.md embeds the semantic upper-half diagram of bits 40..63 (docs/architecture/img/ce64-semantic-upper-half.png) and compares it with the code, band by band. The page is marked WORKING-MODEL.

bits diagram vs. code
0..42 match
59..63 match
43..45 code has a direction triad
46..49 code has the inference mantissa
50..52 code has plasticity
53..58 holds one witness handle, not an update history

No code changes in this part.

Open

  • Where reason, revise and hydrate live in production.
  • Removing node B entirely. Only route cuts run; in a two-step chain those are B's only mechanisms.
  • Contingency search beyond one disabled cause.
  • Whether bits 43..52 should be re-read as the diagram proposes. That would need a version gate.

Entry: .claude/board/entries/2026-10-07-pearl-io-0-ladder-in-and-out-of-ce64.md.

🤖 Generated with Claude Code

https://claude.ai/code/session_0177nSSyQaXqbNuGR1vMXXN6

claude added 2 commits October 7, 2026 18:25
Bits 40..42 select an existing operator; the measurement decides
whether bits 59..63 change.

- SO: P7a observational folds (certify_observational).
- PO: P7a executed randomized arms (Model::causes).
- SPO: dismech counterfactual_replay with one route cut.
- SP: SO vs PO direction through CausalMask::simpsons_paradox_risk.

revise() only raises certification to what the operator earned and
writes bits 59..63 only. hydrate() moves IndirectUnknown to
IndirectKnown only when both bindings A->B and B->Y are sealed.

The P7a model, folds and fixture builder move unchanged into
examples/shared/certification_model.rs; certify() now delegates to a
new certify_observational() after the Causes check (P7a's 13 tests
unchanged).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177nSSyQaXqbNuGR1vMXXN6
- entries/2026-10-07-pearl-io-0-ladder-in-and-out-of-ce64.md: inventory,
  the seam, the measured CUI BONO script, the 12 disable runs, open items.
- STATUS_BOARD row D-PEARL-IO-0 (In PR); entries index regenerated.
- relational_certification_probe: test-only imports behind cfg(test)
  after the model move; pearl probe: drop a same-type cast.

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

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


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

claude added 3 commits October 7, 2026 20:06
…e code

Adds the operator's diagram of bits 40..63 (Pearl ladder, orientation,
activation, entropy, belief-state update, epistemic state) with a band-by-
band table against layout.rs and epistemic_state5. Bands 0..42 and 59..63
match; 43..45, 46..49 and 50..52 are read differently in code (direction
triad, inference mantissa, plasticity); 53..58 holds one witness handle,
not a history. Marked WORKING-MODEL; no code change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177nSSyQaXqbNuGR1vMXXN6
Short section before Workspace: what the register packs, the diagram, and
the one-paragraph caveat that it is a working model (bits 43..58 differ
from the code), linking the band-by-band page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177nSSyQaXqbNuGR1vMXXN6
The image now sits under the badges as the page's picture and links to
the section that explains it; the section keeps the working-model caveat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177nSSyQaXqbNuGR1vMXXN6
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 7, 2026 20:10
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T20:13:06.012919Z fec0613 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@AdaWorldAPI
AdaWorldAPI merged commit 6368d8c into main Oct 7, 2026
7 of 9 checks passed
@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown

Add Carrot credits or activate Agent usage billing to use Autopilot

@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: fec061392b

ℹ️ 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".

pub fn reason(edge: CausalEdge64, ev: &Evidence<'_>, edit: Edit) -> Measured {
let op = Operation::of(edge.causal_mask());
let mut out = Measured::new(op);
let m = ev.model;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Bind evidence to the edge being certified

When a caller pairs a PO edge for one relation with a Model built from another relation's positive trial, Model contains no subject, predicate, or outcome identity and this code never compares it with edge; m.causes() can therefore produce a measurement that upgrades the unrelated edge to Causes. The sealed evidence needs to identify the relation it measures, and reason should reject a mismatch before earning certification.

Useful? React with 👍 / 👎.

Comment on lines +352 to +356
let has = |s: u8, o: u8| sealed.iter().any(|(_, e)| e.s_idx() == s && e.o_idx() == o);
let found = match (has(a, b), has(b, y)) {
(true, true) => Hydration::Hydrated,
(false, false) => Hydration::ProposedOnly,
_ => Hydration::Partial,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Require the bindings to form an ordered chain

If the sealed steps contain B → Y before A → B, these two independent any searches still return Hydrated and promote the topology to IndirectKnown, even though traversing the recorded chain never yields A → B → Y. Check the bindings in chain order (and on the same applicable route) rather than merely checking that both endpoint pairs occur somewhere in the slice.

Useful? React with 👍 / 👎.

Comment on lines +230 to +235
Operation::Association => match m.sourced() {
Err(e) => out.ungrounded = Some(Ungrounded::Model(e)),
Ok(()) => {
let c = m.certify_observational();
if c != Contract::Open {
out.earned = Some(c.certification());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve ungrounded observational results

For an observational model with two valid source receipts but empty comparison arms, m.sourced() succeeds, while every fold inside certify_observational() returns Err(EmptyArm) or Err(NoDeclaredStratum) and the helper collapses those errors to Contract::Open. This leaves both earned and ungrounded unset, incorrectly reporting a grounded negative result instead of the documented Ungrounded::Model; the observational evaluation needs to retain the fold error when no rung is grounded.

Useful? React with 👍 / 👎.

AdaWorldAPI pushed a commit that referenced this pull request Oct 7, 2026
…ords

- entries/2026-10-07-pearl-prod-0-production-wiring.md: placement, the CI
  coverage change, open items (no runtime caller yet; 64-unit cap).
- STATUS_BOARD: D-PEARL-PROD-0 (In PR); D-PEARL-IO-0 Shipped (#1390);
  D-PUZZLE-0 step 3 merged (#1387).
- LATEST_STATE: #1387/#1390 merged; contract delta certification.rs.
- PR_ARC_INVENTORY: #1390 and #1387 entries.
- docs/architecture/ce64-semantic-upper-half.md points at the production
  modules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177nSSyQaXqbNuGR1vMXXN6
AdaWorldAPI pushed a commit that referenced this pull request Oct 7, 2026
…eduler

run_with(opts): heap scheduler (lazy stamps), FIFO worklist baseline,
wall-clock window budget with continuation, Forget arms at window
boundaries (belief, question bits, register, evidence, attention),
#1390 Simpson+trial population, fold quadrants, polarity, end
attractors, productive/redundant/rejected accounting, dense 1k..1M
fold windows. Comparative tests now pool three seeds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177nSSyQaXqbNuGR1vMXXN6
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