Programming Language

Nocter

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

/development/reviews/v0.22.0-phase-4.md

v0.22.0 Phase 4 Practical Integration Review

Outcome

Phase 4 is complete. The public JSON surface now crosses a real filesystem-to-Writer application, native process execution, canonical formatting, diagnostics, and semantic editor features. No unresolved correctness or responsibility-boundary finding remains in the reviewed scope. Phase 5 stabilization and release qualification are next.

Application Boundary

The runnable json-normalize package accepts exactly one UTF-8 path, reads the file with std/fs.read_to_string, parses one complete JSON text, writes compact JSON to stdout through the public Writer contract, and reports public errors to stderr. It does not introduce a JSON path type, file helper, operating-system primitive, parser wrapper, or output adapter.

Native process qualification fixes the complete observable contract:

  • missing or extra arguments exit with status 2 and print usage;
  • valid nested input exits with status 0, preserves exact Number spelling, and writes one compact JSON line;
  • malformed input exits with status 2 and reports the public std.json.invalid_syntax error and byte offset.

The application is also compiled by the complete target-session example suite. Its source enters the repository-wide canonical-formatter assertion, so no JSON-only source normalization or copied expected formatter output exists.

Diagnostic and Editor Review

Invalid parse and write calls report their primary spans at the public user arguments. Their diagnostics contain no ParserState, Continuation, GenerationFrame, ByteSink, or Writer-sink adapter name.

The language-server qualification opens the real application source. It proves that:

  • hover for parse renders its public contract;
  • definition navigation reaches std/json/index.nct, not the implementation source;
  • signature help specializes generic write from the selected public Writer implementation;
  • receiver completion remains available after a syntax error and exposes public Writer behavior;
  • recoverable try_parse, try_stringify, and try_write hover and signature results preserve their allocator and provenance contracts.

All results come from the ordinary semantic snapshot and source projection. The LSP has no JSON API table, source-text declaration parser, or special analysis phase.

Authority Review

JSON parsing remains owned by the cursor and ParserState; generation remains owned by one traversal and escaping path. The application and editor tests consume only exported contracts. Neither repeats JSON grammar, string escaping, object-order, allocation, or Writer dispatch decisions.

The filesystem, process, error, formatter, native-session, and language-server responsibilities remain independently replaceable behind their existing contracts. No responsibility requires knowledge of another responsibility's representation, and no call relies on an undocumented order or a caller-maintained cleanup fact.

Residual Scope

Pretty printing, canonical member ordering, streaming input, floating-point conversion, and generic serialization remain explicit non-goals. Phase 5 will stress the completed public contract and installed artifact; it must not expand this API while qualifying it.