Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
qualification remains a release gate. No tag/publication follows this change.
- Correct native ISO-8601 calendar fields and strict Base64 unused padding bits.
See API migration guidance; no limits/profile weights or dependencies raised.
- Release failed Base64 scratch from logical retention while preserving consumed
work and terminal operational errors. Add 19 acceptance/conformance tests,
public mobile recovery checks and a focused debug/release/ASAN QA lane.


## 1.0.0 — 2026-10-11
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Architecture/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ order by default. Exact duplicates fail checked construction and parsing.
| `JSONObject.build(limits:_:)` | Exclusive noncopyable member accumulator; checks before append |
| `JSON.buildArray(limits:_:)` | Exclusive array accumulator; nested arrays remain one element |
| `append(contentsOf:)` on array accumulator | Explicit flattening with charged work |
| Object subscripts by String/JSONKey | Unmetered linear exact-key lookup; nil means absence |
| Object subscripts by String/JSONKey | Unmetered exact-key lookup using immutable metadata; nil means absence |
| `JSON.requiredMember(_:limits:)` | Bounded lookup; throws on wrong kind or missing member |
| `JSON.presence(of:limits:)` | Bounded lookup separating absent, null and non-null value |
| `JSONObject.presence(of:)` | Unmetered convenience with the same three states |
Expand Down
11 changes: 11 additions & 0 deletions Documentation/Architecture/Release1.1/IntegratedPerformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,14 @@ nine release samples after three warmups: median54.406542 ms and process peak RS
allocation or hard-RSS claims, and no matched mobile optimization comparison.
Physical iPad measurements remain blocked. Logical bytes, allocator observations,
process RSS and caller computation remain distinct.

The additional QA wave changes only Base64 failure cleanup in the runtime. Affected
public Data/payload paths have three matched, alternating release-native process
pairs (27 samples per source/workload, 100 invocations/sample). Valid Data medians
range from −1.28% to +4.98%; payload decoding is +1.16%, corruption recovery −0.09%.
Input hashes/work counters match; no new 10% timing trigger is crossed. The corrected
recovery ledger reports final live zero instead of 300 and peak 16 instead of 300.
This is truthful accounting of freed scratch, without an RSS/allocator improvement
claim. The unchanged index and twelve-workload dispositions above are retained.
The expanded physical QA harness has different work and cannot be compared with
the earlier phone median as a matched speed result. See [QA](QA.md).
80 changes: 64 additions & 16 deletions Documentation/Architecture/Release1.1/Progress.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,68 @@
{
"schema_version": 1,
"target_release": "1.1.0",
"milestone": "implementation, runtime qualification and reviewable candidate",
"tested_core_sha": "a48eb337b70eb075ce37c99dc3d150032f720d00",
"preserved_history": ["1.0.0", "W00-W12", "G01-G12", "RC01-RC08", "F01-F06", "J01-J04", "R0 turn 001"],
"root_function_counts": {"JSON":86,"JSONStreaming":11,"JSONSchema":38,"JSONRegexRuntime":12,"JSONPatch":9},
"root_function_total":156,
"parameterized_invocations":173,
"cap_probes":49,
"readme_examples":10,
"authored_public_docc_symbols":582,
"payload_fixtures":8,
"r5_matrix": {"macOS":"executed","iPhone_simulator":"executed","iPad_simulator":"executed","physical_iPhone":"executed","physical_iPad":"blocked; unavailable"},
"conditional_features": {"SIMD":"deferred","parallel_batches":"deferred","E11":"deferred","E12":"deferred"},
"evidence_policy":"Actual final native/safety/docs/mobile receipts and materialized Turn002 archive identify commands, source hashes, counts and limitations. Documentation-only successors map unchanged core/test inputs explicitly.",
"publication_performed":false,
"remaining_release_blockers":["Physical iPad smoke, disk persistence and release measurements for the agreed R5 matrix", "Complete maintainer review and protected PR integration before final release readiness"],
"performance_review":"IntegratedPerformance.md; unchanged 10% trigger, retain initial regression measurements and final accepted dispositions"
"milestone": "additional acceptance and conformance wave",
"tested_core_sha": "5d655f2beab569ac804890493bfafcf6045caabe",
"preserved_history": [
"1.0.0",
"W00-W12",
"G01-G12",
"RC01-RC08",
"F01-F06",
"J01-J04",
"R0 turn 001"
],
"root_function_counts": {
"JSON": 97,
"JSONStreaming": 14,
"JSONSchema": 41,
"JSONRegexRuntime": 12,
"JSONPatch": 11
},
"root_function_total": 175,
"parameterized_invocations": 173,
"cap_probes": 49,
"readme_examples": 10,
"authored_public_docc_symbols": 582,
"payload_fixtures": 8,
"r5_matrix": {
"macOS": "executed",
"iPhone_simulator": "executed",
"iPad_simulator": "executed",
"physical_iPhone": "executed",
"physical_iPad": "blocked; unavailable"
},
"conditional_features": {
"SIMD": "deferred",
"parallel_batches": "deferred",
"E11": "deferred",
"E12": "deferred"
},
"evidence_policy": "Turn003 materializes actual native/safety/QA/docs/SDK/simulator/iPhone receipts, raw measurements and reproducible source archive. Turn002 and original history remain immutable. Source bindings identify unchanged runtime bytes and expanded test cases.",
"publication_performed": false,
"remaining_release_blockers": [
"Physical iPad smoke, disk persistence and release measurements for the agreed R5 matrix",
"Complete maintainer review and protected PR integration before final release readiness"
],
"performance_review": "IntegratedPerformance.md; unchanged 10% trigger, retain initial regression measurements and final accepted dispositions",
"prior_milestones": [
{
"turn": 2,
"tested_core_sha": "a48eb337b70eb075ce37c99dc3d150032f720d00",
"root_function_total": 156,
"source_manifest_sha256": "2b69a683002eaa4e112bd005b3eb06e63dc8e06bfcd2b5c8485f076870f26797",
"return_sha256": "151ce56037763e1ca3d6d0439521020f34ca368ef77b50c31b8ef4e27fb282b6"
}
],
"qa_wave": {
"added_functions": 19,
"baseline_swift_test_files_retained": 48,
"scope": "QA.md",
"native_full": "passed on tested_core_sha",
"safety_full": "passed on tested_core_sha; TSAN5",
"mobile": "both SDKs/simulators/physical iPhone passed; iPad physical blocked",
"supplemental_boundary_review": "passed at e6eb46da346bee9892119fdc414abd7783e66b2c: 19 exact cases each in debug/release/ASAN",
"docs": "passed at e6eb46da346bee9892119fdc414abd7783e66b2c: four catalogues, 582 authored public symbols, 10 README examples; refresh final documentation successor",
"accounting_fix": "Failed Base64 scratch released; work/terminal health retained; caps/weights/version unchanged"
}
}
69 changes: 69 additions & 0 deletions Documentation/Architecture/Release1.1/QA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Additional 1.1 acceptance and conformance wave

The Turn003 wave adds 19 Swift Testing behavior functions to the 156-function
Turn002 candidate. Exact discovery is JSON97, Streaming14, Schema41, Regex12 and
Patch11: 175 functions, with all 173 prior parameterized invocations and all 48
earlier Swift test files retained. No independent policy exclusion is reclassified.

