Repository navigation
refactor(core): give each name, path and route one owner - #4053
Merged
Merged
Conversation
storage.rs held ZfsRoute while assess.rs and prepare.rs imported it from there and storage.rs imported back. zfs_route.rs owns the table, and storage.rs installs a route through install_route.
The daemon unit uses NETWORK_CONFLICT_EXIT_STATUS and the Internal DNS unit uses ABDICATED. The two stay separate contracts that share a value.
…-core The Tunnel Connector's origin and Caddy's loopback bind took the port from two literals, and ployzd spelled the proxy's container paths again beside core's mounts.
The CLI writes a capture and the Build Machine reads it, and each side spelled the names. One round-trip test writes a capture and reads it back through the layout.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Part of untangling the
core/workspace so that pieces that change together live together, with behavior unchanged. Later agent changes then read less, break less silently and debug faster.This batch gives each name, path and route one owner. Each fact below was spelled in two or more places, so a change to one copy could miss the others.
What changed
RestartPreventExitStatusin the daemon unit and the Internal DNS unit renders fromNETWORK_CONFLICT_EXIT_STATUSandABDICATED. The two stay separate contracts that share the value 78.ployz-coreexports the Ingress Proxy mounts, the loopback port and the bind addresses.ployzdand the Tunnel origin use them.TUNNEL_ORIGINbecomestunnel_origin().ployz_build::capturenames the captured Build directory once. The CLI writer and every Build Machine reader use it. A new test writes a capture and reads it back through the layout.ConfigDirnames the files kept beside the CLI config. Its six call sites use it.installer/zfs_route.rsownsZfsRoute.storage.rs,assess.rsandprepare.rsimport it, sostorage.rsno longer imports back from its own users.Scope
DatasetLayout) is left out. It reaches about 14 files, merges two dataset parsers with different edge rules, and needs theployz-verifycitations updated and both volume models re-run. It is a PR of its own.Design bets
ployz_build, so they cannot drift apart. No behavior moves into the daemon.No red flag is crossed.
Fix ids and decision-log text
host.rs:285anddns/service.rs:194writeRestartPreventExitStatus=78as a literal while core ownsNETWORK_CONFLICT_EXIT_STATUS.ployz-core/domain/ingress.rs:17-22,domain/tunnel.rs:18,25,domain/tailscale.rs:27,34andployzd/ingress/caddy/trace.rs:61spell the Ingress Proxy's container and host paths, the tunnel origin and the loopback port apart.ployz_build::captureowns the captured Build directory layout (names are a frozen wire contract).ployz/src/build/inputs.rswrites, andployz-build/src/{received_recipe,sealed,upload,railpack,index}.rsplusployz/src/build/local.rsread and re-spell, the capture names.ployzd/src/build/sealed.rs(RECORD) andbuild.rsnamesealed.jsona third time.ConfigDir<'a>owns the files kept beside the CLI config.config.with_file_name("<name>")is spelled inhandlers/mcp/login.rs(mcp.json),cloud_login.rs(cloud.json),handlers/device.rs(device.key),handlers/store.rs(store.key),handlers/link.rs(links.json) andpublished/mod.rs(published/). Nothing lists them.installer/storage.rsZfsRoute, a stable distro decision table, lives in the module that consumes it, andassess.rsandprepare.rsimport it from there whilestorage.rsimports back.Tradeoffs
ConfigDircall sites use an inline path-qualified call and add nouseline. Theployz-verifymcp_loginmodel citeslogin.rsandcloud_login.rsby line, and this keeps those lines in place.Blast Radius
No Machine behavior changes. No runtime path changes. The installer, DNS unit and Caddy config render the same text and take the same paths, and the tests below pin that. Boat is skipped per
docs/agents/landing.md.Residual. None under the Cloud security bar. Nothing here touches what Cloud can reach.
Verification
cargo testwith filters, all green.ployz-coreingress and tunnel.ployz-buildlib (82 passed).ployzdinstaller, dns::service, ingress and build (293 passed).ployzconfig_dir, mcp, device, link, store, build::inputs and published (147 passed).cargo clippy --all-targetsonployz-core,ployz-build,ployzandployzdis clean, andcargo fmt --checkis clean.cargo test -p ployz-verify --libpasses (221). Thelogin.rsandcloud_login.rsedits replace one line each, so themcp_logincitations still hold.