Programming Language

Nocter

A self-contained systems language built around simplicity, encapsulation, and foolproof design.

/development/reviews/v0.35.0-phase-2.md

v0.35.0 Phase 2 Unicode-data and Lookup Review

Result: complete with no open Phase 2 finding (2026-09-04). Unicode 17.0.0 data now crosses one verified offline generation boundary into one representation-hidden standard-library lookup module. Character properties and public text algorithms remain Phase 3 and Phase 4 work.

Closed Product

development/unicode/manifest.json is the checked input authority. It records the version, canonical source URL, file name, byte length, and SHA-256 digest for the four final Unicode Character Database files and their license. Exact upstream bytes are tracked under the matching version directory, so ordinary generation and verification never access the network.

The development-only generator separates manifest integrity, UCD parsing, exhaustive validation, and Nocter rendering. It recognizes only the properties and locale-independent casing contexts required by the specification. Unknown contexts stop generation instead of being silently omitted. An independent raw-corpus oracle checks every valid scalar against the merged property ranges and checks every packed lower, upper, and Final_Sigma mapping. Output publication uses a temporary file and atomic replacement only when exact bytes change.

Generated source contains data and generated lengths only. Sorted flat ranges and parallel mapping offset/scalar arrays remain private to std/internal/unicode. The handwritten lookup layer owns binary search, static-array view projection, identity mapping removal, and contextual mapping priority. Its semantic functions currently use pub(./), the narrowest visibility needed by the module's native tests. Phase 3 and Phase 4 will promote only entries that gain a real sibling-module consumer; the standard dependency audit therefore needs no unused-API exception.

Findings Closed During Implementation

  • Structural table validation alone could have reproduced a consistently wrong transformation. Validation now compares generated lookup behavior with independently retained raw input ranges and mapping records across the complete scalar domain.
  • A first contextual representation carried uppercase arrays that Unicode 17.0.0 never changes under Final_Sigma. The generator now rejects such an unsupported change and emits only the conditional lowercase product.
  • Handwritten lookup lengths would have made generated data and its consumer joint authorities. Every array length is now emitted beside its array by the generator.
  • The existing standard dependency review initially rejected the new raw-view edges. Fixed arrays have no implicit slice coercion, so the reviewed ptr and internal/ptr contracts are the single necessary bridge; those exact module edges are now recorded without weakening the audit.
  • The distributed generated tables require the Unicode copyright and permission notice. The root NOTICE, which release packaging already installs, now carries the complete Unicode License V3 notice.

Evidence

  • generator mutation tests prove that a same-length input edit invalidates its recorded digest;
  • generate.js --check verifies all pinned bytes, parses the complete corpus, exhaustively compares generated lookups, and reproduces the committed source exactly;
  • standard-module tests cover property boundaries, complements, one-to-many lower and upper mappings, and Final_Sigma selection;
  • a native-session test compiles and executes those standard tests through checked program, MIR, machine layout, ARM64, Mach-O readonly data, and static slice projection;
  • the exact standard-module dependency and visibility audits pass without an exception for unused package-visible lookup functions;
  • the complete workspace, warnings-denied Clippy, no-default-features, Rustdoc, documentation, and whitespace gates pass at the reviewed commit.

Boundary Result

The generator knows UCD text but no compiler representation. The generated file knows values but no lookup algorithm. The lookup module knows generated symbol contracts but no input-file syntax. Public standard modules and compiler crates know neither range layout nor Unicode file formats. No compiler primitive, parser rule, backend branch, editor table, runtime download, or operating system locale acts as a second Unicode authority.