name: ircd-common-native-boot description: "ircd-common has a clap entrypoint + an embedded in-process boot() API (ircd-common/src/boot.rs) so the faithful oracle daemon can be booted in a test thread, paired natively with leveva; plus the standing leveva testing plan location" metadata: node_type: memory type: reference originSessionId: 335039bb-9134-491e-a78c-4b71eeee1e72#
ircd-common/src/boot.rs (added 2026-06-10) gives the faithful oracle daemon a
Rust-native entrypoint and an embedded in-process boot, so a test binary can boot it
without a subprocess (the seam to "link ircd-rs and leveva together natively").
ircd_common::boot::Options— clap#[derive(Parser)], one field per the historical getopt flag (-a -b -c -q -i -p{strict|on|off|standalone} -s -t -T -v; C's-h servernameis--servernameso-hstays clap--help).to_bootopt()reproduces the exactbootoptbitmask;to_argv()rebuilds canonical argv.ircd_common::boot::run() -> !— the production path.ircd-rs/src/main.rsis now justfn main() { ircd_common::boot::run() }. It clap-parses, then hands canonical flags to the faithfulircd::c_ircd_main(LEFT BYTE-FOR-BYTE UNTOUCHED — daemonize, signals, iauth child, infiniteio_loop). So the documented faithful-translation bytes the ircd-rs goldens pin are preserved; all goldens stayed green.ircd_common::boot::boot(Options) -> Result<Server, BootError>— the embedded path. Runsircd::boot_embedded(a documented minimal adaptation of the c_ircd_main sequence: same faithful init fns/order, forcesBOOT_TTY|BOOT_NOIAUTH, skips setuid/iauth-vfork/ setup_signals, usess_bsd::init_sys_embeddedso it does NOT close the test process's fds, and returnsErrinstead ofexit(-1)on validation failure), then spawns ONE OS thread running a stop-checkedio_loop.Serverexposesport()/local_addr()(discovered vias_bsd::bound_listener_port, scanninglocal[]for theFLAGS_LISTENclient) andshutdown()(cooperativeAtomicBool+ a connect-poke to wake the blockingselect(); also onDrop). Config comes from the usualIRCD_TEST_CONFIGseam.
ONE world per process — all daemon state is process-global static mut, so at most one
embedded Server at a time (fine for one-oracle + one-leveva pairing; leveva keeps its own
ServerContext). Serialize boots with the shared port lock — ircd-rs/tests/harness::lock_boot_port().
Worked example: ircd-rs/tests/inprocess_boot.rs (boots in-process, registers a client to
RPL_WELCOME, shuts down by joining the loop thread). ircd-common gained a clap dep.
Standing testing plan: docs/superpowers/specs/2026-06-10-leveva-testing-plan.md — the
P11 completeness verdict, the test layers, how this native-boot capability is used (skeleton
differential, since leveva diverges from the oracle at the wire level by design — a byte-diff
is the wrong granularity), the fuzzing gap list, and the per-slice cadence. Related:
[[leveva-next-step-s2s-completeness]], [[leveva-ircv3-track]], [[boot-golden-harness]].