| Subject | Additional evidence |
| --- | --- |
| Exact transport | Fixed seed `0x534A1100A11CE001`, 192 documents across six root kinds; compact token bytes independently check native projection, Version 1 opening and native/Foundation JSON/property-list transport |
| Numeric projections | 772 integral spellings, independently checked signed/unsigned 8-bit ranges, including equivalent fractional/exponent spellings |
| Keys/index publication | Checked construction, accumulator, parser, edits and reusable scopes; actual member boundaries 7/8/9, 31/32/33, 63/64/65 and 127/128/129; ordered scalar-key oracle |
| Base64 | 259 canonical byte fixtures; 1,152 mutated unused-padding-bit cases; repeated caught corruption, prefix ownership, quota failure and in-loop cancellation |
| Scoped coding | Permanent ceilings after ordinary failure, prior unselected-text admission, caller-error scratch release and mapped Unicode UTF-8 byte coordinates |
| Payload budgets | Six roots, creation/opening work and live-retention inclusive/minus-one matrix; identical preserved bytes |
| Shared state | 16 workers ×20 openings/read scopes over shared immutable inputs; checked Sendable and five-case TSAN selection |
| Schema | Explicitly rooted definitions and negative cases; wide persisted instances/evaluated scalar locations, plan reuse after invalidity, cumulative regex search boundary |
| Patch | Ordered scalar-key edits and real 32→31→32 stages; cumulative quota refusal publishes no partial result |
| Streaming | Every byte split of a wide scalar-key/lexeme document and malformed duplicate; stable second-key location, terminal pulls, cancellation after three accepted sink bytes |

The first executed wave reproduced a logical-retention accounting defect: shared
Base64 decoding left partial scratch charged after ordinary corruption. A caller
catching that error could accumulate freed-byte reservations and later get a false
resource refusal. Decode now releases only its invocation's failed reservation.
Consumed work and terminal resource/cancellation state remain charged/latched;
successful Data ownership retains its prior accounting. This corrects Version 1
accounting without changing weights, caps, grammar or the public API. It is not an
allocator-memory leak or an RSS improvement claim. Original failure receipts remain.

A new projection test initially calibrated its limit using native rounded decoding
then added a larger exactness-proof operation. Its correction measures the same
complete operation on both sides. Compiler harness corrections use an explicit
JSONKey initializer and an actor-owned Sendable sink; no unsafe annotation or
compiler bypass is introduced. A separate review expanded generated field widths
to include actual member boundaries after adding the special keys.

Use `Scripts/ci.py --lane native`, `--lane safety`, `--lane docs` and the supplemental
`--lane qa` on the supported host. Full native execution retains JSONTestSuite
318 discovered/287 evaluated/31 policy and Schema2337/2300/37, 82 authored vectors,
nine budget vectors, 4,396 malformed replays, 31,824 regex cases/442 patterns and
18,853 Unicode cases/94,265 comparisons. All49 public cap outcomes remain required.
The rooted public consumer retains20 cases and distinct operational errors.

The public mobile harness additionally checks100 caught malformed Data projections
under32 logical bytes and wide indexed payload/Schema/Patch behavior. Both SDKs,
isolated iPhone/iPad simulators and the physical iPhone execute the updated harness;
disk save/reopen/update uses three independently exited processes and eight frozen
fixtures. Physical iPad qualification remains blocked. Simulator execution does
not establish physical-device performance.

The affected Base64 paths have three serial alternating release-native pairs,
each with3 warmups,9 samples and100 public invocations/sample, finite balanced caps,
matched input hashes and identical work. Across27 samples/side, valid decode
medians range from−1.28% to+4.98%; native payload decode is+1.16% and corruption
recovery−0.09%. No new10% timing trigger is crossed. Recovery's corrected logical
peak is16 rather than300, with final live0 rather than300; work remains506. Keep
raw variance/ranges and process-wide RSS separate from these logical counters.
The earlier wide-index and integrated streaming dispositions remain unchanged.

Physical iPhone14ProMax/iOS27.2 updated public QA measures9 release samples after3
warmups: median50.457167ms, process-wide peak25,133,056 bytes, thermal state0 at
both observations. This harness adds work relative to Turn002; the two medians
are not a matched speed comparison. SDK/UIKit/process costs are included.

Actual receipts, failed-source reproduction, raw samples, source bindings, clean
archive rebuilding and compiled catalogues are materialized in the local Turn003
return. Hosted Native job artifacts supply remote source/command receipts. This
wave does not merge the protected PR stack, qualify an MCP server, publish1.1,
select SIMD/parallel batches, or close the unavailable physical iPad gate.
26 changes: 26 additions & 0 deletions Documentation/Architecture/Release1.1/Review.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,29 @@ actual commands/source and nonzero counts. Source archives exclude private input
Git/build trees, signing profiles and device identifiers. Physical iPad remains
blocked; conditional SIMD/parallel batches stay deferred, with no unqualified
performance claim. No merge/tag/publication is implied by this review.

## Additional Turn003 review

The same implementing agent performed a separate source, fixture, receipt and
test-body review against parent `9e61f158`. This remains distinct from independent
human review or GitHub approval. Native/full safety ran at `5d655f2`; the reviewed
boundary additions ran through the exact 19-case debug/release/ASAN QA lane at
`e6eb46d`. All runtime library bytes are unchanged between those two stages.

- Medium: shared Base64 failure retained freed scratch in the logical ledger.
Preserve the 400 failed recovery assertions; restore only the failed decoder's
live reservation. Successful ownership, work and terminal health remain intact.
Full native/ASAN, quota/cancellation-prefix tests and a public 32-byte consumer
verify the correction. Three matched benchmark pairs retain identical work.
- Qualification: special keys added to generated widths obscured actual final
index boundaries. Expanded the corpus to actual 7/8/9, 31/32/33, 63/64/65 and
127/128/129 members; Patch now explicitly visits 32→31→32. All added cases pass
debug/release/ASAN without changing any prior test file or policy exclusion.
- Documentation: the API table still described direct object lookup as linear.
It now describes immutable exact-key metadata. README distinguishes released
1.0's historical stream regression from the candidate's separate +15.76% pair.

The final source binding, clean reproduction, actual catalogue outputs and hosted
CI receipts accompany the local Turn003 return. Both SDKs, both simulator families
and the updated physical iPhone public/disk harness pass. Physical iPad remains
blocked; protected integration and publication require separate maintainer action.
11 changes: 10 additions & 1 deletion Documentation/Qualification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,23 @@ and seven additional nonparameterized cases. The first production lookup increme
the independent runner adds nine budget/report vectors. There are three separate
JSON/JSONSchema consumer tests. All discoveries must be nonzero.

The current integrated 1.1 candidate checks exactly 156 root functions:
The Turn002 integrated 1.1 candidate checked exactly 156 root functions:
JSON 86, JSONStreaming 11, JSONSchema 38, JSONRegexRuntime 12 and JSONPatch 9.
All 173 parameterized invocations remain. The earlier counts above describe their
historical stages, not this source. Three additional public/mobile Swift Testing
functions exercise eight pinned payload fixtures and three independently exited
SwiftData disk phases. The seven-function R0 subset, all 49 cap probes, rooted
20-case consumer and independent policies retain their exact checks.

The additional QA wave adds 19 behavior functions, for exactly 175:
JSON 97, JSONStreaming 14, JSONSchema 41, JSONRegexRuntime 12 and JSONPatch 11.
All 48 earlier Swift test files and 173 parameterized invocations are retained.
The focused `python3 Scripts/ci.py --lane qa` checks exact counts 11/3/3/2 in
debug, release and Address Sanitizer. It supplements the full native/safety lanes
and does not replace independent qualification or any of the 49 cap probes.
Thread Sanitizer checks five shared-state cases, including concurrent payload
opening and separate read scopes over one immutable root. See [QA](../Architecture/Release1.1/QA.md).

| Independent input | Observed policy |
| --- | --- |
| JSONTestSuite, pinned in FixtureRegistry.json | 318 discovered: 101 accepted, 186 rejected, 31 strict/finite-policy rejections |
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,16 @@ documentation. Receipts record actual commands, toolchains, source hashes and ca
counts. Policy exclusions are reported separately from evaluated successes. See
[qualification](Documentation/Qualification/README.md) and [CI](Documentation/CI/README.md).

