v0.34.0 Phase 3 Owned-scalar Integration Review
Result: complete with no open finding (2026-09-04). Owned text, formatting, and hashing now consume the scalar authorities established by the earlier phases.
Closed Product
String.try_push(char) passes the already valid character to the infallible std/internal/utf8.encode_scalar authority and passes the initialized prefix to one private try_push_valid_utf8 transaction. That transaction reserves the complete byte width before any write and publishes String.len only after every byte is stored. String.try_push_utf8 validates untrusted bytes once and then enters the same transaction. String.push(char) changes only the allocation-failure policy by mapping it to the ordinary allocation abort.
char.from_u32 is the sole integer-to-scalar validation boundary. The UTF-8 encoder accepts char, so it cannot duplicate range or surrogate checks. JSON escape decoding constructs char before appending it and delegates encoding and storage to String.try_push.
Format<char> copies the borrowed scalar and delegates directly to String.try_push; it has no encoder. Hash<char> observes the scalar value through the trusted representation bridge and delegates to the existing u32 contribution path; it has no second byte projection or hash algorithm. Equality, ordering, formatting, and hashing therefore share one scalar identity while remaining separate public contracts.
Failure and Authority Review
The invalid allocator integration test constructs an empty String bound to a deliberately rejected allocator, attempts a four-byte character append, observes the stable allocation error, and proves the visible text is still empty. The only logical-length assignment in the scalar transaction is after the complete store loop.
The standard dependency review records the intended character bridge edges from char, hash, scalar iteration, and the UTF-8 encoder. string no longer requires unchecked character access or an impossible-value abort path. No public module exposes unchecked scalar construction, no validation table moved into String or JSON, and no formatting or hashing helper depends on UTF-8 source spelling.
Evidence
- the native Unicode integration test executes aborting and recoverable scalar append and verifies the exact mixed-width UTF-8 result;
- native Format tests append a four-byte character beside text, booleans, and integer boundaries;
- native Hash tests prove a literal and dynamically constructed equal character contribute the same value;
- the recoverable-allocation native test proves scalar append failure leaves the String unchanged;
- the complete physical standard package and reviewed dependency graph accept the new contracts.