1102. network_time_protocol: what an outside maintainer would fix before it leaves
Raised by a read-only outside review of crates/network_time_protocol as a stranger meeting it for
the first time would. It changes nothing; it lists what the move lane and the release lane change.
The number is a placeholder a recording lane fills in.
The crate has no review package under notes/crate-reviews/ and no row in notes/crate-reviews.md,
so this review had no settled package to inherit. The baseline it takes instead, and does not reopen, is what the tree already records. That is the ratified crate name (network_time_protocol, the standard's own word and the one exception to the _contract rule in design/naming.md), the ratified UNIX_MINIMUM, and the recorded MAXIMUM_STRATUM, MAXIMUM_ROOT_DISTANCE and leap::UNSYNCHRONISED. It also includes the four design decisions notes/ntp.md records. They are unauthenticated NTPv4 only, exactly 48 bytes, a fixed era pivot rather than a nearest-era rule, and Packet::parse total with every judgment in Query::accept. Two of those baseline names meet a later rule and are
reopened below, as the release-review rule allows: UNIX_MINIMUM carries no unit, and
UNSYNCHRONISED is a British spelling the cited source does not use.
Reuse: the template partsfoundry/crate-workflows and its scaffold, its naming helpers, Kani, cargo-mutants
and cargo-fuzz. No new tool.
Goal
A stranger who finds network_time_protocol on crates.io can tell in one screen what it is for and
what it refuses to be. The same stranger can build, test and prove it from the README alone. The
repository's ten required checks are green on the first day for the crate's own reasons, and red only
for the crate's own reasons.
Finding status
- P0-1, the manifest does not stand alone: At the move. It still inherits
licenseand[lints]from the workspace and points at nife's publish allowlist; the move inlines both. - P0-2, README, licenses, changelog and a stranger record: At the move. The move writes them, and a stranger runs the README before the first tag.
- P0-3, the contract-crate gate: Done, #3841. The crate-root documentation opens with the kept-name
form in code spans,
(`network_time_protocol`, `RFC 5905`), which the template'scontract_namesand clippy'sdoc_markdownboth accept. - P0-4,
PACKET_LEN: Done, #3804, by Decision 2. The constant isPACKET_BYTES. - P0-5, British spellings in names: Done, #3804, by Decision 2. The low-bit randomizer is gone, the
Rejectvariant for leap indicator 3 isUnsynchronizedand the harness isparse_then_serialize_is_the_identity. - P0-6, acronyms at first use: Done, #3841. The crate-root documentation expands each acronym where
it first appears, and the template's
prose_acronymsreports none. Each RFC citation is a code span, aspartsfoundry/domain_name_systemwrites them, because that gate drops "for" as a small word and so never reads "Request for Comments" as an expansion of RFC. - P0-7, the dependency on
clock_contract: Done, #3804, by Decision 1. The crate keeps a privateNANOSECONDS_PER_SECONDand has no dependencies. - P1-8, shipped text that points back into nife: At the move.
- P1-9, safe Rust: At the move.
#![forbid(unsafe_code)]landed in #3567; the new repository's fuzz opt-in and target remain. - P1-10, the exhaustive sweep and the workspace profile: At the move, in the new manifest. At
opt-level = 2line coverage ofsrc/lib.rsis 97 per cent, over the template's floor of 85, so the full sweep can stay in the default test. - P1-11, surviving mutants: At the move, in the new repository's exemptions file.
- P1-12, the totality of
Interval: Done, #3841. Both accessors saturate, and the Kani harnessthe_interval_conversions_are_totalproves them free of overflow and sign-preserving over everyi128tick count, with a falsification patch. Narrowingfrom_tickstoi64is a further two-way door before the first publish, which the maintainer may rule; the done-when check does not need it. - P1-13, two checks the RFC's reference implementation makes: Done, #3567.
- P1-14, the caller's replay duty: At the move. The
Query::acceptdocumentation states it (#3567); the README's BUGS line is written with the README. - P1-15, a proof that
acceptever accepts: Done, #3567. - P2-16,
Timestamp::fraction: Done, #3567. - P2-17, the low-entropy items: Done, #3804, by Decision 3.
Query::newand the low-bit randomizer no longer exist;Query::with_nonceis the only constructor. - P2-18,
Short's public field: Done, #3804, by Decision 2.ShortFormatkeeps its field private, withfrom_bitsandbits. - P2-19, the
destparameter: Done, #3567. - P2-20, drifted notes: Done, #3567.
- P2-21, the
Rejectorder claim: Done, #3567. - P2-22,
abs_ticks: Done, #3804, by Decision 2.abs_ticksno longer exists. - Decision 1,
clock_contract: Done, #3804, ruled by the maintainer, provisional, 2026-11-14 (UTC). - Decision 2, the public names: Done, #3804, ruled by the maintainer, provisional, 2026-11-14 (UTC),
with the
UNIX_*constants,DEFAULT_POLL_EXPONENTandShortFormatrenamed, and ratified withPORTkept. - Decision 3, the low-entropy items: Done, #3804, ruled by the maintainer, provisional, 2026-11-14 (UTC).
Decisions recorded
Ratify the names now the rename lane has landed
Background. A crate's public names are the interface every user compiles against. The move to
its own repository strips the Name: blocks that mark a name provisional, so each name must read
ratified first. Decision 2, a maintainer's provisional ruling, settles nine spellings: units and
bounds spelled into the constants (PACKET_BYTES, MINIMUM_UNIX_SECONDS, an inclusive
MAXIMUM_UNIX_SECONDS), American spellings, ShortFormat, and abs_ticks gone. Ratification is
the architect's by the naming rule, and a lane has applied the renames; the names stay provisional.
Ruling 2026-11-20 UTC: A. PORT stays, not UDP_PORT.
- A. Ratify against the renamed source, from the review package.
- B. Ratify Decision 2's table now, before the renames.
- C. Ratify with changes the architect names; the rename lane applies them.
Door: one-way at the first publish. A published public name is a breaking change to rename.
Prior art. Rust's std settles a name at stabilization. ntpd-rs names its epoch constant EPOCH_OFFSET and OpenBSD's ntpd
names it JAN_1970 (both recalled). nife differs in spelling the unit and the bound into the name.
Concrete example: a user writes Timestamp::from_unix(seconds, nanoseconds) and reads the window
as MINIMUM_UNIX_SECONDS..=MAXIMUM_UNIX_SECONDS, the way every std range reads.
Blocks: the move.
Clear the review package and approve the repository
Background. A crate leaves this tree for its own nifeos repository only when the architect
clears its review package, and that clearance approves the repository. network_time_protocol is a
pure RFC 5905 wire format with no nife vocabulary, so it meets the bar for leaving. The package
is notes/crate-reviews/network-time-protocol.md.
Ruling 2026-11-20 UTC: A. The architect clears the package and approves nifeos/network_time_protocol.
No tag, no publish.
- A. The architect clears the package, and that clearance creates the repository.
- B. Clear on this outside review alone.
- C. Keep the crate in nife.
Door: one-way. Creating a public repository and moving the crate are outward steps.
Prior art. sntpc and ntp-proto each live in their own repository and publish on their own
cadence. nife differs in reviewing a whole crate once, before its first publish.
Concrete example: the architect cleared generational_table on 2026-11-08 (UTC), and its
repository, partsfoundry/generational_table, dates from that day.
Blocks: the move.
What was checked, and how
The tools run, the sources read and what was not run are in the appendix.
Prior art
The comparison with nearby work is in the appendix.
The items
Effort: XS is under an hour for a lane, S is half a day, M is a day or two. A door is one-way when somebody outside the repository acts on it after the release (a published name, a wire format, an identity, a layout, a dependency). Everything else is two-way and the maintainer decides it. The maintainers have published nothing here yet, so every public name is two-way today and one-way after the first publish. Names are the architect's regardless, and the Decisions section lists the ones the gates refuse.
P0: red on the template's required checks the day the repository exists, or blocks any release
-
The manifest does not stand alone. Finding:
license.workspace = trueand[lints] workspace = trueinherit a workspace that will not be there. Norust-version, soweekly / msrvhas nothing to build. Nodescription,readme,repository,keywordsorcategories. Thepublish = falsecomment sends the reader tocrates/publish-allowlist.txt, a file the new repository does not hold. The dependency line is item 7. Evidence:crates/network_time_protocol/Cargo.tomllines 1 to 19. The template'sstandalonelists each. Change: inlinelicense = "MIT OR Apache-2.0". Inline the lintsclock_contractalready carries (unexpected_cfgsnamingcfg(kani),unsafe_op_in_unsafe_fn,missing_docs, the clippy set).rust-version = "1.88"as the sibling crates say (nobody has verified that the crate builds at 1.88; edition 2024 needs at least 1.85). A one-line description that says "the NTPv4 wire format and client-side checks, no socket".readme,keywords(no-std,ntp,time,sntp) andcategories(no-std,date-and-time,network-programming,parser-implementations). Apublishcomment a stranger can act on, deleted in the release that publishes. Door: two-way (the license has a ruling). Effort: S. -
No README, no license files, no changelog, no stranger record. Finding: the crate ships
Cargo.toml, two source files and seven patches. The template'sstandalonefails on the missing README andLICENSE-MITandLICENSE-APACHE. The acronym, section-order andEXAMPLES/BUGSgates have nothing to read.release / gaterefuses whiledocs/stranger-test.mdreadsLast run: none. The crate's whole explanation lives innotes/ntp.md,notes/ntp/the-era-pivot.mdandnotes/ntp/what-is-proved.md, which do not move with it. Evidence:ls crates/network_time_protocol.script/crate-review-packetsays "None. The crate has no README; the stranger test cannot pass." Change: a README fromscaffold/README-crate.md. Its summary states the scope in one screen (NTPv4 client side, 48 bytes, unauthenticated, no socket or clock, expires 2104). The two documentation examples already inRejectandQueryserve as its EXAMPLES. It lists the seven properties in a user's words under "What is proven". It explains the exhaustive nanosecond sweep and why Kani does not run it. It gives the Kani install line on one line and one real falsification command. A BUGS section says what is not there (NTS, MAC, replay state, selection). The two notes' content that a user needs (the pivot table, the window, the solver timings) moves intodocs/of the new repository. The license files, the changelog and the stranger record come from the scaffold. The maintainers record a stranger run before the first tag. Door: two-way. Effort: M. -
The crate's own name fails the template's contract-crate gate. Finding:
contract_namesrefuses a package whose last word isprotocolunless the crate root's documentation opens with(network_time_protocol, <source>), the kept-name form. The root opens with "The NTPv4 wire format (RFC 5905)", so the gate reads it as a mis-spelled contract crate. nife's own lint names the crate as its one exception; the template carries no exception list. Evidence:src/lib.rsline 1;contract_names: 1 names break the rule. Change: open the root docs with(network_time_protocol, RFC 5905)and keep the sentence that follows. The ratified name does not change. Door: two-way. Effort: XS. -
PACKET_LENcarries no unit. Finding:register_namesrule 4 (a size, length or limit carries its unit) refuses it at a ceiling of 0.design/naming.mdsays the same (MAXIMUM_NAME_BYTES, never_LEN). The name is public and used by three callers. Evidence:src/lib.rsline 30.fixtures/src/network_time_test_server.rslines 118, 155, 157, 228, 229.components/src/network_time_client.rslines 159, 177. Change:PACKET_BYTES, with the callers renamed in the same move, as Decision 2 decides, provisionally. Door: a public name. Two-way today. Effort: XS, plus the callers. -
British spellings in names. Finding:
british_spellingrefuses the British form of the low-bit randomizer (public). It refuses the test and harness for the British form of the parse-then-serialize identity (the harness name is also the falsification patch's file name and the first line of its header). It also refuses the test for the British form of randomizing only the low bits.Reject::Unsynchronisedandleap::UNSYNCHRONISEDescape that list only because the stem is not innaming_words.toml. The rule (aniseending forize) covers them, the abbreviations report flags both, and RFC 5905 itself writes "unsynchronized" (its section 11.1 and Figure 22), so the recorded citation does not support the British form. The client'sreject_codetable names the variant. Evidence:src/lib.rslines 124, 226, 524, 886, 1101.src/verification.rsline 80. the falsification patch of that harness underfalsifications/.components/src/network_time_client.rsline 319. Change:UnsynchronizedandUNSYNCHRONIZED, as Decision 2 decides, provisionally; the low-bit randomizer leaves under Decision 3. The test and harness namesparse_then_serialize_is_the_identityandrandomizing_the_low_bits_touches_only_the_low_bits, with the patch file renamed and its header andnotes/ntp/what-is-proved.mdupdated. Any name kept on purpose needs the kept form at the item, and none of these mirrors a source. Door: two public names, two-way today. The rest two-way. Effort: S. -
Nine acronyms are not expanded at first use in the doc comments. Finding:
prose_acronyms, ceiling 0, reportsNTPv4,RFC,NTS,MAC,UDP,NTP,IPv4,DOWN(emphasis in a test's doc) andMAXSTRAT(a source identifier written as prose). The template judges Rust doc comments once per crate, so the root's first sentence can carry most of the expansions. Evidence:src/lib.rslines 1, 4, 5, 19, 375, 947, 1170. Change: expand each at its first use ("Network Time Protocol version 4 (NTPv4)", "Request for Comments (RFC) 5905", "Network Time Security (NTS)", "message authentication code (MAC)", "User Datagram Protocol (UDP)", "Internet Protocol version 4 (IPv4)"). Lower-case "down". PutMAXSTRATin a code span. The repository may instead acceptRFCas a word, with a reason. Door: two-way. Effort: XS. -
The one dependency is a nife contract crate, taken for one constant. Finding:
clock_contractis a path dependency (../clock_contract) whose only use isNS_PER_SECOND, the number 1,000,000,000. The template'sstandaloneflags the path. The architect-label rule treats any dependency new to the graph as the architect's. Andclock_contract's own review package proposes renaming that constant toNANOSECONDS_PER_SECOND, so the dependency would also inherit a rename. Evidence:Cargo.tomlline 19.src/lib.rsline 48.notes/crate-reviews/clock-contract.mdline 133. Change: a privateNANOSECONDS_PER_SECONDin the crate and no dependency at all, as Decision 1 decides, provisionally. Door: two-way; it removes a dependency. Effort: XS.
P2: later
The P2 items are in the appendix.
P1: before the tag
The P1 items are in the appendix.
Decisions for the architect
The maintainer ruled all three, provisionally, on 2026-11-14 (UTC), as two-way doors before the first publish; the architect may revisit them. Nothing here reopens the crate name, the era pivot, the 48-byte rule or the unauthenticated scope. Ratifying the names is under "Decisions recorded" above. The case behind each ruling (background, recommendation, prior art and an example) is in the appendix.
Decision 1. Does the crate keep a dependency on clock_contract for one constant?
Decided by the maintainer on 2026-11-14 (UTC), provisional: a two-way door before the first
publish, which the architect may revisit. Removing a dependency on an own crate needs no
dependency ruling. The crate drops clock_contract, its only [dependencies] entry, and defines a
private NANOSECONDS_PER_SECOND in src/lib.rs, as core::time defines its own privately.
Item 7 has landed.
Decision 2. The public names the template's gates refuse, and the ones a later rule reopens
Decided by the maintainer on 2026-11-14 (UTC), provisional: a two-way door before the first
publish, which the architect may revisit. The table in
the appendix is the rule, with two rows
settled elsewhere. MAXIMUM_UNIX_SECONDS is inclusive. abs_ticks goes, since no caller outside the
crate uses it. The low-bit randomizer leaves under Decision 3, so its row renames nothing; its
test still takes the American spelling. No old spelling stays as an alias. Items 4, 5, 18 and 22
landed.
Decision 3. Do Query::new and the low-bit randomizer leave before the first publish?
Decided by the maintainer on 2026-11-14 (UTC), provisional: a two-way door before the first
publish, which the architect may revisit. Both leave: the stricter surface, since adding a
constructor later is compatible and removing one is not. Query::new (src/lib.rs line 616) and
the low-bit randomizer (line 226) have no caller outside the crate. Item 17 has landed.
Follow-on
- Recorded. With every finding Done or At the move, the milestone counts as built. The move
lane owns the findings marked At the move, checked against
crates/network_time_protocoland its manifest. The architect ratified the names and cleared the review package.
Done when
The checks are in the appendix.
BUGS
- The falsification replay checked that each patch fails its harness. It did not check that the patch fails at the assertion its header names. Kani reports most of the seven failures through a placeholder message rather than the assertion text. So the replay never matched the "expected to fail" line of five headers against the output.
- The prior-art table marks every claim about another implementation's era rule and nonce as
unverified except
sntpc's, which its own documentation states. The crates.io figures are from the API at review time and change daily.
Index row
An outside review of network_time_protocol before it leaves. Seven items turn the template's
required checks red on the first day. They are the manifest, the missing README and licenses, the
contract-crate opening form, PACKET_LEN, three British spellings, nine unexpanded acronyms, and a
dependency taken for one constant. Eight items land before the first tag. They are nife references
in shipped text, forbid(unsafe_code) and a fuzz opt-in, the optimization the exhaustive sweep
needs, the mutation exemptions, an overflow in Interval's accessors, two RFC checks, the caller's
replay duty, and a liveness proof for accept. Seven items are for later. The maintainer ruled three decisions provisionally (the dependency,
nine names, and whether the low-entropy constructor ships), and a lane built them and wrote the
review package. The crate-root opening form, the acronyms and a proof over Interval's accessors
have landed; the architect cleared the package on 2026-11-20 UTC.