Context
The 2026-05-07 audit (kernel at 77.4% OK) shows that the dominant remaining bottleneck is 69 parse failures concentrated in arch/arm64/rpi/*, drivers/*, fs/*, net/*. Top patterns:
| Count | Pattern |
|---|---|
| 9 | Expected '{' |
| 8 | Expected field name |
| 7 | Expected semicolon or newline between statements |
| 6 | Expected variable name |
| 6 | Expected '}' after struct fields |
Audit hypothesis: many of these are downstream of Rust-style Type::Variant enum constructor syntax. Example from kernel/src/arch/arm64/rpi/gic400.home:215:
let trig = IrqTrigger::Level // currently fails — parser sees `:` and confuses field/typeHome has Type.Variant style (verified in earlier enum Color { Red, Green } snippets). :: is a Rust-ism that the kernel writers brought over.
Two paths
Option A: parser support — add :: as alias for .
Lex :: as a distinct token, parse Type::Variant identical to Type.Variant. Low-risk, kernel-friendly, ~30-50 files unblocked. Single small parser addition (~10-30 lines).
Option B: kernel codemod
Mass-rewrite kernel Type::Variant → Type.Variant. Bigger touch surface but no language change. Probably ~50-100 sites.
Recommendation
Option A. The :: form is widely used in the kernel (these files were ported from Rust references); accepting it as syntactic sugar costs nothing and removes a footgun. Home already accepts both [T; N] and [N]T for arrays, both error{...} and traditional Result, etc. — kernel idioms have been a common addition pattern.
Approach
- Reproduce:
let x = IrqTrigger::Level(andIrqTrigger::Level{ ... }if applicable for tuple/struct variants) - Locate the lexer (probably
packages/lexer/src/lexer.zig) and add aColonColontoken type or similar - In the parser, wherever
.is handled for member access on type-position expressions, also accept:: - Verify with sample files from the audit —
arch/arm64/rpi/gic400.home,arch/arm64/rpi/uart.home,power/battery.home, etc.
Audit-flagged files for spot-check:
kernel/src/arch/arm64/rpi/emmc.homekernel/src/arch/arm64/rpi/gic400.homekernel/src/arch/arm64/rpi/gpio.homekernel/src/arch/arm64/rpi/uart.homekernel/src/power/battery.homekernel/src/power/cpufreq_x86.homekernel/src/power/thermal_x86.home
Why this matters
Single parser fix projected to unblock 30-50 files (~7-12 pp OK). Highest leverage on the post-#41 board.
Reference
- 2026-05-07 audit: `~/Desktop/home-os-kernel-audit-2026-05-07.tsv`