GM
evmts/guillotine-mini Backpressure Audit
main @ 046265e7791a · 2026-11-27T20:53:39.182Z
UNTRUSTED CONTRIBUTOR Smithers Factory Docs
0-49 Failing (4) 50-89 Opportunity (3) 90-100 Passing (16)
Execution Trust Tier untrusted-contributor GitHub Actions event "workflow_dispatch" on "main" is not a canonical main push; running untrusted.
Shared Object Store local-only (build.smithers.sh) Cache write allowed: no (protected against poisoning)
Merge Gate Authority Informational only Actor: roninjin10 via github-actions:workflow_dispatch
Factory & Formal Telemetry 210 Lean proofs · 0 sorry 8 Smithers packages · 11 flows · 8 wiki notes

Top Score Opportunities

Highest-leverage changes ordered by weighted Lighthouse score gain across Uphill categories.

+29 footprint zig-file-lines (20 items)
1634 → 400
+22 verification zig-inline-test-coverage
45.8 → 95
+12 verification ts-test-ratio
70 → 100
+5 style line-length (15 items)
fail → pass
+4 safety zig-assertion-density
0.41 → 20
+2 style function-length src/compiled_code.zig
250 → 70
+2 style function-length src/opcode.zig
159 → 70
+2 style function-length src/u256_math.zig
130 → 70
+2 style function-length src/storage_injector.zig
125 → 70
+2 footprint wasm-surface-bytes src/evm.zig
154091 → 16000
+2 footprint wasm-surface-bytes src/root_c.zig
113679 → 16000
+2 footprint wasm-surface-bytes src/simulation.zig
111497 → 16000

Safety & TigerStyle

Crash-free EVM execution, error propagation, and type-safety across Zig and TypeScript.

6 audits
Zig no panic 48 / 48 pass w2 100

Never use @panic or unreachable in production src/ Zig code; validate and return typed errors.

All 48 measured check(s) passed target thresholds.

Zig no debug print 48 / 48 pass w1 100

Replace std.debug.print in production src/ Zig modules with logger.zig.

All 48 measured check(s) passed target thresholds.

Zig no swallowed errors 48 / 48 pass w2 100

Never swallow errors with empty catch {} or leave error.NotImplemented stubs in production Zig code.

All 48 measured check(s) passed target thresholds.

Zig assertion density 0.41 (target 20) w1 55

Add invariant assertions to production Zig functions to raise assertion density toward TigerStyle targets.

All 1 measured check(s) passed target thresholds.

Ts no explicit any 11 / 11 pass w1.5 100

Replace explicit `any` annotations and `as any` casts in ts/ with narrow types.

All 11 measured check(s) passed target thresholds.

Ts no suppress 11 / 11 pass w1 100

Fix underlying TypeScript errors instead of using @ts-ignore, @ts-expect-error, or @ts-nocheck.

All 11 measured check(s) passed target thresholds.

Style & Limits

TigerStyle structural bounds (70-line functions, 120-char lines) and canonical Zig formatting.

4 audits
Zig fmt 75 / 75 pass w2 100

Keep all Zig files in src/ formatted with `zig fmt`.

All 75 measured check(s) passed target thresholds.

Function length 125 (target 70) w2 64

Keep every production Zig runtime function at or below 70 lines (TigerStyle limit).

ItemMeasuredTargetDiagnostic
src/compiled_code.zig 250 70 compile() is 250 lines (TigerStyle limit 70)
src/opcode.zig 159 70 getOpName() is 159 lines (TigerStyle limit 70)
src/u256_math.zig 130 70 divRem() is 130 lines (TigerStyle limit 70)
src/storage_injector.zig 125 70 writeChangesJson() is 125 lines (TigerStyle limit 70)
src/trace_store.zig 112 70 filter() is 112 lines (TigerStyle limit 70)
src/simulation.zig 85 70 executeOnOverlay() is 85 lines (TigerStyle limit 70)
src/debugger.zig 79 70 writeCurrentStateSummary() is 79 lines (TigerStyle limit 70)
Line length 33 / 48 pass w1 69

Keep production Zig lines at or below 120 characters (TigerStyle limit).

