Skip to content

Add shallow JSON entry points and opt-in native numeric bridges - #29

Merged
ThorFuchs merged 4 commits into
mainfrom
codex/ergonomics-e2
Oct 15, 2026
Merged

ThorFuchs merged 4 commits into
mainfrom
codex/ergonomics-e2

Conversation

@ThorFuchs

@ThorFuchs ThorFuchs commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Adds a shallow JSON discovery surface and the opt-in JSONBridges product: 15 authored declarations, with no removed or changed declarations in the native public-symbol comparison. Existing calls remain supported; each throwing facade delegates once to the existing authority with caller options/limits unchanged.

JSON gains String/Data/byte parsing, checked object construction, exact decimal-text construction, pre-parsed Pointer navigation, exact-key membership and three-state presence composition. CompiledJSONSchema gains validation on its existing immutable offline plan. JSONBridges depends only on JSON and adds five explicit integer/Double/Foundation Decimal conversions. Trusted integer construction remains unmetered; Double round-trip decimal text is distinguished from its exact binary rational, and projection defaults to exact policy.

The generic JSON.number integer overload is deliberately deferred: Swift 6.4 changes existing .number(42) resolution from the enum case to that overload. Typed and inferred enum-case function references, old Codable calls and opt-in import isolation compile in debug and release. No Float widening, exact-binary source conversion, implicit null/defaulting, type erasure, new conformance or external dependency is added.

Validation at 5575ad3:

  • All seven hosted checks pass: Native CI and Linux CI on ARM64/x86_64. Exact discovery remains 296 native / 282 portable functions and 173 parameter invocations per configuration, including 26 new behavior functions. ASan, 12 native / 11 Linux shared-state TSan functions and strict memory safety pass.
  • Six DocC catalogs pass warnings-as-errors with 786/786 authored declarations documented, 15 executed README fences and three synchronized public before/after guides. Actual SourceKit completion captures show the new entry points and bridge import isolation.
  • All 49 cap probes and pinned independent suites retain exact cardinalities: syntax 318 observed / 287 evaluated / 31 policy; schema 2337 / 2300 / 37 policy, plus 82 authored, 9 budget/report and 4396 malformed replays. Policy exclusions remain separate from successes.
  • The complete local Swift 6.4 WASI lane passes 73 commands with unchanged input verification: Node full debug/release root suites, narrower WasmKit public-consumer coverage, caps, rooted vectors, independent suites, strict safety and host parity. The disk-full failed attempt and superseded runs remain separate evidence; none is counted as a pass.
  • iPhoneOS and iPhoneSimulator 27.2 cross-builds pass for all six products and private regex. These are compile checks; no fresh mobile runtime/device or performance claim is made.
  • Both Linux architectures independently reproduce and build/test the exact source archive: SHA-256 6bfe942e10f7514add396603fd83eeb95878c89e7965e6c010f5e6321092d9f2, 1,312,562 bytes, 901 source files plus manifest.

The compiler harness now asks SwiftPM for actual build-products paths rather than assuming macOS directory names, and preserves its positive/negative compiler receipts in CI artifacts. The final harness corrections do not change library sources, tests or manifest.

See the compiled ergonomics crosswalk and linked guides. Suitable for an additive minor release following maintainer review and integration. This PR remains draft for that review; no merge, tag or publication is requested. Parallel CLI/preview work and branch protection are untouched.

@ThorFuchs
ThorFuchs marked this pull request as ready for review October 15, 2026 02:34
@ThorFuchs
ThorFuchs merged commit e8c3e4b into main Oct 15, 2026
8 checks passed
@ThorFuchs
ThorFuchs deleted the codex/ergonomics-e2 branch October 15, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant