tools capa

tools-packet-apply

Apply the Deterministic packets tools-packet-compile emits: the citation at a stated file and line is replaced by the path git recorded it moving to. Refuses to guess -- a packet whose cited string is not on its line is skipped and reported.

Apply the Deterministic packets tools-packet-compile emits: the citation at a stated file and line is replaced by the path git recorded it moving to. Refuses to guess -- a packet whose cited string is not on its line is skipped and reported.

Tiertools
Roletooling
Pathcrates/tools/packet-apply
Edition2021
Targetstools-packet-apply, tools_packet_apply
Public items5 across 0 modules
Tests10

What it is for

Apply the Deterministic packets tools-packet-compile emits.

Compile and apply are separate stages by design (sprint 4.3): the compiler reads a report and emits packets, and never touches the repo. Nothing executed those packets until now, so the deterministic half of every doc-truth run sat compiled and unapplied.

The edit itself is one substitution on one line. Everything interesting is about refusing to make it: a report is a photograph of a tree, and the tree moves. If the cited string is not on the line the packet names, this stage reports the packet skipped and leaves the file alone — it never searches the file for somewhere the edit would fit, because a citation that has shifted is exactly the case where a plausible-looking guess is wrong.

Capabilities

Outcome

Apply the Deterministic packets tools-packet-compile emits.

Item
pub enum Outcome
fn apply_to_text(text : & str, line : usize, from : & str, to : & str) ->(String, Outcome)

Repair

Apply the Deterministic packets tools-packet-compile emits.

Item
pub struct Repair
fn order_repairs(mut repairs : Vec <Repair>) -> Vec <Repair>
fn repairs_from_packets(packets : & serde_json::Value) -> Vec <Repair>

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

No public modules: the crate root is its whole surface.

Public surface

`crate root`

ItemWhat it is
pub struct RepairOne line rewrite: at file, 1-indexed line, from becomes to.
pub enum OutcomeWhat became of one repair.
fn apply_to_text(text : & str, line : usize, from : & str, to : & str) ->(String, Outcome)Rewrite one line of text, returning the new text and what happened
fn order_repairs(mut repairs : Vec <Repair>) -> Vec <Repair>Order repairs so that, within one line, the longest cited string is replaced first
fn repairs_from_packets(packets : & serde_json::Value) -> Vec <Repair>Read Deterministic/LinkRepair packets out of a packets.json value

No pub use re-exports: every item above is declared in this crate.

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)tooling
Locationcrates/tools/packet-apply
Vocabulary in force (lexicon)current

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`tools-packet-compile`toolsnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
anyhow^1noalways
serde_json^1noalways

Development. None.

Build. None.

Depended on by. Nothing in this workspace.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  SELF["tools-packet-apply"]
  SELF -->|runtime| n_tools_packet_compile["tools-packet-compile"]
  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

KindNameSource
bintools-packet-apply`src/main.rs`
libtools_packet_apply`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone 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.

No workspace crate depends on this one.

Verification

KindCount
Unit tests10
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root500

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc55
Public modules with a //! block00
pie showData
    title Public items with rustdoc
    "Documented" : 5
    "No rustdoc detected" : 0

Metrics

MetricValue
Rust source files2
Source lines385
Code lines296
Public API items5
Public modules0
Tests10
Examples0
Cargo features0
Direct runtime dependencies3
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "enum" : 1
    "function" : 3
    "struct" : 1
pie showData
    title Rust source composition
    "Code" : 296
    "Blank or comment" : 89

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.

Todas las tools · Manual