Generates the per-layer sub-reports and the ontology-to-code graph for the EvidenceAcquisition pipeline's 10 sensor-layer specializations, from data/layers.toml. Never hand-write these counts/tables -- this program computes and renders them (PROCESS rule 14).
| Tier | tools |
| Role | unclassified (baselined) |
| Path | crates/tools/pipeline-report |
| Edition | 2021 |
| Targets | tools-pipeline-report, tools_pipeline_report |
| Public items | 14 across 2 modules |
| Tests | 16 |
What it is for
Pure parsing/rendering for tools-pipeline-report (PROCESS rule 14: this program computes every count and table; nothing here is hand-asserted).
Reads data/layers.toml -- one entry per sensor-layer specialization of the EvidenceAcquisition pipeline -- and renders: 1. a per-layer sub-report (naive-name-vs-actual, then the component composition table), and 2. one ontology-to-code graph (Mermaid) using typed relationships (classified_as, implements, composes), not generic arrows.
Capabilities
Component
Pure parsing/rendering for tools-pipeline-report (PROCESS rule 14: this
| Item |
|---|
pub struct Component |
Counts
Pure parsing/rendering for tools-pipeline-report (PROCESS rule 14: this
| Item |
|---|
pub struct Counts |
fn compute_counts(f : & LayersFile) -> Counts |
Layer
Pure parsing/rendering for tools-pipeline-report (PROCESS rule 14: this
| Item |
|---|
pub struct Layer |
fn parse_layers(toml_text : & str) -> Result <LayersFile, String> |
fn render_layer_subreport(l : & Layer) -> String |
LayersFile
Pure parsing/rendering for tools-pipeline-report (PROCESS rule 14: this
| Item |
|---|
pub struct LayersFile |
fn render_report(f : & LayersFile) -> String |
fn render_graph(f : & LayersFile) -> String |
packet (other)
WorkerPacket compiler — sprint-4.1's named gap, the one stage with no
| Item |
|---|
fn compile_packet(discovery : & LayersFile, task : impl Into <String>, layer_ids : & & str, gap : Option <String>, acceptance_contract : impl Into <String>,) -> Result <WorkerPacket, PacketError> |
PacketError
WorkerPacket compiler — sprint-4.1's named gap, the one stage with no
| Item |
|---|
pub enum PacketError |
WorkerPacket
WorkerPacket compiler — sprint-4.1's named gap, the one stage with no
| Item |
|---|
pub struct WorkerPacket |
PacketExecution
Execution telemetry for a dispatched crate::WorkerPacket — "the use
| Item |
|---|
pub struct PacketExecution |
fn hook_payload_for_packet(packet : & WorkerPacket, exec : & PacketExecution) -> Value |
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
tools_pipeline_report
packettelemetry
flowchart TD n_tools_pipeline_report["tools_pipeline_report"] n_tools_pipeline_report --> n_packet["packet"] n_tools_pipeline_report --> n_telemetry["telemetry"]
Public surface
`crate root`
| Item | What it is |
|---|---|
pub struct Component | — |
pub struct Layer | — |
pub struct LayersFile | — |
fn parse_layers(toml_text : & str) -> Result <LayersFile, String> | Parse layers.toml |
pub struct Counts | Counts, computed, never asserted by hand. |
fn compute_counts(f : & LayersFile) -> Counts | — |
fn render_layer_subreport(l : & Layer) -> String | One layer's sub-report: naive-name-vs-actual, then the component composition table (Markdown). |
fn render_report(f : & LayersFile) -> String | The full report: counts header, then every layer's sub-report in order. |
fn render_graph(f : & LayersFile) -> String | Ontology-to-code graph: Pipeline -classified_as-> Layer -implements-> component -composes-> (file/citation) |
`packet`
| Item | What it is |
|---|---|
pub struct WorkerPacket | A minimal, task-scoped unit of dispatch |
pub enum PacketError | — |
fn compile_packet(discovery : & LayersFile, task : impl Into <String>, layer_ids : & & str, gap : Option <String>, acceptance_contract : impl Into <String>,) -> Result <WorkerPacket, PacketError> | Compile a WorkerPacket scoped to exactly the requested layer ids, drawn from discovery (the full DISCOVER retrieval) |
`telemetry`
| Item | What it is |
|---|---|
pub struct PacketExecution | One packet-dispatch step's telemetry, before it's shaped into a hook payload |
fn hook_payload_for_packet(packet : & WorkerPacket, exec : & PacketExecution) -> Value | Build a hook-shaped JSON payload for one packet-dispatch step, in the exact shape tools_corpus::harness_event::parse_hook_event reads: tool_name, tool_input, session_id (-> agent_id), model, tool_response.{success,duration_ms} |
Re-exports. Exported here, defined elsewhere.
| Export | Defined in |
|---|---|
{compile_packet,PacketError,WorkerPacket} | packet::{compile_packet,PacketError,WorkerPacket} |
{hook_payload_for_packet,PacketExecution} | telemetry::{hook_payload_for_packet,PacketExecution} |
Boundary
Depends on no other workspace tier.
Shares tier tools with 84 other crates: tools-advisory-reach, tools-archive-guard, tools-artifact-scaffold, tools-ask-ai-core, tools-ask-ais, tools-ask-gemini, tools-book, tools-book-report, … (84 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) | tools |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/tools/pipeline-report |
| Vocabulary in force (lexicon) | current |
Dependencies
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
anyhow | ^1 | — | no | always |
clap | ^4 | derive | no | always |
serde | ^1 | derive | no | always |
serde_json | ^1 | — | no | always |
thiserror | ^1 | — | no | always |
toml | ^0.8 | — | no | always |
Development, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `tools-cli-conformance` | tools | no | always |
| `tools-corpus` | tools | no | always |
Build. None.
Depended on by. Nothing in this workspace.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR SELF["tools-pipeline-report"] SELF -->|development| n_tools_cli_conformance["tools-cli-conformance"] SELF -->|development| n_tools_corpus["tools-corpus"] 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
| Kind | Name | Source |
|---|---|---|
| bin | tools-pipeline-report | `src/main.rs` |
| lib | tools_pipeline_report | `src/lib.rs` |
Error model
| Error type | Named by |
|---|---|
PacketError | compile_packet |
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | none detected |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none detected |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.
Related capabilities
No workspace crate depends on this one.
Verification
| Kind | Count |
|---|---|
| Unit tests | 16 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
crate root | 9 | 0 | 0 |
packet | 3 | 0 | 0 |
telemetry | 2 | 0 | 0 |
What the tests establish, by name:
compute_counts_matches_hand_count_of_the_sample—src/lib.rsgraph_marks_built_and_unbuilt_citations_distinctly—src/lib.rsparses_layers_and_nested_components—src/lib.rsrejects_malformed_toml_with_an_error_not_a_panic—src/lib.rsreport_header_counts_agree_with_compute_counts—src/lib.rssubreport_contains_both_table_types—src/lib.rscli_definition_conforms—src/main.rscompiled_packet_never_serializes_data_from_layers_outside_its_scope—src/packet.rsduplicate_layer_id_in_one_request_is_an_error—src/packet.rsmissing_gap_is_represented_not_defaulted_to_empty_string—src/packet.rsmulti_layer_packet_contains_exactly_the_requested_layers_not_more—src/packet.rspacket_scoped_to_one_layer_contains_only_that_layer—src/packet.rsunknown_layer_id_is_a_hard_error_not_a_silent_empty_context—src/packet.rsmissing_token_counts_are_simply_absent_not_defaulted_to_zero—src/telemetry.rspayload_round_trips_through_the_real_hook_event_parser—src/telemetry.rsscoped_ontology_context_is_what_reaches_the_payload_not_the_whole_retrieval—src/telemetry.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 9 | 14 |
Public modules with a //! block | 2 | 2 |
pie showData
title Public items with rustdoc
"Documented" : 9
"No rustdoc detected" : 5
Metrics
| Metric | Value |
|---|---|
| Rust source files | 4 |
| Source lines | 795 |
| Code lines | 590 |
| Public API items | 14 |
| Public modules | 2 |
| Tests | 16 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 6 |
| Workspace reverse dependencies | 0 |
pie showData
title Public API by kind
"enum" : 1
"function" : 7
"struct" : 6
pie showData
title Rust source composition
"Code" : 590
"Blank or comment" : 205
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.