pub struct RigPlan {
pub name: String,
pub config_name: Option<String>,
pub compose_file: PathBuf,
pub project_dir: PathBuf,
pub services: Vec<String>,
pub host_ports: Vec<u16>,
pub port_mappings: Vec<PortMapping>,
pub volumes: Vec<String>,
pub gateway_service: Option<String>,
pub modules: BTreeMap<String, ModuleDeclaration>,
}Expand description
The resolved rig — research Pattern 1’s model, plus the target→
published port pairs (the gateway-URL heuristic in actions::rig
needs targets, not just the published half).
Fields§
§name: StringCompose project name — THE identity truth (honors the rig’s own
.env COMPOSE_PROJECT_NAME via the resolve run).
config_name: Option<String>The [rigs.NAME] config key this plan was resolved FROM, when it
came from config at all — None for a cwd or convention
discovery, which has no name to select by.
Distinct from name on purpose: name is the compose project
(which .env can rename), while this is what --rig takes. The
orphan report’s remove_with needs THIS one — suggesting
--rig <compose project> would name a rig that does not exist,
and on a multi-rig setup an unqualified uninstall can act on the
wrong gateway. That command is irreversible, so the selector has
to be right rather than merely present.
compose_file: PathBufThe compose file discovery found.
project_dir: PathBufIts directory (--project-directory on every resolve; where
.env is read from).
services: Vec<String>Service names, sorted (the config map’s keys).
host_ports: Vec<u16>Published host ports (the published half of port_mappings).
port_mappings: Vec<PortMapping>Full target→published pairs.
volumes: Vec<String>Named volumes declared by the compose file.
gateway_service: Option<String>The derived gateway service (D-12): the first service publishing
a port targeting 8088, else the first targeting 443, else
None. resolve_entry overrides this with
RigEntry::module_service when set. Populated by every
discovery path; only consumed when modules are declared.
modules: BTreeMap<String, ModuleDeclaration>Declared third-party modules (D-01): copied from
RigEntry::modules by resolve_entry ONLY — every other
discovery path leaves this empty, which is the structural
reason SC-1 (an undeclared rig behaves byte-identically to
today) holds.