P2: later
An appendix to the milestone.
P2: before the release, or when a lane is near
-
Rights::ALLis a hand-written literal. Finding:ALLis0b1_1111(line 84) and the doc warns that a right added without widening it is silently dropped at every delegation; the testrights_bits_are_the_wire_formatis the only guard.abi::rights::ALLspells out the union. Change:READ.union(WRITE).union(GRANT).union(ENUMERATE).union(BIND)in aconst, so the compiler keeps the invariant and the test keeps the wire value. Door: two-way. Effort: XS. -
Abbreviated and stale parameter names. Finding:
reap_decisionandsurvey_includestakefault_epandinvoked_ep:epabbreviates a word people say in full, and the object it names is now a rendezvous, which the same doc comments say.derivebindssrc; the tests nameObjandorig. The template's abbreviations report lists all eleven components. Parameters are names under the rule. Evidence:src/lib.rslines 173, 193, 459, 724;src/tests.rslines 4, 153. Change:supervising_rendezvous,invoked_rendezvous,source,Object,original(provisional); the kernel's two call sites pass positionally and do not change. Door: two-way. Effort: S. -
Erroris thin for a stranger. Finding: noDisplayorcore::error::Errorimplementation, so a user cannot?it into a boxed error or print it withoutDebug;insert_atanswersNoFreeSlotfor an occupied slot, which also means "the table is full";get_withanswersCannotWidenfor "you do not hold the right", a different fact. Capsicum separates these (ENOTCAPABLEversusEBADF). Evidence:src/lib.rslines 197 to 207, 397 to 403, 435 to 444. Change: implementDisplay(andcore::error::Error, which is stable incore); considerSlotOccupiedandInsufficientRightsvariants, with the kernel mapping them onto itsabi::Erroras it does today. Door: two-way before the release; the variant set is a published name after it. Effort: S. -
The process-wide peak is unconditional. Finding:
PEAKis astatic AtomicU32(line 506) raised on every first fill. On a target without 32-bit atomics (thumbv6m,riscv32iwithout the A extension) the crate does not compile; and a library that keeps a process-wide static for one consumer's idle loop surprises a reader who wanted a table. Change: a cargo feature (peak, provisional) that the kernel turns on and that gatesPEAK,note_peakandhighest_seen; or at least#[cfg(target_has_atomic = "32")]. The per-tablepeak()stays unconditional. Door: two-way now; a feature is a published name after the release. Effort: S. -
No read-only walk, and
delete_matchingtakesFn. Finding: the crate offers no iterator over occupied slots, so the kernel walks0..len()withgetin three places (kernel/src/sched/capabilities.rslines 88, 149 and 328). One of them is a revocation sweep the crate already gavedelete_matchingto avoid.delete_matchingtakesimpl Fn, where std'sretaintakesFnMut. Change:iter(&self) -> impl Iterator<Item = (u64, Capability<O>)>over the occupied mask;FnMut; then the three kernel sites becomedelete_matchingoriter. The kernel half is a follow-up outside this crate. Door: two-way. Effort: S. -
The mutation record travels as "unknown" when the triage knows it. Finding: the dry run writes into
.github/mutants-exemptsthat it has no record of the three missed mutants.notes/project-metrics/mutation-triage.csvlines 270, 567 and 568 record them:fill's>to>=(the global already holds the pair),note_peak's|to^(the halves share no bit), and1 << 0to1 >> 0. The triage argues each equivalent, and each still survives on rerun. Change: write the three lines with their reasons into the stagedmutants-exemptsin the move pull request, so the first weekly run has nothing new to name. Door: two-way. Effort: XS. -
One test pins the global exactly. Finding:
the_high_water_word_reports_the_occupancy_and_the_capacity_that_set_itassertshighest_seen() == (64, 64)and holds only while no other test in the binary exceeds 64 of 64; the comment says so. A future test with a wider ceiling than 64 is impossible, but one that fills 64 of 64 first merely ties, and the dependency on test ordering is the kind of thing a stranger's first added test breaks. Change: assert the peak half is 64 and the ceiling half is 64 only after this table reached 64, with the floor test keeping its>=; or move the exact assertion into an integration test binary of its own. Door: two-way. Effort: XS. -
Notes beside the crate have drifted. Finding:
notes/capabilities/table.mdsaysCap::mint_child(the type isCapability) and thatkernel/src/sched.rsscans for the owning thread (the scheduler split intosched/);notes/capability-lifecycle.mdline 14 quotesderivereturningNoRights(it isCannotWiden) and line 36 quotes aCaptype. Change: edit the notes to the truth; they stay in nife after the move. Door: two-way. Effort: XS. -
Option<Capability<O>>has no niche. Finding:Rights(u32)uses every bit pattern, soOption<Capability<u64>>is 24 bytes for a 16-byte payload and the kernel's 64-slot table is 2,064 bytes where 1,552 would hold it. Every thread's TCB carries one. Change: optional. ARightsrepresentation with a reserved invalid pattern (aNonZeroU32holdingbits | 1 << 31, or an enum) givesOptionits niche;from_bitsalready masks, so the wire format does not change. Measure before and after. The free word and counts do not change. Door: two-way now; a layout anyone measures after the release. Effort: M.