Milestone A2 (MASTER_PLAN §6) asked for "the full type system checks the MVK file-set with zero escape-hatch holes", with a diagnostics bar of file:line:col, expected/found types, and a suggested fix.
Done: scripts/typecheck.sh reports 39/39 Appendix A files with zero type errors, gated on every commit.
The headline finding
The Home compiler already shipped a checker meeting that bar — home check, with proper locations and carets. Nothing in this repository had ever run it. First measurement: 35/39.
That is the third time in Phase 0 the gap turned out to be measurement rather than capability, after build.sh's silent fallbacks (#24) and the stub register that no CI job enforced (#25). Worth stating as a pattern: this project's recurring failure mode is not missing work, it is unmeasured work.
The last four files needed compiler fixes, not kernel fixes
Each had been silently mis-shaping programs rather than merely failing to check them.
| Fix | Upstream | Effect |
|---|---|---|
Arbitrary-width integers (u4, u6, u40) | home-lang/home@4dc1ec9 | 35 → 37 |
| if-expression branches may hold statements | home-lang/home@f39fc6b | 37 → 39 |
| Bindings survive a failed inference | ″ | ″ |
Pointer slicing ptr[0..len] | ″ | ″ |
The worst was the parser. An if-expression branch in brace form was parsed with expression() — exactly one expression. A branch containing a statement left the parser mid-block, and the following expect(RightBrace) consumed the brace closing the enclosing function. No error was reported. The AST for a minimal repro had 4 top-level statements instead of 2: the let binding vanished and every statement after it was hoisted to module scope.
So in vmm.home the checker was right — the function genuinely never declared pdpt. Fifteen "Undefined variable" errors, none of them at the cause.
Real kernel bugs the gate found
mvk_poc.homedeclaredputs(s: int)and called it with a string literal — in the file that is our boot proof.shell_syscall.homepassed bare*u8pointers to parameters typed[]const u8, so the callee would have read a length from whatever followed in memory (#a5dac98).var pipe_fds: [2]u32was uninitialized, and on thecmd_count == 1path theSYS_PIPEcall never runs while the code below still readspipe_fds[0]— a file descriptor made of stack garbage.socket.homecalledtcp.tcp_accept()and declared atcp.TCPConnectionInfo; neither existed anywhere in the tree (fixed in #21f5fdc).scheduler.homedefinedscheduler_waketwice.
Follow-on work for the type system is tracked in #39.