tools tier

tools-bugs-index

Generates the bug index table in docs/bugs/README.md from each bug file's own header block, and checks it in CI. The prose above the table is hand-written and untouched; only the rows between the markers are generated, so a record file and its index row cannot disagree.

Generates the bug index table in docs/bugs/README.md from each bug file's own header block, and checks it in CI. The prose above the table is hand-written and untouched; only the rows between the markers are generated, so a record file and its index row cannot disagree.

Tiertools
Roletooling
Pathcrates/tools/bugs-index
Edition2021
Targetstools-bugs-index, tools_bugs_index, cli
Public items15 across 1 module
Tests70

What it is for

The bug index table, generated from the bug records themselves.

docs/bugs/README.md is two documents in one file. Above the table is prose a person wrote — the naming rule, the status lifecycle, the record format, the rule that every bug lives both here and on GitHub. None of it is derived from anything and none of it is touched here.

The table is the other document. Every column it carries already exists in each record's own header block, so a hand-maintained table can only ever drift from the records it summarizes — and did: three separate sessions left an "index gap noted" paragraph in that file rather than a mechanism, and the count reached 57 record files against 33 rows.

This is the mechanism. render builds the rows from the records; check decides whether the file on disk matches. A record missing a field it is required to carry is a hard error naming the file and the field — never a blank cell, because a blank cell is how a table starts lying quietly.

Capabilities

crate root

The bug index table, generated from the bug records themselves.

Item
pub const BEGIN_MARKER: & str
pub const END_MARKER: & str
pub const UNRECORDED: & str
fn parse_record(file_name : & str, body : & str) -> Result <BugRecord, IndexError>

BugId

The bug index table, generated from the bug records themselves.

Item
pub struct BugId
BugId :: fn parse(raw : & str) -> Result <Self, IndexError>
BugId :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result

BugRecord

The bug index table, generated from the bug records themselves.

Item
pub struct BugRecord
fn render_table(records : & mut BugRecord) -> String

IndexError

The bug index table, generated from the bug records themselves.

Item
pub enum IndexError
IndexError :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
fn splice(readme : & str, table : & str) -> Result <String, IndexError>

Proposal

Priority proposals, derived from the records rather than read out of them

Item
pub struct Proposal
fn propose(record : & BugRecord, body : & str) -> Option <Proposal>
fn render_report(proposals : & Proposal, unrecorded_issues : usize) -> String

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_bugs_index

Public surface

`crate root`

ItemWhat it is
pub const BEGIN_MARKER: & strOpening marker; everything between it and END_MARKER is generated.
pub const END_MARKER: & strClosing marker
pub const UNRECORDED: & strCell written when a record names no GitHub issue
pub struct BugIdA record's identifier, kept as series plus number so ordering is numeric
BugId :: fn parse(raw : & str) -> Result <Self, IndexError>Parses B-050 or BUG-0006
BugId :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
pub struct BugRecordOne record, reduced to the columns the index shows.
pub enum IndexErrorEvery way this can refuse
IndexError :: fn fmt(& self, f : & mut fmt::Formatter <'_>) -> fmt::Result
fn parse_record(file_name : & str, body : & str) -> Result <BugRecord, IndexError>Builds a record from one file's name and contents
fn render_table(records : & mut BugRecord) -> StringRenders the table body: header row, separator, then one row per record, ordered by series and number rather than by directory listing.
fn splice(readme : & str, table : & str) -> Result <String, IndexError>Replaces the marked region of readme, leaving every other byte alone

`propose`

ItemWhat it is
pub struct ProposalA band, and the words in the record that put it there.
fn propose(record : & BugRecord, body : & str) -> Option <Proposal>Bands one record from the words it uses about itself.
fn render_report(proposals : & Proposal, unrecorded_issues : usize) -> StringRenders the dated operational report

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/bugs-index
Vocabulary in force (lexicon)current

Dependencies

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
anyhow^1noalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tempfile^3noalways

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-bugs-index`src/main.rs`
libtools_bugs_index`src/lib.rs`
testcli`tests/cli.rs`

Error model

Error typeNamed by
IndexErrorparse_record, splice

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 tests59
Integration tests11
Examples0
Doctests0

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

ModuleTestsExamplesConsumers
crate root900
propose300

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc1315
Public modules with a //! block11
pie showData
    title Public items with rustdoc
    "Documented" : 13
    "No rustdoc detected" : 2

Metrics

MetricValue
Rust source files3
Source lines1761
Code lines1296
Public API items15
Public modules1
Tests70
Examples0
Cargo features0
Direct runtime dependencies1
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "constant" : 3
    "enum" : 1
    "function" : 5
    "method" : 3
    "struct" : 3
pie showData
    title Rust source composition
    "Code" : 1296
    "Blank or comment" : 465

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