Sprint 3.87 (Gate 1.5 round 1 decision): downloads the whisper.cpp ggml model to one canonical, checksummed, manifest-recorded path -- Rule 14, no more manual/undocumented model placement.
| Tier | tools |
| Role | unclassified (baselined) |
| Path | crates/tools/whisper-model-provision |
| Edition | 2021 |
| Targets | tools-whisper-model-provision, tools_whisper_model_provision |
| Public items | 7 across 0 modules |
| Tests | 8 |
What it is for
Sprint 3.87 (Gate 1.5 round 1): the shared provisioning library crate for a locally-cached model artifact -- download -> checksum-verify -> atomic-install -> manifest entry, idempotent re-run. Whisper-specific knowledge (URL, expected checksum) lives only in main.rs; everything here is generic to "one big binary artifact, one canonical path."
Manifest format matches tools-local-model-import's own TSV convention (tab-separated, sanitized fields, comment header) deliberately, so the two model-provisioning tools this workspace has read the same way, even though they are not merged (different runtime: whisper.cpp has no Modelfile concept; different privacy posture: this is not the private-LLM-you-don't-want-other-tools-reading case that tool's ~/.config/imp/ isolation exists for -- this manifest can live in an ordinary XDG cache dir).
Capabilities
crate root
Sprint 3.87 (Gate 1.5 round 1): the shared provisioning library crate for a
| Item |
|---|
fn canonical_model_path(home : & Path, filename : & str) -> PathBuf |
fn manifest_path(home : & Path) -> PathBuf |
fn checksum_matches(expected : & str, actual : & str) -> bool |
Provisioned
Sprint 3.87 (Gate 1.5 round 1): the shared provisioning library crate for a
| Item |
|---|
pub struct Provisioned |
fn render_manifest(entries : & Provisioned) -> String |
fn parse_manifest(text : & str) -> Vec <Provisioned> |
fn already_provisioned(entries : & Provisioned, name : & str, sha256 : & str) -> 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
No public modules: the crate root is its whole surface.
Public surface
`crate root`
| Item | What it is |
|---|---|
fn canonical_model_path(home : & Path, filename : & str) -> PathBuf | The canonical, single-source-of-truth location for the whisper model this workspace uses |
fn manifest_path(home : & Path) -> PathBuf | Where the manifest lives, alongside the models it describes. |
fn checksum_matches(expected : & str, actual : & str) -> bool | Does actual match expected? Case-insensitive (a checksum pasted from a release page is not always lowercased), otherwise exact. |
pub struct Provisioned | One line of the manifest: a provisioned model, its source, its verified checksum, and when it was installed. |
fn render_manifest(entries : & Provisioned) -> String | Render the manifest, same shape as tools-local-model-import's own render_manifest (comment header, tab-separated, sanitized fields). |
fn parse_manifest(text : & str) -> Vec <Provisioned> | Parse a manifest written by render_manifest |
fn already_provisioned(entries : & Provisioned, name : & str, sha256 : & str) -> bool | Idempotency check: is this exact model (by name AND checksum) already recorded as provisioned? A name match with a DIFFERENT checksum is not idempotent -- it means the source changed, and re-provisioning is correct, not skippable. |
No pub use re-exports: every item above is declared in this crate.
Boundary
Reaches into foundation, infrastructure.
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/whisper-model-provision |
| Vocabulary in force (lexicon) | current |
Tier flow. Which tiers this crate's own edges cross.
flowchart LR n_tools["tools"] --> n_foundation["foundation"] n_tools["tools"] --> n_infrastructure["infrastructure"]
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `foundation-audit-log` | foundation | no | always |
| `infrastructure-fetcher` | infrastructure | no | always |
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
anyhow | ^1 | — | no | always |
bytes | ^1 | — | no | always |
futures-util | ^0.3 | — | no | always |
tokio | ^1 | full, rt-multi-thread, macros, fs, io-util | no | always |
url | ^2 | — | no | always |
Development, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
tokio | ^1 | full, rt-multi-thread, macros, fs, io-util, time | 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-whisper-model-provision"] SELF -->|runtime| n_foundation_audit_log["foundation-audit-log"] SELF -->|runtime| n_infrastructure_fetcher["infrastructure-fetcher"] 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-whisper-model-provision | `src/main.rs` |
| lib | tools_whisper_model_provision | `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
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | yes |
| database access | none detected |
| 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 |
|---|---|
HOME | src/main.rs |
Related capabilities
No workspace crate depends on this one.
Verification
| Kind | Count |
|---|---|
| Unit tests | 8 |
| 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 | 7 | 0 | 0 |
What the tests establish, by name:
already_provisioned_requires_name_and_checksum_match—src/lib.rscanonical_path_is_framework_scoped_not_consumer_specific—src/lib.rschecksum_matches_is_case_insensitive—src/lib.rsmanifest_parse_skips_malformed_lines_not_fatal—src/lib.rsmanifest_round_trips—src/lib.rsstream_to_file_hashed_aborts_and_deletes_the_partial_file_over_the_cap—src/main.rsstream_to_file_hashed_of_empty_stream_matches_the_empty_hash—src/main.rsstream_to_file_hashed_writes_all_chunks_and_hashes_the_full_content—src/main.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 7 | 7 |
Public modules with a //! block | 0 | 0 |
pie showData
title Public items with rustdoc
"Documented" : 7
"No rustdoc detected" : 0
Metrics
| Metric | Value |
|---|---|
| Rust source files | 2 |
| Source lines | 439 |
| Code lines | 316 |
| Public API items | 7 |
| Public modules | 0 |
| Tests | 8 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 7 |
| Workspace reverse dependencies | 0 |
pie showData
title Public API by kind
"function" : 6
"struct" : 1
pie showData
title Rust source composition
"Code" : 316
"Blank or comment" : 123
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.