Skip to content

Tracking: 2026-07 modularity review — gated boundaries hold, ungated ones have already drifted #746

Description

@InauguralPhysicist

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.

Boundary Gated? Measured state
SANDBOX_ALLOW[] yes — tests/test_sandbox_allow.eigs 148 entries, 0 phantom
Builtin ↔ docs yes — tools/stdlib_index_check.sh (with --selftest) clean
Extension builtin names yes — ext_names.h X-macro correct by construction
Opcode metadata tables no 3 of 4 tables drifted (#737)
eigenlsp.c builtin_docs[] no 68 of 235 builtins, 1 phantom (#742)
ASTType switch exhaustiveness bought, then opted out 1 of 38 exhaustive (#738)

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)

Structure

Root cause folded into an existing issue

Corrections to my own earlier claims, recorded so nobody re-derives them

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions