v0.21.0 Phase 5 Practical Qualification Review
Result
Phase 5 is complete and reviewed. A runnable line-frequency package now exercises ordinary Map<String, usize> mutation and Set<String> deduplication through the public prelude surface, native compilation, real process arguments, fallible file input, and exact process output.
Diagnostics and editor qualification consume the same standard-library declarations used by native compilation. Hover, completion, signature help, and navigation identify public Map contracts without exposing the private table. No HashMap, HashSet, bucket, seed, probing, or storage-engine name entered the user surface.
Boundary Review
Public contract and private representation
std/map/index.nct, std/set/index.nct, and std/hash/index.nct remain the only public contract roots for the new APIs. Concrete storage belongs to std/internal/table; its exported names use package visibility and are referenced by Map and Set implementation sources only. Public Map and Set types remain opaque, while semantic iterator item types expose only keys and values.
The audit found no second table implementation, compiler-owned collection case, compatibility alias, public representation field, or editor-only reconstruction of the collection surface. Map and Set continue to delegate storage, probing, growth, cleanup, allocator affinity, and paired iteration to one table authority.
Tooling authority
The editor test opens an ordinary user source against the bundled standard package and asks hover, definition, signature-help, and completion queries through the language server. Each response is derived from the checked semantic snapshot. Definition selects std/map/index.nct; hover and completion contain no table or bucket spelling; signature help renders the checked String/i32 specialization. The test also verifies completion recovery after the member name is temporarily missing.
Invalid key use and forbidden readwrite Set iteration are compiled through the same bundled analysis entry used by editor diagnostics. They produce ordinary source diagnostics at the public operation rather than an internal failure or a representation-level message.
Formatter correction
Qualification exposed one shared-model omission: MappingBody had not joined the formatter's comma-list classification, and prefix spacing discarded the preceding token's syntax owner. This made mapping literals retain a trailing comma, attach their opening bracket, and insert a space inside generic arguments such as Map< &str, i32>.
The correction adds mapping bodies and literal shapes to the existing list and delimiter contracts and preserves both token contexts during spacing. It does not special-case Map or inspect source text. One idempotence test covers keyed pack declarations, nonempty mapping literals, empty typed mapping literals, trailing-comma removal, and borrowed generic arguments.
Complete quality gate
The final Clippy gate exposed existing overlong functions along the keyed-pack path. They were not suppressed. Drafting a call pack, initializing ownership and loan loop bindings, evaluating closure provenance, specializing a keyed executable segment, validating one MIR pack segment, resolving concrete pack-loop bindings, and copying one ARM64 fixed segment now have explicit focused helpers. The refactoring moves closed decisions within their owning stage; it does not add a cross-stage lookup, repeat type selection, or change a public behavior.
Practical Evidence
The public example contract executes both usage failure and a successful frequency report. Its fixture contains repeated logical lines, so one process proves insertion, lookup, indexing mutation, distinct membership, owned strings, and exact output:
lines: 3
unique: 2
matching: 2
Repository-owned package discovery also requires every package example directory to have an execution contract. The new package therefore cannot silently stop crossing native compilation or runtime execution.
Qualification Evidence
Phase 5 passed:
cargo test --workspace --quietindevelopment/compiler/;cargo clippy --workspace --all-targets -- -D warnings;- focused native target-session and public process-contract tests;
- focused bundled-analysis diagnostics and language-server semantic query tests;
- formatter idempotence for every runnable example and the mapping-literal regression;
cargo fmt --all -- --check;node docs/build-docs.jsand generated documentation link validation;git diff --check.
The complete Map/Set milestone is ready for release preparation. Publication identity, artifact assembly, external archive qualification, and release notes remain release-preparation work rather than Phase 5 work.