Repository navigation
CE64 ISA: strict decoder, register methods, field contracts - #1407
Conversation
Reasoning chooses the operation; CausalEdge64 defines what it means. - isa.rs: strict Opcode decoder (5 of 16 codes execute; counterfactual, intervention and reserved codes fault), one canonical truth function per instruction, declared field contracts. - forward decodes and dispatches to execute(op); no semantic default arm. - register methods deduction/induction/abduction/synthesis (payload via an explicit Compose algebra), revision (truth-only), counterfactual and intervention (partial, always refuse). - learn and syllogize use the canonical truth functions. - forward, forward_chain, forward_edge, replay_step now return Result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
…t confidence Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
|
Warning Review limit reachedYour organization has reached its usage spending cap. Adjust your spending cap in the billing tab. Next included review available in 5 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 61 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (19)
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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9fcfb8cb07
ℹ️ 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".
Codex P2 on #1407: - counterfactual()/intervention() built their fault from the v2 signed mantissa unconditionally, so under the v1 layout a direct call reported -6/+6 while forward() reported 6/5 for the same instruction. Both now go through IsaFault::unsupported, which encodes the code in the active layout (to_mantissa is now const for this). New unit test in isa.rs runs under both layouts and pins the agreement. - ReplayError and replay_chain's # Errors said replay has one failure mode; they now describe ReplayError::Isa as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
forward() now returns Result and refuses non-executable codes, so the fixture draws only the five executable mantissas and unwraps the result. Re-verified: the energy-3-bit disable still turns J red. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
forward() now returns Result and refuses non-executable codes, so the fixture draws only the five executable mantissas and unwraps the result. Re-verified: the energy-3-bit disable still turns J red. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
Reasoning chooses the operation.
CausalEdge64defines what that operation means.Gadamerdecides whether evidence is admitted; the register only computes.Methods and signatures
a.deduction(b, compose) -> Selfa.induction(b, compose) -> Selfa.abduction(b, compose) -> Selfa.synthesis(b, compose) -> Selfa.revision(b) -> Selfaa.counterfactual(b, compose) -> Result<Self, IsaFault>a.intervention(b, compose) -> Result<Self, IsaFault>a.execute(op, b, compose) -> Selfforwardrunsa.forward(b, s, p, o) -> Result<Self, IsaFault>b's code, then dispatch toexecuteComposeis the S/P/O payload algebra only. It never selects an opcode. Using the same operands with two different algebras changes S/P/O and leaves every other field identical (tested).Dispatch over all 16 inference codes
+1+2-1+4+50,-8,-2,±3,-4,-5,±6,±7IsaFault::Unsupported { mantissa }Before this PR,
±6and±7ran the Synthesis mean and came back stamped±6and7. The other unsupported codes ran some other instruction and came back stamped with that instruction's code.Field-liveness matrix
Each row is declared in
isa::contractsand checked ince64_isa_contract.rsby perturbing one operand field at a time.forward/executerevisionlearnsyllogizeNonewithout a figureforwardandsyllogizealready wrote W and Epi5 as zero before this PR. They are now declared constants rather than an undocumented loss; the behaviour itself is unchanged.Golden vectors (raw
u64)Max-confidence revision defect
revision(c=255, c=255)returnsf = c = 0. The path:c = 1.0 ≥ 0.999, soevidence_weight = f32::MAX;MAX + MAX = +inf;inf / inf = NaN;u8cast saturatesNaNto0.A single c=255 operand gives a finite result but dominates: its frequency wins outright. The capped reference instead gives a weighted mean.
Both cases are pinned as known-bad and kept out of the normative set. The smallest fix is to cap c before
evidence_weight, as the reference does; that is a separate PR.Gadamer stays above the register
tests/gadamer_isa_revision.rs:revision;revisionalone would inflate an echo, which is why the gate sits above it.isa.rsnames no reasoning-policy types (enforced by a source guard).Tests
-D warnings.chain_confidence,gadamer_isa_revisionandmoore_nars16_probe(15) pass, as do the full planner, cognitive-shader-driver and p64-bridge suites.Every disable run below asserts that its patch applied, and each turned the listed tests red:
forwardignores the decoded opcodelearnclears Wrevisionclears Epi5isa.rscounterfactualcomputes a resultOpen
forward's revision step (+4) composes the payload, whilerevision(b)does not. Whether a payload-composing revision step should exist at all is a decision this PR does not make.forwardwrites the executed code into bits 46..49. The transition-loop reading ("do not whisper the operation back into the result edge") says it should not. This predates the PR and is unchanged.learnmixes arithmetic with policy: archetype reassignment and the 0.9 / 0.7 freeze thresholds.syllogizeboth chooses its rule from the figure and computes it.TruthValue,nars_infer,NarsTables) still differ from the canonical ones.API change:
forward,forward_chain,NarsEngine::forward_edgeandreplay_stepnow returnResult.ReplayErrorgains anIsavariant.Docs:
docs/architecture/ce64-semantic-upper-half.mdnow separates physical encoding, declared reading and ISA operation. Board:.claude/board/entries/2026-10-08-ce64-isa-register-contract.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01EFw2WdKr1oxvaKCJC2ua2R
Generated by Claude Code