Skip to main content

Module deploy

Module deploy 

Source

Structsยง

CatalogInfo ๐Ÿ”’
Model catalog selected for this deployment.
DeployManifest ๐Ÿ”’
PackageEntry ๐Ÿ”’
PackageSpawnEnv ๐Ÿ”’
ResolvedPackage ๐Ÿ”’
One package as it was actually found on disk when the deployment ran.
Spawned ๐Ÿ”’

Constantsยง

CMD_ACTIVATE ๐Ÿ”’
CMD_DEACTIVATE ๐Ÿ”’
CMD_INIT ๐Ÿ”’
CMD_SHUTDOWN ๐Ÿ”’
DEFAULT_DRIVER_INIT_TIMEOUT ๐Ÿ”’
DEPLOY_CONSUMER_ID ๐Ÿ”’
SOMA_STAGE_FD ๐Ÿ”’
Fixed fd number rbnx exports as ROBONIX_SOMA_STAGE_FD in somaโ€™s environment. Any fd โ‰ฅ 3 works โ€” we pick 3 because itโ€™s the first non-stdio slot, which keeps ls /proc/<soma>/fd readable at a glance. Soma reads the trigger line, then closes it.

Functionsยง

apply_pilot_catalog_env ๐Ÿ”’
call_driver_cmd ๐Ÿ”’
Issue one Driver(cmd) RPC against a freshly-connected channel, then release the channel. Returns the responseโ€™s state string on success; bail-errors when ok=false or the RPC itself fails. Used by the boot path for both CMD_INIT and CMD_ACTIVATE, with identical timeout / channel hygiene.
check_prerequisites ๐Ÿ”’
Boot-time prerequisites check:
close ๐Ÿ”’ โš 
component_records ๐Ÿ”’
driver_init_timeout ๐Ÿ”’
dup2 ๐Ÿ”’ โš 
ensure_soma_defaults ๐Ÿ”’
Make sure system.soma exists in the manifest map as a mapping, and resolve any relative file paths inside it against manifest_dir.
execute
git_state ๐Ÿ”’
git rev-parse HEAD, and a digest of the uncommitted changes if any.
init_spawned ๐Ÿ”’
is_builtin_system ๐Ÿ”’
libc_close ๐Ÿ”’
libc_dup2 ๐Ÿ”’
lifecycle_state_label ๐Ÿ”’
load_transport_checks ๐Ÿ”’
log_path ๐Ÿ”’
observe_package_transports ๐Ÿ”’
persist_state ๐Ÿ”’
port_is_free ๐Ÿ”’
Probe a host:port. Returns Ok(()) when nothing is listening (we can safely bind), Err describing the live owner otherwise. This is a race-prone pre-check (someone else can grab the port between probe and spawn) but in practice the failure mode it catches โ€” a stale previous-boot daemon โ€” has been alive for minutes, not seconds, so a single connect attempt is enough.
prepare_manifest ๐Ÿ”’
Apply top-level deployment variables, then expand every scalar in the manifest. Build and boot share this preparation path so package locations, target-manifest selectors, system settings, and package config all resolve against the same environment.
read_log_tail ๐Ÿ”’
Read the last max_lines lines of a file for embedding into an error message. Best-effort: an unreadable/missing file returns an empty string rather than an error โ€” the caller already reports the path, we just enrich when we can. We read the whole file (soma.log is scribe-managed and stays small during boot), split, and take the tail โ€” no seek-from-end acrobatics needed for the boot-time use case.
read_provider_exit_summary ๐Ÿ”’
Summarize a package that exited before Atlas registration. Providers often forward Python tracebacks through Scribe at info level, so the lifecycle- specific parser above may intentionally return None. In that case the last structured message is the most useful single-line cause for boot output.
read_provider_failure ๐Ÿ”’
Return the providerโ€™s actual lifecycle failure rather than whichever shutdown record happened to be written last. Scribe records are JSONL; providers commonly report lifecycle transitions at info level, so prefer -> ERROR (...) messages before falling back to an error-level record.
repo_dir_name ๐Ÿ”’
Compute a PackageEntryโ€™s expected on-disk path. PURE โ€” no I/O, no logging, no cloning. path: entries land at manifest_dir/path; url: entries land at cache_root/<name> (whether or not itโ€™s been cloned yet). Use entry_path_exists_on_disk to check presence; use the public cmd::fetch::clone_remote_packages (called from rbnx build) to actually populate the cache. Cache directory name for a url-remote package: the git REPO name (last path segment of the url, minus .git), NOT the per-instance provider id.
require_system_args ๐Ÿ”’
resolve_entry_path ๐Ÿ”’
resolve_model_catalog ๐Ÿ”’
Resolve the catalog path: ROBONIX_LLM_CATALOG, then manifest model_catalog:, then ~/.robonix/models.yaml.
resolve_pilot_config ๐Ÿ”’
Use Pilotโ€™s parser so preflight honors the same CLI, env and file settings.
short_label ๐Ÿ”’
Strip the leading <component>_ from the boot-log pkg_label. system_memory โ†’ memory; primitive_tiago_chassis โ†’ tiago_chassis. Keeps boot-output columns narrow (the section header above already said which class the entry belongs to).
soma_grpc_ready ๐Ÿ”’
spawn_and_init ๐Ÿ”’
Spawn one package and wait for its provider to register with Atlas.
spawn_package ๐Ÿ”’
spawn_soma_binary ๐Ÿ”’
Spawn soma with an inherited pipe on SOMA_STAGE_FD. The parent keeps the write end and later writes stage2\n to it (see write_stage2_trigger below). Layered on spawn_system_binaryโ€™s stdio+scribe pattern but adds:
spawn_system_binary ๐Ÿ”’
system_boot_detail ๐Ÿ”’
system_cli_args ๐Ÿ”’
Translate supported system: manifest fields into CLI args for built-in binaries.
system_listen ๐Ÿ”’
Translate a system.<name>: block into CLI args for the corresponding Rust binary. Per-binary mapping kept narrow โ€” adding a new flag means touching exactly this function plus the binaryโ€™s clap struct.
validate_model_catalog ๐Ÿ”’
Load and validate a catalog before any system component is spawned, and export the path plus the exact api_key_env names for consumers.
wait_for_registration ๐Ÿ”’
Poll atlas until a provider NOT in before appears. Returns the new provider_id plus every distinct lifecycle Driver observed after the declaration settle window. The caller verifies this list before sending config or lifecycle commands.
wait_for_soma_skills ๐Ÿ”’
wait_for_soma_stage1 ๐Ÿ”’
warn_capability_transports ๐Ÿ”’
with_spinner ๐Ÿ”’
Run fut while animating the boot spinner so the user sees the [ โ ™ ] name msg_prefix N.Ns line update steadily even when the underlying RPC takes a while (Driver(CMD_INIT) for sensor-warm-up packages routinely sits at 30+ seconds). Without this the line goes silent right after wait_for_registration finishes and rbnx looks hung between OK lines.
write_lockfile ๐Ÿ”’
Write rbnx-boot/deployment.lock: what this run actually used.
write_stage2_trigger ๐Ÿ”’
Write the stage2\n trigger into the pipe rbnx and soma share (see spawn_soma_binary). This is a one-shot: soma reads the line, unblocks its skill-package launcher, and closes its read end. rbnx-side we drop the writer here โ€” no reason to hold it open, and closing gives soma an immediate EOF on the (very unlikely) chance it re-reads.
ๆต™ICPๅค‡2023005800ๅท-2 ๆต™ๅ…ฌ็ฝ‘ๅฎ‰ๅค‡33010902005384ๅท