Skip to content

Packaging and Health Readiness

Argus Sentry ships as a Python wheel with optional native accelerators. A deployment installs one package, configures one file, and proves its own state through a typed health snapshot.

What the wheel installs

The wheel carries the full Python surface: the decision core, the token issuer, the executor guard, the evidence chain, the sidecar and shard runtimes, the MCP gateway, the profile kits, the policy packs, and the locales. It installs and runs with zero native code.

The package depends on esthien-argus-sdk. Install it from your package index first, or point PYTHONPATH at its source. The wheel also installs one console script, argus-sentry-gateway, the stdio MCP proxy.

Build and install from the repository's python/ directory:

python -m pip wheel --no-deps -w package/dist .
pip install package\dist\argus_sentry-1.0.1-py3-none-any.whl

Verify:

$ python -c "import argus_sentry; print(argus_sentry.__version__)"
1.0.1

Native accelerators

Four Rust extensions accelerate the hot path: the token codec, the issuer, the evidence recorder, and the enforcement core. Each is optional and each sits behind a parity gate at load. A host without them runs the pure Python reference paths, which are the parity oracles: slower, never different.

The conformance vectors the parity gates check ship as package data, so a clean install runs the same parity checks a development checkout runs.

A deployment can demand native paths instead of accepting a fallback. The demand is enforced by the health readiness gate below, not by hope.

The health snapshot

argus_sentry.health.collect_health returns one typed snapshot: the policy hash, version, and signer; the engine binding; the recorder contract and chain head; every native accelerator's parity-gate state; the session registry size; the limiter state; the metrics registry; and uptime.

from argus_sentry.health import collect_health

snapshot = collect_health(deployment.core, chain=deployment.chain,
                          guard=deployment.guard, config=config)
print(snapshot.ready, snapshot.failures)
print(snapshot.engine.binding, snapshot.recorder.contract)

Readiness fails closed on a demanded-native configuration

Two configuration keys make demands:

  • [engine] binding = "native": the policy must be served by a Rust engine. If only the Python reference evaluator is available, the snapshot is not ready and the failure names engine.
  • [evidence] contract = "native": the chain must be owned by the native recorder. If its parity gate failed or the extension is absent, the failure names recorder.

A silent fallback when the configuration said native is a configuration violation surfaced as a health failure with the component named, not a note in a log. The remaining accelerators (token codec, issuer, enforcement core) fail open by design: acceleration over a byte-parity reference, reported per component in the snapshot's accelerator rows.

Run the snapshot at startup gate time or on a schedule. ready: False with its failures tuple is the pager event.

Metrics hooks

The decision-path counters are opt-in:

[metrics]
enabled = false
ring_capacity = 8192
profile = "default"

When enabled, each decision pays one counter update plus one latency append, measured at 0.535 microseconds per decision against a 1.0 microsecond budget (measured run, shipped test suite). The bounded ring backs the p50, p95, and p99 snapshot; the profile label groups counts under the name a deployment's monitoring expects.

The hook is off by default so measurement runs inherit no unasked per-decision work.

Upgrade path

Key rotation is a new epoch on the issuer; the executor's key epoch list carries the anchor. Chain reset is a deliberate boot epoch bump. Policy changes are new signed documents: sign, pin the new trust anchor, and the policy version and hash travel in every decision record.

See sentry.toml for every key and the fail-closed load contract, and Regulator Export for retention and evidence output.