Repository navigation
Description
Parent: #1078, in #1076. Needs: #1092, #1093, #1094. Unblocks: #1096, #1120, #1131, #1132.
Goal. NVX's guest helper programs move, with their modules, into nvx-guest-tools: nvx-time-probe; nvx-console-pending, nvx-mmio-write, nvx-exit, nvx-device-io and nvx-reseed; nvx-ingress; and nvx-time. nvx keeps the library parts: Seed, reseed and ReseedError, for the capture's repair and the time ABI; guest::time's public facade, TimeAbi and its types, whose start_daemon forks the time daemon; and the announcer's Announcer, PROGRAM and StartError, until #1120 gives nvx-ingress start a spawner of its own; activation stops starting the announcer earlier, in #1105.
Notes.
- SL1.1a makes the guest build workspace-aware.
guest_binaries.pybuilds, checks and tests the guest binaries across the workspace, each in the crate that owns it, so the later moves don't edit it. nvx-guest-toolsis published afternvx. Its first version is published by hand.
PRs, in order. Each PR has one goal, leaves dev green, and names in its description each old test of its area as kept, rewritten or retired, with each change that check_test_changes.py reports. Its tests follow the repository's test layout: a module's unit tests, and the code that only they use, sit in its tests.rs or tests/ and move with it. The estimates count core lines (code, not comments, docs or tests) and counted files; each PR records its measured values. Each PR does what its Scope says and no more: a case, input or layout that its Scope doesn't name, and whatever "Not in this PR" lists, is out of scope. Address every review comment within the scope, and ask before acting on one that asks for more. A PR whose measured core lines pass the stop that its Estimate names (twice the estimate, at most 600) stops and asks before continuing.
-
SL1.1a:
nvx-time-probeships from nvx-guest-tools.- Objective:
nvx-time-probebecomes the first guest binary owned bynvx-guest-tools. The guest build must consequently build, check, test, identify and stage binaries from whichever workspace crate owns each program, without changing the probe's behavior. - Contents:
git mvofguest::time_probe(1.9K core lines) and its binary.guest_binaries.py, which ran Cargo in thenvx-rsmember only, builds, checks and tests the guest binaries across the workspace, each in the crate that owns it, its test cases included, so the later moves don't edit it; the initramfs build takes the binary from the new crate. The publishing list addsnvx-guest-toolsafternvx, its first version by hand. - Scope:
- Move
nvx-rs/src/guest/time_probe/andnvx-rs/src/bin/nvx-time-probe.rsintocrates/nvx-guest-tools, withtime_probe/tests.rs, each submodule'stests.rsand thetime_probe_*program cases; the unit tests usecommand_linethroughnvx-sys'stest-supportfeature. - Make
scripts/nvx_tools/guest_binaries.pyrun Cargo across the workspace and select each staged guest binary from its owning package. - Update the guest source inventory and initramfs staging so
nvx-time-probecomes fromnvx-guest-toolswhile the other guest binaries still come fromnvx. - Add
nvx-guest-toolsafternvxin the publishing order; its first version is published manually.
- Move
- Not in this PR:
- Changes to
nvx-time-probeoptions, diagnostics, output, exit statuses or probe algorithms: this PR only moves the program. - Renaming or reorganizing the probe modules, or cleaning up their implementation while moving them.
- Moving any other guest binary: later PRs in nvx-rs slimming 1.2.1: the guest helper binaries ship from nvx-guest-tools #1095 and nvx-rs slimming 1.2.2: the managed agent lives in nvx-init #1096 do that.
- A package-discovery framework for arbitrary binaries: the repository has a fixed guest-binary list and known owning crates.
- Changes to
- Approach: Use
git mvfor the probe and its tests, then adapt the existing fixed guest-binary build flow to issue workspace Cargo commands and find each named artifact in its owning package. Keep one inventory and one staging path; do not introduce a new build abstraction or infer packages by parsing manifests. - Done when:
- The moved
time_probe_*cases still check the same command lines, exit statuses, output and probe results fromnvx-guest-tools. - Guest checks and tests run across the workspace and find the probe's unit and integration tests in its owning crate.
- The initramfs build stages
nvx-time-probefromnvx-guest-tools, and a guest image boots with the staged binary. - The publishing list places
nvx-guest-toolsafternvx.
- The moved
- Needs: SL0.3b, in nvx-rs slimming 1.1.3: the guest's and the host's OS layers live in
nvx-sys#1093; SL0.2b, in nvx-rs slimming 1.1.2: one Cargo workspace, and the new crates' empty shells #1092. - Estimate: 100 core lines, 6 counted files. Past 200 core lines, stop and ask before continuing.
- Objective:
-
SL1.1b: The small guest tools ship from nvx-guest-tools.
- Objective: The small standalone guest programs ship from
nvx-guest-toolsinstead of thenvxlibrary crate. The reusable reseed API remains innvxfor capture repair and the time ABI. - Contents:
git mvofnvx-console-pending,nvx-mmio-write,nvx-exitandnvx-device-iowith their modules, and ofnvx-reseed'smain, oncereseed's library part is factored from it.Seed,reseedandReseedErrorstay, for the capture's repair and the time ABI. The crate's binaries are found undersrc/bin/, so its manifest declares none. - Scope:
- Move
console_pending,mmio_write,exitanddevice_io, their binary entry points, adjacenttests.rsfiles and program cases intocrates/nvx-guest-tools; the moved tests usecommand_line,Failingandcreate_fifothroughnvx-sys'stest-supportfeature. - Factor
nvx-reseed's binary entry point fromguest::reseed, then move only that entry point and its program tests tonvx-guest-tools. - Keep
Seed,reseedandReseedError, and keep their cases innvx-rs/src/guest/reseed/tests.rsafter moving the binary cases. - Place the moved entry points under
nvx-guest-tools/src/bin/; its manifest does not enumerate the binaries.
- Move
- Not in this PR:
- Changes to command lines, output, exit statuses or device behavior: these are code moves plus the reseed split they require.
- Renaming binaries, modules, public reseed items or test cases.
- Redesigning the reseed API or moving its library implementation:
nvxcallers still need it. - General cleanup, shared utility extraction or consolidation among the small programs.
- Approach: Use
git mvfor each complete program and its tests. Make the narrowest split inreseed.rsthat leaves the reusable API innvxand moves the existingmain; rely on Cargo'ssrc/bin/discovery rather than adding manifest entries or a binary-registration layer. - Done when:
- The
console_pending_*,mmio_write_*,reseed_*,exit_*anddevice_io_*program cases run fromnvx-guest-toolswith their existing command-line, status and output assertions. - The unit tests of the moved programs move with them, while the tests of
Seed,reseedandReseedErrorremain innvx. - The guest build stages all five moved binaries from
nvx-guest-tools, and the guest image boots with them.
- The
- Needs: SL1.1a, above.
- Estimate: 150 core lines, 5 counted files. Past 300 core lines, stop and ask before continuing.
- Objective: The small standalone guest programs ship from
-
SL1.2:
nvx-ingressships from nvx-guest-tools.- Objective:
nvx-ingress, including its restored-gueststart GATEWAYmode, ships fromnvx-guest-tools.nvxtemporarily retains only the announcer spawner that activation still uses. - Contents:
git mvof the announcer's program:ingress::{main, address, collect, diag, encode, sender, table, test_mode}, with itsstart GATEWAYmode, which starts and detaches an announcer for a restored guest, and its tests.Announcer,PROGRAMandStartErrorstay innvx, andstartuses them, until SL6.13c givesnvx-ingressits own spawner, because activation starts the announcer until SL7.3. The privileged-port search (bind_privileged), which both use, splits into two crate-local copies:Announcerkeeps one innvxuntil SL6.13c deletes it withguest::ingress, and the program takes the other, which SL6.13c reuses. - Scope:
- Move the ingress program modules
main,address,collect,diag,encode,sender,tableandtest_mode, its binary entry point and its program tests intocrates/nvx-guest-tools. - Keep
Announcer,PROGRAMandStartErrorinnvx-rs/src/guest/ingress, and keepstart GATEWAYcalling them until SL6.13c. - Copy the existing privileged-port search into each crate locally: one copy serves
Announcer, and one serves the moved program. - Preserve the five ingress integration cases; move
ingress/tests.rsand the program modules' adjacenttests.rsfiles, whileannouncer/tests.rsstays innvx. The diagnostics tests usenvx-sys'stest-supportfeature, and the NVXL fixture and needed reader support move into crate-local tests.
- Move the ingress program modules
- Not in this PR:
- Changes to ingress commands, snapshots, announcements, socket inheritance, diagnostics or exit statuses: this PR moves existing behavior.
- Renaming or redesigning the ingress modules or their wire and table formats.
- A shared crate or abstraction for the small privileged-port search: only two temporary crate-local users need it.
- Giving
nvx-ingress startits own spawner or deletingAnnouncer; SL6.13c does both after activation stops using it.
- Approach: Use
git mvfor the program side and its tests. Leave the spawner types at their current public names innvx, and duplicate onlybind_privilegedacross the crate boundary; do not create a utility crate, redesign spawning or mix the later announcer removal into this move. - Done when:
- The five moved
ingress_*program cases still check test mode, UDP settling, invalid invocations, socket inheritance andstartfailure fromnvx-guest-tools. - The program modules' unit tests move, while tests of
Announcer,PROGRAMandStartErrorremain innvx. - The guest build stages
nvx-ingressfromnvx-guest-tools, and its command line, output and exit statuses are unchanged.
- The five moved
- Needs: SL1.1a, above.
- Estimate: 150 core lines, 4 counted files. Past 300 core lines, stop and ask before continuing.
- Objective:
-
SL1.3:
nvx-timeships from nvx-guest-tools.- Objective:
nvx-timeships fromnvx-guest-toolswhilenvxretains theTimeAbifacade that starts and signals the daemon. The moved front end keeps the host-clock correction and restored network settings already supported ondev. - Contents:
git mvoftime::{main, commands, test_mode}, onnvx-sys's time implementation.TimeAbistays innvx:TimeAbi::start_daemonforks the daemon, and a restore signals it.commandsandtest_modecarry the host-clock correction and the restore's network settings thatdevadded. - Scope:
- Move
guest::time::{main, commands, test_mode}, thenvx-timebinary,time/tests.rs,commands/tests.rs,test_mode/tests.rsand the program cases intocrates/nvx-guest-tools; the main tests usecommand_linethroughnvx-sys'stest-supportfeature. - Build the moved program on the time implementation already owned by
nvx-sys. - Keep
TimeAbiandTimeAbi::start_daemoninnvx; the facade continues to fork the daemon, and restore continues to signal it. - Carry the existing host-clock correction and version-6 restore network settings with
commandsandtest_mode.
- Move
- Not in this PR:
- Changes to
nvx-timecommands, packet formats, arithmetic, logging, output or exit statuses: this PR moves the front end. - Moving or redesigning
TimeAbi, daemon startup or restore signaling. - Further refactoring of the time implementation in
nvx-sys; its ownership is established before this PR. - Renaming time modules or cleaning up their tests during the move.
- Changes to
- Approach: Use
git mvfor the program front end and its tests, point its existing calls atnvx-sys, and leave thenvxfacade intact. Do not combine the move with protocol changes, a new daemon interface or a broader time-module reorganization. - Done when:
- The moved
time_test_mode_*cases andtime_reads_a_plain_capture_requeststill check the same packets, samples, logs, status, network settings, command line and failures. - The
commandsandtest_modeunit tests move tonvx-guest-tools, while the facade and implementation tests remain with their owners. - The guest build stages
nvx-timefromnvx-guest-tools, and the guest image boots with it.
- The moved
- Needs: SL0.3e3, in nvx-rs slimming 1.1.4: the time core that
nvxandnvx-timeshare lives innvx-sys#1094; SL1.1a, above. - Estimate: 200 core lines, 5 counted files. Past 400 core lines, stop and ask before continuing.
- Objective:
Tests. SL1.1a moves the time_probe unit tests and the time_probe_* cases of nvx-rs/tests/guest_tools.rs. SL1.1b moves the console_pending_*, mmio_write_*, reseed_*, exit_* and device_io_* program cases, with the programs' unit tests; the tests of Seed, reseed and ReseedError stay in nvx. SL1.2 moves the five ingress_* program cases and the program modules' unit tests; the tests of Announcer, PROGRAM and StartError stay in nvx. SL1.3 moves the time_test_mode_* cases, time_reads_a_plain_capture_request, and the commands and test_mode unit tests; the time facade's tests stay with nvx or its nvx-sys implementation. Each moved case still checks the same command line, exit status and output. The guest build takes each helper binary that this group moves from nvx-guest-tools, while nvx-managed-agent stays in nvx until #1096; the guest image boots with them. After each move, the guest build, its checks and the staged binaries' tests find the programs and their cases in the crates that own them.
Done when: every PR above has merged, with dev green.
Activity
esaurez commentedon Nov 3, 2026
Closing as not planned: the plan in #1076 changed.
nvxstays the only crate, with no Cargo workspace and no new crates. NVX's own programs, its control protocol and the OS layers stay innvx, private to it, and CI checks the public API against committed snapshots (#1091). The guest tools keep shipping fromnvx, and #1091 hides their entry points. A guest tool installs from the published crate, for example withcargo install nvx --no-default-features --features guest --profile guest --bin nvx-ingress.