1048. generational_table: what an outside maintainer would fix before 0.1.0
Raised by the lane lane/generational-table-outside-review, a read-only review of
partsfoundry/generational_table as a stranger to this tree would meet it. It changes nothing; it lists
what the next lanes change.
The review took its accepted baseline from
the review package and
the release record (nifeos/nife:notes/generational-table-and-existing-crates.md), and raises none of the decisions those settle. Those are the crate name and the 19 ratified names. They are the typed EntryName<T> with to_bits, from_bits and NEVER_MINTED, and the saturating generation that retires a slot. They are the first-fit insert and the [Option<T>; N] storage. They are the dual license, the low expected demand the README states, and the ruling that the crate publishes.
Milestone 1033 (generational_table: the
fixed-capacity, proved slotmap, released on its own) owns the tag, the soak and the publication.
This block owns the findings that should land inside that path.
Reuse: the template partsfoundry/crate-workflows and its scaffold, cargo-mutants, Kani, cargo-fuzz, and
the crate's own harness helpers (any_reachable_table, any_operation). No new tool.
Goal
A stranger who finds generational_table on crates.io can tell in one screen what it is for. The same stranger can build and prove it from the README alone, reach for the methods a slotmap user expects, and trust that every safety claim holds on every target the crate compiles for.
The repository's gates are green
for the crate's own reasons and red only for the crate's own reasons.
What was checked, and how
Verified firsthand, on a fresh clone at the head of main:
cargo build,cargo test(23 unit tests, 5 documentation tests, 1 compile-fail test),cargo clippy --all-targetsandcargo docwith warnings denied, all clean on stable 1.99.1 and on 1.88, the manifest'srust-version.- The crate builds for
aarch64-unknown-none-softfloat,riscv64imac-unknown-none-elfandx86_64-unknown-none. - Kani 0.68.0 verifies all six harnesses, and each of the six falsification patches applies and fails exactly its own harness at the assertion its header names.
- cargo-mutants over the whole crate: 83 mutants, 49 caught, 34 unviable, none missed, none timed out. The repository's own weekly shard reports the same figures.
- Both cargo-fuzz targets build on nightly and ran 25 seconds each with no finding (180,000 and 2,000,000 executions).
typosandcargo deny checkpass.cargo package --listshipssrc/, the manifest, the lockfile, the README, the changelog and both license files.- Sizes:
Table<u64, 256>andTable<*mut u8, 256>are 5,136 bytes;Table<u32, 256>andTable<&u8, 256>are 3,088 bytes;Option<EntryName<T>>is 16 bytes. - The repository's workflow runs, rulesets and the template's history, through the GitHub API.
- Download figures for the prior-art crates, from the crates.io API.
Inferred from reading, not run: the behavior on a target whose usize is narrower than 32 bits
(item 2), and whether the crate builds at Rust 1.85 (item 15).
Not run: cargo semver-checks (no previous release to compare against), Miri (the weekly job runs it and passed), a long fuzz campaign, a release dry run, script/apply-settings and the template's name-check helpers. The review package ran the helpers over the same names, and no public name has changed since.
Prior art
How the crate sits against what a crates.io user already knows. Recent downloads are the last 90 days at the time of the review.
| crate | recent / all-time downloads | storage | handle | generation | what a user coming from it will miss here |
|---|---|---|---|---|---|
slab 0.4 |
289M / 1.11G | Vec |
usize, no generation |
none | insert(value), capacity, clear, iter_mut, retain, Index; and the README does not name it |
slotmap 1.1 |
37.3M / 130M | Vec, growable |
KeyData, as_ffi/from_ffi, two words can reach one entry |
per slot, odd while occupied, wraps after 2^31 reuses | insert, contains_key, iter_mut, capacity, clear, retain, drain, Index, Ord on keys, secondary maps |
generational-arena 0.2 |
1.22M / 10.7M | Vec, archived upstream |
(usize, u64), 16 bytes |
one counter for the arena | insert, contains, iter_mut, capacity, clear, retain, drain |
thunderdome 0.6 |
227k / 1.18M | Vec |
Index, to_bits/from_bits, same packing as this crate |
per slot, wraps past zero after 2^32 - 1 | insert, contains, iter_mut, capacity, clear, retain, drain, Index::slot(), get_by_slot |
triple_arena 0.15 |
232k / 361k | inline on StackBacking, unsafe |
a caller type from a macro, index and optional generation | one counter for the arena | growth, many arena kinds |
coca 0.3 |
17 / 4.4k | inline, MaybeUninit, unsafe; dormant |
u64, generation high, index low |
per slot, wraps after 2^31 | constant-time insert, a packed dense pool |
Where this crate differs: capacity fixed at compile time, no allocation, a const constructor that
sits in a static, no unsafe, and a generation that retires a slot instead of wrapping. A typed name that any u64 can spell, which the table checks on every use. A walk bounded by the highest live slot and resumable from a slot cursor. Six machine-checked proofs, each shipped with the patch that makes it fail. What it costs: an O(N) first-fit insert, one Option tag per slot on a T
without a niche, a slot lost after 2^32 - 1 occupants, and the smaller method surface in the last
column. The release record's Kani run against slotmap is the concrete example. A map holding one
entry resolves a u64 it never minted, because from_ffi forces the version odd. This crate's
a_name_the_table_never_minted_resolves_to_nothing refuses that.
The items
The fifteen items, graded P0 to P2 with evidence, change, door and effort, are in the appendix. Item numbers in this block refer to it.
What needs the architect
No one-way door remains open. The architect ratified the five new public names of item 6 and
Ord on EntryName<T> (item 11). The ruling already covers the publication, its version, the
license and the crate name. This block does not reopen them.
Done when
Cargo.tomlcarries no comment that points outside the repository, and the release that publishes carries nopublish = false.slot_indexresolves nothing for a slot the target cannot index, with a test that spells such a name, and the documentation says so.- The README has a section a stranger can follow to build, test, prove and falsify, the Kani install line copies as one line, and a new stranger run is on record with no open finding against the README.
- The callers pin a template release that carries the mutation stack,
mutation.ymlis a caller with this repository's cron,check / mutation-diffis a required check, andmutation / mutationhas one green full run onmain. - Six harnesses become seven, each new one arriving with a falsification patch that
proofs / falsifyreplays red, and the walk harness countsvalues_mut. insert,contains_key,iter_mut,slot_countandclearexist with tests, and the README's method list names them.- A benchmark in the repository reproduces every performance figure the README states, or the README states none.
cargo test,cargo kani,cargo mutants(none missed) and both fuzz targets are green at the commit the release tags.
BUGS
- Item 5 was the template's to fix, and
partsfoundry/crate-workflows#50fixed it; the release gate reads the mutation verdict, which is green onmain. - Item 2 came from reading, not from a build for a 16-bit target. The fix is cheap enough to
land without one. A
#[cfg(target_pointer_width = "16")]test would need a toolchain this repository does not carry. - The review did not run the template's name-check helpers again; the review package's run covers the same names, and the five new names of item 6 will meet them in their own pull request.
- The fuzz runs here took 25 seconds per target on one machine. The weekly job gives five minutes. Neither is a long campaign. The repository commits no seed corpus, so each run starts cold.
Where this stands
Every finding is done or waits on the release that publishes. The publishing hold keeps that release back until every outside review is delivered (ruled 2026-11-18 UTC), and milestone 1033 owns it, its tags and the pin bumps in this tree.
Finding status
Read against partsfoundry/generational_table main at 8328360, the merge of
partsfoundry/generational_table#22.
- Item 1 (P0), the manifest's publish line: Waiting on the release that publishes, which deletes
publish = falseas ruled. The comment beside it is one sentence a stranger can act on (partsfoundry/generational_table#11). - Item 2 (P1), the slot truncation on a narrow target: Done,
partsfoundry/generational_table#9andpartsfoundry/generational_table#14.slot_indexwidens a slot without a check whereusizeholds 32 bits or more and resolves nothing elsewhere, and theEntryNamedocumentation says so. The narrow-target test needs a toolchain the repository does not carry (BUGS). - Item 3 (P1), the README's recorded gaps: Waiting on the release that publishes, which adds the
cargo addline and the crates.io and docs.rs badges.partsfoundry/generational_table#11landed the rest: the "Building and proving" section, the one-line Kani install and a stranger run with no open finding (docs/stranger-test.md). - Item 4 (P1), the template's mutation stack: Done,
partsfoundry/generational_table#15,partsfoundry/generational_table#18andpartsfoundry/generational_table#20. The callers pin template releasev8,mutation.ymlis a caller with the repository's cron,check / mutation-diffis a required check onmain, and mutation run 44468076120 is green at8328360. - Item 5 (P1), the single-shard mutation verdict: Done,
partsfoundry/crate-workflows#50. - Item 6 (P1), the five methods: Done,
partsfoundry/generational_table#10, with the spellings ofpartsfoundry/generational_table#21:insert,contains_key,iter_mut,slot_countandclear, each in the README's method list. - Item 7 (P1), the induction step for the walk bound: Done,
partsfoundry/generational_table#9. Ten harnesses carry ten falsification patches, among themthe_walk_bound_and_the_live_count_survive_any_operation, and the walk harness countsvalues_mut. - Item 8 (P1), the performance figure: Done,
partsfoundry/generational_table#12.cargo benchreproduces every figure the README states. - Item 9 (P2), the O(N) first-fit scan: Done,
partsfoundry/generational_table#12. Insert scans from a cursor below which no slot is free, andthe_scan_cursor_keeps_first_fit_orderproves the order unchanged. - Item 10 (P2), the storage layout: Done,
partsfoundry/generational_table#12. The README states the layout, asize_oftest pins it, and the one-array layout measured no faster, so the two arrays stay. - Item 11 (P2),
EntryNameas a key: Done,partsfoundry/generational_table#10.PartialOrdandOrdorder by the packed bits, as ratified, andDebuggoes throughdebug_struct. - Item 12 (P2), the docs.rs front page: Done,
partsfoundry/generational_table#11. The crate documentation opens with an example and states the range ofNand the stack cost. - Item 13 (P2), four text fixes: Waiting on the release that publishes, which collapses the
changelog's three pre-release sections to one line.
partsfoundry/generational_table#11landed the other three (slabin the comparison, the CONTRIBUTING line, the CODEOWNERS caveat). - Item 14 (P2), the unmatched
Zliballowance: Done,partsfoundry/generational_table#11. The item asked for no change to the list;deny.tomlkeeps the template's list and says why the warning is expected. - Item 15 (P2),
rust-version: Done,partsfoundry/generational_table#11.rust-versionis 1.85, and the weeklymsrvjob holds it. - Done when, last bullet, every gate green at the commit 0.1.0 tags: Waiting on the release that
publishes. Tests, proofs and mutation are green at
8328360; fuzz last ran green at551fb87, before the renames ofpartsfoundry/generational_table#21, and runs again on its weekly schedule. - The release review's names: Done,
partsfoundry/generational_table#21andpartsfoundry/generational_table#22.slot_ofisslot_index,live_slotsislive_slot_indices,iter_fromisiter_from_slot_index(parameterfirst_slot_index),insert_withisinsert_with_name,capacityisslot_count,NEVER_MINTEDstays, and theDebugfield matches.
Follow-on
- Milestone 1033. Items 1, 3 and 13 and the last bullet of Done when wait on the release that
publishes, which milestone 1033 (
generational_table: the fixed-capacity, proved slotmap, released on its own) owns. The finding status above says what each release step does. - Done. Items 2, 4 to 12, 14 and 15 and the release review's names, in the crate repository pull requests the finding status names.
Open decisions
None. Every remaining step is the release that publishes, which the standing publishing hold already governs; no item here needs a ruling of its own.
Index row
An outside review of generational_table before its first release: one manifest fix that blocks publishing, seven items to land before the tag, and seven for later. The seven cover a slot truncation on narrow targets, the README's recorded gaps, the template's mutation stack and its single-shard verdict bug, five missing methods, an induction-step proof for the walk bound, and a benchmark behind the README's figure.