roadmap BUILT

1092. byte_glob: what an outside maintainer would fix before the crate leaves

Raised by a read-only outside review of the crate then at crates/glob (now crates/byte_glob), read the way a maintainer meeting it for the first time would. The review changed nothing and opened nothing; every item below is work for a lane. No review package exists for this crate yet, so the baseline the review took as settled is the crate's own record: nifeos/nife:notes/glob.md, notes/glob-scope.md, notes/glob/proofs.md and notes/verification/glob-proofs.md. The four scope decisions those record are ** out, qualifiers out, POSIX classes out and a leading dot special by default. They stay closed here. So do the one-backtrack algorithm, the three-byte proof domain and the ratified crate name byte_glob. A later rule or an outside fact reopens one only where the text says so. Milestone 1017 (the contract crates leave in this order) places the crate at step 5 and owns the move; this block owns the findings that land inside that path.

Reuse: the crate's own tests, harnesses and falsification patches, the shared crate workflows and their helpers, script/crate-review-packet, helpers/name_release.py, cargo-mutants and cargo-fuzz. No new tool.

Finding status

One line per finding, in the review's order: P0 in the blocks-the-move appendix, P1 in the before-the-tag appendix, P2 in the later-items appendix, then the decisions and the release steps.

Open decisions

None.

Goal

A stranger who finds this crate in its own repository can tell in one screen what it matches, what it refuses to match, and why matches(b"*", b".config") is false. They can build it, run its tests and its proofs from the README alone, and apply one falsification patch. The template's check and proofs workflows pass on the move commit for the crate's own reasons. The public names are final before the move strips their provenance, and the crate has a name it can one day publish under.

Publishing stays held.

What the review covered

See the appendix.

Findings, prioritized

P0 blocks the move and the creation of the repository. P1 lands before the first tag there. P2 follows it. A door is one-way where someone outside the tree acts on the outcome (a published name, the public API, a layout, a dependency); the maintainer decides the rest.

P0: the name, the names, and what does not stand alone

The P0 items are in the appendix.

P1: before the first tag

The P1 items are in the appendix.

P2: later

The P2 items are in the appendix.

Decisions for the architect

Decisions 1 to 3 carry the architect's rulings. The baseline (scope, the default dot rule, the algorithm) stays closed.

Decision 1. The registry name of the crate (P0-1)

Ruled 2026-11-14 (UTC): the crate is named byte_glob, in code and package alike. crates/glob is crates/byte_glob, the package and the library are byte_glob, and every caller says byte_glob::matches. The old name carries no doc(alias). The Name: block is ratified for byte_glob.

Background. The crate is a glob matcher, and glob is the right word for it. On crates.io that word belongs to rust-lang's crate, which matches str patterns against paths, supports **, and has over 700 million downloads. A crate name is the one name nobody can change after a publish, and the move creates the repository with whatever name the crate then has. The in-tree ratification of glob stood as a description; the question was the qualifier.

The naming page's rule for crates: one word where one will do, an underscore where the name qualifies a thing. One word will not do, so the qualifier should say what distinguishes this matcher from the one everyone knows. Three facts do: it matches bytes rather than characters; it matches one file name rather than a path; its cost has a bound and a proof. The prior art qualifies the same way: globset (a set of globs), glob-match (the operation), wildmatch (the syntax subset).

Options, each verified free on crates.io:

Concrete example. With the ruling, swish's manifest line becomes byte_glob = { version = "0.1.0", git = ..., rev = ... } and words.rs reads byte_glob::has_magic(token). Without a change, the template's release dry run for this crate would print the trusted-publishing door for a crate owned by rust-lang, and the registry would refuse a real run.

Decision 2. The seven public names (P0-2)

Background. The move strips provenance, so these gain ratification in the review package or never. The reviewer's reading of each against design/naming.md:

name kind reading recommendation
matches(pattern, name) fn, bool a third-person verb phrase, as the question rule asks ratified
matches_with(pattern, name, dot) fn, bool the same, _with for the policy argument, as std's _with ratified
has_magic(pattern) fn, bool has_ before a thing held; "magic" is the word Python's glob module and every shell manual use for an unquoted wildcard ratified
literal(pattern, out) fn, Option a noun for the thing returned, the pattern's one literal name ratified
match_steps(pattern, name, dot) fn, (bool, usize) the steps of a match; P2-3 may give it a named return later ratified
cost_bound(pattern_len, name_len) const fn a bound on the steps; the parameters are P1-7 step_bound
Dot { Special, Ordinary } enum "dot" alone does not say which dot; the policy is about the first byte LeadingDot

LeadingDot::Special and LeadingDot::Ordinary read at a call site without the doc: matches_with(pattern, name, LeadingDot::Ordinary). Prior art spells the same policy FNM_PERIOD (fnmatch), require_literal_leading_dot (rust-lang/glob), dotglob (bash) and GLOB_PERIOD (glibc's glob(3)); every one of them names the position. The variants stay: they are the two answers. The three call sites in the tree change with it (pgrep/src/lib.rs lines 94 to 102, two mentions, and the doc tests).

Ruled 2026-11-20 (UTC): matches, matches_with, has_magic, literal, match_steps and LeadingDot (variants Special and Ordinary) stand as built, and cost_bound becomes step_bound, with no alias for either old spelling. has_ and is_ are for a bool only, and literal is a noun for an Option value. step_bound sits beside match_steps and states the unit. The tuple return of match_steps stays the maintainer's provisional call, a two-way door.

Decision 3. Ratify the seven names and create partsfoundry/byte_glob

Ruled 2026-11-20 (UTC), option A: the architect cleared the review package. The repository partsfoundry/byte_glob has the go, with publish = false, no tag and no publish. The move (milestone 1017, step 5) starts once the prove shard is green and the step_bound rename has landed. The package is notes/crate-reviews/byte-glob.md.

Background. The move strips every Name: block, so the names leave the tree as whatever they are on that day. A repository exists in the organization only once the architect clears its review. The alternatives were clearing before the rename and holding until step 5.

Prior art: fnmatch spells the policy FNM_PERIOD, rust-lang/glob require_literal_leading_dot, bash dotglob and glibc's glob(3) GLOB_PERIOD; each names the position, as LeadingDot does. This tree cleared generational_table and block_roster_contract the same way, a review package first and the repository after. A concrete example: byte_glob::matches_with(b"*", b".config", LeadingDot::Ordinary) is true and reads without the doc, where Dot::Ordinary leaves the reader asking which dot.

Prior art

The comparison with nearby work is in the appendix.

Done when

The checks are in the appendix.

BUGS

Follow-on

Index row

An outside reading of byte_glob before it leaves. The crate name is byte_glob (Decision 1), the README, the manifest fields and the split proof module are in, and the test that linked two staying crates lives in grant_plan. Dot is LeadingDot and cost_bound is step_bound (Decision 2), and the architect cleared the review package and ratified the seven names (Decision 3). The move is done: the crate lives at partsfoundry/byte_glob, and nife pins it by commit. The later items landed. The matcher itself checks out. Publishing stays held.