Expand description
Rig discovery + pre-flight (04-01, RIG-01): the RigPlan model,
the LOCKED 5-level discovery that always ends in one resolve-then-act
config run, and the port-collision pre-flight.
§Resolve-then-act (research Pattern 1)
Discovery only ever finds a compose FILE; resolve_plan then runs
docker compose -f <file> --project-directory <dir> config --format json through the runner and the returned .name (which honors the
rig’s own .env COMPOSE_PROJECT_NAME) becomes the identity truth
every later op passes as explicit -p <name> (Pitfall 8: no
implicit directory-name projects, ever).
§Discovery order (LOCKED — must-have truth)
--rig NAMEflag →[rigs.NAME]IGNITION_RIGenv → same (the bin folds it into the flag — one env→flag home, the IGNITION_PROFILE precedent)[rig].default→[rigs.<default>](a stale default is a LOUD error, never a silent scan)- cwd candidates:
./docker/compose.yml,./docker/docker-compose.yml,./compose.yml,./compose.yaml,./docker-compose.yml - WHK conventions — the git-module repo, then the WHK-Global
orchestration repo, each probed under BOTH home roots
(plan-checker: machine layouts differ; never pin one root):
~/Documents/whiskeyhouse/first,~/whiskeyhouse/second.
Nothing found → CoreError::Rig carrying the full search trail
(agents self-diagnose). Convention roots live in ONE const array;
[whk_roots] additionally honors IGNITION_RIG_ROOTS (path-separated)
so binary tests can isolate the machine’s real home and agents with
rigs elsewhere can redirect the convention scan.
Re-exports§
pub use compose::ComposeOutput;pub use compose::ComposeRunner;pub use compose::DockerCompose;pub use compose::DockerPsEntry;pub use compose::PortMapping;pub use compose::Publisher;pub use compose::ServiceStatus;pub use compose::VolumeEntry;pub use compose::compose_version;pub use compose::config_args;pub use compose::docker_ps_publish_args;pub use compose::parse_config;pub use compose::parse_docker_ps_ldjson;pub use compose::reset_preview;
Modules§
- compose
- The compose shell-out engine (04-01, RIG-01): runner seam, version check, LOCKED arg builders, and the LDJSON/array parsers — serde models out, no printing (the TUI rides the actions layer in Phase 6).
Structs§
- Port
Conflict - A host port already held by something that is NOT this rig’s own project (same-project occupants are recreate-safe).
- RigPlan
- The resolved rig — research Pattern 1’s model, plus the target→
published port pairs (the gateway-URL heuristic in
actions::rigneeds targets, not just the published half).
Enums§
- RigSelection
- What the caller wants resolved: an explicit name (the
--rigflag, which the bin already foldedIGNITION_RIGinto) or the auto chain ([rig].default→ cwd scan → convention scan).
Constants§
- WHK_
HOME_ ROOTS - WHK convention home roots, tried in this order (plan-checker
2026-08-22: this machine’s whk-environment-orchestration lives under
~/whiskeyhouse/, not~/Documents/whiskeyhouse/— layouts differ per machine, so BOTH roots are probed for BOTH convention repos).
Functions§
- port_
preflight - Port pre-flight (research Pattern 3), run before
up: per host port,docker ps --filter publish=<port> --format jsonfirst (rich attribution); when docker reports no occupant, an advisorylsofpass attributes non-docker HOST processes.lsofabsence is tolerated silently (skip — it is advisory-only). Occupants belonging to THIS project are fine (a recreate); anything else is a conflict. - resolve_
plan - Resolve the rig end-to-end: discovery → the one
configrun → aRigPlanwhose.nameevery later op passes as explicit-p.