Skip to content

1.9: store refinements, selectIndices, macOS 15 / iOS 18 floor - #84

Merged
ThorFuchs merged 10 commits into
mainfrom
feat/1.9-api-refinements
Nov 10, 2026
Merged

ThorFuchs merged 10 commits into
mainfrom
feat/1.9-api-refinements

Conversation

@ThorFuchs

@ThorFuchs ThorFuchs commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Refinements and extensions to the 1.9.0-dev store/selection APIs ahead of a 1.9.0 release decision. Additive against published 1.8.0. The configured store's public API is unreleased in 1.8.0 and was admitted by the maintainer on 2026-11-10.

Store refinements (JSONInspection)

  • Integer record IDs. JSONStoreIDKind (.string default, .integer) per collection. Integer IDs compare by exact mathematical value (7 == 7.0 == 7e0). Values beyond Double precision stay exact. Kinds never convert: a string "7" in an integer collection is recordIDWrongKind, and a cross-kind marker is referenceDanglingID.
  • Typed lookup. JSONStoreRecordID (string/integer literals) and lookup(collection:id:). The String overload is kept and delegates to it.
  • Typed failures. JSONStoreFailurePhase and JSONStoreCapacity enums. JSONStoreFailure is now Equatable.
  • collectionIndex(named:). Maps an exact collection name to its physical index.
  • References. Removed the redundant validateTargets knob: .strict(marker:) always validates targets, which is what all 69 pinned NAV12 vectors use.
  • JSONInspectionBatch.optionalValues(at:maximumRequests:). Returns nil for an absent member or an out-of-range index and throws for everything else. Matches values(at:) error parity and uses one cumulative ledger.

Transform

  • JSONTransformProgram.selectIndices(in:bindings:limits:source:). Runs selection to EOF and returns the ordinals. Completion statistics are identical to the manual withSelection loop.

Toolchain / WASI

  • WASI lane pinned to the swift-6.4.2-RELEASE_wasm SDK (scripts and docs).

Docs and inventories

  • DocC (ID kinds, optional reads, selectIndices), README, and the "Unreleased — 1.9.0-dev" section of CHANGELOG. Each guide still has exactly one compiled Swift example.
  • TestDiscovery and harness pins: JSONInspectionTests 222, JSONTransformTests 59, workflow 32, selection 18. New tests are workflowR01–R08 and the 2 selection* tests.

Platform floor (macOS 15 / iOS 18)

Carried from the 1.8.1 candidate #83 to match Swift-MCP-Server-Core (macOS 15, iOS 18, Linux).

  • Package.swift: .macOS(.v15), .iOS(.v18). Development still needs Swift 6.4 and the macOS 27 SDK.
  • JSONHTML: the WebKit WebPage PDF backend is @available(macOS 26, iOS 26, *) and throws backendUnavailable before 26. Before 27, the Markdown transfer type uses net.daringfireball.markdown.
  • Compile evidence (Swift 6.4.2):
    • swift build --build-tests at the macOS 15 floor: exit 0.
    • All 12 library targets for arm64-apple-ios18.0 (iOS 27.2 SDK): exit 0.
  • Not run: tests on a real macOS 15–26 or iOS 18 system or simulator.

Qualification record and performance exception

New Documentation/Qualification/Release1.9.md. The maintainer chose to record an explicit exception for the 1.9.0 controlled-performance gate (excepted_explicitly, not passed). No performance claim is made.

Local verification

Swift 6.4.2 (swiftly, swiftlang-6.4.2.1.9), Xcode 27.2 macOS SDK, python3 Scripts/ci.py --lane <lane>. All commands exited 0:

Lane Commit Commands
docs 3284782 2
structural-workflows 3284782 9
inspection 3284782 19
native 3284782 62
store 2f83b70 8
wasm 2f83b70 2

Store and WASM ran on 2f83b70. The only change since then is the guide wording plus the regenerated CLI identity in 3284782. The platform-floor commits (246c1ca, 49d1c93) and the record (b99a6ea, c27d2f7) are checked by this PR's CI.

The only issue swift package diagnose-api-breaking-changes reports against 1.8.0 is a false positive for a package-only enum.

