Skip to content

migration B+C: full-corpus triage + C1 deep wave (8 kernels, 4-gate green)#535

Merged
hyperpolymath merged 2 commits into
mainfrom
claude/cool-keller-gr5sl
Jun 5, 2026
Merged

migration B+C: full-corpus triage + C1 deep wave (8 kernels, 4-gate green)#535
hyperpolymath merged 2 commits into
mainfrom
claude/cool-keller-gr5sl

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

@hyperpolymath hyperpolymath commented Jun 5, 2026

ReScript → AffineScript → wasm migration of hyperpolymath/idaptik, staged under proposals/idaptik/ (the access gate keeps idaptik writes out of scope; this is verified + staged + applyable, not applied). Two phases on this branch.

Phase C — deep wave 1 (cluster C1), 4-gate green

Cluster C1 (the eleven shared/src leaf modules) re-decomposed into 8 pure-integer co-processor kernels staged under proposals/idaptik/migrated/<Name>/. Brain = the integers that cross the wasm boundary; the host keeps strings/floats/DOM/mutable state (the senses).

Kernel Brain Boundary verdict
DeviceType 12-device taxonomy: count, validity, code-clamp LOSSLESS
PuzzleFormat difficulty(4)/tier(5) + DLCLoader clamp-to-default CONTROLLED-LOSS @0
PortNames 10 coprocessor-domain port taxonomy (= portnames.wasm) LOSSLESS
GameEvent alertLevel(4, ordered clamp) + direction(6, flat) LOSSLESS + CL @0
Kernel_Compute per-domain element caps + 504/413/404/0 scheduler gate decision (parity)
Kernel 503/404/0 pre-flight gate + domain→handler router CONTROLLED-LOSS @4
RetryPolicy 503/504/429 transient classifier + 3-policy table decision (parity)
Diagnostics <70/<90/≥90 health-band classifier + registry check decision (parity)

Re-decomposed, not transliterated: Promise/async collapsed to the synchronous status decision; service-locator reads (ResourceAccounting, backend registry) threaded as explicit integer params; variants re-encoded as closed integer bands; floats + wall-clock timing kept host-side.

Four gates green (captured in migrated/EVIDENCE.adoc):

  • G1 compile — 8/8 → wasm
  • G2 parity — 1223/1223 oracle-vs-wasm inputs (independent JS oracles)
  • G3 echo-boundary — 6 Agda proofs, agda exit 0: 3 LOSSLESS + 3 CONTROLLED-LOSS, each collision named and certified
  • G4 assail — 8/8 clean (no undeclared clamp / unguarded decoder)

Three C1 files are host-side "senses" with no brain and stay in the host: Coprocessor_Backends.res (registration wiring), PortNamesCoprocessor.res (JS bridge shim — consumes PortNames.affine), DLCLoader.res (JSON parser; its one integer fragment ships as PuzzleFormat.clamp_tier).

Phase B — full-corpus triage (the worklist)

affine-migratability over all 571 idaptik .res files → the resumable worklist Phases C–Ω navigate from.

Verdict Count %
MIGRATABLE NOW 389 68%
STRING-GATED (wall 1) 71 12%
EFFECT-GATED (wall 2) 111 19%

Non-test production: 358 files, 196 migratable (55%). Twelve clusters C1..C12 ordered leaf-pure-integer-first. Top walls: module-level ref() (79), string subscript (44), String.length (30).

  • migration-map.json — machine worklist (resume rule + per-cluster files + per-file wall labels); C1 status → DONE
  • migration-map.adoc — human map
  • {state-vs-digest,game-vs-deepspace}.svg — Phase A determinism diagrams (not previously committed)

Ledger

Phase B DONE; Phase C wave 1 (C1) DONE. NEXT: C2 — the vm/lib/ocaml instruction set (31 files, the pure-integer reversible VM opcodes), same 4-gate recipe.

Rebased onto current main (incl. #534 codegen-deno WASI stub); #533 evangelist toolkit confirmed merged.

https://claude.ai/code/session_01WoKhFQePiRsAj7aqnxbG8s


Generated by Claude Code

claude added 2 commits June 5, 2026 05:23
…n,adoc}

