notes

Proposed decision: which of nife's standards a dependency is held to

Status: proposed, for an architect. Provisional; the integrator mints a section number if it is ruled. The data is the census, measured 2026-10-18 and 2026-10-19 (UTC) over the 99 crate versions nife ships, its two vendored trees and the milestone 784 (reuse what the tree wrote) candidates.

§46 (thin primitives or whole subsystems; we write everything in between) decides whether nife takes a dependency. Nothing says what a taken dependency must be. Today the only written bar is deny.toml through script/supply-chain: licenses, advisories, the unmaintained list, yanked versions, crates.io as the only source, and one version per crate. This proposal takes nife's internal standards one at a time and asks which should hold dependencies too. The questions are ordered by how much each answer changes.

The pattern in the data, and in every organization checked: a standard that describes a crate's risk transfers to dependencies. A standard that describes how its owner works does not. Unsafe soundness, advisories and maintenance are risks. Size limits, mutation scores, proofs and BUGS sections are process. Google, Chromium, Fuchsia, Mozilla's cargo-vet, Android, the Rust project's tidy and the Linux kernel all gate dependencies on unsafe review and supply chain. None requires mutation testing, Miri, fuzzing, proofs, coverage or length limits of code it does not own. Sources are listed at the end.

Q1. Is #2379's confidence bar a gate, a goal, or only for crates nife publishes?

Pull request #2379 proposes that any crate nife builds on meet partsfoundry/crate-workflows' gates. The bar has five parts: Kani with every harness falsified, a mutation baseline, semver checks, a tested minimum Rust version, and a stranger build.

Options:

Recommendation: (c). The bar describes nife's own process, and the census shows the ecosystem does not follow it. (b) would publish a list on which every row fails, which informs no decision.

Q2. How is a dependency's unsafe code held to account?

nife holds its own unsafe code three ways. Each unsafe block carries a SAFETY comment (clippy::undocumented_unsafe_blocks). Each unsafe fn carries a # Safety section (milestone 112). Density stays under a ceiling of 60 blocks per 10,000 code lines outside kernel/src/arch/ (nife is at 57).

Options:

Recommendation: (b). It is the only option that records a judgment about each crate, and it uses the criteria the largest Rust users already share. It would still be the choice if (c) cost the same. The cost is the review of 76 crate versions, plus a delta review on each update after that.

The kernel runs unconfined, and §46 says to write the kernel. It links three crates: aarch64-cpu 11.2.0, spin 0.12.3 and tock-registers 0.10.1. Together they hold 71 unsafe blocks.

Options:

Recommendation: (b). The record is what matters. A strict grade on three small crates is cheap and reviewable. (a) forks three maintained crates to add comments. With equal effort the recommendation would still be (b), because a fork's maintenance cost is ongoing and the comments add no check a ub-risk-1 review lacks. This fork affects §46's "write the kernel", so it is the architect's call.

Q4. Must a dependency's own tests run?

nife gates its own code on tests that pass, with 85 percent line coverage per file.

Options:

Recommendation: (b). The weekly run would have shown the census's numbers without a lane, and it is the cheapest way to see a regression in a pinned version. Coverage is not recommended for dependencies. No organization requires it, and measuring it needs a per-crate instrumented build.

Q5. Does Miri run on dependencies?

Under milestone 79 (Miri over the host crates), nife runs Miri weekly over its own code. That run is a report, not a required check.

Options:

Recommendation: (a). It costs one more job on a schedule nife already runs, and it is the only check here that looks inside a crate's unsafe code by machine.

Q6. Are dependencies that parse untrusted input fuzzed?

Under milestone 42 (supply chain and fuzzing in CI), nife fuzzes its own parsers of bytes it did not write, 60 seconds per target, as a required check.

Options:

Recommendation: (a). nife's thesis is confining code it did not write, and these crates are where hostile bytes enter. This recommendation is about risk, not effort. Each target is a few dozen lines.

Q7. What makes a dependency maintained enough?

§198 (the glue is ours, the primitives are not) refused rustls-rustcrypto on maintenance: an alpha release, 17 months stale, two of three versions yanked, and dependencies pinned to older major versions. cargo-deny's unmaintained = "all" fires only when RustSec has published an advisory.

Options:

Recommendation: (a). The measured cases show finished crates and abandoned ones look the same to a date check. A recorded judgment can tell them apart; a threshold cannot.

Q8. Do nife's size and documentation rules apply to dependencies?

The first two are the file limit of §266 (a Rust source file stays under 2,000 lines) and the function limit of §283 (a function is held to 100 code lines by a lint ratchet). The third is the 40-line comment-block ceiling of §267 (a comment states the constraint as it is now). With them go the BUGS-section practice and clippy at -D warnings.

Options:

Recommendation: (b). They exist so nife's code stays readable to the people who change it, and nife does not change its dependencies.

What the recommendations mean for milestone 784

Under (b) for Q2 and Q7, each candidate needs a recorded unsafe review and a maintenance judgment:

Sources