roadmap BUILT

887. Crate repositories share one CI template, adapted from nife's gates

calef, 2026-10-11 (UTC): "As a gate for each of these milestones, I want to ensure that we're exposing clean crates without nife assumptions. I also want to ensure that the gates that we have for nife will be adapted for these crate repos as well." Approving this block's plan: "Yes. Don't we want proofs and falsifications for our crates?"

857's Fork 1 already ruled the shape on 2026-10-07: one repository per crate under nifeos. Its words: "Every crate repository uses one shared CI template (Kani, lint, release) through reusable workflows."

Fork 4 ruled the proof job (kani-github-action), plus a job that applies each falsification patch and expects Kani to fail. It ruled that the release refuses to publish unless the proofs are green. Fork 6 ruled trusted publishing from a nifeos workflow. Until this block, no milestone built any of it, and every per-crate block from 813 to 821 said so in its BUGS.

What this builds

  1. A template repository, partsfoundry/crate-workflows, holding reusable workflows (on: workflow_call), one per row group below: check, proofs, weekly and release. A crate repository's own workflow files are a few lines each that call them, pinned by commit SHA, as nife pins every action today.
  2. Versioned releases of the template (v1, v2, ...), each a tag on one commit.
  3. A lag check, in the template itself so no crate repository can forget it. Every reusable workflow's first job compares the SHA it was called at (job_workflow_sha) with the template's newest release and fails when it is older. A weekly schedule in each crate repository runs the same check with no pull request open, and Dependabot's github-actions ecosystem opens the bump.
  4. The release machinery 857 ruled and nobody owns yet. In nife, a lint makes publish = false the default and allows publishing only for crates on calef's allowlist (Fork 3). The list is one file, provisionally crates/publish-allowlist.txt, which script/metrics already reads. Outside it, the nifeos crates.io team and the trusted publisher configuration (Fork 6). The release workflow publishes only from a tag, only after check and proofs pass on that commit, and only through a GitHub environment calef approves.
  5. Per-repository CI time. helpers/ci_job_times.py takes a repository argument and reads each crate repository too, so a slow template job shows up in nife's metrics.

Repository configuration

calef, 2026-10-11 (UTC): "nife is MIT OR Apache-2.0, so we should dual license our crates as well. I agree with your recommendations on the crate repos." The recommendations he agreed to are below. They live in the template as one settings file and a script that applies it with gh api. A weekly drift check in each crate repository reads the live settings back and fails on any difference. A setting changed by hand in the web interface is then a red run, not a surprise.

Both license files, because GitHub's license detection reads nife itself as Apache-2.0 although the tree carries both. script/crate-standalone checks the pair and the field.

A crate adapting permissive source joins the pair with AND to each adapted source's SPDX license, as in (MIT OR Apache-2.0) AND ISC. Facts read add nothing; notices stay. Tools read a published field and nobody can withdraw it, so it names every term: dropping one later stays compatible, adding one does not.

The names: ruled

calef ruled the names on 2026-10-17 (UTC):

Name His reply
The repository partsfoundry/crate-workflows "Keep"
The canary repository partsfoundry/crate-workflows-test, over crate-workflows-canary "Keep test"
The seven callable workflow filenames: check, proofs, weekly, release, hold, label and ruled "Keep"
The team crates-io becomes crate-maintainers; its crates.io owner string is github:nifeos:crate-maintainers "crate-maintainers"
The required checks: check / fmt, check / clippy, check / tests, check / coverage, check / standalone, check / supply-chain, proofs / kani, proofs / falsify and hold / architect hold "Per your suggestion"

