Skip to main content

urirun-fleet

Fleet reconciliation for URI nodes — a lightweight control loop so a stale node never counts as usable. The host knows the desired state; each node reports its actual state; the fleet computes drift, classifies readiness, and gates task execution on ready, never on online.

desired state  →  actual state  →  diff  →  reconcile plan  →  smoke  →  ready?  →  run task
   (host)          (node/health)   (drift)   (node:// URIs)    (verify)   (gate)

The readiness ladder (status.py)

A node climbs: offline → online → enrolled → routable → compatible → ready. Two off-ladder states capture "reachable but not usable": stale (version/scheme/registry drift) and blocked (needs a human, e.g. enrollment). The host runs tasks only on ready.

Modules

module role
desired_state.py parse the fleet spec (YAML/JSON) → per-node desired dict
actual_state.py normalize a node's /health + /routes (+ optional runtime state); probe() fetches it live
diff.py desired − actual → typed drift, each with its node:// remedy; auto vs blocked severity
status.py classify (actual, desired, drift, smoke) → one Readiness with a runnable gate
smoke.py required-route presence + optional live read-only checks — turns compatible into ready
reconciler.py ordered dry-run plan() (deduped), the run_allowed() preflight gate, and assess()/assess_live()
capabilities.py capability groups (any_of route globs) — require an ability, not a bare scheme
executor.py run the plan via an injected call, re-probe after each change, roll back on failure; never runs a blocked plan
node_client.py authenticated HTTP transport to a node (probe, call /run with token/signature)
events.py append-only JSONL event log (fleet.reconcile.started … `node.ready
rollout.py atomic releases: build off to the side, smoke, then flip current symlink; rollback()
cli.py `urirun-fleet status

Use

urirun-fleet diff      --fleet examples/fleet.yaml --nodes ~/.urirun/nodes.json
urirun-fleet reconcile --fleet examples/fleet.yaml --nodes ~/.urirun/nodes.json --node lenovo
urirun-fleet reconcile --fleet examples/fleet.yaml --nodes ~/.urirun/nodes.json --node lenovo --execute
urirun-fleet enroll    --fleet examples/fleet.yaml --nodes ~/.urirun/nodes.json --node lenovo

Reconcile prints the ordered plan (upgrade → connector install → registry rebuild → restart → smoke) — a code change always appends restart + smoke, because a warm worker keeps stale imports until the process restarts.

--execute runs the plan through a NodeClient, logging a JSONL trace. Hard rules: default is dry-run; a blocked plan (e.g. enrollment needed) is refused; the executor re-probes after each change and rolls back on failure. Enroll first, then reconcile.

Status

Implemented and tested (23 tests, all functions ≤15 cyclomatic): desired/actual/diff/ status/smoke/capabilities/reconcile-plan + preflight gate + execute mode (executor, node_client, events, aliases, capability groups) + atomic releases (rollout: switch/ rollback/deploy-with-smoke). Live diff/reconcile/--execute verified against lenovo (correctly blocked on enrollment → execution refused). Next: the node-side backend for the node:// management URIs (upgrade/install/rebuild/restart/smoke) that this orchestrates — node.sh --doctor already implements most of that logic locally.

Part of the ifURI solution · Author: Tom Sapletta · Apache-2.0

Metadata

Release files for urirun-fleet 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for urirun-fleet 0.1.0
File Size Uploaded
urirun_fleet-0.1.0.tar.gz 22.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for urirun-fleet 0.1.0
File Interpreter ABI Platform
urirun_fleet-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.2 kB

Release files / urirun_fleet-0.1.0.tar.gz

Download URL urirun_fleet-0.1.0.tar.gz
Size 22.2 kB
Tags Source
SHA-256 checksum
How to use checksums
cc1b72c930c70f2901a370a12e43218db1a7bc34a89a2a1bb08c185ba11f0b58
BLAKE2b-256 checksum
How to use checksums
0affa782c65ffe8f6c8c512b1631962748adbd42c0e77d4861625b66d1bbc592
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / urirun_fleet-0.1.0-py3-none-any.whl

Download URL urirun_fleet-0.1.0-py3-none-any.whl
Size 22.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aad4b3ffadfbb109f0c50b00ae2f2a3640d03cae2d3522035df32767bcc1786c
BLAKE2b-256 checksum
How to use checksums
9abd9c1fd1109a5d2ba558ad47588a53f25c8aa8e3fdf5a43b1ef1d54a39eb37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page