oleksandrmelnychenko/aura-replay

AURA server-side safety replay and inference runtime

Rust

0

45 commits

updated Sep 3, 2026

See the code

README

AURA Replay

AURA Replay is the independent server-side safety library for authenticated intake, privacy-safe context enrichment, inference, risk fusion, policy, persistence, and observability.

It does not contain the on-device detector implementation, Swift wrapper, C ABI, client lexicons, client evaluation corpora, or Apple artifact tooling. Those belong to aura-runtime.

Workspace

aura-replay                Public server runtime facade
aura-replay-contracts      Server-owned typed contracts and authenticated envelopes
aura-wire-relay            Versioned serialization boundary
aura-relay-intake          Validation and privacy normalization
aura-relay-context         Reputation and relationship context
aura-relay-inference       Inference orchestration
aura-relay-risk            Risk fusion
aura-relay-policy          Response policy
aura-relay-store           Persistence adapters
aura-relay-observability   Privacy-safe audit and metrics
aura-relay-ml              Server-side model orchestration
aura-replay-ml-engine      Server-owned model execution engine

The historical relay term remains in internal crate names because it describes message routing. aura-replay is the stable public repository and library name.

Verification

python3 ci/client_vocabulary_gate.py
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --all-targets --all-features --locked

The workspace is self-contained and must build without an aura-runtime checkout.

The client safety vocabulary (common.rs, context.rs, event.rs, observation.rs) is owned by aura-runtime and vendored here at the revision recorded in crates/aura-replay-contracts/client-vocabulary.pin.json. The gate above refuses any drift; add --verify-upstream (with AURA_CLIENT_VOCABULARY_TOKEN or GITHUB_TOKEN set) to also compare the vendored copy against that exact client revision. Re-pinning is a reviewed operation: update the pin and copy the new revision's files verbatim.

Model inference

Relay model inference is compiled out by default and enabled with the model-inference feature on aura-replay, which pulls in aura-relay-ml and the ONNX path of aura-replay-ml-engine.

bash ci/install_onnxruntime.sh
cargo test --workspace --features aura-replay/model-inference --all-targets

ci/onnxruntime.pin.json pins the ONNX Runtime release, its archive digest, and the library digest; the installer refuses anything else, and maintains /usr/local/lib/onnxruntime as a stable symlink to the pinned prefix, which is where .cargo/config.toml points ORT_DYLIB_PATH.

models/manifest.json pins every model artifact by SHA-256. MlConfig::strict_manifest_validation makes a digest mismatch fail the pipeline instead of degrading to the rule-based fallback.

A model signal is evidence, never an independent verdict. ModelCalibration bounds it:

bounddefaulteffect
min_signal_score0.50weaker signals are dropped before fusion
corroboration_bonus_cap0.10a signal that matches a local finding may raise that finding's score by at most this much
unsupported_score_cap0.60a signal no local finding corroborates cannot carry the response above this score
unsupported_confidence_capMediumsuch a signal cannot report higher confidence

The model never lowers a local finding, and never runs when intake produced no text.

Model training

training/ holds the pipeline that produces the unified model and data/ its corpora. The kids lexicon it derives synthetic examples from is client-owned and vendored at training/vendor/aura-kids-lexicon.json, pinned by training/client-lexicon.pin.json and checked by the same gate as the vocabulary.

python3 training/generate_kids_synthetic.py
python3 training/prepare_augmented_data.py
python3 training/train_unified.py

Boundary

AURA Replay accepts only explicitly defined server contracts. It does not read client state or open an implicit network path from the detector. Aura Messenger remains responsible for any approved transport between the application and server infrastructure.

oleksandrmelnychenko/aura-replay

AURA server-side safety replay and inference runtime

Rust

0

45 commits

updated Sep 3, 2026

See the code

README

AURA Replay

AURA Replay is the independent server-side safety library for authenticated intake, privacy-safe context enrichment, inference, risk fusion, policy, persistence, and observability.

It does not contain the on-device detector implementation, Swift wrapper, C ABI, client lexicons, client evaluation corpora, or Apple artifact tooling. Those belong to aura-runtime.

Workspace

aura-replay                Public server runtime facade
aura-replay-contracts      Server-owned typed contracts and authenticated envelopes
aura-wire-relay            Versioned serialization boundary
aura-relay-intake          Validation and privacy normalization
aura-relay-context         Reputation and relationship context
aura-relay-inference       Inference orchestration
aura-relay-risk            Risk fusion
aura-relay-policy          Response policy
aura-relay-store           Persistence adapters
aura-relay-observability   Privacy-safe audit and metrics
aura-relay-ml              Server-side model orchestration
aura-replay-ml-engine      Server-owned model execution engine

The historical relay term remains in internal crate names because it describes message routing. aura-replay is the stable public repository and library name.

Verification

python3 ci/client_vocabulary_gate.py
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --all-targets --all-features --locked

The workspace is self-contained and must build without an aura-runtime checkout.

The client safety vocabulary (common.rs, context.rs, event.rs, observation.rs) is owned by aura-runtime and vendored here at the revision recorded in crates/aura-replay-contracts/client-vocabulary.pin.json. The gate above refuses any drift; add --verify-upstream (with AURA_CLIENT_VOCABULARY_TOKEN or GITHUB_TOKEN set) to also compare the vendored copy against that exact client revision. Re-pinning is a reviewed operation: update the pin and copy the new revision's files verbatim.

Model inference

Relay model inference is compiled out by default and enabled with the model-inference feature on aura-replay, which pulls in aura-relay-ml and the ONNX path of aura-replay-ml-engine.

bash ci/install_onnxruntime.sh
cargo test --workspace --features aura-replay/model-inference --all-targets

ci/onnxruntime.pin.json pins the ONNX Runtime release, its archive digest, and the library digest; the installer refuses anything else, and maintains /usr/local/lib/onnxruntime as a stable symlink to the pinned prefix, which is where .cargo/config.toml points ORT_DYLIB_PATH.

models/manifest.json pins every model artifact by SHA-256. MlConfig::strict_manifest_validation makes a digest mismatch fail the pipeline instead of degrading to the rule-based fallback.

A model signal is evidence, never an independent verdict. ModelCalibration bounds it:

bounddefaulteffect
min_signal_score0.50weaker signals are dropped before fusion
corroboration_bonus_cap0.10a signal that matches a local finding may raise that finding's score by at most this much
unsupported_score_cap0.60a signal no local finding corroborates cannot carry the response above this score
unsupported_confidence_capMediumsuch a signal cannot report higher confidence

The model never lowers a local finding, and never runs when intake produced no text.

Model training

training/ holds the pipeline that produces the unified model and data/ its corpora. The kids lexicon it derives synthetic examples from is client-owned and vendored at training/vendor/aura-kids-lexicon.json, pinned by training/client-lexicon.pin.json and checked by the same gate as the vocabulary.

python3 training/generate_kids_synthetic.py
python3 training/prepare_augmented_data.py
python3 training/train_unified.py

Boundary

AURA Replay accepts only explicitly defined server contracts. It does not read client state or open an implicit network path from the detector. Aura Messenger remains responsible for any approved transport between the application and server infrastructure.