ReviewOS

home-lang/home-os

Function signature mismatches between modules surfaced after #11 import fixes

#12
Open glennmichael123 opened this 10 days ago ·
10 days ago

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

CallerCallsTarget moduleActual exportNote
kernel/src/sync/mutex.homescheduler.wake_process(...)kernel/src/sched/scheduler.homescheduler_wake(...)Function name differs
kernel/src/net/xdp.homememory.kmalloc(size, 0)kernel/src/core/memory.homekmalloc(size) (single-arg)Arity mismatch
kernel/src/perf/zero_copy.homenetwork.net_send_phys(...)kernel/src/net/socket.home (post-#11 redirect)does not exist anywhereMissing 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 check across kernel/src/**/*.home and 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 385acd9 of `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

Sign in to comment on this issue.