The crates-io environment keeps its name. Template release v6 (d5ad709, partsfoundry/crate-workflows #9) carries the check names, and the canary's main ruleset requires all nine. The team crate-maintainers exists. No Name: block in nife carries these names, so script/names has nothing to ratify.

The first publish: ruled

crates.io binds a trusted publisher only to a crate that already exists. calef, 2026-10-17 (UTC), answered "B" to this option for how the first publish happens:

B. The release workflow does the first publish with a scoped token. A crates.io token limited to publish-new, restricted to that crate's name and given a short expiry, is stored as a secret on the crates-io environment. The workflow uses it only when the crate doesn't exist on crates.io yet. So v1 goes through the same proofs-green gate and your environment approval as every later release. After v1 you bind the trusted publisher and delete the secret.

He declined publishing v1 by hand. The release workflow decides by the crate's presence on crates.io, never by the secret's: an existing crate publishes through trusted publishing only, with no fallback to the token. A missing secret on an absent crate fails naming it. Built in partsfoundry/crate-workflows #8 and released in v6. The secret is CRATES_IO_FIRST_PUBLISH_TOKEN, a provisional name.

A first publish waits on its soak (milestone 818 (jh7110_entropy: proven JH7110 TRNG logic, released on its own) is the pilot).

How 887 closes: ruled

Every crate that could publish first depends on this milestone. calef, 2026-10-22 (UTC): "A: 887 is BUILT once a v7 dry-run release on the canary passes the gate and waits in crates-io for my approval; the first-publish and semver-baseline checks move to 818." Milestone 818's exit carries both checks.

Each nife gate, kept, adapted or dropped

Read 2026-10-11 from script/ci-build, script/lint, .github/workflows/ and their helpers. A crate repository is a no_std library with host tests and Kani proofs, and no kernel, QEMU, roadmap or merge queue; each row applies that test.

nife gate crate repository reason
script/fmt (rustfmt) adapt Stable rustfmt, without nife's two unstable options
clippy -D warnings adapt Host, each listed target and a --cfg kani build, at the stated MSRV and at the newest stable
rustdoc broken links keep The docs are the crate's manual
cargo-machete keep Downstream users pay for an unused dependency
host tests (cargo test) keep No QEMU leg; the crates are pure logic
coverage, 85% per file keep Same floor, same tool (cargo-llvm-cov)
fuzz (cargo-fuzz) keep For crates that parse bytes; nightly, so weekly
Miri, weekly keep Same job, nightly
mutation (cargo-mutants), weekly keep A report
script/verify (Kani) adapt Kani installed with cargo install at the version in .kani-version (0.68.0), run on every pull request (Fork 4)
falsification sweep adapt Every patch applied with -p1 must turn its harness red at its own assertion; on every pull request, since a crate has few
script/falsifications --check keep Every harness has a patch or a stated reason
kani-reach drop A dispatch-only measurement of nife's reach
loom interleavings drop No crate uses loom yet
cargo-deny adapt nife's policy without its own exceptions
vendor-verify, vendor-watch drop No vendored code
toolchain drift and bump adapt A weekly stable and beta build replaces the nightly pin
MSRV build new The stated rust-version builds; nife has no MSRV to check
semver check adapt cargo-semver-checks against the last release stands in for milestone 610 (the interface's stability is measured weekly)
script/crate-standalone adapt Its citation and file checks run in the repository, keeping nife's vocabulary out
file-length ratchet (2,000 lines), comment-block ratchet keep Same rules
workspace lints (unsafe_op_in_unsafe_fn, missing_docs) keep Inlined into each crate's [lints]
orphan Rust files keep Every .rs file is in the module tree
prose ratchet adapt README and changelog, at nife's caps
house style, typos, no em-dashes, markdown links resolve keep Same checks
EXAMPLES and BUGS new The README must carry both headings
actions pinned to a SHA keep Supply chain, unchanged
a workflow that swallows a failure says where it goes keep Same rule
shellcheck, sh -n, tracked-but-ignored files keep Same checks
job budgets adapt Per repository, with time read by helpers/ci_job_times.py
CodeQL (Rust) keep Same job
commit-msg Co-Authored-By hook keep Agent attribution everywhere nife writes
empty diff keep Same check
architect label (helpers/architect-label-rules.py, architect-label.yml) adapt Keeps the new-dependency rule and adds a semver rule (below); drops the abi-surface, spawnproto, system-call-error and decisions rules
architect hold (architect-hold.yml) keep Red while needs-architect is on, and a required check
script/record-ruling adapt The same label swap, from a template script
name provenance blocks (script/names) drop A published crate carries no Name: block; git holds a name's history, and crate-standalone refuses a block
naming rules: the spelled-out words of helpers/name_checks.py (cap included) and helpers/unit_symbols.py adapt check / standalone holds every name a crate defines to the same words and units, at a ceiling of 0 with no baseline; a name kept from a datasheet, a specification or the standard library states its source in its doc comment and carries a doc(alias)
citations, decisions, roadmap, fatal risks, audits index, TODO cites a milestone drop Records that live in nife; a TODO cites an issue in the crate repository
naming checks 1 to 3, branch names, ready-status, script docs, env names in prose, agent instructions drop nife's own vocabulary and lane process
merge drain, trunk health, ci-failing, verify shard refresh drop No merge queue at one crate's traffic
audit and stranger cadence adapt A stranger builds and proves the crate from its README
kernel and image gates: boot, swish, icount, bench, cpu-matrix, stack frames, W^X, reproducible image, arch rules, system call registers, #[path] sharing drop A library crate has no kernel, QEMU or image

Reuse

Taken, not written: GitHub's reusable workflows, rust-lang/crates-io-auth-action (RFC 3691), Dependabot, cargo-semver-checks and taiki-e/install-action. Kani is the exception to taking an action: the template installs it with cargo install at the version in .kani-version, so the Actions allowlist names no Kani action. A weekly template job proposes the version bump as one pull request (crate-workflows #5). Prior art for the shape: rust-embedded's and RustCrypto's shared workflows, read for structure rather than copied. The workflows themselves are written, since none publishes a falsification job.

Exit

A crate repository, partsfoundry/crate-workflows-test, calls every reusable workflow from releases v1 and v2. Built 2026-10-16 (UTC). The same day, calef ruled that it stands as the template's release canary, adopting each release before a crate depends on it. It has adopted release v6 (commit d5ad7091019cae8122b0c673fd790936039485ea) through its pull request 7, merged at d8c155c39c97a74b9fcc5e4492814bdc374ba4af on main, where all nine ruled check names reported green. A published release opens that adoption pull request itself, as nife-smelter (canary-adopt.yml; for v7, the canary's pull request 8). The template's own selftest is green on every job, plus the release gate's refusal. The canary's earlier pull requests show fmt, tests, coverage, standalone and the falsification replay red on a commit made to break them and green on the next. Others show the lag check naming a stale pin and the supply-chain refusal of a floating action. A pull request held by needs-architect took a recorded ruling that swapped the label and turned the hold green. The apply script configures the canary from the settings file and reports what it cannot do. It sets the features, the security toggles, the Actions permissions, the crates-io environment with calef as required reviewer, the team, the labels, and the main ruleset with the nine required checks. The drift check reads the settings back. It went red naming a hand-changed setting. The tag ruleset is live on the canary (ruleset 25290943), and script/apply-settings applies it from the settings file. On v7, a dry-run release on the canary (run 39716515649, at 456ad0f20e41af263d1835df2607e86f8b932d75) passed the gate on that commit's push runs, created no tag, and its publish job waits in the crates-io environment for calef. That is the "publishes nothing without calef's environment approval" row and the ruled close. In nife, the allowlist lint fails a crate that drops publish = false without being on the list, and helpers/ci_job_times.py reads a crate repository by argument.

BUGS

Follow-on

Index row

One shared CI template for every crate repository nife releases, as reusable workflows adapted gate by gate from nife's own. A check fails when a repository lags the template, and the template carries the release machinery 857 ruled: the allowlist lint, the crates.io team and trusted publishing.