Control plane for harnessed work: execution runs, evidence, state transitions, story harness, language policy, and shard provenance over corpus_sourcecode
| Tier | operations |
| Role | unclassified (baselined) |
| Path | crates/operations/control-plane |
| Edition | 2021 |
| Targets | operations_control_plane, admission_guard_live, artifact_identity_live, benefit_rows_live, canonical_identity_live, composition_shape_live, concept_kind_axes_live, concept_owner_live, dependency_rule_live, first_rule_live, gate_registry_live, gate_rows_live, inventory_seed_live, kind_term_admission_live, metaclass_ratified_live, model_identity_live, payload_read_live, payload_reasoning_live, payload_store_live, registry_export_live, requirement_live, requirement_rank_live, rule_kind_live, six_kind_identity_live, story_sections_live, symbol_index_live, term_reading_census_live, term_reading_rows_live, term_skos_live, term_version_change_live, term_version_live, transition_merge_live, withdrawn_concepts_live, work_product_live, worker_usage_live |
| Public items | 351 across 25 modules |
| Tests | 362 |
What it is for
Control plane for harnessed work (sprint 4.21).
Coordinates WHAT is done, in what order, and whether it counts as done: execution runs, evidence, state transitions, the story harness, language policy, shard provenance, and session accounting -- all over corpus_sourcecode.
Placement (operator ruling, 2026-08-17): this is the operations layer, which docs/architecture/layers.toml labels "runtime/SRE/control plane" and where operations-workflow already lives. It was built inside tools-org-knowledge during sprint 4.20, which is the knowledge index -- the wrong crate for source-code and application work.
A harness (imp, tools-work-runner, an interactive wrapper) binds to this library. It does not own the record: the record outlives any harness, and more than one harness contends for the same steps.
Owed merge, recorded rather than hidden: operations-workflow already ships Transition, StateMachineDefinition, StateTransitionRecord, WorkflowStore, and workflow_transition_history with compare-and-swap on state_version. execution's transition tables duplicate that concept and lack the CAS guarantee. Sprint 4.21 AC2 merges them; this crate keeps the tables until those rows are migrated, never before.
Capabilities
crate root
Control plane for harnessed work (sprint 4.21).
| Item |
|---|
pub const CONTROL_PLANE_MIGRATIONS: & (& str, & str) |
benefit (other)
Whether a benefit has been realised (0091). Pure: the arithmetic and the
| Item |
|---|
fn share(baseline : f64, target : f64, latest : f64) -> Option <f64> |
fn validate_measure(unit : & str, baseline : f64, target : f64) -> Result <(), String> |
Realisation
Whether a benefit has been realised (0091). Pure: the arithmetic and the
| Item |
|---|
pub enum Realisation |
Realisation :: fn as_str(self) -> & 'static str |
fn realisation(baseline : f64, target : f64, latest : Option <f64>) -> Realisation |
boxes (other)
Budget boxes (sprint 4.41): the decidable core. Balances are DERIVED
| Item |
|---|
fn median_p90_cents(costs : & i64) -> Option <(i64, i64)> |
BoxFacts
Budget boxes (sprint 4.41): the decidable core. Balances are DERIVED
| Item |
|---|
pub struct BoxFacts |
BoxFacts :: fn balance_cents(self) -> i64 |
fn may_spend(box_name : & str, facts : BoxFacts) -> Result <(), String> |
Cost
Cost, from tokens and a dated rate schedule.
| Item |
|---|
pub struct Cost |
CostPerAccepted
Cost, from tokens and a dated rate schedule.
| Item |
|---|
pub struct CostPerAccepted |
CostPerAccepted :: fn ratio(& self) -> Option <f64> |
CostPerAccepted :: fn cheaper_at_floor(a : Self, b : Self, coverage_floor : f64) -> Option <bool> |
Rate
Cost, from tokens and a dated rate schedule.
| Item |
|---|
pub struct Rate |
Rates
Cost, from tokens and a dated rate schedule.
| Item |
|---|
pub struct Rates |
Rates :: fn parse(tsv : & str) ->(Self, usize) |
Rates :: fn get(& self, schedule_id : & str, model : & str) -> Option <(Rate, & str)> |
Rates :: fn cost(& self, schedule_id : & str, model : & str, use_ : TokenUse) -> Option <Cost> |
TokenUse
Cost, from tokens and a dated rate schedule.
| Item |
|---|
pub struct TokenUse |
Claim
Which corpus answers an ask, read from rows rather than compiled in.
| Item |
|---|
pub struct Claim |
Claim :: fn bounded(& self) -> bool |
Claim :: fn holds(& self, key_kind : & str, key : & str) -> bool |
async fn claims_on(pool : & PgPool, noun : & str) -> Result <Vec <Claim>, sqlx::Error> |
Corpus
Which corpus answers an ask, read from rows rather than compiled in.
| Item |
|---|
pub struct Corpus |
async fn active(pool : & PgPool) -> Result <Vec <Corpus>, sqlx::Error> |
Route
Which corpus answers an ask, read from rows rather than compiled in.
| Item |
|---|
pub enum Route |
Route :: fn records(& self, fan_out : bool) -> Result <Vec <String>, Undecided> |
fn route(claims : & Claim, nouns : & String, key : Option <(& str, & str)>) -> Route |
Undecided
Which corpus answers an ask, read from rows rather than compiled in.
| Item |
|---|
pub struct Undecided |
Undecided :: fn question(& self) -> String |
Undecided :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result |
dispatch (other)
Dispatch decidables (sprint 4.40): which items an approval may ready,
| Item |
|---|
pub const MAX_ARGV_ITEMS: usize |
pub const MAX_ARG_BYTES: usize |
pub const MAX_PATH_BYTES: usize |
fn ladder_decision(facts : LadderFacts) ->(Rung, String) |
DispatchOutcome
Dispatch decidables (sprint 4.40): which items an approval may ready,
| Item |
|---|
pub enum DispatchOutcome |
fn classify_runner_output(exit_code : i32, stdout : & str, stderr : & str) -> DispatchOutcome |
DonePredicate
Dispatch decidables (sprint 4.40): which items an approval may ready,
| Item |
|---|
pub enum DonePredicate |
fn validate_predicate(p : & DonePredicate) -> Result <(), String> |
fn suggest_predicate(goal : & str) -> Option <DonePredicate> |
ItemState
Dispatch decidables (sprint 4.40): which items an approval may ready,
| Item |
|---|
pub struct ItemState |
fn readyable(items : & ItemState) -> Vec <Uuid> |
LadderFacts
Dispatch decidables (sprint 4.40): which items an approval may ready,
| Item |
|---|
pub struct LadderFacts |
Rung
Dispatch decidables (sprint 4.40): which items an approval may ready,
| Item |
|---|
pub enum Rung |
envelope (other)
The envelope every prompt the estate sends (sprint 4.47 A13,
| Item |
|---|
pub const ACCOUNT_OPEN: & str |
pub const ACCOUNT_CLOSE: & str |
pub const RESULT_FENCE: & str |
Admitted
The envelope every prompt the estate sends (sprint 4.47 A13,
| Item |
|---|
pub struct Admitted |
Envelope
The envelope every prompt the estate sends (sprint 4.47 A13,
| Item |
|---|
pub struct Envelope |
Envelope :: fn demand(& self) -> String |
Envelope :: fn admit(& self, reply : & str) -> Result <Admitted, EnvelopeRefusal> |
EnvelopeRefusal
The envelope every prompt the estate sends (sprint 4.47 A13,
| Item |
|---|
pub enum EnvelopeRefusal |
EnvelopeRefusal :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result |
JsonType
The envelope every prompt the estate sends (sprint 4.47 A13,
| Item |
|---|
pub enum JsonType |
JsonType :: fn as_str(self) -> & 'static str |
ResultShape
The envelope every prompt the estate sends (sprint 4.47 A13,
| Item |
|---|
pub struct ResultShape |
ResultShape :: fn object(fields : & (& str, JsonType)) -> Self |
verb:cap
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
fn cap_value(value : & Value, cap : usize) ->(Value, bool) |
verb:constants
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
pub const OBSERVED_VALUE_CAP_BYTES: usize |
pub const POLICY_CAP_BYTES: usize |
pub const MAX_SHARD_SOURCES: usize |
pub const STATUS_NEW: & str |
pub const EVIDENCE_KINDS_V1: & & str |
pub const LEGAL_TRANSITIONS: & (& str, & str, & str, bool) |
pub const QUERY_PACK_SQL: & str |
verb:evidence
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
fn evidence_hash(kind : & str, subject : & str, observed_value : & Value) -> String |
verb:finish
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
async fn finish_run(pool : & sqlx::PgPool, run_id : Uuid, result : RunResult, detail : Option <& str>,) -> Result <(), ExecutionError> |
async fn finish_run_with_account(pool : & sqlx::PgPool, run_id : Uuid, result : RunResult, detail : Option <& str>, confidence : Option <f64>, reasoning_hash : Option <& str>,) -> Result <(), ExecutionError> |
verb:record
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
async fn record_shard_provenance(pool : & sqlx::PgPool, shard : & ShardProvenance,) -> Result <(), ExecutionError> |
async fn record_transition(pool : & sqlx::PgPool, req : & TransitionRequest,) -> Result <i64, ExecutionError> |
async fn record_transition_in(tx : & mut sqlx::Transaction <'_, sqlx::Postgres>, req : & TransitionRequest,) -> Result <i64, ExecutionError> |
verb:start
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
async fn start_run(pool : & sqlx::PgPool, start : & RunStart,) -> Result <(Uuid, i32), ExecutionError> |
async fn start_work_item_run(pool : & sqlx::PgPool, work_item_id : Uuid, executor_kind : ExecutorKind,) -> Result <(Uuid, i32), ExecutionError> |
verb:step
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
async fn step_scope(pool : & sqlx::PgPool, task_id : Uuid,) -> Result <Vec <ScopeEntry>, ExecutionError> |
verb:subject
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
fn subject_states(subject_kind : & str) -> Vec <& 'static str> |
verb:update
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
fn update_edges(subject_kind : & str) -> Vec <(& 'static str, & 'static str)> |
verb:validate
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
fn validate_run_start(executor_kind : ExecutorKind, shard_hash : Option <& str>, mediated_semantics_hash : Option <& str>, lexicon_version : Option <& str>, disclosure : Option <& Disclosure>,) -> Result <(), String> |
fn validate_evidence_kind(kind : & str) -> Result <(), String> |
fn validate_shard_sources(count : usize) -> Result <(), String> |
verb:verify
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
async fn verify_pinned_state(pool : & sqlx::PgPool, shard_hash : & str,) -> Result <Vec <SourceState>, ExecutionError> |
Cause
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
pub enum Cause |
Cause :: fn as_str(self) -> & 'static str |
fn parse_cause(s : & str) -> Result <Cause, String> |
fn validate_transition(subject_kind : & str, from : & str, to : & str, cause : Cause, evidence_present : bool, run_present : bool,) -> Result <(), String> |
Disclosure
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
pub struct Disclosure |
ExecutionError
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
pub enum ExecutionError |
async fn pin_paths(pool : & sqlx::PgPool, shard_hash : & str, paths : & String, repo_commit : & str,) -> Result <Vec <String>, ExecutionError> |
async fn record_evidence(pool : & sqlx::PgPool, run_id : Uuid, kind : & str, subject : & str, observed_value : & Value, provenance : & str,) -> Result <Uuid, ExecutionError> |
async fn step_done_predicate(pool : & sqlx::PgPool, task_id : Uuid,) -> Result <Option <Value>, ExecutionError> |
ExecutorKind
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
pub enum ExecutorKind |
ExecutorKind :: fn as_str(self) -> & 'static str |
fn parse_executor_kind(s : & str) -> Result <ExecutorKind, String> |
LegalEdge
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
pub struct LegalEdge |
fn legal_edge(subject_kind : & str, from : & str, to : & str) -> Option <LegalEdge> |
NamedQuery
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
pub struct NamedQuery |
fn parse_query_pack(pack : & str) -> Vec <NamedQuery> |
RunResult
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
pub enum RunResult |
RunResult :: fn as_str(self) -> & 'static str |
fn parse_run_result(s : & str) -> Result <RunResult, String> |
RunStart
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
pub struct RunStart |
ScopeEntry
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
pub struct ScopeEntry |
fn scope_dirs(root : & std::path::Path, entries : & ScopeEntry) -> Vec <std::path::PathBuf> |
ShardProvenance
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
pub struct ShardProvenance |
ShardProvenance :: fn is_reproducible(& self) -> bool |
SourceState
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
pub struct SourceState |
TaskEntity
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
pub struct TaskEntity |
TransitionRequest
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
pub struct TransitionRequest |
WorkItemEntity
Execution spine (sprint 4.20): the rows that make an execution, its
| Item |
|---|
pub struct WorkItemEntity |
gate (other)
Running a gate: the mechanism work item 5 gave Gate 3.
| Item |
|---|
pub const CHECK_TIMEOUT: Duration |
pub const MAX_CHECK_OUTPUT_BYTES: usize |
pub const ALLOWED_BINARIES: & str; 1 |
fn argv(program : & str) -> Result <(String, Vec <String>), String> |
CheckOutcome
Running a gate: the mechanism work item 5 gave Gate 3.
| Item |
|---|
pub struct CheckOutcome |
GateReport
Running a gate: the mechanism work item 5 gave Gate 3.
| Item |
|---|
pub struct GateReport |
async fn run_gate(pool : & PgPool, gate : & str, work_item_id : Uuid, repo_root : & str,) -> Result <GateReport, ExecutionError> |
identifier (other)
Spelled-out identifiers (sprint 4.47 amendment 10; operator, 2026-09-05:
| Item |
|---|
pub const LEGACY_PREFIXES: (& str, & str); 2 |
fn spell(label : & str, sprint : & str) -> Option <String> |
fn legacy_count(text : & str, sprint : & str) -> usize |
fn sprint_of_filename(path : & str) -> Option <String> |
fn ratchet(baseline : & Baseline, measured : & (String, usize)) -> Vec <RatchetViolation> |
Baseline
Spelled-out identifiers (sprint 4.47 amendment 10; operator, 2026-09-05:
| Item |
|---|
pub struct Baseline |
Baseline :: fn parse(text : & str) -> Result <Self, String> |
Baseline :: fn render(& self) -> String |
Baseline :: fn record(& mut self, path : & str, count : usize) -> Result <(), String> |
RatchetViolation
Spelled-out identifiers (sprint 4.47 amendment 10; operator, 2026-09-05:
| Item |
|---|
pub struct RatchetViolation |
Site
Spelled-out identifiers (sprint 4.47 amendment 10; operator, 2026-09-05:
| Item |
|---|
pub struct Site |
fn relabel(text : & str, sprint : & str) ->(String, Vec <Site>) |
inventory (other)
Sprint 4.21 AC9: the inventory check costs no tokens and produces
| Item |
|---|
pub const MAX_QUERIES: usize |
pub const MAX_QUERY_BYTES: usize |
fn inventory_queries(goal : & str, noise : & std::collections::BTreeSet <String>) -> Vec <String> |
InventoryReport
Sprint 4.21 AC9: the inventory check costs no tokens and produces
| Item |
|---|
pub struct InventoryReport |
async fn run_inventory_check(pool : & PgPool, work_item_id : Uuid,) -> Result <InventoryReport, ExecutionError> |
KindRow
The kind rows derived from ratified terms (sprint 4.47; ADR 0045 §3:
| Item |
|---|
pub struct KindRow |
fn kind_row_for(term : & str) -> Option <KindRow> |
lexicon (other)
Language policy as execution state (sprint 4.20 continuation).
| Item |
|---|
pub const REGISTRY_FILES: & & str |
pub const RATIFIED_ROLE_VOCABULARY: & str |
fn lexicon_version(sources : & (& str, & str)) -> String |
fn conflicts(lexicon_tsv : & str, roles_tsv : & str, tier_tsv : & str, glossary_tsv : & str, ratified_role_vocabulary : & str,) -> Vec <String> |
fn status_of(registry : & GovernedTerm, term : & str) -> TermStatus |
fn classify_coinage(registry : & GovernedTerm, term : & str, concept : & str, evidence : Value, lexicon_version : & str, _policy : CoinagePolicy,) -> CoinageVerdict |
fn validate_ratification_authority(authority : & str) -> Result <(), String> |
CoinagePolicy
Language policy as execution state (sprint 4.20 continuation).
| Item |
|---|
pub enum CoinagePolicy |
CoinagePolicy :: fn as_str(self) -> & 'static str |
CoinagePolicy :: fn parse(s : & str) -> Result <Self, String> |
CoinageVerdict
Language policy as execution state (sprint 4.20 continuation).
| Item |
|---|
pub enum CoinageVerdict |
GovernedTerm
Language policy as execution state (sprint 4.20 continuation).
| Item |
|---|
pub struct GovernedTerm |
fn build_registry(lexicon_tsv : & str, roles_tsv : & str, tier_tsv : & str, glossary_tsv : & str, ratified_role_vocabulary : & str,) -> Vec <GovernedTerm> |
LexicalViolation
Language policy as execution state (sprint 4.20 continuation).
| Item |
|---|
pub struct LexicalViolation |
fn validate_output(path : & str, lines : & String, lexicon_tsv : & str) -> Vec <LexicalViolation> |
NeedsTermRatification
Language policy as execution state (sprint 4.20 continuation).
| Item |
|---|
pub struct NeedsTermRatification |
TermStatus
Language policy as execution state (sprint 4.20 continuation).
| Item |
|---|
pub enum TermStatus |
TermStatus :: fn as_str(self) -> & 'static str |
TermStatus :: fn admissible_in_new_output(self) -> bool |
lexicon_export (other)
Sprint 4.47 U1c task a2: the rows render the files.
| Item |
|---|
fn normalize_label(label : & str) -> String |
fn non_ascii_labels(terms : & TermRow, labels : & LabelRow) -> Vec <String> |
fn resolvable_label_conflicts(terms : & TermRow, labels : & LabelRow) -> Vec <LabelConflict> |
fn render_lexicon(header : & str, terms : & TermRow) -> Result <String, Vec <UnrenderableField>> |
fn render_roles(header : & str, terms : & TermRow) -> Result <String, Vec <UnrenderableField>> |
fn render_tiers(header : & str, terms : & TermRow) -> Result <String, Vec <UnrenderableField>> |
fn render_glossary(header : & str, terms : & TermRow, labels : & LabelRow, broader : & BroaderRow,) -> Result <String, Vec <UnrenderableField>> |
fn render_canonical(header : & str, terms : & TermRow, labels : & LabelRow, broader : & BroaderRow,) -> Result <String, Vec <UnrenderableField>> |
fn parse_canonical(tsv : & str,) -> Result <(Vec <TermRow>, Vec <LabelRow>, Vec <BroaderRow>), Vec <SeedRefusal>> |
fn canonical_round_trips(bytes : & str, terms : & TermRow, labels : & LabelRow, broader : & BroaderRow,) -> Result <(), String> |
fn parse_term_seed(tsv : & str) -> Result <Vec <SeedRow>, Vec <SeedRefusal>> |
BroaderRow
Sprint 4.47 U1c task a2: the rows render the files.
| Item |
|---|
pub struct BroaderRow |
LabelConflict
Sprint 4.47 U1c task a2: the rows render the files.
| Item |
|---|
pub struct LabelConflict |
LabelKind
Sprint 4.47 U1c task a2: the rows render the files.
| Item |
|---|
pub enum LabelKind |
LabelKind :: fn as_str(self) -> & 'static str |
LabelRow
Sprint 4.47 U1c task a2: the rows render the files.
| Item |
|---|
pub struct LabelRow |
LineDiff
Sprint 4.47 U1c task a2: the rows render the files.
| Item |
|---|
pub struct LineDiff |
fn diff_rendering(path : & str, on_disk : & str, rendered : & str) -> Vec <LineDiff> |
SeedRefusal
Sprint 4.47 U1c task a2: the rows render the files.
| Item |
|---|
pub struct SeedRefusal |
SeedRow
Sprint 4.47 U1c task a2: the rows render the files.
| Item |
|---|
pub struct SeedRow |
TermRow
Sprint 4.47 U1c task a2: the rows render the files.
| Item |
|---|
pub struct TermRow |
fn unenforced_retirements(terms : & TermRow) -> Vec <(String, Option <String>)> |
UnrenderableField
Sprint 4.47 U1c task a2: the rows render the files.
| Item |
|---|
pub struct UnrenderableField |
metering (other)
The meter (sprint 4.37): counts are facts, prices are ratified data,
| Item |
|---|
pub const TOKEN_CLASSES: & str; 4 |
pub const USAGE_SOURCES: & str; 4 |
fn cost_of(counts : & Counts, prices : & PriceRow, model : & str, at : & str,) -> Result <DerivedCost, String> |
fn derivation_key(execution_run_id : uuid::Uuid, usage_event_ids : & uuid::Uuid, price_ids : & uuid::Uuid,) -> String |
fn canonical_utc(ts : & str) -> Option <String> |
fn attribute_facts <'a>(facts : & 'a UsageFact, runs : & RunWindow,) ->(Vec <(uuid::Uuid, & 'a UsageFact)>, Vec <& 'a UsageFact>) |
fn cents_of(amount : & Money) -> Result <i64, String> |
fn unposted(all : & uuid::Uuid, posted : & std::collections::HashSet <uuid::Uuid>,) -> Vec <uuid::Uuid> |
async fn record_usage_events(pool : & sqlx::PgPool, attributed : & (uuid::Uuid, & UsageFact),) -> Result <CaptureOutcome, sqlx::Error> |
fn derive_remainder(facts : & PostFactRow, remainder : & uuid::Uuid, prices : & PriceRow,) -> Result <(Money, Vec <uuid::Uuid>), String> |
async fn count_unreconciled(pool : & sqlx::PgPool) -> Result <usize, sqlx::Error> |
CaptureOutcome
The meter (sprint 4.37): counts are facts, prices are ratified data,
| Item |
|---|
pub struct CaptureOutcome |
Counts
The meter (sprint 4.37): counts are facts, prices are ratified data,
| Item |
|---|
pub struct Counts |
fn sum_usage(events : & Counts) -> Counts |
fn worker_usage_counts(json : & str) -> Option <(Counts, Option <String>)> |
async fn record_worker_usage(pool : & sqlx::PgPool, run_id : uuid::Uuid, counts : & Counts, model : Option <& str>,) -> Result <bool, sqlx::Error> |
DerivedCost
The meter (sprint 4.37): counts are facts, prices are ratified data,
| Item |
|---|
pub struct DerivedCost |
PostFactRow
The meter (sprint 4.37): counts are facts, prices are ratified data,
| Item |
|---|
pub type PostFactRow: (uuid::Uuid, Option <String>, Option <String>, i64, i64, i64, i64,) |
PostReport
The meter (sprint 4.37): counts are facts, prices are ratified data,
| Item |
|---|
pub struct PostReport |
async fn post_costs(pool : & sqlx::PgPool, tenant_id : uuid::Uuid,) -> Result <PostReport, sqlx::Error> |
PriceRow
The meter (sprint 4.37): counts are facts, prices are ratified data,
| Item |
|---|
pub struct PriceRow |
fn price_in_effect <'a>(prices : & 'a PriceRow, model : & str, class : & str, at : & str,) -> Option <& 'a PriceRow> |
async fn load_prices(pool : & sqlx::PgPool) -> Result <Vec <PriceRow>, sqlx::Error> |
PriceSeed
The meter (sprint 4.37): counts are facts, prices are ratified data,
| Item |
|---|
pub struct PriceSeed |
fn parse_rates_tsv(tsv : & str) -> Result <Vec <PriceSeed>, String> |
async fn ingest_prices(pool : & sqlx::PgPool, seeds : & PriceSeed,) -> Result <(usize, usize, Vec <String>), sqlx::Error> |
RunWindow
The meter (sprint 4.37): counts are facts, prices are ratified data,
| Item |
|---|
pub struct RunWindow |
async fn run_windows_for_session(pool : & sqlx::PgPool, harness_run_id : & str,) -> Result <Vec <RunWindow>, sqlx::Error> |
UsageFact
The meter (sprint 4.37): counts are facts, prices are ratified data,
| Item |
|---|
pub struct UsageFact |
fn usage_fact(line : & str) -> Option <UsageFact> |
fn dedupe_facts(facts : Vec <UsageFact>) -> Vec <UsageFact> |
UsageSurvey
The meter (sprint 4.37): counts are facts, prices are ratified data,
| Item |
|---|
pub struct UsageSurvey |
fn survey_usage <'a>(lines : impl Iterator <Item = & 'a str>) -> UsageSurvey |
payload (other)
Payload store (sprint 4.43b): keep the exact shard and mediated-form bytes a
| Item |
|---|
pub const MAX_PAYLOAD_BYTES: usize |
fn content_matches_hash(content : & str, hash : & str) -> bool |
fn fits(len : usize, max : usize) -> bool |
fn storable(content : & str, hash : & str) -> bool |
async fn load_shard_payload(pool : & PgPool, shard_hash : & str,) -> Result <Option <LoadedPayload>, PayloadError> |
async fn load_mediated_payload(pool : & PgPool, mediated_hash : & str,) -> Result <Option <LoadedPayload>, PayloadError> |
async fn load_reasoning_payload(pool : & PgPool, reasoning_hash : & str,) -> Result <Option <LoadedPayload>, PayloadError> |
LoadedPayload
Payload store (sprint 4.43b): keep the exact shard and mediated-form bytes a
| Item |
|---|
pub struct LoadedPayload |
PayloadError
Payload store (sprint 4.43b): keep the exact shard and mediated-form bytes a
| Item |
|---|
pub enum PayloadError |
fn verify_loaded(content : & str, byte_count : i64, hash : & str) -> Result <(), PayloadError> |
async fn store_shard_payload(pool : & PgPool, shard_hash : & str, content : & str,) -> Result <bool, PayloadError> |
async fn store_reasoning_payload(pool : & PgPool, reasoning_hash : & str, content : & str,) -> Result <bool, PayloadError> |
async fn store_mediated_payload(pool : & PgPool, mediated_hash : & str, content : & str,) -> Result <bool, PayloadError> |
probe (other)
The definition of done, and what happens when it is not met.
| Item |
|---|
fn eval_path_exists(root : & Path, path : & str, kind : PathKind) -> ProbeResult |
fn decide(outcome : Outcome, attempts : Attempts) -> NextAction |
fn is_cargo_test(argv : & String) -> bool |
fn ran_no_tests(stdout : & str) -> bool |
Attempts
The definition of done, and what happens when it is not met.
| Item |
|---|
pub struct Attempts |
NextAction
The definition of done, and what happens when it is not met.
| Item |
|---|
pub enum NextAction |
Outcome
The definition of done, and what happens when it is not met.
| Item |
|---|
pub enum Outcome |
PathKind
The definition of done, and what happens when it is not met.
| Item |
|---|
pub enum PathKind |
Probe
The definition of done, and what happens when it is not met.
| Item |
|---|
pub enum Probe |
fn parse_probe(raw : & serde_json::Value) -> Result <Probe, String> |
ProbeResult
The definition of done, and what happens when it is not met.
| Item |
|---|
pub struct ProbeResult |
reading (other)
How a model read a governed word (story 4.74). Pure: the closed set of
| Item |
|---|
fn offered(input : & SensePreferenceInput <'_>) -> Candidates |
fn parse_sense_selection(text : & str, offered : & Candidates) -> Result <Candidate, String> |
fn preference_of(selected : Candidate) -> SensePreference |
fn rank_conflict(rows : & ReadingRow) -> Vec <TermRank> |
AdjudicationInput
How a model read a governed word (story 4.74). Pure: the closed set of
| Item |
|---|
pub struct AdjudicationInput<'a> |
fn adjudication_prompt(input : & AdjudicationInput <'_>) -> String |
Candidate
How a model read a governed word (story 4.74). Pure: the closed set of
| Item |
|---|
pub enum Candidate |
Candidates
How a model read a governed word (story 4.74). Pure: the closed set of
| Item |
|---|
pub struct Candidates |
fn candidates_for(term : & str) -> Candidates |
Reading
How a model read a governed word (story 4.74). Pure: the closed set of
| Item |
|---|
pub enum Reading |
Reading :: fn as_str(self) -> & 'static str |
Reading :: fn parse(text : & str) -> Result <Self, String> |
fn classify_reading(verdict : SenseVerdict) -> Reading |
fn parse_adjudication(text : & str, expected : usize) -> Result <Vec <Option <Reading>>, String> |
ReadingRow
How a model read a governed word (story 4.74). Pure: the closed set of
| Item |
|---|
pub struct ReadingRow |
SensePreference
How a model read a governed word (story 4.74). Pure: the closed set of
| Item |
|---|
pub enum SensePreference |
SensePreferenceInput
How a model read a governed word (story 4.74). Pure: the closed set of
| Item |
|---|
pub struct SensePreferenceInput<'a> |
fn sense_preference_prompt(input : & SensePreferenceInput <'_>) -> String |
SenseVerdict
How a model read a governed word (story 4.74). Pure: the closed set of
| Item |
|---|
pub enum SenseVerdict |
TermRank
How a model read a governed word (story 4.74). Pure: the closed set of
| Item |
|---|
pub struct TermRank |
requirement (other)
The requirements chain, decidable half (sprint 4.47 U19, A11, A12):
| Item |
|---|
fn plan_guard(requirements : & Requirement, findings : & Finding) -> Vec <PlanRefusal> |
Disposition
The requirements chain, decidable half (sprint 4.47 U19, A11, A12):
| Item |
|---|
pub enum Disposition |
Finding
The requirements chain, decidable half (sprint 4.47 U19, A11, A12):
| Item |
|---|
pub struct Finding |
NeedKind
The requirements chain, decidable half (sprint 4.47 U19, A11, A12):
| Item |
|---|
pub enum NeedKind |
PlanRefusal
The requirements chain, decidable half (sprint 4.47 U19, A11, A12):
| Item |
|---|
pub enum PlanRefusal |
Requirement
The requirements chain, decidable half (sprint 4.47 U19, A11, A12):
| Item |
|---|
pub struct Requirement |
session_usage (other)
Session accounting (sprint 4.20 continuation): token usage per harness
| Item |
|---|
fn extract_usage(line : & str) -> Option <(BTreeMap <String, i64>, Option <String>)> |
fn run_id_from_source_ref(source_ref : & str) -> String |
SessionUsage
Session accounting (sprint 4.20 continuation): token usage per harness
| Item |
|---|
pub struct SessionUsage |
fn fold_session(run_id : & str, lines : impl Iterator <Item = String>) -> SessionUsage |
async fn record_usage(pool : & sqlx::PgPool, usage : & SessionUsage) -> Result <usize, sqlx::Error> |
story (other)
The story harness above the execution spine (sprint 4.20 continuation):
| Item |
|---|
pub const TEMPLATE_REGISTRY_PATH: & str |
pub const SUPPLIERS: & str; 3 |
fn accept_worker_result(result : & WorkerResult, registry : & TemplateSection, kind : & str,) -> Result <(), Vec <ResultRefusal>> |
fn headings_of(markdown : & str) -> Vec <String> |
fn render_story(projection : & StoryProjection, registry : & TemplateSection, kind : & str,) -> String |
Audience
The story harness above the execution spine (sprint 4.20 continuation):
| Item |
|---|
pub enum Audience |
Audience :: fn as_str(self) -> & 'static str |
Audience :: fn parse(s : & str) -> Result <Self, String> |
OracleResult
The story harness above the execution spine (sprint 4.20 continuation):
| Item |
|---|
pub enum OracleResult |
OracleResult :: fn as_str(self) -> & 'static str |
fn evaluate_criterion(oracle_kind : & str, required_evidence_kind : Option <& str>, evidence : & (String, Value),) -> OracleResult |
ResultRefusal
The story harness above the execution spine (sprint 4.20 continuation):
| Item |
|---|
pub enum ResultRefusal |
StoryProjection
The story harness above the execution spine (sprint 4.20 continuation):
| Item |
|---|
pub struct StoryProjection |
TemplateSection
The story harness above the execution spine (sprint 4.20 continuation):
| Item |
|---|
pub struct TemplateSection |
fn render_template_registry(rows : & TemplateSection) -> String |
fn parse_template_registry(tsv : & str) -> Result <Vec <TemplateSection>, String> |
fn validate_rendered(markdown : & str, registry : & TemplateSection, kind : & str,) -> Result <(), String> |
WorkerResult
The story harness above the execution spine (sprint 4.20 continuation):
| Item |
|---|
pub struct WorkerResult |
story_compile (other)
The ingest direction of the story doctrine (sprint 4.39): a hand-written
| Item |
|---|
pub const DOC_CAP_BYTES: usize |
pub const MAX_CRITERIA: usize |
pub const MAX_TASKS: usize |
pub const COMPILER_VERSION: & str |
fn diff_story(existing_intent : & str, existing : & ExistingCriterion, compiled : & CompiledStory,) -> StoryAmendment |
fn compile_story(markdown : & str, filename : Option <& str>,) -> Result <CompiledStory, CompileRefusal> |
CompileRefusal
The ingest direction of the story doctrine (sprint 4.39): a hand-written
| Item |
|---|
pub enum CompileRefusal |
CompileRefusal :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result |
CompiledCriterion
The ingest direction of the story doctrine (sprint 4.39): a hand-written
| Item |
|---|
pub struct CompiledCriterion |
CompiledStory
The ingest direction of the story doctrine (sprint 4.39): a hand-written
| Item |
|---|
pub struct CompiledStory |
ExistingCriterion
The ingest direction of the story doctrine (sprint 4.39): a hand-written
| Item |
|---|
pub struct ExistingCriterion |
ParsedUserStory
The ingest direction of the story doctrine (sprint 4.39): a hand-written
| Item |
|---|
pub struct ParsedUserStory |
fn parse_user_story(section : & str) -> Option <ParsedUserStory> |
StoryAmendment
The ingest direction of the story doctrine (sprint 4.39): a hand-written
| Item |
|---|
pub struct StoryAmendment |
StoryAmendment :: fn is_empty(& self) -> bool |
StoryAmendment :: fn is_refused(& self) -> bool |
story_html (other)
The human's projection of a story: themed HTML from the same canonical
| Item |
|---|
pub const HTML_GENERATOR_VERSION: & str |
pub const STORY_CSS: & str |
fn escape(s : & str) -> String |
fn anchor(section : & str) -> String |
fn render_story_html(projection : & StoryProjection, registry : & TemplateSection, kind : & str, md_href : Option <& str>,) -> String |
story_sections (other)
The sprint document's sections that had a declared table and no writer
| Item |
|---|
fn check_security_plan(s : & SecurityPlan) -> Option <SectionRefusal> |
fn check_consensus_position(p : & ConsensusPosition) -> Option <SectionRefusal> |
fn check_planned_test(t : & PlannedTest) -> Option <SectionRefusal> |
async fn record_security_plan(pool : & sqlx::PgPool, s : & SecurityPlan, provenance : & str,) -> Result <Uuid, SectionError> |
async fn record_consensus_position(pool : & sqlx::PgPool, p : & ConsensusPosition, provenance : & str,) -> Result <Uuid, SectionError> |
async fn record_planned_test(pool : & sqlx::PgPool, t : & PlannedTest, provenance : & str,) -> Result <Uuid, SectionError> |
fn check_new_need(n : & NewNeed) -> Option <SectionRefusal> |
fn check_new_requirement(r : & NewRequirement) -> Option <SectionRefusal> |
fn check_new_finding(f : & NewFinding) -> Option <SectionRefusal> |
async fn record_need(pool : & sqlx::PgPool, n : & NewNeed, provenance : & str,) -> Result <Uuid, SectionError> |
async fn record_requirement(pool : & sqlx::PgPool, r : & NewRequirement,) -> Result <Uuid, SectionError> |
async fn record_finding(pool : & sqlx::PgPool, f : & NewFinding) -> Result <Uuid, SectionError> |
ConsensusPosition
The sprint document's sections that had a declared table and no writer
| Item |
|---|
pub struct ConsensusPosition |
NeedPath
The sprint document's sections that had a declared table and no writer
| Item |
|---|
pub enum NeedPath |
NeedPath :: fn as_str(self) -> & 'static str |
NewFinding
The sprint document's sections that had a declared table and no writer
| Item |
|---|
pub struct NewFinding |
NewNeed
The sprint document's sections that had a declared table and no writer
| Item |
|---|
pub struct NewNeed |
NewRequirement
The sprint document's sections that had a declared table and no writer
| Item |
|---|
pub struct NewRequirement |
PlannedTest
The sprint document's sections that had a declared table and no writer
| Item |
|---|
pub struct PlannedTest |
Priority
The sprint document's sections that had a declared table and no writer
| Item |
|---|
pub enum Priority |
Priority :: fn as_str(self) -> & 'static str |
SectionError
The sprint document's sections that had a declared table and no writer
| Item |
|---|
pub enum SectionError |
SectionError :: fn from(r : SectionRefusal) -> Self |
SectionRefusal
The sprint document's sections that had a declared table and no writer
| Item |
|---|
pub struct SectionRefusal |
SecurityInvariant
The sprint document's sections that had a declared table and no writer
| Item |
|---|
pub enum SecurityInvariant |
SecurityInvariant :: fn as_str(self) -> & 'static str |
SecurityInvariant :: fn all() -> Self; 4 |
fn unanswered_invariants(answered : & SecurityInvariant) -> Vec <SecurityInvariant> |
SecurityPlan
The sprint document's sections that had a declared table and no writer
| Item |
|---|
pub struct SecurityPlan |
symbol_index (other)
Sprint 4.21 AC3: the symbol inventory is state, not a file.
| Item |
|---|
fn normalized_name(name : & str) -> String |
SymbolRow
Sprint 4.21 AC3: the symbol inventory is state, not a file.
| Item |
|---|
pub struct SymbolRow |
async fn replace_symbols(pool : & PgPool, rows : & SymbolRow) -> Result <u64, sqlx::Error> |
work_product (other)
Sprint 4.47 U1a — the work-product ontology, decidable half.
| Item |
|---|
fn sprint_state_machine() -> operations_workflow::Result <StateMachineDefinition> |
fn sprint_number_valid(number : & str) -> bool |
fn slug_valid(slug : & str) -> bool |
fn kind_name_valid(kind : & str) -> bool |
KindRefusal
Sprint 4.47 U1a — the work-product ontology, decidable half.
| Item |
|---|
pub enum KindRefusal |
fn admit_kind(kind : & str, term_status : TermStatus) -> Result <(), KindRefusal> |
SprintKey
Sprint 4.47 U1a — the work-product ontology, decidable half.
| Item |
|---|
pub struct SprintKey |
SprintKey :: fn key(& self) -> String |
SprintRef
Sprint 4.47 U1a — the work-product ontology, decidable half.
| Item |
|---|
pub enum SprintRef |
fn parse_sprint_ref(s : & str) -> Result <SprintRef, String> |
SprintState
Sprint 4.47 U1a — the work-product ontology, decidable half.
| Item |
|---|
pub enum SprintState |
SprintState :: fn as_str(self) -> & 'static str |
SprintState :: fn parse(s : & str) -> Result <Self, String> |
SprintState :: fn next(self) -> Option <Self> |
SprintState :: fn can_transition(self, to : Self) -> bool |
How to use it
No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.
Module structure
operations_control_plane
benefitboxescostdatasourcedispatchenvelopeexecutiongateidentifierinventorykindslexiconlexicon_exportmeteringpayloadprobereadingrequirementsession_usagestorystory_compilestory_htmlstory_sectionssymbol_indexwork_product
flowchart TD n_operations_control_plane["operations_control_plane"] n_operations_control_plane --> n_benefit["benefit"] n_operations_control_plane --> n_boxes["boxes"] n_operations_control_plane --> n_cost["cost"] n_operations_control_plane --> n_datasource["datasource"] n_operations_control_plane --> n_dispatch["dispatch"] n_operations_control_plane --> n_envelope["envelope"] n_operations_control_plane --> n_execution["execution"] n_operations_control_plane --> n_gate["gate"] n_operations_control_plane --> n_identifier["identifier"] n_operations_control_plane --> n_inventory["inventory"] n_operations_control_plane --> n_kinds["kinds"] n_operations_control_plane --> n_lexicon["lexicon"] n_operations_control_plane --> n_lexicon_export["lexicon_export"] n_operations_control_plane --> n_metering["metering"] n_operations_control_plane --> n_payload["payload"] n_operations_control_plane --> n_probe["probe"] n_operations_control_plane --> n_reading["reading"] n_operations_control_plane --> n_requirement["requirement"] n_operations_control_plane --> n_session_usage["session_usage"] n_operations_control_plane --> n_story["story"] n_operations_control_plane --> n_story_compile["story_compile"] n_operations_control_plane --> n_story_html["story_html"] n_operations_control_plane --> n_story_sections["story_sections"] n_operations_control_plane --> n_symbol_index["symbol_index"] n_operations_control_plane --> n_work_product["work_product"]
Public surface
`crate root`
| Item | What it is |
|---|---|
pub const CONTROL_PLANE_MIGRATIONS: & (& str, & str) | The schema this crate owns, applied into corpus_sourcecode by whoever runs migrations for that database |
`benefit`
| Item | What it is |
|---|---|
pub enum Realisation | How far a benefit has come from its baseline toward its target, as at the latest measurement |
Realisation :: fn as_str(self) -> & 'static str | The word the benefit_realisation view uses for this state. |
fn share(baseline : f64, target : f64, latest : f64) -> Option <f64> | The signed share of the way from baseline to target, direction-agnostic: a cost falling 100 → 60 realises at 60 exactly as revenue rising 60 → 100 does |
fn realisation(baseline : f64, target : f64, latest : Option <f64>) -> Realisation | The benefit's state as at its latest measurement, or Unmeasured when there is none. |
fn validate_measure(unit : & str, baseline : f64, target : f64) -> Result <(), String> | The measure a benefit must carry to be written at all: a unit, and two numbers that differ |
`boxes`
| Item | What it is |
|---|---|
pub struct BoxFacts | A box as the decision sees it: the asserted limit and the derived sum of posted costs, both in cents. |
BoxFacts :: fn balance_cents(self) -> i64 | Limit minus posted — negative when overspent (late postings can do that; the NEXT dispatch refuses, per the round's injection probe). |
fn may_spend(box_name : & str, facts : BoxFacts) -> Result <(), String> | AC2's decision: may this story's item proceed to a PAID rung? A refusal names the box and its balance — the runner prints it verbatim and the console banners it |
fn median_p90_cents(costs : & i64) -> Option <(i64, i64)> | AC5: median and p90 (nearest-rank) over posted per-run costs, cents |
`cost`
| Item | What it is |
|---|---|
pub struct Rate | Rates for one model under one schedule, per MILLION tokens. |
pub struct TokenUse | What a run consumed |
pub struct Cost | A computed cost, inseparable from the schedule that produced it. |
pub struct Rates | Parsed rate registry: (schedule_id, model) -> (Rate, currency). |
Rates :: fn parse(tsv : & str) ->(Self, usize) | Parse the committed TSV |
Rates :: fn get(& self, schedule_id : & str, model : & str) -> Option <(Rate, & str)> | — |
Rates :: fn cost(& self, schedule_id : & str, model : & str, use_ : TokenUse) -> Option <Cost> | Cost this usage under a named schedule |
pub struct CostPerAccepted | Cost per accepted result — the metric that matters, and the one that is gamed if reported alone |
CostPerAccepted :: fn ratio(& self) -> Option <f64> | None when nothing was accepted: dividing by zero accepted results would report infinite cost for a run that simply produced nothing, which is a different failure and needs a different response. |
CostPerAccepted :: fn cheaper_at_floor(a : Self, b : Self, coverage_floor : f64) -> Option <bool> | The comparison, refused unless both arms clear the coverage floor |
`datasource`
| Item | What it is |
|---|---|
pub struct Corpus | One record that can answer an ask. |
pub struct Claim | One corpus's claim on one governed noun. |
Claim :: fn bounded(& self) -> bool | Does this claim state a range at all? |
Claim :: fn holds(& self, key_kind : & str, key : & str) -> bool | Could this claim hold key? An unbounded claim always could: stating no range is silence, not a claim of absence, and excluding it would turn one into the other |
pub enum Route | How an ask reached the record that answered it. |
Route :: fn records(& self, fan_out : bool) -> Result <Vec <String>, Undecided> | The corpora this route may actually be answered from |
pub struct Undecided | Several records could answer and this capability answers from one |
Undecided :: fn question(& self) -> String | The question to put to the operator, built from the rows |
Undecided :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result | — |
async fn active(pool : & PgPool) -> Result <Vec <Corpus>, sqlx::Error> | Every corpus that can be asked today, in name order |
async fn claims_on(pool : & PgPool, noun : & str) -> Result <Vec <Claim>, sqlx::Error> | Every claim on one noun, in try order |
fn route(claims : & Claim, nouns : & String, key : Option <(& str, & str)>) -> Route | Route by governed noun, optionally narrowed by a key |
`dispatch`
| Item | What it is |
|---|---|
pub const MAX_ARGV_ITEMS: usize | Caps on the predicate form (Gate 1.5.6 §1). |
pub const MAX_ARG_BYTES: usize | — |
pub const MAX_PATH_BYTES: usize | — |
pub enum DonePredicate | The typed done-predicate forms the runner evaluates |
fn validate_predicate(p : & DonePredicate) -> Result <(), String> | Validate an operator-supplied predicate (AC2): typed kinds only, caps enforced, paths repo-relative with no parent escapes |
pub struct ItemState | One work item as the readying decision sees it. |
fn readyable(items : & ItemState) -> Vec <Uuid> | AC1: the set an approval may ready — draft items whose dependency (when one exists) is already verified |
fn suggest_predicate(goal : & str) -> Option <DonePredicate> | Suggest a done predicate from the task's own words (operator ask, 2026-09-02: "does the program not do that for me?") |
pub enum Rung | The routing ladder's rungs (sprint 4.41 AC3), cheapest lawful first. |
pub struct LadderFacts | The inputs the ladder decision needs — all queried/probed by the rim. |
fn ladder_decision(facts : LadderFacts) ->(Rung, String) | AC3: pick the rung and say why — the sentence lands in routing_decision verbatim. |
pub enum DispatchOutcome | What one runner invocation amounted to (AC3): classified from the runner's own words, refusals verbatim — never re-guessed. |
fn classify_runner_output(exit_code : i32, stdout : & str, stderr : & str) -> DispatchOutcome | Classify the runner's captured output + exit status. |
`envelope`
| Item | What it is |
|---|---|
pub const ACCOUNT_OPEN: & str | The fence the model must open its account with, and close. |
pub const ACCOUNT_CLOSE: & str | — |
pub const RESULT_FENCE: & str | The fence the typed result travels in. |
pub enum JsonType | A JSON type a field must have, for the flat-object constructor. |
JsonType :: fn as_str(self) -> & 'static str | — |
pub struct ResultShape | The declared shape of a prompt kind's result: a JSON Schema document |
ResultShape :: fn object(fields : & (& str, JsonType)) -> Self | The common case: an object with exactly these required fields, no others (additionalProperties: false), each of one JSON type. |
pub struct Envelope | What every prompt carries: its kind and the shape it demands back. |
pub enum EnvelopeRefusal | Why a reply was refused |
EnvelopeRefusal :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result | — |
pub struct Admitted | A reply that passed the envelope: the account verbatim, the typed result, and how many bytes of prose fell outside the two. |
Envelope :: fn demand(& self) -> String | The demand appended to every prompt, rendered from the schema so the model is told exactly what comes back and nothing is typed per prompt. |
Envelope :: fn admit(& self, reply : & str) -> Result <Admitted, EnvelopeRefusal> | Admit a reply or refuse it, by the rules in the module doc |
`execution`
| Item | What it is |
|---|---|
pub const OBSERVED_VALUE_CAP_BYTES: usize | Cap on evidence.observed_value bytes (Gate 1.5.6 §1) |
pub const POLICY_CAP_BYTES: usize | Cap on routing_decision / selection_policy jsonb bytes. |
pub const MAX_SHARD_SOURCES: usize | Cap on shard_source rows per shard. |
pub const STATUS_NEW: & str | The pseudo-status a subject transitions FROM at creation, so from_status can stay NOT NULL and the composite foreign key applies to the first transition as well as every later one. |
pub const EVIDENCE_KINDS_V1: & & str | Evidence kinds, v1 |
pub enum ExecutorKind | Who or what performed an execution. |
ExecutorKind :: fn as_str(self) -> & 'static str | The stored executor_kind text. |
pub enum RunResult | Terminal state of one execution attempt. |
RunResult :: fn as_str(self) -> & 'static str | The stored result text. |
pub enum Cause | — |
Cause :: fn as_str(self) -> & 'static str | The stored cause text. |
fn parse_executor_kind(s : & str) -> Result <ExecutorKind, String> | Parse an executor_kind from the CLI |
fn parse_run_result(s : & str) -> Result <RunResult, String> | Parse a terminal result from the CLI |
fn parse_cause(s : & str) -> Result <Cause, String> | Parse a transition cause from the CLI |
pub const LEGAL_TRANSITIONS: & (& str, & str, & str, bool) | The legal state graph, as data: (subject_kind, from, to, requires_evidence) |
pub struct LegalEdge | One legal edge, resolved. |
fn legal_edge(subject_kind : & str, from : & str, to : & str) -> Option <LegalEdge> | Look up an edge in LEGAL_TRANSITIONS. |
fn subject_states(subject_kind : & str) -> Vec <& 'static str> | The states a subject kind can occupy, in the machine's own declaration order (first appearance of each to state in LEGAL_TRANSITIONS) |
fn validate_run_start(executor_kind : ExecutorKind, shard_hash : Option <& str>, mediated_semantics_hash : Option <& str>, lexicon_version : Option <& str>, disclosure : Option <& Disclosure>,) -> Result <(), String> | The model-run provenance rule: a model execution names the exact shard and the exact mediated semantics it ran on, or it does not start |
fn validate_transition(subject_kind : & str, from : & str, to : & str, cause : Cause, evidence_present : bool, run_present : bool,) -> Result <(), String> | Transition legality plus the per-edge evidence requirement |
fn validate_evidence_kind(kind : & str) -> Result <(), String> | The v1 evidence vocabulary gate |
fn cap_value(value : & Value, cap : usize) ->(Value, bool) | Truncate an oversize jsonb payload, returning the value to store and whether it was truncated |
fn evidence_hash(kind : & str, subject : & str, observed_value : & Value) -> String | Content hash for an evidence row: SHA-256 over kind\nsubject\n<canonical value>, lowercase hex |
fn validate_shard_sources(count : usize) -> Result <(), String> | The shard-source cap (Gate 1.5.6 §1) |
pub struct ShardProvenance | A shard's provenance: enough to recompile it, never its bytes. |
ShardProvenance :: fn is_reproducible(& self) -> bool | A shard is reproducible only if every source is pinned to a corpus_doc_version row. |
pub const QUERY_PACK_SQL: & str | The checked-in query pack |
pub struct NamedQuery | One named query from the pack. |
fn parse_query_pack(pack : & str) -> Vec <NamedQuery> | Split the query pack into named blocks: a -- name: <slug> line opens a block, the first line ending in ; closes it |
pub enum ExecutionError | Failures of the spine's write path. |
async fn record_shard_provenance(pool : & sqlx::PgPool, shard : & ShardProvenance,) -> Result <(), ExecutionError> | Record a shard's provenance and its pinned sources in one transaction |
async fn pin_paths(pool : & sqlx::PgPool, shard_hash : & str, paths : & String, repo_commit : & str,) -> Result <Vec <String>, ExecutionError> | Pin a shard's inputs to the corpus's own record of their state |
pub struct SourceState | One pinned source, checked against what the corpus holds NOW. |
async fn verify_pinned_state(pool : & sqlx::PgPool, shard_hash : & str,) -> Result <Vec <SourceState>, ExecutionError> | The state half of a replay: does every pinned source still hold the bytes the shard was compiled from? # Errors ExecutionError::Db on a connection-level failure. |
pub struct RunStart | What a caller needs to open an execution. |
pub struct Disclosure | The disclosure record for one model call (ADR 0035, "Disclosure policy") |
async fn start_run(pool : & sqlx::PgPool, start : & RunStart,) -> Result <(Uuid, i32), ExecutionError> | Open an execution against a step |
async fn start_work_item_run(pool : & sqlx::PgPool, work_item_id : Uuid, executor_kind : ExecutorKind,) -> Result <(Uuid, i32), ExecutionError> | Start a run whose subject is a WORK ITEM rather than a task (0062) |
async fn finish_run(pool : & sqlx::PgPool, run_id : Uuid, result : RunResult, detail : Option <& str>,) -> Result <(), ExecutionError> | Close an execution |
async fn finish_run_with_account(pool : & sqlx::PgPool, run_id : Uuid, result : RunResult, detail : Option <& str>, confidence : Option <f64>, reasoning_hash : Option <& str>,) -> Result <(), ExecutionError> | Close an execution WITH the model's own account (sprint 4.43d, US11): confidence fills 0018's reserved at-close column; reasoning_hash points at the stored crate::payload reasoning text |
async fn record_evidence(pool : & sqlx::PgPool, run_id : Uuid, kind : & str, subject : & str, observed_value : & Value, provenance : & str,) -> Result <Uuid, ExecutionError> | Record one typed observation against an execution |
pub struct ScopeEntry | One artifact a work item is scoped to, as work_item_scope records it. |
fn scope_dirs(root : & std::path::Path, entries : & ScopeEntry) -> Vec <std::path::PathBuf> | The directories a harness may be granted for a scope, resolved against a repo root |
async fn step_scope(pool : & sqlx::PgPool, task_id : Uuid,) -> Result <Vec <ScopeEntry>, ExecutionError> | The artifacts this step's work item is scoped to |
async fn step_done_predicate(pool : & sqlx::PgPool, task_id : Uuid,) -> Result <Option <Value>, ExecutionError> | This step's definition of done, as stored on its work item |
pub struct TransitionRequest | One status change, applied. |
async fn record_transition(pool : & sqlx::PgPool, req : & TransitionRequest,) -> Result <i64, ExecutionError> | Apply a status change AND record it, in one transaction |
async fn record_transition_in(tx : & mut sqlx::Transaction <'_, sqlx::Postgres>, req : & TransitionRequest,) -> Result <i64, ExecutionError> | The transition inside a CALLER-OWNED transaction (sprint 4.40 AC1: an approval readies its story's items in the approval's own transaction — all of it commits or none) |
pub struct WorkItemEntity | work_item as a operations_workflow::store::StatefulEntity -- sprint 4.21 AC2's binding of the harness subjects to the shipped CAS. |
pub struct TaskEntity | The task — the ordered unit inside a work item (ISO/IEC/IEEE 12207) — as a stateful entity |
fn update_edges(subject_kind : & str) -> Vec <(& 'static str, & 'static str)> | The (from, to) pairs 0029's generated trigger enforces for one subject kind -- LEGAL_TRANSITIONS minus the creation edges (creation is an INSERT; the trigger fires on UPDATE). |
`gate`
| Item | What it is |
|---|---|
pub const CHECK_TIMEOUT: Duration | Wall-clock ceiling for one check |
pub const MAX_CHECK_OUTPUT_BYTES: usize | Per-stream capture cap |
pub const ALLOWED_BINARIES: & str; 1 | Binaries a registered check may invoke |
pub struct CheckOutcome | What one check decided, and why. |
pub struct GateReport | What one gate run decided about one work item. |
fn argv(program : & str) -> Result <(String, Vec <String>), String> | Split a registered program string into an allowlisted binary and its arguments |
async fn run_gate(pool : & PgPool, gate : & str, work_item_id : Uuid, repo_root : & str,) -> Result <GateReport, ExecutionError> | Run every required check of gate against work_item_id, recording each decision as a check_result with the evidence that produced it |
`identifier`
| Item | What it is |
|---|---|
pub const LEGACY_PREFIXES: (& str, & str); 2 | The legacy letter prefixes this module knows, and the kind each spells. |
pub struct Site | One rewritten site: where, what it said, what it says now. |
fn spell(label : & str, sprint : & str) -> Option <String> | The spelled identifier for one legacy label: AC12 with sprint 4.47 is acceptance-criterion 4.47.12; U1c is work-item 4.47.1c |
fn relabel(text : & str, sprint : & str) ->(String, Vec <Site>) | Rewrite every legacy label in text to its spelled form for sprint, returning the new text and the sites, in document order |
fn legacy_count(text : & str, sprint : & str) -> usize | How many legacy sites a relabel would touch: the number a commit hook ratchets downward and refuses to see rise. |
fn sprint_of_filename(path : & str) -> Option <String> | The sprint number a story file carries in its name (a story file named sprint-4.47-<slug>.md → 4.47), or None for any other file |
pub struct Baseline | The ratchet's baseline: one measured count per document, shrink-only |
Baseline :: fn parse(text : & str) -> Result <Self, String> | # Errors A line that is not path<TAB>count, by line number. |
Baseline :: fn render(& self) -> String | — |
Baseline :: fn record(& mut self, path : & str, count : usize) -> Result <(), String> | Record a measurement |
pub struct RatchetViolation | One document the ratchet refuses: its count is above its baseline line (or above zero with no line). |
fn ratchet(baseline : & Baseline, measured : & (String, usize)) -> Vec <RatchetViolation> | The ratchet over measured documents: every one whose count exceeds what the baseline allows, in path order |
`inventory`
| Item | What it is |
|---|---|
pub const MAX_QUERIES: usize | Hard cap on queries per inventory run (Gate 1.5.6 §1): the whole-goal query plus the goal's distinct meaningful words, first-appearance order. |
pub const MAX_QUERY_BYTES: usize | Byte cap one query may occupy -- capability_search refuses above 256, so the derivation never produces what the function would reject. |
fn inventory_queries(goal : & str, noise : & std::collections::BTreeSet <String>) -> Vec <String> | Derive the queries an inventory run searches, deterministically: the trimmed goal itself (when it fits the byte cap), then each distinct lowercase word longer than two characters that is not a noise word, in first-appearance order, capped at MAX_QUERIES. |
pub struct InventoryReport | What one inventory run found. |
async fn run_inventory_check(pool : & PgPool, work_item_id : Uuid,) -> Result <InventoryReport, ExecutionError> | Execute the work item's inventory_check root as a tool run: search, record evidence whose subject is the queries, and move the step pending -> in_progress -> verified with the evidence riding the verified edge |
`kinds`
| Item | What it is |
|---|---|
pub struct KindRow | One kind row as derived from a ratified term. |
fn kind_row_for(term : & str) -> Option <KindRow> | Derive a kind row from a ratified term's label |
`lexicon`
| Item | What it is |
|---|---|
pub enum TermStatus | Where a term stands in a given vocabulary state |
TermStatus :: fn as_str(self) -> & 'static str | — |
TermStatus :: fn admissible_in_new_output(self) -> bool | Whether this status may appear, unmarked, in newly governed output. |
pub struct GovernedTerm | One row of the governed vocabulary. |
pub enum CoinagePolicy | What a model execution may do about a term it cannot express. |
CoinagePolicy :: fn as_str(self) -> & 'static str | — |
CoinagePolicy :: fn parse(s : & str) -> Result <Self, String> | # Errors A string naming the accepted set. |
pub const REGISTRY_FILES: & & str | The registry files, in the order that defines the version hash |
pub const RATIFIED_ROLE_VOCABULARY: & str | The vocabulary version whose role rows are RATIFIED |
fn lexicon_version(sources : & (& str, & str)) -> String | Content hash of a vocabulary state: SHA-256 over name\n<bytes> for each source in the given order |
fn build_registry(lexicon_tsv : & str, roles_tsv : & str, tier_tsv : & str, glossary_tsv : & str, ratified_role_vocabulary : & str,) -> Vec <GovernedTerm> | Build the governed vocabulary from the repo's ratified files |
fn conflicts(lexicon_tsv : & str, roles_tsv : & str, tier_tsv : & str, glossary_tsv : & str, ratified_role_vocabulary : & str,) -> Vec <String> | Terms a registry classifies as ratified while ALSO retiring or prohibiting them |
fn status_of(registry : & GovernedTerm, term : & str) -> TermStatus | Look a term up in a built registry |
pub struct LexicalViolation | One lexical violation in governed output. |
fn validate_output(path : & str, lines : & String, lexicon_tsv : & str) -> Vec <LexicalViolation> | Validate model output BEFORE it is accepted as governed state |
pub struct NeedsTermRatification | The typed stop a governed execution produces instead of coining a term |
pub enum CoinageVerdict | What an execution may do with a term it wants to use. |
fn classify_coinage(registry : & GovernedTerm, term : & str, concept : & str, evidence : Value, lexicon_version : & str, _policy : CoinagePolicy,) -> CoinageVerdict | Decide what a governed execution may do about term |
fn validate_ratification_authority(authority : & str) -> Result <(), String> | Only an operator ruling ratifies a term |
`lexicon_export`
| Item | What it is |
|---|---|
pub struct TermRow | A concept, as the authoring plane holds it. |
pub enum LabelKind | SKOS altLabel / hiddenLabel. |
LabelKind :: fn as_str(self) -> & 'static str | — |
pub struct LabelRow | One label of one concept. |
pub struct BroaderRow | One stored broader edge |
pub struct UnrenderableField | A field whose text cannot go into a tab-separated file without changing what the file means |
pub struct LineDiff | One line where a rendering and the file on disk disagree. |
pub struct LabelConflict | Two labels that would resolve to two concepts from one bare string. |
fn normalize_label(label : & str) -> String | The normal form a bare term is resolved in: trimmed and lowercased |
fn non_ascii_labels(terms : & TermRow, labels : & LabelRow) -> Vec <String> | Labels the vocabulary will not accept, because their equality under a hook's bare-string match is not decidable without a normalization form this crate does not carry. |
fn resolvable_label_conflicts(terms : & TermRow, labels : & LabelRow) -> Vec <LabelConflict> | Every pair of labels that normalize to one string across the whole vocabulary -- prefLabels and term labels together, since a hook holds neither concept kind nor table when it resolves a word. |
fn render_lexicon(header : & str, terms : & TermRow) -> Result <String, Vec <UnrenderableField>> | lexicon-policy.tsv: the retirement list the commit hooks read |
fn render_roles(header : & str, terms : & TermRow) -> Result <String, Vec <UnrenderableField>> | architectural-role-vocabulary.tsv: vocabulary_version<TAB>role |
fn render_tiers(header : & str, terms : & TermRow) -> Result <String, Vec <UnrenderableField>> | tier-vocabulary.tsv: term<TAB>definition<TAB>examples |
fn render_glossary(header : & str, terms : & TermRow, labels : & LabelRow, broader : & BroaderRow,) -> Result <String, Vec <UnrenderableField>> | glossary.tsv: the ratified vocabulary, carrying every field the version must pin |
fn render_canonical(header : & str, terms : & TermRow, labels : & LabelRow, broader : & BroaderRow,) -> Result <String, Vec <UnrenderableField>> | term-canonical.tsv: the CURRENT semantic state, entire, deterministic from rows (operator ruling 2026-09-10, step 5) |
fn parse_canonical(tsv : & str,) -> Result <(Vec <TermRow>, Vec <LabelRow>, Vec <BroaderRow>), Vec <SeedRefusal>> | Read term-canonical.tsv back into the rows it was rendered from — the other half of the bootstrap claim (operator ruling 2026-09-10, step 6) |
fn canonical_round_trips(bytes : & str, terms : & TermRow, labels : & LabelRow, broader : & BroaderRow,) -> Result <(), String> | Prove a canonical rendering reads BACK to the rows it came from |
fn unenforced_retirements(terms : & TermRow) -> Vec <(String, Option <String>)> | Terms ruled unwritable that no registry file publishes, so no hook refuses them: (term, what to write instead) |
pub struct SeedRow | One row of a term seed file: the vocabulary as an operator authored it, before any of it is in the database. |
pub struct SeedRefusal | Why a seed row is not importable. |
fn parse_term_seed(tsv : & str) -> Result <Vec <SeedRow>, Vec <SeedRefusal>> | Parse a term seed file: term kind definition scope_note standard alt hidden broader, - for an empty cell, # for a comment |
fn diff_rendering(path : & str, on_disk : & str, rendered : & str) -> Vec <LineDiff> | Where the file on disk and the rendering differ, line by line |
`metering`
| Item | What it is |
|---|---|
pub const TOKEN_CLASSES: & str; 4 | The token classes a price can be ratified for — mirrored by 0030's model_price.token_class CHECK (drift-tested). |
pub const USAGE_SOURCES: & str; 4 | Who may report a usage fact — mirrored by 0030's usage_event.source CHECK (drift-tested) |
pub struct Counts | A run's observed token counts: the sum over its immutable usage events, one field per ratifiable token class. |
fn sum_usage(events : & Counts) -> Counts | Sum usage facts per class |
pub struct PriceRow | One ratified price row for one model |
fn price_in_effect <'a>(prices : & 'a PriceRow, model : & str, class : & str, at : & str,) -> Option <& 'a PriceRow> | The price in effect for model + class at at: the latest row whose effective_from is not later than at, ties broken by id so the pick never depends on input order |
pub struct DerivedCost | A derived cost: the money amount and the exact price rows it used — the posting binds to these ids, so a historical entry is never silently repriced from today's table. |
fn cost_of(counts : & Counts, prices : & PriceRow, model : & str, at : & str,) -> Result <DerivedCost, String> | Derive cost as counts × model's prices in effect at at |
fn derivation_key(execution_run_id : uuid::Uuid, usage_event_ids : & uuid::Uuid, price_ids : & uuid::Uuid,) -> String | The derivation's identity: a hash over the RUN id plus the sorted usage-event ids and price-row ids |
fn canonical_utc(ts : & str) -> Option <String> | Normalize a timestamp to one comparable UTC key: YYYY-MM-DD HH:MM:SS.ffffff (fraction padded to six digits) |
pub struct UsageFact | One transcript line's usage, keyed for exactly-once capture. |
fn usage_fact(line : & str) -> Option <UsageFact> | Read one transcript line into a keyed usage fact, or None for a line carrying no usage or no usable key |
fn worker_usage_counts(json : & str) -> Option <(Counts, Option <String>)> | Sprint 4.41 AC4 — the worker cost seam: read the frontier CLI's own machine-readable usage (claude --output-format json carries a top-level usage object) into Counts plus the model it names |
async fn record_worker_usage(pool : & sqlx::PgPool, run_id : uuid::Uuid, counts : & Counts, model : Option <& str>,) -> Result <bool, sqlx::Error> | Bind one worker's self-reported usage to its run (sprint 4.41 AC4) |
fn dedupe_facts(facts : Vec <UsageFact>) -> Vec <UsageFact> | Collapse repeated keys to the LAST occurrence, keeping first-seen order: streaming writes a message's final usage last (25,957 live divergent cases), so the final line is the fact. |
pub struct RunWindow | — |
fn attribute_facts <'a>(facts : & 'a UsageFact, runs : & RunWindow,) ->(Vec <(uuid::Uuid, & 'a UsageFact)>, Vec <& 'a UsageFact>) | Attribute facts to the run whose start, finish window contains them (boundaries inclusive) |
fn cents_of(amount : & Money) -> Result <i64, String> | The exact derivation, rounded to the ledger's grain (cents, bankers' half-even) |
fn unposted(all : & uuid::Uuid, posted : & std::collections::HashSet <uuid::Uuid>,) -> Vec <uuid::Uuid> | The facts no prior posting names — the next posting's remainder (exactly-once per FACT across a run's accruing postings). |
pub struct PriceSeed | One ingest-ready price row: the ratified TSV line, split per token class, per-token, canonical-UTC |
fn parse_rates_tsv(tsv : & str) -> Result <Vec <PriceSeed>, String> | Parse docs/reference/model-rates.tsv (schedule_id, effective_from date, vendor, model, four per-MILLION rates, currency, provenance) into per-token PriceSeeds |
pub struct UsageSurvey | What the R6 survey measures over one line stream: whether one message's usage object repeats across lines (the double-count shape that would make per-line summing over-bill). |
fn survey_usage <'a>(lines : impl Iterator <Item = & 'a str>) -> UsageSurvey | Count usage-bearing lines per message.id (the decidable core of the R6 double-count question), and whether any message's repeated usage diverges across its lines. |
async fn ingest_prices(pool : & sqlx::PgPool, seeds : & PriceSeed,) -> Result <(usize, usize, Vec <String>), sqlx::Error> | Append-only price ingest: a seed whose (model, token_class, effective_from) already exists WITH THE SAME price is a no-op; the same key with a DIFFERENT price is a refused edit-in-place (the TSV header's own rule) — counted and returned, never a clean no-op (Gate 4) |
async fn load_prices(pool : & sqlx::PgPool) -> Result <Vec <PriceRow>, sqlx::Error> | Every ratified price row, effective_from rendered in the canonical UTC form price_in_effect relies on |
async fn run_windows_for_session(pool : & sqlx::PgPool, harness_run_id : & str,) -> Result <Vec <RunWindow>, sqlx::Error> | The run windows for one harness session, timestamps pre-canonicalized by the query (AT TIME ZONE 'UTC' — the render the pure fns state) |
pub struct CaptureOutcome | What one capture pass did with its attributed facts. |
async fn record_usage_events(pool : & sqlx::PgPool, attributed : & (uuid::Uuid, & UsageFact),) -> Result <CaptureOutcome, sqlx::Error> | Insert attributed facts as transcript-sourced usage events, the line uuid as the idempotency key, the observed model and instant kept on the fact (0031) |
pub type PostFactRow: (uuid::Uuid, Option <String>, Option <String>, i64, i64, i64, i64,) | One fact row as the poster reads it: id, observed model, canonical observed instant, the four counts. |
fn derive_remainder(facts : & PostFactRow, remainder : & uuid::Uuid, prices : & PriceRow,) -> Result <(Money, Vec <uuid::Uuid>), String> | PURE: derive the remainder's summed amount and the deduped price rows it used |
pub struct PostReport | What one posting pass did. |
async fn post_costs(pool : & sqlx::PgPool, tenant_id : uuid::Uuid,) -> Result <PostReport, sqlx::Error> | Post every CLOSED run's underived cost into the tenant's own books: one balanced journal entry per derivation (debit model-usage expense, credit provider payable), cents at the ledger's grain, the exact amount and the fact/price bindings on cost_posting |
async fn count_unreconciled(pool : & sqlx::PgPool) -> Result <usize, sqlx::Error> | Postings whose journal entry is missing or no longer posted — the soft pointer's reconciliation (Gate 4 N4) |
`payload`
| Item | What it is |
|---|---|
pub const MAX_PAYLOAD_BYTES: usize | The largest payload we store, per row (Gate 1.5.6 input cap) |
fn content_matches_hash(content : & str, hash : & str) -> bool | Does content hash (SHA-256, hex) to hash? The same digest the sharder and the DB CHECK use (foundation-audit-log, never a hand-rolled one — Gate 0.5). |
fn fits(len : usize, max : usize) -> bool | len bytes within max (the boundary is inclusive). |
fn storable(content : & str, hash : & str) -> bool | A payload is storable when it hashes to its key AND fits the cap. |
pub enum PayloadError | Why a payload could not be stored — or served. |
pub struct LoadedPayload | A stored payload, verified on the way out: the reveal/replay routes serve nothing this function has not re-hashed against its key (AC8). |
fn verify_loaded(content : & str, byte_count : i64, hash : & str) -> Result <(), PayloadError> | Re-verify a loaded row against its key: the content must hash to hash and the recorded byte_count must equal the content's length |
async fn load_shard_payload(pool : & PgPool, shard_hash : & str,) -> Result <Option <LoadedPayload>, PayloadError> | Load the stored shard payload for shard_hash, verified (re-hash == key, byte count == length) |
async fn load_mediated_payload(pool : & PgPool, mediated_hash : & str,) -> Result <Option <LoadedPayload>, PayloadError> | Load the stored mediated form for mediated_hash, same verification. |
async fn store_shard_payload(pool : & PgPool, shard_hash : & str, content : & str,) -> Result <bool, PayloadError> | Store the shard payload keyed by its hash |
async fn store_reasoning_payload(pool : & PgPool, reasoning_hash : & str, content : & str,) -> Result <bool, PayloadError> | Store the model's reasoning text keyed by its sha256 (sprint 4.43d, AC14) |
async fn load_reasoning_payload(pool : & PgPool, reasoning_hash : & str,) -> Result <Option <LoadedPayload>, PayloadError> | Load the stored reasoning for reasoning_hash, verified like the others. |
async fn store_mediated_payload(pool : & PgPool, mediated_hash : & str, content : & str,) -> Result <bool, PayloadError> | Store the mediated form keyed by its semantic-mediation hash |
`probe`
| Item | What it is |
|---|---|
pub enum Probe | v1 done-predicate enum (Gate 1.5 sprint-4.5 Q2, Codex-sharpened names) |
pub enum PathKind | — |
fn parse_probe(raw : & serde_json::Value) -> Result <Probe, String> | Parse and validate a stored predicate |
pub struct ProbeResult | A probe verdict plus the evidence a red verdict carries into the single corrective re-issue (the "diff attached" of harness notes §5). |
fn eval_path_exists(root : & Path, path : & str, kind : PathKind) -> ProbeResult | Evaluate PathExists — pure given a filesystem root. |
pub enum NextAction | Where the loop goes after an attempt (Gate 1.5 Q4: ONE corrective retry with evidence attached; infra failures get ONE separate infra retry and never consume the corrective one). |
pub struct Attempts | Attempt bookkeeping fed to decide |
pub enum Outcome | — |
fn decide(outcome : Outcome, attempts : Attempts) -> NextAction | The retry state machine |
fn is_cargo_test(argv : & String) -> bool | Whether this argv is a cargo test invocation, and so subject to the vacuous-pass rule below. |
fn ran_no_tests(stdout : & str) -> bool | Whether a cargo test run executed NO tests at all |
`reading`
| Item | What it is |
|---|---|
pub enum Reading | The closed set (term_reading.reading CHECK, 0082) |
Reading :: fn as_str(self) -> & 'static str | — |
Reading :: fn parse(text : & str) -> Result <Self, String> | Exact, lowercase, closed |
pub enum SenseVerdict | What the lexicon's sense split says about one occurrence |
fn classify_reading(verdict : SenseVerdict) -> Reading | The rule from a sense verdict to a reading |
pub struct SensePreferenceInput<'a> | One term's probe: the bare word and up to three definitions |
pub struct Candidates | Which letter carries which candidate definition in a rendered prompt. |
fn candidates_for(term : & str) -> Candidates | The letter assignment for a term: a fixed function of the word, so the same input always renders the same bytes (a stable shard hash) and ours is not always in the same position (or the model learns the position). |
fn sense_preference_prompt(input : & SensePreferenceInput <'_>) -> String | The prompt as bytes |
fn offered(input : & SensePreferenceInput <'_>) -> Candidates | The letters actually offered for a term, given which definitions exist. |
pub enum Candidate | Which candidate the model selected. |
fn parse_sense_selection(text : & str, offered : & Candidates) -> Result <Candidate, String> | A model's answer against the offered letters |
pub enum SensePreference | Which sense the model prefers with no context to go on: ours, another, or it declined |
fn preference_of(selected : Candidate) -> SensePreference | — |
pub struct ReadingRow | One reading row as the ranking sees it. |
pub struct TermRank | One term × model, with its shares |
fn rank_conflict(rows : & ReadingRow) -> Vec <TermRank> | Rank term × model by conflicting share, highest first; ties broken by fewer governed, then by name, so the order is total and stable. |
pub struct AdjudicationInput<'a> | One term's adjudication: the governed definition and the real-use occurrences the rules could not decide, each numbered so the answer can name it |
fn adjudication_prompt(input : & AdjudicationInput <'_>) -> String | The adjudication prompt as bytes: deterministic for equal inputs (it is the mediated payload, hashed), the closed answer set stated, UNKNOWN always offered, one tab-separated line demanded per occurrence. |
fn parse_adjudication(text : & str, expected : usize) -> Result <Vec <Option <Reading>>, String> | A model's adjudication against the occurrences it was shown: one line per occurrence, in order, `<n><TAB><governed\ |
`requirement`
| Item | What it is |
|---|---|
pub enum NeedKind | What a stakeholder said, classified (29148 need; MoSCoW want). |
pub struct Requirement | The requirement's slots (AC61): a requirement with an empty required slot holds the story in ASK and is never filled by guessing. |
pub enum Disposition | How a requirement is met from what exists (A10; ISO 19011 finding). |
pub struct Finding | — |
pub enum PlanRefusal | Why PLAN refuses to let a story leave (AC61–AC63) |
fn plan_guard(requirements : & Requirement, findings : & Finding) -> Vec <PlanRefusal> | The PLAN guard: every refusal over the story's requirements and findings, in row order, so the console can show them all at once rather than one per attempt |
`session_usage`
| Item | What it is |
|---|---|
pub struct SessionUsage | What one session cost, summed from its own usage records. |
fn extract_usage(line : & str) -> Option <(BTreeMap <String, i64>, Option <String>)> | Pull the numeric usage from one transcript line, plus any model name sitting beside it |
fn fold_session(run_id : & str, lines : impl Iterator <Item = String>) -> SessionUsage | Fold a session's lines into one accounting row |
fn run_id_from_source_ref(source_ref : & str) -> String | The session id a transcript's source_ref refers to: the file stem, which is the session uuid the harness also reports to its hooks |
async fn record_usage(pool : & sqlx::PgPool, usage : & SessionUsage) -> Result <usize, sqlx::Error> | Write one session's accounting into run_measurement -- the shipped telemetry substrate, keyed by run_id, which execution_run.harness_run_id already joins to |
`story`
| Item | What it is |
|---|---|
pub enum Audience | Who a section is written for |
Audience :: fn as_str(self) -> & 'static str | — |
Audience :: fn parse(s : & str) -> Result <Self, String> | # Errors A string naming the accepted set. |
pub struct TemplateSection | One ratified section of a story document. |
pub const TEMPLATE_REGISTRY_PATH: & str | Where the rendering of the template rows lives, relative to the repo root |
pub const SUPPLIERS: & str; 3 | The supplier vocabulary of a section, closed (A11). |
fn render_template_registry(rows : & TemplateSection) -> String | Render the template rows as the registry file: header, then one row per section in (kind, ordinal) order whatever order the rows arrive in, so the bytes are canonical and a --check diff means the rows moved. |
fn parse_template_registry(tsv : & str) -> Result <Vec <TemplateSection>, String> | Parse the registry file back into rows |
pub struct WorkerResult | What a worker is allowed to return: typed values, addressed to sections that already exist |
pub enum ResultRefusal | Why a worker result was refused. |
fn accept_worker_result(result : & WorkerResult, registry : & TemplateSection, kind : & str,) -> Result <(), Vec <ResultRefusal>> | Accept or refuse a worker result against the ratified section registry |
fn headings_of(markdown : & str) -> Vec <String> | The level-2 headings of a rendered document, in order. |
fn validate_rendered(markdown : & str, registry : & TemplateSection, kind : & str,) -> Result <(), String> | Verify a rendered document still carries the ratified sections, in the ratified order |
pub struct StoryProjection | Everything the generator needs |
fn render_story(projection : & StoryProjection, registry : & TemplateSection, kind : & str,) -> String | Render the story document from canonical state |
pub enum OracleResult | The verdict an acceptance criterion closes with. |
OracleResult :: fn as_str(self) -> & 'static str | — |
fn evaluate_criterion(oracle_kind : & str, required_evidence_kind : Option <& str>, evidence : & (String, Value),) -> OracleResult | Evaluate one acceptance criterion against the evidence recorded for it |
`story_compile`
| Item | What it is |
|---|---|
pub const DOC_CAP_BYTES: usize | Input cap (AC2): a Gate 1 doc is prose, not a payload. |
pub const MAX_CRITERIA: usize | Row caps (Gate 1.5.6.1): more than this is not a sprint plan. |
pub const MAX_TASKS: usize | — |
pub const COMPILER_VERSION: & str | The compiler's version, recorded as evidence on the compile run (AC7) |
pub struct CompiledCriterion | One acceptance criterion as compiled: its code (from an ACn bullet prefix when the doc numbers them, positional AC1.. when it does not) and the statement text verbatim (wrapped lines joined by one space). |
pub struct CompiledStory | The deterministic result of compiling one Gate 1 doc (AC1). |
pub enum CompileRefusal | Typed refusals (AC2) — each names the defect and, where a line exists, its 1-based location. |
CompileRefusal :: fn fmt(& self, f : & mut std::fmt::Formatter <'_>) -> std::fmt::Result | — |
pub struct ExistingCriterion | A criterion as the database holds it, for the amendment diff (sprint 4.47 AC28): its code, its statement, and whether it has closed on evidence. |
pub struct StoryAmendment | What amending a story would do to its rows (sprint 4.47 AC28/AC29) |
StoryAmendment :: fn is_empty(& self) -> bool | Nothing to do — the document and the rows already agree. |
StoryAmendment :: fn is_refused(& self) -> bool | A refusal outranks the diff: the caller writes nothing. |
fn diff_story(existing_intent : & str, existing : & ExistingCriterion, compiled : & CompiledStory,) -> StoryAmendment | Diff a compiled document against the rows a story already holds |
fn compile_story(markdown : & str, filename : Option <& str>,) -> Result <CompiledStory, CompileRefusal> | Compile a hand-written Gate 1 doc to its canonical rows (AC1) |
pub struct ParsedUserStory | The three parts of a user story, kept apart because they answer different questions: who wants it, what they want, and the benefit that makes it worth doing. |
fn parse_user_story(section : & str) -> Option <ParsedUserStory> | Parse a ## User Story section into its three parts |
`story_html`
| Item | What it is |
|---|---|
pub const HTML_GENERATOR_VERSION: & str | The renderer's version, stamped into the document like the Markdown one |
pub const STORY_CSS: & str | The stylesheet, emitted with the document so a single file opens correctly with no asset server |
fn escape(s : & str) -> String | Escape the five characters that would otherwise close a tag or an attribute |
fn anchor(section : & str) -> String | A section's anchor: its name reduced to what a URL fragment may carry. |
fn render_story_html(projection : & StoryProjection, registry : & TemplateSection, kind : & str, md_href : Option <& str>,) -> String | Render one story as a standalone themed document |
`story_sections`
| Item | What it is |
|---|---|
pub enum SecurityInvariant | The four Gate 1.5.6 invariants |
SecurityInvariant :: fn as_str(self) -> & 'static str | The stored spelling, matching 0057's CHECK. |
SecurityInvariant :: fn all() -> Self; 4 | Every invariant, so a caller can iterate the gate rather than restate it. |
pub struct SecurityPlan | One Gate 1.5.6 answer for one story |
pub struct ConsensusPosition | One seat's answer in one Gate 1.5 round |
pub struct PlannedTest | One planned test, written before the implementation it judges. |
pub struct SectionRefusal | Why a section row was refused, in the caller's words rather than a constraint name. |
fn check_security_plan(s : & SecurityPlan) -> Option <SectionRefusal> | Gate 1.5.6: an invariant that applies must say how; one that does not must say why not |
fn unanswered_invariants(answered : & SecurityInvariant) -> Vec <SecurityInvariant> | The gate is answered when all four invariants have a row |
fn check_consensus_position(p : & ConsensusPosition) -> Option <SectionRefusal> | Gate 1.5: a round is a seat, a position, and (from round 2) a verdict on the previous one |
fn check_planned_test(t : & PlannedTest) -> Option <SectionRefusal> | Gate 2: a test that cannot say what it proves is not a plan. |
pub enum SectionError | A write refused before it reached the database, or the database's own failure |
SectionError :: fn from(r : SectionRefusal) -> Self | — |
async fn record_security_plan(pool : & sqlx::PgPool, s : & SecurityPlan, provenance : & str,) -> Result <Uuid, SectionError> | Record one Gate 1.5.6 answer |
async fn record_consensus_position(pool : & sqlx::PgPool, p : & ConsensusPosition, provenance : & str,) -> Result <Uuid, SectionError> | Record one seat's position in one round |
async fn record_planned_test(pool : & sqlx::PgPool, t : & PlannedTest, provenance : & str,) -> Result <Uuid, SectionError> | Record one planned test |
pub enum NeedPath | Where a need was stated |
NeedPath :: fn as_str(self) -> & 'static str | The stored spelling, matching 0047's CHECK. |
pub enum Priority | MoSCoW, as 0047 CHECKs it. |
Priority :: fn as_str(self) -> & 'static str | — |
pub struct NewNeed | A stakeholder's words, before they are a row |
pub struct NewRequirement | A requirement before it is a row |
pub struct NewFinding | A finding before it is a row: how one requirement is met from what exists. |
fn check_new_need(n : & NewNeed) -> Option <SectionRefusal> | Mirrors 0047's need CHECKs. |
fn check_new_requirement(r : & NewRequirement) -> Option <SectionRefusal> | Mirrors 0047's requirement CHECKs |
fn check_new_finding(f : & NewFinding) -> Option <SectionRefusal> | Mirrors 0047's finding_reuse_cites_a_crate and finding_absence_carries_searches: a reuse that names no crate is a claim, and an absence with no searches was asserted rather than checked (AC2b). |
async fn record_need(pool : & sqlx::PgPool, n : & NewNeed, provenance : & str,) -> Result <Uuid, SectionError> | Record a stakeholder need |
async fn record_requirement(pool : & sqlx::PgPool, r : & NewRequirement,) -> Result <Uuid, SectionError> | Record a requirement against its need |
async fn record_finding(pool : & sqlx::PgPool, f : & NewFinding) -> Result <Uuid, SectionError> | Record a finding against its requirement |
`symbol_index`
| Item | What it is |
|---|---|
pub struct SymbolRow | One pub item, the TSV row's shape (name kind crate layer path visibility) plus the derived normalized_name. |
fn normalized_name(name : & str) -> String | Fold a symbol name so spelling variants collide on purpose: StateTransitionRecord, state_transition_record and state-transition-record all normalize to statetransitionrecord (AC3's stated reason for the column existing). |
async fn replace_symbols(pool : & PgPool, rows : & SymbolRow) -> Result <u64, sqlx::Error> | Replace the whole symbol index in one transaction: advisory lock, delete, insert every row, commit -- or abort with nothing changed on the first error (Gate 1.5.6 §4) |
`work_product`
| Item | What it is |
|---|---|
pub enum SprintState | The sprint lifecycle (sprint 4.47 state table) |
SprintState :: fn as_str(self) -> & 'static str | — |
SprintState :: fn parse(s : & str) -> Result <Self, String> | Parse the stored form |
SprintState :: fn next(self) -> Option <Self> | The forward step of the state table. |
SprintState :: fn can_transition(self, to : Self) -> bool | Every legal edge: the forward step, CONSENSUS staying put for another round (ITERATE), REVIEW → BUILD (REVISE) and REVIEW → PLAN (REJECT) |
fn sprint_state_machine() -> operations_workflow::Result <StateMachineDefinition> | The sprint lifecycle as the registered crate's definition (Gate 0.5: operations-workflow owns state machines; this crate does not grow a second one) |
pub struct SprintKey | A sprint's identity: the number every citer uses, and the slug that keeps two sprints with the same number distinct (Gate 1.5 round 2, point A) |
pub enum SprintRef | What a citation string denotes. |
SprintKey :: fn key(& self) -> String | — |
fn sprint_number_valid(number : & str) -> bool | 1, 4, 4.45, 3.138 — digits separated by single dots; no leading or trailing dot, no empty segment, no other character. |
fn slug_valid(slug : & str) -> bool | Lowercase kebab: a-z0-9+(-a-z0-9+)*, at most 120 bytes |
fn parse_sprint_ref(s : & str) -> Result <SprintRef, String> | Parse a citation: number/slug is a key, number alone is an alias. |
fn kind_name_valid(kind : & str) -> bool | A work-product kind name: the same kebab grammar as a slug, at most 40 bytes — it is a table's concept name and a lexicon term at once. |
pub enum KindRefusal | Why a kind was refused |
fn admit_kind(kind : & str, term_status : TermStatus) -> Result <(), KindRefusal> | The admission rule (ADR 0045 §3): a kind exists only for a RATIFIED term |
No pub use re-exports: every item above is declared in this crate.
Boundary
Reaches into foundation, identity.
Shares tier operations with 40 other crates: operations-approval-workflow, operations-assessments, operations-block-imaging, operations-boot-media, operations-browser-agent-worker, operations-camera-discovery, operations-camera-liveview, operations-camera-registry, … (40 total).
_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._
Where it sits
| Tier (ontology) | operations |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/operations/control-plane |
| Vocabulary in force (lexicon) | current |
Tier flow. Which tiers this crate's own edges cross.
flowchart LR n_operations["operations"] --> n_foundation["foundation"] n_operations["operations"] --> n_identity["identity"]
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `foundation-audit-log` | foundation | no | always |
| `foundation-bounded-io` | foundation | no | always |
| `foundation-lexicon` | foundation | no | always |
| `foundation-money` | foundation | no | always |
| `identity-tenant` | identity | no | always |
| `operations-workflow` | operations | no | always |
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
jsonschema | ^0.53 | — | no | always |
rust_decimal | ^1 | serde | no | always |
serde | ^1 | derive, derive | no | always |
serde_json | ^1 | — | no | always |
sqlx | ^0.8 | runtime-tokio, postgres, chrono, uuid, json | no | always |
thiserror | ^2 | — | no | always |
uuid | ^1 | v4, v7, serde, js, v4, serde | no | always |
Development, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
tempfile | ^3 | — | no | always |
tokio | ^1 | full, macros, rt-multi-thread | no | always |
Build. None.
Depended on by. 5 workspace crates.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR n_tools_artifact_scaffold["tools-artifact-scaffold"] -->|uses| SELF n_tools_corpus["tools-corpus"] -->|uses| SELF n_tools_fleet_reconnect["tools-fleet-reconnect"] -->|uses| SELF n_tools_imp["tools-imp"] -->|uses| SELF n_tools_work_runner["tools-work-runner"] -->|uses| SELF SELF["operations-control-plane"] SELF -->|runtime| n_foundation_audit_log["foundation-audit-log"] SELF -->|runtime| n_foundation_bounded_io["foundation-bounded-io"] SELF -->|runtime| n_foundation_lexicon["foundation-lexicon"] SELF -->|runtime| n_foundation_money["foundation-money"] SELF -->|runtime| n_identity_tenant["identity-tenant"] SELF -->|runtime| n_operations_workflow["operations-workflow"] classDef self fill:#1f883d,stroke:#1f883d,color:#fff; class SELF self;
Feature flags
No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.
Targets
Error model
| Error type | Named by |
|---|---|
ExecutionError | finish_run, finish_run_with_account, pin_paths, record_evidence, record_shard_provenance, record_transition, … (14 total) |
PayloadError | load_mediated_payload, load_reasoning_payload, load_shard_payload, store_mediated_payload, store_reasoning_payload, store_shard_payload, … (7 total) |
SectionError | record_consensus_position, record_finding, record_need, record_planned_test, record_requirement, record_security_plan |
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | yes |
| async runtime | none detected |
| database access | yes |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | yes |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
| Variable | Read in |
|---|---|
CARGO | src/gate.rs |
CARGO_MANIFEST_DIR | src/lib.rs |
KNOWLEDGE_TEST_DB | src/execution.rs |
Related capabilities
5 workspace crates depend on this one: tools-artifact-scaffold, tools-corpus, tools-fleet-reconnect, tools-imp, tools-work-runner.
Verification
| Kind | Count |
|---|---|
| Unit tests | 243 |
| Integration tests | 119 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
crate root | 1 | 0 | 1 |
benefit | 4 | 0 | 3 |
boxes | 3 | 0 | 2 |
cost | 5 | 0 | 0 |
datasource | 7 | 0 | 13 |
dispatch | 13 | 0 | 4 |
envelope | 8 | 0 | 1 |
execution | 47 | 0 | 38 |
gate | 7 | 0 | 7 |
identifier | 9 | 0 | 9 |
inventory | 5 | 0 | 1 |
kinds | 2 | 0 | 1 |
lexicon | 15 | 0 | 11 |
lexicon_export | 22 | 0 | 18 |
metering | 33 | 0 | 20 |
payload | 13 | 0 | 12 |
probe | 11 | 0 | 22 |
reading | 18 | 0 | 13 |
requirement | 6 | 0 | 4 |
session_usage | 5 | 0 | 4 |
story | 15 | 0 | 12 |
story_compile | 13 | 0 | 6 |
story_html | 5 | 0 | 6 |
story_sections | 24 | 0 | 8 |
symbol_index | 3 | 0 | 3 |
work_product | 10 | 0 | 0 |
What the tests establish, by name:
a_failed_check_leaves_the_work_item_unable_to_advance—tests/admission_guard_live.rsa_task_may_not_start_until_the_admission_guard_passes—tests/admission_guard_live.rsa_work_item_is_born_with_no_tasks—tests/admission_guard_live.rsan_inventory_check_may_no_longer_be_written_as_a_task—tests/admission_guard_live.rsthe_guard_chain_is_registered_end_to_end—tests/admission_guard_live.rsthe_latest_check_decides_and_a_pass_admits_the_work_item—tests/admission_guard_live.rsa_work_product_may_not_invent_its_own_identity—tests/artifact_identity_live.rsa_work_product_stands_on_an_artifact_of_the_work_product_kind—tests/artifact_identity_live.rsan_unadmitted_concrete_kind_is_refused—tests/artifact_identity_live.rsone_call_mints_the_artifact_and_the_work_product_with_one_identity—tests/artifact_identity_live.rsthe_column_no_longer_mints_an_identity_nothing_knows—tests/artifact_identity_live.rswork_product_identity_is_artifact_identity_and_the_key_is_validated—tests/artifact_identity_live.rsa_benefit_cannot_be_measured_before_its_outcome_was_observed—tests/benefit_rows_live.rsa_benefit_that_states_no_measure_is_refused—tests/benefit_rows_live.rsthe_view_and_the_pure_function_agree_in_both_directions—tests/benefit_rows_live.rsassociation_rows_and_unnamed_events_are_not_given_identity—tests/canonical_identity_live.rsevery_durable_governed_record_is_rooted_in_the_substrate—tests/canonical_identity_live.rsexisting_uuids_are_preserved_not_replaced—tests/canonical_identity_live.rsreusing_a_label_does_not_confer_the_identity_it_used_to_name—tests/canonical_identity_live.rsthe_name_is_a_label_and_renaming_preserves_identity—tests/canonical_identity_live.rsthe_rule_relations_are_blocked_by_vocabulary_now_not_by_identity—tests/canonical_identity_live.rsa_composition_that_satisfies_its_shape_is_valid—tests/composition_shape_live.rsa_member_is_pinned_to_a_governed_term_in_its_own_snapshot—tests/composition_shape_live.rsan_unknown_shape_admits_nothing—tests/composition_shape_live.rsbeing_a_triple_is_derived_from_the_member_count—tests/composition_shape_live.rsthe_shape_says_what_it_requires_and_how_many—tests/composition_shape_live.rstoo_few_too_many_and_unnamed_are_three_different_answers—tests/composition_shape_live.rsa_retired_word_keeps_the_reason_it_was_retired—tests/concept_kind_axes_live.rsa_term_may_be_unclassified_rather_than_wrongly_classified—tests/concept_kind_axes_live.rsa_term_that_was_not_retired_may_not_carry_a_retirement_reason—tests/concept_kind_axes_live.rs- _… 332 more_
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 325 | 351 |
Public modules with a //! block | 25 | 25 |
pie showData
title Public items with rustdoc
"Documented" : 325
"No rustdoc detected" : 26
Metrics
| Metric | Value |
|---|---|
| Rust source files | 26 |
| Source lines | 15971 |
| Code lines | 12120 |
| Public API items | 351 |
| Public modules | 25 |
| Tests | 362 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 13 |
| Workspace reverse dependencies | 5 |
pie showData
title Public API by kind
"constant" : 33
"enum" : 38
"function" : 153
"method" : 47
"struct" : 79
"type alias" : 1
pie showData
title Rust source composition
"Code" : 12120
"Blank or comment" : 3851
Generation
Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.