1086. domain_name_resolution_contract: what an outside maintainer would fix before it leaves
Raised by a read-only review lane that met crates/domain_name_resolution_contract the way a
maintainer outside this tree would, on a fresh clone of main. It changes nothing; it lists what
the next lanes change before the crate moves to nifeos/domain_name_resolution_contract.
The review package for this crate is in notes/crate-reviews/
(domain-name-resolution-contract.md).
Where it and this block differ, the package wins.
The architect ratified the crate name (src/lib.rs lines 22 to 24). Pull request #2797 ratified
the three constants NAME_TEXT_MAXIMUM, MAXIMUM_ADDRESSES and GRANTS_MAXIMUM. The architect
froze the interface identity, INTERFACE_ID 11 and VERSION 1 (decision 3). Milestone 956 (the linked
interfaces carry checkable versions) minted it, and
design/roadmap/0956-the-linked-interfaces-carry-checkable-versions.md lists it. The
crate has its place in the order of extraction, step 6 of milestone 1017 (the contract crates leave
in this order), after domain_name_system has left in step 5. The rule that
a release review rechecks names ratified before a later naming rule applies here, as it did to
DATA_MAXIMUM in the socket_contract package.
Reuse: script/crate-move --dry-run, helpers/lint_externalized_crates.py, the template
partsfoundry/crate-workflows and its helpers (standalone.py, spelled_out.py, register_names.py,
abbreviations.py, prose_acronyms.py), cargo-mutants' recorded census, Kani and cargo-fuzz for
the proofs this block asks for. No new tool.
Finding status
Items 1 to 3 are under P0, 4 to 11 in the before-the-tag
appendix, and 12 to 14 in
the later items. Read against
nife main; the crate has not yet left.
- Item 1 (P0), the crate describes its consumers in 54 lines: Done,
#3641 and
#3838.
helpers/lint_externalized_crates.pycounts one hit, the ratified crate-nameName:block, which the move strips with the others. - Item 2 (P0),
fixtureis nife's boot-test data: Done, #3838. The cases live incrates/domain_name_resolution_fixture, which stays in nife and is never published. - Item 3 (P0), the manifest does not stand alone: Done,
#3641,
#3838 and
#3818.
Cargo.tomlcarries every field the shape asks for and explicit lints, the crate carries a README and the two license files, anddomain_name_systemis agitdependency pinned at itsv0.1.0-pre.1tag. - Item 4 (P1), the limits and offsets break the current rules: Done,
#3641,
partsfoundry/crate-workflows#76 and
#3865. The template's
spelled_out,register_names,unit_symbolsandquestion_shapejudge 319 names in the crate and refuse none. - Item 5 (P1), the interface identity: Done, #3583.
- Item 6 (P1), the reply word to a control
CALL: Done, #3583. - Item 7 (P1), one field with three bounds: Done,
#3641 and
#3838. The resolver, the grant table and the std
client all read
MAXIMUM_NAME_FIELD_BYTES, and two layout assertions bound the page. - Item 8 (P1),
Outcome::from_worddecodes words the resolver cannot send: Done, #3641. - Item 9 (P1), the documentation does not stand alone: Done,
#3641 and
#3838. The template's
prose_acronymsfinds every acronym expanded. - Item 10 (P1), the grant table has no proof: Done,
#3641 and
#3838. Two Kani harnesses with falsification
patches, and the fuzz target
domain_name_resolution_grants_controlin the crate's ownfuzz/workspace. - Item 11 (P1), the six surviving mutants: At the move.
script/crate-movecarries the census row into the new repository's.github/mutants-exempts, where the six equivalent mutants are listed with the reason, and deletes the row from.cargo/mutants-baseline.txt. - Item 12 (P2),
wirecarries the spawner's half into the standard library: Done, #3641. - Item 13 (P2), the root zone has three spellings: Done, #3641.
- Item 14 (P2), small shapes: Done, #3641 and #3785, which built decision 4.
- Decision 1, the reopened names: Done, ruled as built,
#3641 and
#3785. The
Name:blocks that still say provisional go at the move with the others. - Decision 2, the control reply: Done, #3583.
- Decision 3, the identity: Done, #3583.
- Decision 4, the reply to an unknown transport: Done, #3785.
- Decision 5, the attach operation's name: Done, #3785.
- Decision 6, the review and the move: Done, #3798, which wrote the review package.
- Decision 7, the fixture's names and the repository go: Done, #3838.
- F-attach, the attach operation's name: Done, decision 5, #3785.
- F-log, a runtime log channel for the spawner: Done,
#3583, as an entry in the BUGS list of
crates/system_initializer. - F-package, the review package: Done, #3798.
- F-clearance, review clearance: Done, #3838. The
architect cleared the review package and approved
nifeos/domain_name_resolution_contract.
Open decisions
None.
Goal
A stranger who opens nifeos/domain_name_resolution_contract can tell in one screen what the three
parties on the resolver's endpoint are (the spawner, a client, the resolver). The same stranger can
see which words each sends, where the name and the addresses sit in the page, and what every reply
word means. The crate names nothing that is not in its own repository. Its one stateful parser, the
grant table, provably never panics on a message and never puts a half-written zone in force.
Its names pass the template's gates at a ceiling of zero.
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: S is half a day for a lane, M a day or two, L longer. A door is one-way when somebody outside this repository acts on it after the first tag (a public name, a wire word, a layout, a dependency). Everything else is two-way and the maintainer decides it. Every name proposed below is provisional; the architect names.
P0: blocks the move
-
The crate describes its consumers, in 54 lines. Finding: the externalization lint counts 54 lines that name nife, a nife program or a nife path, and the dry run's
mentions nifeandcitationschecks fail on the same lines. They fall into four classes: the fixture's zonenife.testand every test name under it (src/fixture.rslines 6, 45 to 74;src/tests.rs, 34 lines; the doc example insrc/grants.rslines 87 to 97). Paths into this tree (src/lib.rsline 5 tonotes/name-resolution/the-contract.md, line 62 tosystem_tests/,src/endowment.rsline 32 tocomponents/,src/wire.rsline 2 to the std farm'ssys/pal/nife/resolveproto.rs). Program names (domain_name_resolveratsrc/lib.rsline 23,net_stackatsrc/endowment.rsline 30). And citations of milestones and sections (Cargo.tomllines 8 to 14,src/wire.rslines 31, 88,src/grants.rsline 2 and others: 9 milestone lines and 4 section lines by the dry run's count). Why it matters: the runbook's rule is that a crate that has left never mentions nife, and the template'sstandalonecheck refuses the citations. Change: a documentation pass in nife before the move. Example zones become reserved names (example.org,example.test). Each path becomes a sentence about the role ("the program that spawns the resolver", "a standard library that speaks this contract"). Each milestone or section citation becomes the reason it stood for, in one clause, or goes. The fixture's lines go with item 2. TheName:blocks go by themselves at the move. Door: two-way. Effort: M. -
fixtureis nife's boot-test data inside a crate that is to stand alone. Finding:src/fixture.rsholds the zone the boot test grants (nife.test) and the address of the test runners' name-server peer (10.0.2.9, which is a QEMU user-network address, line 9). It also holds four report codes for the test client's last message (lines 13 to 22) and the ten cases the client asks in order (lines 44 to 75). Its three users are all in nife:fixtures/src/name_resolver_test_client.rs,system_tests/src/user/name_resolver_tests.rsandstd_exerciser/src/bin/std_resolve.rs. The module is where 14 of the 54 nife mentions sit, and the template's register check refusesECHO_NO_ADDRESS(an address that is neither virtual nor physical). Nothing in the protocol depends on it: the crate's own tests import nothing from it. Why it matters: a contract crate published for others to implement against ships a list of host names that only one test harness answers, and an address only one virtual network has. Change: move the module to a crate that stays in nife. The test client, the kernel test and the std exerciser must all reach that crate (thefixturespackage, or a smallname_resolver_fixturecrate beside it, the wayfile_system_fixturesits besidefile_system_contract). Thepackage_indexdoc comment that cites the module (crates/package_index/src/lib.rsline 795) follows it. Door: two-way. Thesocket_contractreview package puts the same question to the architect as its decision 2 (wheresocket_contract::fixturelives). One ruling should settle both, and this block does not ask it twice. Effort: S. -
The manifest does not stand alone. Finding:
Cargo.tomlinheritslicense.workspace(line 6) andlints.workspace(lines 16 to 17) from a workspace that will not be there. It has norust-version,description,readme,keywordsorcategories. Itspublish = falsecomment (line 5) points atcrates/publish-allowlist.txt. Its one dependency is apathinto this tree (line 20). The crate has no README, and the template'sstandalonecheck lists ten lines, the firstno LICENSE-MIT. The dry run stages the scaffold's README shape and says it needs writing. Why it matters: the template refuses the tree as staged, before any workflow runs. Change: the shapecrates/block_roster_contract/Cargo.tomlalready has:rust-version,description,license = "MIT OR Apache-2.0",readme,keywords,categories, and an explicit[lints.rust]and[lints.clippy]block carryingunexpected_cfgsforcfg(kani),unsafe_op_in_unsafe_fn,missing_docsandundocumented_unsafe_blocks. The dependency ondomain_name_systembecomes agitdependency withrevandversiononce that crate has left (step 5 of milestone 1017 comes before this crate's step 6; nothing here reopens the order). A README withEXAMPLESandBUGS(item 9). The license files are the template's two, copied by the move lane (unverified whether the runbook names that step; the dry run does not stage them). Door: two-way, except the license, which the organization has already ruled and this block does not reopen. Effort: S.
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 doors that someone outside this repository acts on after the first tag. Every decision here is a rule in force. The architect ruled 2 and 3 on 2026-11-14 (UTC), 1 and 4 to 6 on 2026-11-19 (UTC), and 7 on 2026-11-20 (UTC).
-
The names (item 4). Ruled 2026-11-19 (UTC), option A. The 30 provisional names stand as built. A limit opens
MAXIMUM_and ends with its unit, an address that is not a memory location says which kind, and an offset follows the family-wide<FIELD>_OFFSET_BYTES.was built NAME_TEXT_MAXIMUM,GRANTS_MAXIMUMMAXIMUM_NAME_TEXT_BYTES,MAXIMUM_GRANTSMAXIMUM_ADDRESSESMAXIMUM_IPV4_ADDRESSES, as indomain_name_systemOFF_NAME,OFF_ADDRESSESNAME_OFFSET_BYTES,IPV4_ADDRESSES_OFFSET_BYTESw0,w1;text_len,text_total;opfirst_word,second_word;text_bytes_received,text_bytes_total;operationTRANSPORT_UDP,TRANSPORT_TCPand the rest of the public names keep their spelling.first_wordandsecond_wordare ratified for this crate only. Other contracts that still writew0andw1follow when their own names come up. Prior art: smoltcp spells its limitsMAX_NAME_SIZE(recalled, unverified); POSIX spellsNI_MAXHOST. nife spells the word and the unit out. Example:MAXIMUM_NAME_TEXT_BYTES = 253besidedomain_name_system::MAXIMUM_NAME_BYTES = 255shows that one holds dotted text and the other wire bytes. -
The reply word to a control
CALL(item 6). Ruled 2026-11-14 (UTC), option A. The reply usesOutcome's packing, a status byte and a detail byte, exactly as a resolve reply does.status::OK(0) means the resolver accepted the message.status::BAD_REQUEST(10) means it refused the message, and the detail byte carries theRefusalby its number inwire::refusal:UnknownOperation1,BadgeZero2,OutOfOrder3,TooLong4,BadZone5,Full6,NoSuchGrant7. The numbers stay fixed, andDENIED(1) does not answer a control message. The resolver sends the packed word (Control::reply). The spawnerCALLs the last piece of each grant and reads the answer (control_answer); earlier pieces stay one-waySENDs. A refusal means no grant: the spawner forgets the entry and the spawn fails. -
The interface identity (item 5). Ruled 2026-11-14 (UTC), option A. The ruling freezes the identity at
INTERFACE_ID11 andVERSION1. Version 1 includes the control reply of decision 2, with no bump, because the earlier bare reply was never part of the contract. -
The reply to an unknown transport (item 14). Ruled 2026-11-19 (UTC), option A. The spawner hands the resolver
TRANSPORT_UDP(0) orTRANSPORT_TCP(1). The resolver refuses any other word at start and answers every resolve withstatus::NETWORKandnetwork_step::UNKNOWN_TRANSPORT(5), as it does for a missing socket page. The step number is an addition inside interface version 1, which stays. The restrictive option follows the precedent a missing socket page set. Door: one-way at the tag, since the step number is a wire word. Prior art: glibc's resolver readsoptions use-vcas a flag, so no third value can exist (recalled, unverified); systemd-resolved refuses an unknown D-Bus enum value with an error. nife differs by carrying the transport as a number a spawner writes. Example: a resolve against a resolver started with transport 2 returnsOutcome { status: NETWORK, detail: UNKNOWN_TRANSPORT }, and the standard library reports which step failed. -
The attach operation's name. Ruled 2026-11-19 (UTC), option A. The operation that hands the resolver its page is
OPERATION_ATTACH_SHARED_PAGEhere and in the socket contract, with its number unchanged. The two contracts must agree on one act's name, and in the socket contractframealso means a network frame (polled_wait), thoughpage framestays the kernel's own term. Door: one-way at the tag. Prior art: Linux namesmmaponce for every file type. Example: both crates readOPERATION_ATTACH_SHARED_PAGE. -
The review and the move. Ruled 2026-11-19 (UTC), option A. A lane writes the review package once the rulings pull request merges, with the names as ruled,
UNKNOWN_TRANSPORTandOPERATION_ATTACH_SHARED_PAGEincluded. The move does not wait for the socket contract. The repository go is asked when the package exists, and the move runs at step 6 of milestone 1017 (the contract crates leave in this order), afterdomain_name_systemleaves in step 5. Door: two-way until the repository exists. Prior art:file_allocation_tableande1000ecleared from a written package. Example: the move runsscript/crate-moveon a tree whosestandalonecheck reports nothing. -
The fixture's names and the repository go. Ruled 2026-11-20 (UTC). The crate that holds the boot-test fixture keeps the ratified name
domain_name_resolution_fixture, and the code for a client whose first name did not resolve isECHO_UNRESOLVED, with no alias. The architect cleared the review package: the go createsnifeos/domain_name_resolution_contractwithpublish = false, no tag and no publish, and the move waits for thedomain_name_systemtag. Door: one-way once the repository exists. Prior art:device_tree_blobandinterfaces_notecleared the same way. Example: the test client reportsECHO_UNRESOLVED(3) whenpackages.nife.testdoes not resolve.
Done when
The checks are in the appendix.
BUGS
- The dry run ran without its build half and against the template at
v7from a local checkout. The template's head carries checksv7lacks (passive voice, history phrases, function length, spelled-out words, unit symbols), which this block ran by hand. A later template release may add more. - A spawner whose grant the resolver refuses fails the spawn without saying why, since nothing in the spawner
writes a line once the shell runs (
crates/system_initializerBUGS). first_wordandsecond_word(decision 1) are ratified for this crate only, so the tree still writesw0andw1in other contracts, which follow when their own names come up.
Follow-on
- Recorded. Item 11 is at the move: the move lists the six equivalent mutants, with the reason, in the new repository's mutation exemptions.
Index row
An outside review of domain_name_resolution_contract before it leaves. Three items block the move
(54 mentions of nife, the boot-test fixture inside the crate, a manifest that does not stand alone).
Eight land before the first tag. They are the reopened names, the interface identity, an undefined
control reply word, three bounds for one field, an unchecked reply count, the README and a broken
doc table, a proof over the grant table, and the six equivalent mutants. Three more are for later.
The architect has ruled all seven decisions: the control reply word, the identity, the names, the
reply to an unknown transport, the attach operation's name, the review package and move, and the
fixture's names with the repository go.