1087. domain_name_system: what an outside maintainer would fix before it leaves
Raised by a read-only outside review of crates/domain_name_system, read the way a maintainer
meeting it on crates.io would read it. The review changed nothing; this block lists what the next
lanes change, in the order the move needs them.
The accepted baseline is the review package, domain-name-system.md
in notes/crate-reviews/. Four things are settled.
The crate name is ratified, with dns and name_resolver refused. Pull request #2797 ratified
five constants (MAXIMUM_UDP_MESSAGE_BYTES, MAXIMUM_NAME_BYTES, MAXIMUM_LABEL_LEN,
MAXIMUM_CHAIN, MAXIMUM_ADDRESSES). Section 248 (the resolver is its own confined program) and
ยง252 (one zone per client badge) shape the callers and not this crate. Milestone 1017 (the contract
crates leave in this order) places this crate in step 5 with the process-tools leaves. This block reopens
none of those except where a later rule contradicts a ratified name, and says so where it does
(items 6 and 7).
Reuse: the template partsfoundry/crate-workflows and its scaffold, script/crate-standalone,
script/crate-review-packet, helpers/name_release.py, Kani, cargo-mutants, cargo-fuzz. No new
tool.
Finding status
Items 1 to 4 are under P0, 5 to 9 in the before-the-tag
appendix, and 10 to 16 in the later
items. The crate lives in
partsfoundry/domain_name_system, tagged v0.1.0-pre.1.
- Item 1 (P0), unratified public names: Done, #3728, which ratified every public name as built.
- Item 2 (P0), the manifest does not stand alone: Done, #3658.
- Item 3 (P0), the files a stranger needs are absent: Done,
#3658 for the README and both license files, the move
commit for the scaffold files and caller workflows, and partsfoundry/domain_name_system#3 for
docs/stranger-test.mdand the stranger run. - Item 4 (P0), shipped text points into nife: Done, #3608.
- Item 5 (P1), the fuzz target lives in nife: Done,
#3658 for
#![forbid(unsafe_code)], the move commit for the crate's ownfuzz/and the caller'spublic-crash-inputs: true, and #3818, which removed the target from nife. - Item 6 (P1), two length names break the units rule: Done, #3608.
- Item 7 (P1), names that need the specification, and the
addressgate: Done, parts a, c and d in #3608 and #3668, and part b in partsfoundry/domain_name_system#1, which names the binding and the test names as IPv4.check / standaloneis green on the crate'smainwith notcporudpline in.github/accepted-words. - Item 8 (P1), a TTL with its high bit set: Done, #3559.
- Item 9 (P1), the equivalent mutants: Done, partsfoundry/domain_name_system#4, which exempts the six
survivors the first full run named, and
mutation / mutationis green on the crate'smain. - Item 10 (P2),
DisplayandFromStr: Done, #3608. - Item 11 (P2), type sizes: Done, #3608.
- Item 12 (P2), an exhaustive
Error: Done, #3608. - Item 13 (P2), documentation drift: Done, #3608.
- Item 14 (P2), host-name syntax: Done, #3608.
- Item 15 (P2), fixtures that cannot be re-captured: Done, #3608.
- Item 16 (P2), the TCP buffer: Done, #3608 for
MAXIMUM_TCP_MESSAGE_BYTESand theTcpReply::newsentence, and #3658 for the test client's buffer. - Decision 1,
MAXIMUM_LABEL_BYTESandHEADER_BYTES: Done, #3608, ratified by #3728. - Decision 2, the specification's abbreviations: Done, #3668, ratified by #3728.
- Decision 3, the IPv4 address names: Done, #3608, ratified by #3728.
- Decision 4, the review package and the clearance: Done, #3786 for the package, cleared 2026-11-19 (UTC), and #3818 for the move.
Open decisions
None.
Goal
A stranger who finds domain_name_system on its own can tell in one screen that it is the DNS wire
format a stub resolver needs, as pure computation. It covers a query for one name's IPv4 addresses,
the checks a reply must pass, and TCP framing. The same stranger can build, test, prove and fuzz it
from the README alone, meets no name that needs this tree to decode, and finds the repository's
gates green for the crate's own reasons. Nothing in the crate's shipped text points back into nife.
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 public name, a published behavior, a
wire layout, a dependency). Everything else is two-way and the maintainer decides it. Line numbers
are crates/domain_name_system/src/lib.rs unless a path says otherwise.
P0: blocks the move
-
DONE. Every public name carries a
Name:block, and all are ratified as they stand (2026-11-16 UTC):helpers/name_release.py --draft domain_name_systemlists none as provisional or without a block, andscript/crate-standalone domain_name_systempasses its names step. The ratification pull request's body is that table, which is the one record of these names, since the move commit strips the blocks. Door: each name is one-way once published; the block itself is two-way. -
DONE. The manifest does not stand alone. Finding: the manifest inherits
licenseandlintsfrom the nife workspace, there is norust-version, nodescription,repository,readme,keywordsorcategories, and thepublish = falseline's comment namescrates/publish-allowlist.txt, a file the new repository will not have. The header comment cites milestone 384 (nothing here resolves a hostname, and in a capability system the resolver is a grant) andnotes/name-resolution.md. Evidence:crates/domain_name_system/Cargo.tomllines 4 to 17;crate-standalonefindingsinherits license,inherits lints,no rust-version,2 milestone citation line(s). Change: inlinelicense = "MIT OR Apache-2.0". Inline the[lints]table the template'sstandalone.pyrequires (unsafe_op_in_unsafe_fn,missing_docs,unexpected_cfgswithcfg(kani)in its check-cfg list, and the clippy rows the workspace carries).rust-version = "1.88"(the flooras_chunks_mutsets; confirm withcargo +1.88 testbefore the tag). A one-sentencedescription.repository,readme,categories = ["no-std", "no-std::no-alloc", "network-programming", "parser-implementations"],keywords = ["dns", "stub-resolver", "no-std", "rfc1035", "rfc7766"]. Replace thepublishcomment with one a stranger can act on, and the header comment with the crate's one-line purpose. Door: two-way (publishing itself has a ruling elsewhere, not reopened here). Effort: XS. -
The files a stranger needs are absent: README,
LICENSE-MIT,LICENSE-APACHE, and the scaffold'sCHANGELOG.md,_typos.toml,deny.toml,rustfmt.toml,docs/stranger-test.mdand caller workflows. Finding: the crate directory holdsCargo.toml,src/,tests/andfalsifications/only. The template'scheck / standalonerefuses a crate with no README, and itshelpers/readme_sections.pywants## EXAMPLESand## BUGS, which the crate's root doc comment already has in substance (lines 1 to 24 and the four doctests). Evidence:crate-standalonefindingsno README,no LICENSE-MIT,no LICENSE-APACHE;cargo package --listships ten files and no license text. Change: copyscaffold/at the move as its README says. Write the README fromscaffold/README-crate.md. It carries the badge row, theQuery::acceptdoctest as the example, the three harnesses by name and the Kani install line on one line. It also gives the measured proof cost (about 65 seconds for the three harnesses here, memory not measured). It adds one falsification run with its printedVERIFICATION:- FAILED, the BUGS list from the root doc, the minimum Rust version and the type sizes measured above. Record the first stranger run indocs/stranger-test.md. Door: two-way. Effort: S. DONE: the README and both license files, the scaffold's other files and caller workflows from the move, and the stranger run indocs/stranger-test.md. -
Shipped text points into nife. DONE. Finding: line 4 sends the reader to
notes/name-resolution.md. Line 7 namesfuzz/fuzz_targets/domain_name_system_reply.rs, a path in nife (item 5 moves the target). Lines 262 to 263 cite milestone 384 and say nothing appliesis_within, whichcrates/domain_name_resolution_contract/src/grants.rsline 180 does. Lines 369 to 371 citecrates/multicast_dns_protocol, a commit hash and milestone 298 (retire the multicast DNS responder and its two crates, which advertised a goal that is gone), which a stranger cannot open. The move strips the crate-name block at lines 21 to 24, so it needs no edit for it. Evidence:crate-standalonefindings5 path into the nife tree line(s),1 provenance block line(s); the lines above. Change: line 4 becomes "which program sends these bytes, and which names a client may ask about, are the caller's policy". Line 7 names the crate's ownfuzz/directory. Lines 262 to 263 say whatis_withinis for (a resolver grant scoped to a zone) without the milestone. Lines 369 to 371 keep the one useful fact, that the engine is separate so Kani can prove the loop at a small output size, and drop the lineage.script/crate-standalonemust report zero citations. Door: two-way. 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
Each is a rule in force. The ratification of every public name as built, 2026-11-16 (UTC), covers the first three. Decision 4 dates from 2026-11-19 (UTC).
Decision 1. MAXIMUM_LABEL_BYTES and HEADER_BYTES
A DNS label is at most 63 bytes and a message header 12. A length or a limit carries its unit, as
MAXIMUM_NAME_BYTES and MAXIMUM_UDP_MESSAGE_BYTES already did, so the names are
MAXIMUM_LABEL_BYTES and HEADER_BYTES, with no alias of the old spellings. A caller writes [0u8; MAXIMUM_LABEL_BYTES] and knows the unit from the name. Prior art: hickory-proto names its limit
MAX_LABEL_LENGTH (unverified); nife's rule is stricter.
Decision 2. The specification's abbreviations in public names
A term a reader searches for keeps its spelling, with the expansion in its doc and a
#[doc(alias)]; any other term expands. People say "question count", not "qdcount", and they do say
"TTL" and "class IN". The names in force:
Header::{question_count, answer_count, authority_count, additional_count}(aliasesQDCOUNTand so on) andHeader::response_code()(aliasRCODE).FLAG_RESPONSE,FLAG_TRUNCATEDandFLAG_RECURSION_DESIRED(aliasesQR,TC,RD);RESPONSE_CODE_MASK,RESPONSE_CODE_NAME_ERROR(aliasNXDOMAINtoo) andOPERATION_CODE_MASK(aliasOPCODE).Question::{record_type, class}andRecord::{record_type, class, ttl_seconds, data, data_offset}.ttlstays an abbreviation and carries the unit:Record::ttl_secondsandAnswer::ttl_seconds(), with aliasesTTLandtime to live.record_type::CANONICAL_NAMEandcanonical_name_target(aliasesCNAMEandcanonical name), andrecord_type::IPV4_ADDRESS(aliasesAandaddress record).CLASS_INkeeps its spelling as a term of art, with aliasInternet class.
Prior art: hickory-proto spells the counts out and keeps ttl (unverified); the domain crate
keeps qdcount() (unverified). Example: the resolver's check reads header.question_count != 1,
and a reader who has never opened RFC 1035 knows what refused the reply.
Decision 3. MAXIMUM_IPV4_ADDRESSES, Answer::ipv4_addresses and Reject::NoIpv4Address
The crate returns IPv4 addresses only, and the template's register_names gate reads a bare
address as a memory address. So the names say which kind: MAXIMUM_IPV4_ADDRESSES,
Answer::ipv4_addresses() and its field, Reject::NoIpv4Address, and the test names to match, with
no template exemption. domain_name_resolution_contract asserts the same limit, and reject_code
keeps code 9. Prior art: std::net::Ipv4Addr and smoltcp's IpAddress name the kind where a reader
looks first. Example: answer.ipv4_addresses() says what &[[u8; 4]] holds, and an
ipv6_addresses() later needs no rename.
Decision 4. Write the package now and clear the move from it
The move follows notes/crate-move.md: a review package, the architect's review clearance, then
the repository. Milestone 1017 (the contract crates leave in this order) places this crate in step
5, before domain_name_resolution_contract, which pins it as a git dependency. A lane writes the
package now, from the crate as it stands, and the architect clears the move from it. The
move does not wait for the resolver contract, whose names have settled. Creating a public repository
is an outward step, so the clearance itself stays the architect's. Prior art:
file_allocation_table and e1000e each cleared from a written package before their repository
existed. Example: the architect clears the package, and script/crate-move domain_name_system
creates partsfoundry/domain_name_system with the three mutant exemptions and the fuzz target staged.
Done when
The checks are in the appendix.
Follow-on
- Done. Every finding, by the pull requests under Finding status. The crate
lives in
partsfoundry/domain_name_system, and its later work is that repository's.
BUGS
- The template's
abbreviationshelper judged one name when run here. That is almost certainly a harness problem on the reviewing side, so the abbreviations report (tcp,udpand any other) stays unverified until the crate runs the template'scheckworkflow. - The crate builds and tests at Rust 1.88 in the move's dry run (
script/crate-move --dry-run). - The
register_nameshelper did not flagMAXIMUM_LABEL_LENorHEADER_LEN, while the written rule does. Whether the helper reads a_LENsuffix by design is a template question this block raises and does not answer. - Whether the four timed-out mutants count against the template's mutation gate stays unverified.
- The prior-art rows for
hickory-proto,domain,simple-dnsand the C libraries are from memory and the other-implementations note, not from reading those sources here. Each carries a mark.
Index row
An outside review of domain_name_system before it leaves. Four items block the move (48 unratified
names, a manifest and files that do not stand alone, text pointing into nife). Five land before the
first tag (the fuzz target moving with the crate, two length names under the units rule, the
specification's abbreviations and the address gate, a TTL the RFC says to zero, the three
equivalent mutants). Seven more are for later. The architect has ratified the three name decisions
and cleared the move.