Gunnar

nordisk/edda

crates/autonom/Cargo.toml

[package]
name = "autonom"
version = "0.2.0"
edition = "2021"
description = "The nordisk anti-drift / completeness subsystem: the single shared home for WIRING-coverage (the Gap = Surface − Covered − Allowlist gate), the allowlist/excuse-register file model, and the reusable sentinel-ban check. A thin façade over nornir-testmatrix's discover+coverage engine, adding the file I/O and the string-scan that had no shared home — so nornir, robotui, and (later) dwarves consume ONE coverage machinery."
license = "MIT OR Apache-2.0"
repository = "https://git.gunnar.rs/nordisk/edda"
keywords = ["coverage", "gate", "completeness", "wiring", "autonom"]
categories = ["development-tools::testing"]
exclude = ["/.nornir/"]

[dependencies]
anyhow = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "1"
# The pure discover + coverage engine (Surface / Gap / Allowlist / GateReport).
# autonom is a FAÇADE over this crate — it does not (yet) absorb its modules; see
# .nornir/autonom-consolidation.md for the staged migration.
nornir-testmatrix = { version = "0.2.7", path = "../nornir-testmatrix" }

# The `scan` feeder: parse a repo's Rust source into the discover engine's
# SymbolRow/CallEdge facts so autonom can actually RUN the Function-coverage gate
# against a real tree (the feeders that read a live symbol graph live in nornir,
# which pulls facett/warehouse; this is the self-contained pure-source path). OFF
# by default so the published façade stays lean.
syn = { version = "2", features = ["full", "visit"], optional = true }
walkdir = { version = "2", optional = true }
# Bench MODE (feature `bench`): register the source-scan bencher with the shared
# nornir-bench harness. OFF by default.
nornir-bench = { version = "0.2.0", path = "../nornir-bench", optional = true }

[features]
default = []
# `scan` — the source-scanning feeder ([`feeder`]) + the `autonom` CLI binary:
# walk a repo's Rust source, build the Function surface, and emit the
# "code lacking tests" gap report. Pulls syn + walkdir.
scan = ["dep:syn", "dep:walkdir"]
# `bench` — register the scan bencher (`bench::ScanFold`) with nornir-bench.
# Implies `scan` (the bencher drives the feeder).
bench = ["scan", "dep:nornir-bench"]

# The runnable coverage CLI. Only builds with the `scan` feeder in.
[[bin]]
name = "autonom"
required-features = ["scan"]

# The nornir-bench harness entrypoint (prints one JSON BenchRun on stdout, with
# host cores + memory telemetry stamped by the harness). Only with `bench`.
[[example]]
name = "nornir-bench"
required-features = ["bench"]

[dev-dependencies]
tempfile = "3"