Performance is measured separately on native release builds. The current reviewed
Performance is measured separately on native release builds. The released 1.0
streaming comparison is approximately **11% slower**, exceeding the unchanged 10%
review trigger, with its accepted disposition and measurement limits documented in
[performance notes](Documentation/Performance/README.md). Logical retention remains
separate from process RSS. Scalar scanning and plan-local immutable regex sharing
are the qualified choices. Projection and JSON text-sequence framing remain deferred.
The 1.1 candidate's separate matched stream comparison is **15.76% slower**; its
[integrated review](Documentation/Architecture/Release1.1/IntegratedPerformance.md)
retains the accepted disposition. The [additional QA wave](Documentation/Architecture/Release1.1/QA.md)
records conformance coverage and the Base64 accounting correction.

## Contributing, support and licensing

Expand Down
12 changes: 9 additions & 3 deletions Scripts/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from preflight import collect

ROOT = pathlib.Path(__file__).resolve().parents[1]
SHARED_TESTS = 'independentCodecFacadesAndExactValuesCanBeSharedAcrossTasks|concurrentSchemaEvaluationsHaveExclusiveDynamicRegexAndAnnotationState|sharedRegexProgramHasExclusiveConcurrentSearchState|immutableIndexedObjectCanBeSharedAcrossTasks'
SHARED_TESTS = 'independentCodecFacadesAndExactValuesCanBeSharedAcrossTasks|concurrentSchemaEvaluationsHaveExclusiveDynamicRegexAndAnnotationState|sharedRegexProgramHasExclusiveConcurrentSearchState|immutableIndexedObjectCanBeSharedAcrossTasks|qaSharedPayloadAndRootHaveIndependentConcurrentReadScopes'
R0_TESTS = 'readerProbe|indexProbes|duplicateRecognitionPrecedesValueAndClosingSyntax'

def snapshot():
Expand All @@ -15,6 +15,12 @@ def snapshot():
def commands(lane, output):
# The qualification executable resolves output paths from its repository root.
output = output.relative_to(ROOT)
if lane == 'qa':
return [
['swift', 'test', '--filter', 'qa'],
['swift', 'test', '-c', 'release', '--filter', 'qa'],
['swift', 'test', '-c', 'release', '--sanitize', 'address', '--scratch-path', '.build/ci-address', '--filter', 'qa'],
]
if lane == 'native':
return [
['python3', '-B', 'Scripts/public_check.py'],
Expand Down Expand Up @@ -71,7 +77,7 @@ def check_result(command, code, log):
counts = [int(n) for n in re.findall(r'Test run with (\d+) tests? in[^\n]*passed', log)]
passed = code == 0
if command[:2] == ['swift', 'test']:
expected = [7] if R0_TESTS in command else [3] if 'Tools/MCPReadiness' in command or 'Tools/MobileQualification' in command else [1] if 'Tools/Qualification' in command else [1, 1, 2] if 'thread' in command else [9, 11, 12, 38, 86]
expected = [2, 3, 3, 11] if 'qa' in command else [7] if R0_TESTS in command else [3] if 'Tools/MCPReadiness' in command or 'Tools/MobileQualification' in command else [1] if 'Tools/Qualification' in command else [1, 1, 3] if 'thread' in command else [11, 12, 14, 41, 97]
passed = passed and sorted(counts) == expected
if 'Tools/Qualification' in command:
probes = re.findall(r'^CAP_PROBE (\w+) (\S+)$', log, re.MULTILINE)
Expand All @@ -89,7 +95,7 @@ def check_result(command, code, log):

def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--lane', choices=['native', 'safety', 'docs', 'r0'], required=True)
parser.add_argument('--lane', choices=['native', 'safety', 'docs', 'r0', 'qa'], required=True)
parser.add_argument('--output')
args = parser.parse_args()
output = ROOT / (args.output or '.build/ci/' + args.lane)
Expand Down
Loading