P1: before the tag
An appendix to the milestone.
P1: before the first release
-
The
fixturemodule is this tree's test scaffolding in the public API. Finding:pub mod fixtureexportsTRANSCRIPT,SINK_NAME(the name of a file on a nife test image,"sinkout"),READY,DONE,BADandcode, documented againstfixtures/src/file_sink.rs,fixtures/src/sink_transcript_writer.rs,file_system_contract::READYandfile_system_fixture. Its consumers are three fixture programs and the kernel-sidesink_tests, all in this tree. On docs.rs every reader meets them beside the wire; an alternative implementer has no use for them; and they are the only items in the crate that name nife files. Evidence:src/lib.rslines 278 to 316; consumersfixtures/src/sink_transcript_writer.rs,fixtures/src/file_sink.rs,fixtures/src/file_source.rs,system_tests/src/user/sink_tests.rslines 137 to 181. Change: move the module to a crate of its own in this tree,byte_sink_fixture(provisional), depending onbyte_sink_contract, the shapefile_system_fixturealready has; the four consumers change oneuse. The alternative, a cargo featurefixturedefaulting off, keeps the code in the published crate and the nife file names in its documentation. The fixture crate stays in this tree: it is neither publishable nor used by a second repository. Decision B decides the separate crate, provisionally. Door: two-way before any publish, decision B. Effort: S. -
The
abidev-dependency binds the move order to another repository for one assertion. Finding:GONErestatesabi::Error::Gone, and the only test that pins the two together linksabias a dev-dependency. Milestone 1017 (the contract crates leave in this order) therefore sequences this crate afterabi, and after the move the dev-dependency becomes a pin on a publishedabi. The assertion is about two crates nife links; nife already links both insystem_testsand the kernel. Evidence:Cargo.tomllines 18 to 26;src/lib.rslines 322 to 329; milestone 1017's table row for this crate. Change: movethe_restated_gone_code_is_the_kernelstosystem_tests(or any nife crate that links both), leaving this crate with no dependency of any kind. The crate may then leave in any order relative toabi, and theGONEdocumentation says only that the value is the kernel's "object no longer exists" return, restated here so a writer needs no second crate. A dependency on the publishedabiis already approved for an organization crate, so the alternative is open. It costs a version bump here for everyabirelease and buys nothing an in-tree test does not. Door: two-way. Effort: S. -
No proof, and the README the template requires has a "What is proven" section. Finding: the crate has no Kani harness. The decoder is total by construction (the fuzzing note says so and declines a fuzz target for that reason), which is exactly the kind of claim a harness states cheaply. The five properties below come from harnesses written and verified against the standalone copy; see the figures in "What was checked". Evidence:
src/lib.rs(nocfg(kani));notes/fuzzing/not-fuzzed.mdline 12;scaffold/README-crate.mdin the template. Change: aproofsmodule behindcfg(kani)with five properties. First, any prefix of up to sixteen symbolic bytes survivespackthenunpackwithtakenequal to its length. Write it as a concrete loop over the seventeen lengths under#[kani::unwind(18)], since a symbolic length does not finish (see "What was checked"). Second,unpacknever returnsBytes(n)withnaboveINLINE_MAXIMUMfor any three words. Third,with_severitythenseverityreads back the clamped level and leaves the count, opcode and kind unchanged for any first word. Fourth,classifyisGoneexactly forGONEandOkexactly for a non-negative return. Fifth,eof()unpacks asEoffor any second and third word and equals no bytes message of any length. Each with a falsification patch, as the template'sfalsifyjob requires. Thestd-srcgenerator must keep stripping the module or ignoring it: a#[cfg(kani)]module is inert in std, and the generator already keeps#[cfg(doctest)]items for the same reason. Door: two-way. Effort: S. -
The crate promises the
kindbyte as the extension point, and the decoder ignores it. Finding:KIND_SHIFT's documentation says a later structured body "arrives as a new kind rather than a new framing".unpackreturnsBytes(n)for any kind. Every sink that decodes through it (the terminal adapter, the shell's two readers,wc, std's stdin, the benchmark contract) would print a future structured body as text. Onlysystem_logreadskindfirst and refuses another kind; it does so outsideunpack. So the extension point exists for one consumer and is a silent misread for the rest. Evidence:src/lib.rslines 162 to 169 and 232 to 246;crates/system_log/src/log.rsline 113;components/src/terminal_sink_caretaker.rsline 50;components/src/swish/running.rsline 1258;components/src/wc.rsline 137; the std PALsys/stdio/nife.rsline 120. Change:unpackreturnsMalformedfor a bytes message whose kind is notKIND_TEXT. Every writer today sends zero there, so nothing on the wire changes and every existing test still passes;system_log's own check becomes redundant and may stay. The alternative,Msg::Bytes { len, kind }, makes every consumer decide, which is the misread by another route. Refusing now and relaxing later is compatible; the reverse is not. Door: two-way before the release (decoder behavior, no wire change). Effort: S. -
A British spelling fails the template's gate at a ceiling of zero. Finding: the British spelling of "neighbors" appears in a test function's name, and the British spellings of "authorize" and "neighbor" appear in prose. The house-style check refuses them in new text. Evidence:
src/lib.rslines 207, 442 and 454. Change:neighbors,authorize,neighbor. Door: two-way. Effort: XS. -
The end-of-stream message's second and third words are reserved, decision C. Finding: an alternative sink implementer needs a rule for
w1andw2of anOPERATION_EOFmessage, andrm's status and count need somewhere to go that is not the stream. Change:unpackrefuses any end of stream but(eof(), 0, 0)as malformed, with a test and a Kani harness, andrmsends its verdict on an endpoint of its own after its report ends (grant_plan::rm_report). Every other writer in the tree already sent zero. Door: one-way (wire format), decision C, ruled. Effort: S. -
Names that a later rule reopens at release review. Finding:
INLINE_MAXIMUMis a limit without its unit, and the units rule says a limit opensMAXIMUM_and ends with its unit. The name predates that rule, and a release review rechecks such names.reqis not a request (aSENDhas no reply) and the abbreviations report flags it.Msgis an abbreviation the same report expands.retis a parameter name the naming rules cover.w0,w1,w2are the ABI's own words for the three message registers.OPERATION_EOF,eofandMsg::Eofname a file where the thing is a stream, butEofis std's spelling (ErrorKind::UnexpectedEof). Evidence:src/lib.rslines 62, 73, 174 to 197, 268;design/naming.md, "Units" and "Shapes"; theabbreviationsreport in "What was checked". Change: as decision D decides, provisionally:MAXIMUM_INLINE_BYTES,first_word,Message,returned, the rest kept. One rename lane applies it across every caller, with the std PAL regenerated. Door: two-way before the first tag, decision D. Effort: S. -
The documentation and the decoder disagree about a zero-length bytes message. Finding:
OPERATION_BYTES's documentation says the count is 1 toINLINE_MAXIMUMand the note sayslen = 1..=16, whileunpackaccepts 0 and a test asserts thatpack(&[])unpacks asBytes(0). std's stdout path callspackon whatever slice the caller supplies, so an empty write would send one. Evidence:src/lib.rslines 38, 232 to 242, 385 to 394;notes/sink-protocol.mdline 77. Change: the documentation says 0 toINLINE_MAXIMUM, and that a zero-count bytes message is legal and a sink treats it as nothing. That iswrite(2)'s rule for a zero-byte write and what every decoder in the tree already does. Refusing it would turn an emptywriteinto a broken stream. Door: two-way (states the decoder's existing behavior). Effort: XS.