open-standards/wai/wai-audit/Cargo.toml
Transaction Science 3cd1abe5aa Six WAI services answer GET /metrics, and wai-audit builds as a library
wai/wai-metrics, a crate with no dependencies, writes the text exposition
format: counters and gauges with checked names and escaped label values,
counts by labels fixed in the code, a request counter by route, method and
status, and a strict reader of the format for tests. Every label is a
&'static str, so no room, principal, account or address can become one.

The room service, the ingest gateway (a resource of its table), wai-audit,
wai-ledger, wai-fleet and wai-key-proxy answer GET /metrics with their
requests, sessions and fan-out where they have them, what they hold, and the
gateway's unmetered energy marker. The room service answers it before the
routes of its API, outside openapi.json and the catalogue. Each service's
test reads its answer strictly, moves its series with real requests, and
finds none of the parties of those requests in it.

wai-audit gains a library target: collector, http (App::new) and
load_or_create; main.rs reads the environment and calls them, and the
existing tests run through the library.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-07 01:50:40 -05:00

34 lines
1.1 KiB
TOML

[package]
name = "wai-audit"
version = "0.1.0"
edition = "2024"
license = "Apache-2.0"
description = "The reference collector of WAI's stream audit (extensions/stream-audit.md): it verifies each session bundle a player sends, stores the accepted ones one per session, takes Event-mode CMCD batches, and serves each channel's report signed with its key, which anyone holding the stored bundles recomputes byte for byte."
repository = "https://git.transaction.science/Transaction-Science/open-standards"
publish = false
# The collector and its routes, for a service that hosts them; the binary is a thin caller.
[lib]
path = "src/lib.rs"
[[bin]]
name = "wai-audit"
path = "src/main.rs"
[dependencies]
axum = "0.8"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "sync", "time"] }
serde_json = "1"
ed25519-dalek = "2"
getrandom = "0.4"
wai = { path = "../wai-rs", default-features = false, features = ["stream_audit"] }
# GET /metrics, in the text exposition format.
wai-metrics = { path = "../wai-metrics" }
[dev-dependencies]
tower = { version = "0.5", features = ["util"] }
http-body-util = "0.1"
sha2 = "0.10"
[profile.release]
lto = "thin"