Skip to content

migrate(C2 wave 2b): VM memory/stack/port/control opcodes — cluster C2 complete#540

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/cool-keller-gr5sl
Jun 5, 2026
Merged

migrate(C2 wave 2b): VM memory/stack/port/control opcodes — cluster C2 complete#540
hyperpolymath merged 1 commit into
mainfrom
claude/cool-keller-gr5sl

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

C2 wave 2b — and the array-ABI blocker was never real

The ledger scoped wave 2b as "needs an array/linear-memory ABI." Reading the actual opcode sources overturned that: the VM's memory, stack, and port buffers are not arrays in the brainVmState.res stores every one as string-keyed dict slots (_mem:N, _s:N, _pin:port). That dict is host-side state (the senses); the integer brains are all scalar. No array ABI was required — this is the established scalar recipe.

4 kernels, 9 opcodes (re-decomposed per brain/senses)

Kernel Opcodes Scalar brain
VmMemory LOAD, STORE additive reg ± mem / mem ± reg (host owns memory[])
VmStack PUSH, POP stack-pointer sp ± 1 + register clear (host owns the slots)
VmPort RECV, SEND port-pointer ptr ± 1 + additive accumulate
VmControl IF_POS, IF_ZERO, LOOP scalar branch/continuation predicates (bodies host-orchestrated)

Reversibility migrated as explicit round-trip exports: load/store/sp/recv_acc/recv_ptr/send_ptr all round-trip to identity. IF/LOOP carry no value round-trip — their Janus reversibility is host orchestration (reverse run applies the same predicate to the exit register, runs the chosen branch reversed).

Four gates green

Gate Result
G1 compile 4/4 (WASM)
G2 parity 1568/1568 (independent oracles re-derive each .res transform)
G3 boundary n/a (transforms/predicates — no value↔integer encoding table)
G4 assail 4/4 clean

No-kernel senses (faithfully classified, not migrated)

Call (orchestration) · CoprocessorCall (tombstone — never implemented, superseded by SEND/RECV) · State/VmState/VM/SubroutineRegistry/VmStateCoprocessor/InstructionCoprocessor (state containers / bridges).

Cluster C2 COMPLETE — wave 1 (11 opcodes + taxonomy) + 2a (Mul/Div) + 2b (these 9) = every reversible-VM opcode with a separable integer brain. NEXT = C3.

Staged-only under proposals/idaptik/migrated/ — idaptik write-gate honoured.

https://claude.ai/code/session_01WoKhFQePiRsAj7aqnxbG8s


Generated by Claude Code

…2 complete

Re-decomposition overturned the ledger's premise. Wave 2b was scoped as
"needs an array/linear-memory ABI" -- but reading the sources shows the
VM's memory, stack and port buffers are NOT arrays in the brain:
VmState.res stores every one as string-keyed dict slots (_mem:N, _s:N,
_pin:port). That dict is host-side STATE (the senses); the integer brains
are all scalar -- additive value transforms, pointer arithmetic, branch
predicates. No array ABI was required; this is the established scalar
recipe.

4 kernels covering 9 opcodes, re-decomposed per the brain/senses split:
- VmMemory (LOAD/STORE) -- additive reg/mem transform; host owns memory[].
- VmStack  (PUSH/POP)   -- stack-pointer sp+/-1; host owns the stack slots.
- VmPort   (RECV/SEND)  -- port-pointer +/-1 + additive accumulate.
- VmControl(IF_POS/IF_ZERO/LOOP) -- scalar branch/continuation predicates;
  branch bodies are host-orchestrated, Janus reversibility lives in the host.

Reversibility migrated as explicit round-trip exports: load/store/sp/
recv_acc/recv_ptr/send_ptr all round-trip to identity.

Four gates green: 4/4 compile, 1568/1568 parity (independent oracles
re-deriving each .res transform), G3 n/a (transforms/predicates), 4/4
assail-clean.

No-kernel senses (faithfully classified, not migrated): Call
(orchestration), CoprocessorCall (tombstone -- never implemented,
superseded by SEND/RECV), State/VmState/VM/SubroutineRegistry/
VmStateCoprocessor/InstructionCoprocessor (state containers / bridges).

Cluster C2 COMPLETE (wave 1 + 2a + 2b = all reversible-VM opcodes with a
separable integer brain). Ledger + migration-map updated; NEXT = C3.

https://claude.ai/code/session_01WoKhFQePiRsAj7aqnxbG8s
@hyperpolymath hyperpolymath merged commit b37af77 into main Jun 5, 2026
24 checks passed
@hyperpolymath hyperpolymath deleted the claude/cool-keller-gr5sl branch June 5, 2026 14:25
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

🔍 Hypatia Security Scan

Findings: 87 issues detected

Severity Count
🔴 Critical 2
🟠 High 15
🟡 Medium 70

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Action perpolymath/standards/.github/workflows/governance-reusable.yml@main\n needs attention",
    "type": "unpinned_action",
    "file": "governance.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action ons/checkout@v6\n    needs attention",
    "type": "unpinned_action",
    "file": "publish-jsr.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Action land/setup-deno@v2\n    needs attention",
    "type": "unpinned_action",
    "file": "publish-jsr.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in affine-vscode-publish.yml",
    "type": "missing_timeout_minutes",
    "file": "affine-vscode-publish.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in casket-pages.yml",
    "type": "missing_timeout_minutes",
    "file": "casket-pages.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in casket-pages.yml",
    "type": "missing_timeout_minutes",
    "file": "casket-pages.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in casket-pages.yml",
    "type": "missing_timeout_minutes",
    "file": "casket-pages.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "missing_timeout_minutes",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "missing_timeout_minutes",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "missing_timeout_minutes",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

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