You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Umbrella for the modularity review of main @ 8e8970a (release suite 3216/3216, ASan+UBSan 3220/3220, leak tally 0 — nothing here is currently failing).
The organizing finding
Modularity in this codebase is not a question of design taste. Every boundary with an automated gate is at zero drift; every comparable boundary without one has already broken. The same team, the same conventions, the same review discipline — the gate is the whole difference.
So the recommendation across all of these is one recommendation: extend the gate patterns the project already invented.tools/stdlib_index_check.sh even ships a --selftest that injects a fake undocumented builtin to prove the gate isn't vacuously green — that self-proving pattern generalizes directly to the opcode tables and the LSP registry.
Filed
Correctness-adjacent (drift that is already a defect)
What is well-factored (do not "fix" these — extend them)
ext_names.h (X-macro registry, with the ~120-name drift it killed documented in the header) · jit.h (opaque handle, zero conditional compilation, standalone-testable via jit_smoke.c) · ext_store.c (zero file-scope globals, per-state handle table, whole-TU freestanding gate) · tools/stdlib_index_check.sh (self-proving gate) · the src/freestanding/ seam (no forked runtime logic, two-stage symbol gate plus a glibc differential) · the acyclic header graph · EIGS_JIT_ENABLED collapsing arch+freestanding into one symbol used 7 times.
Suggested order
#738 first — it is the cheapest and it mechanically prevents #737's class from recurring. Then #737 and #743 (already-drifted invariants), then #740 (retires two existing workarounds), then the rest.
Umbrella for the modularity review of
main@8e8970a(release suite 3216/3216, ASan+UBSan 3220/3220, leak tally 0 — nothing here is currently failing).The organizing finding
Modularity in this codebase is not a question of design taste. Every boundary with an automated gate is at zero drift; every comparable boundary without one has already broken. The same team, the same conventions, the same review discipline — the gate is the whole difference.
SANDBOX_ALLOW[]tests/test_sandbox_allow.eigstools/stdlib_index_check.sh(with--selftest)ext_names.hX-macroeigenlsp.cbuiltin_docs[]ASTTypeswitch exhaustivenessSo the recommendation across all of these is one recommendation: extend the gate patterns the project already invented.
tools/stdlib_index_check.sheven ships a--selftestthat injects a fake undocumented builtin to prove the gate isn't vacuously green — that self-proving pattern generalizes directly to the opcode tables and the LSP registry.Filed
Correctness-adjacent (drift that is already a defect)
OP_TRAJECTORY_SLOTmissing from the untrusted-chunk verifier, 4 opcodes disassemble as"???", 15 desync the disassemblerdefault:arm in 37 of 38 ASTType switches — the enforcement is bought and then opted out of #738 —-Werror=switchis in CFLAGS but defeated bydefault:in 37 of 38ASTTypeswitches; the opcode tables switch onuint8_tso-Wswitchcannot apply at allgc_clear_nodemisses an owned edgeGC_FOR_EACH_CHILDreports (VAL_FN's chunk);CallFramehas 5 hand-written init sites and 2 teardown loopstrace.cis entirely process-global andext_http's per-connection worker callstrace_shutdown();g_exit_requestedis never resetStructure
src/eigenscript, which is why the test runner needs a binary fingerprint guard and CLAUDE.md needs a prohibition; a per-variant objdir retires bothEIGENSCRIPT_FREESTANDINGleaks 52#ifdefblocks intobuiltins.cand 6 intolint.c, thoughext_store.candjit.calready demonstrate two clean gating patternsmake gfx+ the embedding API yields a runtime with no gfx builtins, and eigenlsp's builtin table is 24% complete #742 — env composition duplicated across 5 sites:make gfx+ the embedding API yields no gfx builtins;eigenlsp.c's builtin table is 24% completeeigenscript.his a 1253-line umbrella in 29 TUs,eigenscript.ccarries two dead extension includes,vm.chas 32 stale externsmatmul/softmaxforked byEIGENSCRIPT_EXT_MODEL(structural fork; I could not demonstrate a numeric divergence — see the issue for the negative result)Root cause folded into an existing issue
vm_borrow_scanisstaticinvm.c, so the other TUs cannot call it; there are 4 uncompensated sites, not 3, and the Debug-build guard for the #546 borrow-scan cap: full-scan past the cap and abort on a missed borrow #548 guard covers only the 3 that were already correct (comment)Corrections to my own earlier claims, recorded so nobody re-derives them
g_vm,g_try_depth, andg_arenaare not globals — they are bridge macros ontoEigsThread(eigenscript.h:716-784). TheEigsState/EigsThreadseam works and most of the runtime obeys it; Multi-state boundary: trace.c is entirely process-global and ext_http's per-connection worker calls trace_shutdown(), destroying the process tape on every request #739 is about the few subsystems never migrated.tools/gen_lsp_stdlib_index.sh→src/lsp_stdlib_index.h), which narrows AI discoverability: llms.txt is invisible to agents working in the repo, BUILTINS.md omits map/filter/reduce, and there is no machine-readable API index #734 considerably (comment).ValTypea build error does not hold —val_type_nameends indefault: return "?", and there are zero_Static_asserts insrc/(see -Werror=switch is in CFLAGS but defeated by adefault:arm in 37 of 38 ASTType switches — the enforcement is bought and then opted out of #738).eigenscript-extend-vm(cited as holding the "update all N sites" checklist that would have prevented Opcode metadata tables have already drifted: OP_TRAJECTORY_SLOT missing from the untrusted-chunk verifier, 4 opcodes disassemble as "???", 15 desync the disassembler #737),eigenscript-jit, andaot-differential..claude/skills/contains onlywrite-eigenscript.What is well-factored (do not "fix" these — extend them)
ext_names.h(X-macro registry, with the ~120-name drift it killed documented in the header) ·jit.h(opaque handle, zero conditional compilation, standalone-testable viajit_smoke.c) ·ext_store.c(zero file-scope globals, per-state handle table, whole-TU freestanding gate) ·tools/stdlib_index_check.sh(self-proving gate) · thesrc/freestanding/seam (no forked runtime logic, two-stage symbol gate plus a glibc differential) · the acyclic header graph ·EIGS_JIT_ENABLEDcollapsing arch+freestanding into one symbol used 7 times.Suggested order
#738 first — it is the cheapest and it mechanically prevents #737's class from recurring. Then #737 and #743 (already-drifted invariants), then #740 (retires two existing workarounds), then the rest.