tools tier

tools-rename-drift-scan

tools-rename-drift-scan: find and fix literal occurrences of a retired path or crate name (e.g. a renamed sibling repo, a re-tiered crate) across everything tools-knowitall has cataloged. Built for the rp-master-wt/rust-primitives -> rust-framework-workspace rename and the primitives-* -> foundation-*/domain-*/infrastructure-*/tools-* crate re-tiering; the rule list is not hardcoded to those, so it covers the next rename too.

tools-rename-drift-scan: find and fix literal occurrences of a retired path or crate name (e.g. a renamed sibling repo, a re-tiered crate) across everything tools-knowitall has cataloged. Built for the rp-master-wt/rust-primitives -> rust-framework-workspace rename and the primitives-* -> foundation-*/domain-*/infrastructure-*/tools-* crate re-tiering; the rule list is not hardcoded to those, so it covers the next rename too.

Tiertools
Roleunclassified (baselined)
Pathcrates/tools/rename-drift-scan
Edition2021
Targetstools-rename-drift-scan, tools_rename_drift_scan
Public items6 across 0 modules
Tests11

What it is for

Pure logic for finding/fixing a retired name's literal occurrences. No I/O here (that's main.rs): a rename produces the same class of bug every time (a sibling repo directory renamed, a crate re-tiered) — this makes fixing an instance of it a reusable operation instead of a one-off grep-and-hand-edit, per the "write once" rule.

Capabilities

RenameRule

Pure logic for finding/fixing a retired name's literal occurrences.

Item
pub struct RenameRule
RenameRule :: fn parse(spec : & str) -> Result <Self, String>
RenameRule :: fn builtin() -> Vec <RenameRule>
fn from_governed_term(term : & str, prefer : & str) -> Result <RenameRule, String>
fn apply_rule(text : & str, rule : & RenameRule) ->(String, usize)
fn apply_rules(text : & str, rules : & RenameRule) ->(String, usize)

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 RenameRuleOne retired-name -> current-name mapping, e.g
RenameRule :: fn parse(spec : & str) -> Result <Self, String>Parse OLD=NEW
RenameRule :: fn builtin() -> Vec <RenameRule>The drift this tool shipped to fix first
fn from_governed_term(term : & str, prefer : & str) -> Result <RenameRule, String>Build a RenameRule from one governed_term row (term, prefer), e.g
fn apply_rule(text : & str, rule : & RenameRule) ->(String, usize)Replace every literal occurrence of rule.old with rule.new in text
fn apply_rules(text : & str, rules : & RenameRule) ->(String, usize)Apply every rule in sequence, summing replacement counts across all of them.

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

Boundary

Depends on no other workspace tier.

Shares tier tools with 86 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, … (86 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)
Locationcrates/tools/rename-drift-scan
Vocabulary in force (lexicon)current

Dependencies

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
clap^4derivenoalways
sqlx^0.8runtime-tokio, postgresnoalways
thiserror^2noalways
tokio^1rt-multi-thread, macrosnoalways

Development. None.

Build. None.

Depended on by. Nothing in this workspace.

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
bintools-rename-drift-scan`src/main.rs`
libtools_rename_drift_scan`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 runtimeyes
database accessyes
network I/Onone detected
unsafe codenone detected
environment variablesyes

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

VariableRead in
CORPUS_SOURCECODE_APP_DBsrc/main.rs

No workspace crate depends on this one.

Verification

KindCount
Unit tests11
Integration tests0
Examples0
Doctests0

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

ModuleTestsExamplesConsumers
crate root400

What the tests establish, by name:

Documentation coverage

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

Metrics

MetricValue
Rust source files2
Source lines473
Code lines384
Public API items6
Public modules0
Tests11
Examples0
Cargo features0
Direct runtime dependencies4
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "function" : 3
    "method" : 2
    "struct" : 1
pie showData
    title Rust source composition
    "Code" : 384
    "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.

All tools · Manual