Context
Issue #11 fixed 23 dangling kernel imports by redirecting them at the right files. With imports now resolving, typechecker-level mismatches surface that weren't visible before. Documented in the #11 agent's report.
Confirmed mismatches
| Caller | Calls | Target module | Actual export | Note |
|---|---|---|---|---|
kernel/src/sync/mutex.home | scheduler.wake_process(...) | kernel/src/sched/scheduler.home | scheduler_wake(...) | Function name differs |
kernel/src/net/xdp.home | memory.kmalloc(size, 0) | kernel/src/core/memory.home | kmalloc(size) (single-arg) | Arity mismatch |
kernel/src/perf/zero_copy.home | network.net_send_phys(...) | kernel/src/net/socket.home (post-#11 redirect) | does not exist anywhere | Missing function |
There are likely more once home check is run across the kernel after #11 lands; these are just the ones the audit-followup agent noticed in passing.
Why this happened
Each redirect in #11 picked the closest-matching real file (e.g. network.net_send_phys got redirected to net/socket.home since that's where the canonical socket API lives), but didn't audit that the consuming code's call sites match what the target module actually exports. The work was scoped strictly to import-line edits.
Proposal
- Once #14 (BSS zero-init) and #16 (parser hangs) land, run
home checkacrosskernel/src/**/*.homeand bucket each typecheck error - For "function not found" / "wrong arity" errors specifically, decide per case:
- Caller is using an outdated API → update the call site
- Target module is missing a function the caller needs → add the function (or move it from wherever it currently lives)
- The redirect from #11 was conceptually wrong → choose a different target
- File subsequent issues by subsystem if the bucket is large
References
- Originating discussion: this finding was bullet 3 of "Unexpected discoveries" in the #11 agent's report (commit
385acd9of `fix: resolve 23 dangling kernel module imports`) - Related: home-lang/home #14 (BSS zero-init) blocks this from being fully audited; #16 (parser hangs) blocks bulk `home check` runs