migration B+C: full-corpus triage + C1 deep wave (8 kernels, 4-gate green)#535
Merged
Conversation
…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
a887c62 to
8682584
Compare
🔍 Hypatia Security ScanFindings: 87 issues detected
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ReScript → AffineScript → wasm migration of
hyperpolymath/idaptik, staged underproposals/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/srcleaf modules) re-decomposed into 8 pure-integer co-processor kernels staged underproposals/idaptik/migrated/<Name>/. Brain = the integers that cross the wasm boundary; the host keeps strings/floats/DOM/mutable state (the senses).DeviceTypePuzzleFormatPortNamesportnames.wasm)GameEventKernel_ComputeKernelRetryPolicyDiagnosticsRe-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):agda exit 0: 3 LOSSLESS + 3 CONTROLLED-LOSS, each collision named and certifiedThree C1 files are host-side "senses" with no brain and stay in the host:
Coprocessor_Backends.res(registration wiring),PortNamesCoprocessor.res(JS bridge shim — consumesPortNames.affine),DLCLoader.res(JSON parser; its one integer fragment ships asPuzzleFormat.clamp_tier).Phase B — full-corpus triage (the worklist)
affine-migratabilityover all 571 idaptik.resfiles → the resumable worklist Phases C–Ω navigate from.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 → DONEmigration-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/ocamlinstruction 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