Phase B of the ReScript -> AffineScript -> wasm migration: ran the
affine-migratability tool over all 571 idaptik .res files and bucketed by
area x verdict x shape into a resumable worklist.

  571 files: 389 MIGRATABLE NOW (68%), 71 STRING-GATED (12%), 111 EFFECT-GATED.
  Non-test production: 358 files, 196 migratable (55%).
  Twelve clusters C1..C12 ordered leaf-pure-integer-first, + C_TESTS.
  Top walls: module-level ref() (79), string subscript (44), String.length (30).

migration-map.json is the machine worklist (resume_rule + per-cluster file
lists + per-file wall labels); migration-map.adoc is the human map. Also lands
the two determinism latency-regime SVGs (game-vs-deepspace, state-vs-digest)
referenced by multiplayer-determinism.adoc but not previously committed.

https://claude.ai/code/session_01WoKhFQePiRsAj7aqnxbG8s
Deep wave 1 of the ReScript -> AffineScript -> wasm migration. Cluster C1
(shared/src leaf modules) re-decomposed into eight pure-integer co-processor
kernels staged under proposals/idaptik/migrated/, each verified end-to-end by
the 4-gate recipe.

Kernels (brain = the integers that cross the wasm boundary; host keeps the
strings/floats/DOM/state — the senses):

  DeviceType      12-device taxonomy: count, validity, code-clamp (lossless)
  PuzzleFormat    difficulty(4)/tier(5) encodings + DLCLoader clamp-to-default
  PortNames       10 coprocessor-domain port taxonomy (= portnames.wasm, the
                  kernel PortNamesCoprocessor.res's JS bridge already targets)
  GameEvent       alertLevel(4, ordered clamp) + direction(6, flat)
  Kernel_Compute  per-domain element caps + the 504/413/404/0 scheduler gate
  Kernel          the 503/404/0 pre-flight gate + domain -> handler router
  RetryPolicy     the 503/504/429 transient classifier + 3-policy config table
  Diagnostics     the <70/<90/>=90 health-band classifier + registry check

Re-decomposed, not transliterated: Promise/async collapsed to the synchronous
status decision; service-locator reads (ResourceAccounting, backend registry)
threaded as explicit integer params; variants re-encoded as closed integer
bands; floats + wall-clock timing kept host-side (timing is a sense).

Four gates green (captured in migrated/EVIDENCE.adoc):
  G1 compile        8/8 -> wasm
  G2 parity         1223/1223 oracle-vs-wasm inputs (independent JS oracles)
  G3 echo-boundary  6 Agda proofs, agda exit 0: 3 LOSSLESS (DeviceType,
                    PortNames, GameEvent direction) + 3 CONTROLLED-LOSS
                    (PuzzleFormat tier clamp, GameEvent alert clamp, Kernel
                    route fan-in) — each collision named and certified
  G4 assail         8/8 clean (no undeclared clamp / unguarded decoder)

Three C1 files are host-side "senses" with no extractable brain and stay in
the host: Coprocessor_Backends.res (registration wiring), PortNamesCoprocessor
.res (JS bridge shim, consumes PortNames.affine), DLCLoader.res (JSON parser;
its one integer fragment is delivered as PuzzleFormat.clamp_tier).

Staged, not applied — per the plan's access gate, the apply + cutover wait on
idaptik write-access (Phase Omega). Ledger: Phase B + Phase C wave 1 DONE;
next = C2 (vm/lib/ocaml instruction set). migration-map.json C1 -> DONE.

https://claude.ai/code/session_01WoKhFQePiRsAj7aqnxbG8s
@hyperpolymath hyperpolymath force-pushed the claude/cool-keller-gr5sl branch from a887c62 to 8682584 Compare June 5, 2026 05:25
@hyperpolymath hyperpolymath changed the title triage(phase-b): full-corpus migratability sweep — migration-map.json + .adoc migration B+C: full-corpus triage + C1 deep wave (8 kernels, 4-gate green) Jun 5, 2026
@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

@hyperpolymath hyperpolymath marked this pull request as ready for review June 5, 2026 09:52
@hyperpolymath hyperpolymath merged commit d706d52 into main Jun 5, 2026
27 checks passed
@hyperpolymath hyperpolymath deleted the claude/cool-keller-gr5sl branch June 5, 2026 09:53
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