No version bump, tag or release is part of this PR. Merge and release remain human-gated.

🤖 Generated with Claude Code

ThorFuchs and others added 6 commits November 10, 2026 05:30
JSONStoreFailure reports a typed JSONStoreFailurePhase and JSONStoreCapacity
(raw values keep the original phase numbers and capacity names) and is
Equatable. JSONStoreReferences.strict(marker:) drops the validateTargets
flag whose only accepted value was true; the invalidReferenceMode code
becomes unreachable and is removed. Add collectionIndex(named:).

Add JSONStoreIDKind (.string default, .integer). Integer IDs compare by
exact mathematical value through a compact canonical key built from the
normalized digits and exponent, so 7, 7.0 and 7e0 are one ID, values
beyond Double precision stay exact and large exponents never expand.
IDs never convert between kinds. JSONStoreRecordMetadata.id is a typed
JSONStoreRecordID (string and integer literals) with scalar-exact string
equality; lookup(collection:id:) accepts one, and the String overload
remains. The string-ID path and its accounting are byte-identical: all
69 pinned NAV12 vectors and their fixtures are unchanged.

Add JSONInspectionBatch.optionalValues(at:maximumRequests:): nil only for
an absent member or an index past the end; wrong-kind, negative-index,
pointer-token, resource and cancellation failures match values(at:).

Add eight workflowR public-consumer tests and update the docs, which now
describe these APIs as available since 1.9.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run indexed-selection convention V1 to EOF and return the selected
ordinals in emitted order. Positions and their leases stay alive until
completion, so the completion statistics equal the manual withSelection
loop. Document it in IndexedSelection and drop the stale 1.8-candidate
wording from the JSONTransform overview. Two selection tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use swift-6.4.2-RELEASE_wasm (Swift.org archive SHA-256 83baca83...) and
the matching 6.4.2 compiler banner in the WASI lane and audit. Receipts
produced under the 6.4.0 pin stay bound to it; the executed 6.4.0 audit
record keeps its original archive hash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TestDiscovery: JSONInspectionTests 222 and JSONTransformTests 59 in the
native, portable and WASI inventories; eight workflow and two selection
identities. Update the harness pins to match, the README sections that
still said 1.8 candidate, the Unreleased 1.9.0-dev changelog and the CLI
source identity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The store qualification parses STORE_VECTOR lines against the pinned
numeric phases, so print JSONStoreFailurePhase.rawValue. Use plain code
for JSON in the optionalValues doc comment; cross-module symbol links do
not resolve inside the JSONInspection catalog. Regenerate the CLI
source identity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The workflow and selection qualifiers compile exactly one swift fence per
guide; show the extra ID-kind and selectIndices snippets as inline code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ThorFuchs
ThorFuchs marked this pull request as ready for review November 10, 2026 14:20
ThorFuchs and others added 4 commits November 10, 2026 15:24
Swift-JSON compiles and passes its tests with macOS 15 / iOS 18 minimums;
the macOS/iOS 27 floor was declared rather than required. Only two optional
JSONHTML APIs need newer systems:

- The WebKit WebPage PDF backend is marked available from macOS/iOS 26;
  earlier systems report the existing JSONPDFFailure.backendUnavailable.
- The Markdown transfer type uses the system-declared
  net.daringfireball.markdown identifier before UTType.markdown (27).

Tests that exercise those APIs carry matching availability. Development
still uses Swift 6.4 with the macOS 27 SDK; Linux and WASI are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add Documentation/Qualification/Release1.9.md: scope, the macOS 15 / iOS 18
deployment floor carried from the 1.8.1 candidate, the maintainer's explicit
1.9.0 performance-gate exception and the local lane results. Regenerate the
CLI source identity after the platform commits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ThorFuchs ThorFuchs changed the title 1.9: store ID kinds, typed failures, optional batch reads, selectIndices 1.9: store refinements, selectIndices, macOS 15 / iOS 18 floor Nov 10, 2026
@ThorFuchs
ThorFuchs merged commit 199c3b5 into main Nov 10, 2026
20 checks passed
@ThorFuchs
ThorFuchs deleted the feat/1.9-api-refinements branch November 10, 2026 15:36
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