ItemMeasuredTargetDiagnostic
src/async_executor.zig fail - line 219: 121 chars (limit 120)
src/call_result.zig fail - line 87: 124 chars (limit 120)
src/debugger.zig fail - line 567: 128 chars (limit 120)
src/evm.zig fail - line 281: 123 chars (limit 120)
src/evm_config.zig fail - line 9: 133 chars (limit 120)
src/frame.zig fail - line 103: 130 chars (limit 120)
src/inspector.zig fail - line 330: 123 chars (limit 120)
src/instructions/frame_interface.zig fail - line 58: 128 chars (limit 120)
src/instructions/handlers_context.zig fail - line 40: 151 chars (limit 120)
src/instructions/handlers_log.zig fail - line 61: 127 chars (limit 120)
src/instructions/handlers_storage.zig fail - line 245: 136 chars (limit 120)
src/instructions/handlers_system.zig fail - line 374: 124 chars (limit 120)
src/precompiles/wasm_host.zig fail - line 13: 182 chars (limit 120)
src/simulation.zig fail - line 188: 123 chars (limit 120)
src/storage.zig fail - line 54: 125 chars (limit 120)
No todo markers 59 / 59 pass w1 100

Resolve TODO, FIXME, XXX, and HACK markers in production Zig and TypeScript modules.

All 59 measured check(s) passed target thresholds.

Footprint & Minimalism

Minimal EVM source footprint, WASM surface compactness, and module size budgets.

3 audits
Zig file lines 1634 (target 400) w2 24

Keep production Zig files concise (<=400 lines) to preserve guillotine-mini's minimal architecture.

All 48 measured check(s) passed target thresholds.

Wasm surface bytes 73727 B (target 16000 B) w1.5 33

Keep core EVM modules under src/ and wasm/ compact to protect the <=2.5 MiB WASM binary budget.

All 49 measured check(s) passed target thresholds.

Ts file lines 295 (target 300) w1 90

Keep TypeScript modules under ts/ concise (<=300 lines per file).

All 11 measured check(s) passed target thresholds.

Verification & Tests

Lean 4 formal oracle proofs, Zig inline unit tests, and TypeScript test coverage.

4 audits
Lean no sorry 8 / 8 pass w2 100

Never leave `sorry` or unproved `axiom` declarations in spec/lean/**/*.lean.

All 8 measured check(s) passed target thresholds.

Lean theorems 210 (target 120) w1 98

Expand Lean 4 reference specification proofs in spec/lean/ toward complete opcode/fork coverage.

All 1 measured check(s) passed target thresholds.

Zig inline test coverage 45.8 (target 95) w1.5 11

Include inline `test` blocks inside production src/ Zig modules.

All 1 measured check(s) passed target thresholds.

Ts test ratio 70 (target 100) w1 22

Pair every production TypeScript module in ts/ with dedicated unit tests.

All 1 measured check(s) passed target thresholds.

Documentation

Companion *.zig.md design docs and local markdown link integrity.

2 audits
Broken links 45 / 45 pass w2 100

Fix broken relative and root-relative links in root Markdown files and docs/**/*.md.

All 45 measured check(s) passed target thresholds.

Companion doc coverage 100 (target 90) w1 94

Maintain companion `*.zig.md` design documentation alongside top-level production `src/*.zig` modules.

All 1 measured check(s) passed target thresholds.

Factory & Trust

Smithers Cloud projections, cache-poisoning trust boundaries, Obsidian wiki links, and MCP agent readiness.

4 audits
Factory projection sync 2 / 2 pass w2 100

Keep .smithers/factory.json and .smithers/home.json valid and projected from FACTORY.ts and HOME.ts.

All 2 measured check(s) passed target thresholds.

Trust boundary guard 4 / 4 pass w2 100

Enforce cache-write isolation, canonical main release gating, protected trust roots, and person-only merge policy.

All 4 measured check(s) passed target thresholds.

Wiki link integrity 15 / 15 pass w1.5 100

Maintain all core .smithers/wiki pages and Mythical History with zero broken Obsidian wikilinks.

All 15 measured check(s) passed target thresholds.

Mcp and agent readiness 3 / 3 pass w1 100

Keep .mcp.json, AGENTS.md, and one-time sandbox auth tooling wired to smithers.sh/evmts/guillotine-mini/mcp.

All 3 measured check(s) passed target thresholds.