Skip to content

Commit ce816d2

Browse files
committed
Add bounded advanced filters and inherited compatibility qualification
1 parent bcb2a97 commit ce816d2

29 files changed

Lines changed: 4380 additions & 92 deletions

‎Documentation/Architecture/ExtractionManifest.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@
211211
"pdf": "Original invocation-owned lifecycle, finite adapter accounting and visible-range pagination using Apple SDK APIs. PDFKit is independent qualification only; no third-party renderer adapted."
212212
},
213213
"original_notes": [
214-
"1.4 C3 decimal magnitude, rational/quantization kernel, pull range and type-directed overloads are original Apache-2.0 code. The 738-case deterministic oracle uses Python integer/Fraction arithmetic; no jq/Rhoe arithmetic implementation was copied."
214+
"1.4 C3 decimal magnitude, rational/quantization kernel, pull range and type-directed overloads are original Apache-2.0 code. The 738-case deterministic oracle uses Python integer/Fraction arithmetic; no jq/Rhoe arithmetic implementation was copied.",
215+
"1.4 inherited CLI qualification fixtures are copied byte-for-byte: RhoePlatform/RhoeJSON pin 51d37acc137422065b07ebeb7e4ecdb2d02b99ee, 119 golden and 49 subset rows. Apache-2.0 license retained in Licenses/RhoeJSON-CLI-Fixtures-Apache-2.0.txt. PlanningDispositions labels are provisional, not evaluated successes. New explicit-stack CLI code is original; old eager JSONValue evaluator and arithmetic were not ported.",
216+
"1.4 C4 immutable IR/function/pattern metadata, invocation closures/thunks, continuations, scalar string and format helpers, root-provenance paths and transactional mutation are original Apache-2.0 code. No eager upstream evaluator, Foundation regex or approximate arithmetic was copied."
215217
]
216218
}

‎Documentation/Architecture/Release1.4/Acceptance.json‎

Lines changed: 74 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"schema": "swift-json-cli-acceptance/1",
33
"prepared": "2026-10-14",
4-
"implementation_status": "Foundation, query core and exact arithmetic milestones; C4/C5 integration remains unqualified",
4+
"implementation_status": "Advanced native filter milestone; complete final platform and C5 integration remain open",
55
"requirements": [
66
{
77
"id": "CL001",
@@ -843,13 +843,16 @@
843843
"title": "Reduce/foreach streams",
844844
"verification": "Last-update state, every foreach extraction, multiple inits, empty updates and actual evaluation order.",
845845
"obligation": "mandatory",
846-
"status": "not_run",
846+
"status": "passed",
847847
"evidence_required": true,
848848
"fixture_ids": [
849849
"reduce-last-update",
850850
"reduce-empty-update",
851851
"foreach-every-update",
852852
"reduce-multiple-inits"
853+
],
854+
"evidence": [
855+
"Documentation/Architecture/Release1.4/Advanced.md"
853856
]
854857
},
855858
{
@@ -858,12 +861,15 @@
858861
"title": "Lexical filter functions",
859862
"verification": "Filter/value parameters, arity/scopes, self-recursion, no forward refs and finite explicit frames.",
860863
"obligation": "mandatory",
861-
"status": "not_run",
864+
"status": "passed",
862865
"evidence_required": true,
863866
"fixture_ids": [
864867
"filter-parameter-code",
865868
"forward-definition-rejected",
866869
"recursive-definition"
870+
],
871+
"evidence": [
872+
"Documentation/Architecture/Release1.4/Advanced.md"
867873
]
868874
},
869875
{
@@ -872,11 +878,14 @@
872878
"title": "Loops/recurse/walk",
873879
"verification": "Correct order/null handling/parent-after-child behavior with bounded frames/work and no fixed hidden10k cap.",
874880
"obligation": "mandatory",
875-
"status": "not_run",
881+
"status": "passed",
876882
"evidence_required": true,
877883
"fixture_ids": [
878884
"walk-child-before-parent",
879885
"recurse-null-leaves"
886+
],
887+
"evidence": [
888+
"Documentation/Architecture/Release1.4/Advanced.md"
880889
]
881890
},
882891
{
@@ -885,14 +894,17 @@
885894
"title": "Typed try/catch/optional",
886895
"verification": "Catch only language errors; prior yields/handler streams correct; syntax/resource/cancel/IO never suppressed.",
887896
"obligation": "mandatory",
888-
"status": "not_run",
897+
"status": "passed",
889898
"evidence_required": true,
890899
"fixture_ids": [
891900
"input-eof-catch",
892901
"malformed-input-cannot-catch",
893902
"repeating-division-caught",
894903
"division-zero-caught",
895904
"try-prior-yield"
905+
],
906+
"evidence": [
907+
"Documentation/Architecture/Release1.4/Advanced.md"
896908
]
897909
},
898910
{
@@ -901,12 +913,15 @@
901913
"title": "Collection builtin inventory",
902914
"verification": "sort/group/unique/min/max/by forms, stable ties, multi-key generator lists, finite materialization.",
903915
"obligation": "mandatory",
904-
"status": "not_run",
916+
"status": "passed",
905917
"evidence_required": true,
906918
"fixture_ids": [
907919
"sort-exact-integers",
908920
"total-order",
909921
"group-scalar-distinct"
922+
],
923+
"evidence": [
924+
"Documentation/Architecture/Release1.4/Advanced.md"
910925
]
911926
},
912927
{
@@ -915,10 +930,13 @@
915930
"title": "Generator first/last/nth",
916931
"verification": "Correct pull/empty behavior and completion of remaining input; no hidden job early success.",
917932
"obligation": "mandatory",
918-
"status": "not_run",
933+
"status": "passed",
919934
"evidence_required": true,
920935
"fixture_ids": [
921936
"first-generator"
937+
],
938+
"evidence": [
939+
"Documentation/Architecture/Release1.4/Advanced.md"
922940
]
923941
},
924942
{
@@ -927,10 +945,13 @@
927945
"title": "Flatten/any/all",
928946
"verification": "Depth bounds, empty identities, short circuit and explicit deep traversal.",
929947
"obligation": "mandatory",
930-
"status": "not_run",
948+
"status": "passed",
931949
"evidence_required": true,
932950
"fixture_ids": [
933951
"all-any-empty"
952+
],
953+
"evidence": [
954+
"Documentation/Architecture/Release1.4/Advanced.md"
934955
]
935956
},
936957
{
@@ -939,11 +960,14 @@
939960
"title": "Literal string helpers",
940961
"verification": "Scalar contains/search/split/join/ASCII trim/case; empty patterns/type errors and bounded scan.",
941962
"obligation": "mandatory",
942-
"status": "not_run",
963+
"status": "passed",
943964
"evidence_required": true,
944965
"fixture_ids": [
945966
"split-empty-scalars",
946967
"index-empty-pattern"
968+
],
969+
"evidence": [
970+
"Documentation/Architecture/Release1.4/Advanced.md"
947971
]
948972
},
949973
{
@@ -952,13 +976,16 @@
952976
"title": "Conversions/explode/implode",
953977
"verification": "Strict tonumber, preserved tostring, non-BMP scalar ints, invalid surrogate/range/type rejection.",
954978
"obligation": "mandatory",
955-
"status": "not_run",
979+
"status": "passed",
956980
"evidence_required": true,
957981
"fixture_ids": [
958982
"explode-non-BMP",
959983
"implode-surrogate-rejected",
960984
"tonumber-exact",
961985
"tonumber-whitespace-rejected"
986+
],
987+
"evidence": [
988+
"Documentation/Architecture/Release1.4/Advanced.md"
962989
]
963990
},
964991
{
@@ -967,10 +994,13 @@
967994
"title": "Path enumeration/admission",
968995
"verification": "Exact segments, missing paths, generated paths, shape/domain restrictions and no Pointer conflation.",
969996
"obligation": "mandatory",
970-
"status": "not_run",
997+
"status": "passed",
971998
"evidence_required": true,
972999
"fixture_ids": [
9731000
"setpath-created-array"
1001+
],
1002+
"evidence": [
1003+
"Documentation/Architecture/Release1.4/Advanced.md"
9741004
]
9751005
},
9761006
{
@@ -979,12 +1009,15 @@
9791009
"title": "Assignment = versus |=",
9801010
"verification": "Original versus current-value RHS input; generator output, first update/empty delete semantics.",
9811011
"obligation": "mandatory",
982-
"status": "not_run",
1012+
"status": "passed",
9831013
"evidence_required": true,
9841014
"fixture_ids": [
9851015
"assignment-set-generator",
9861016
"assignment-update-first",
9871017
"assignment-update-delete"
1018+
],
1019+
"evidence": [
1020+
"Documentation/Architecture/Release1.4/Advanced.md"
9881021
]
9891022
},
9901023
{
@@ -993,10 +1026,13 @@
9931026
"title": "Transactional mutation/deletion",
9941027
"verification": "Stable array removals, deduplicated targets, overlap rejection and input unchanged on failure.",
9951028
"obligation": "mandatory",
996-
"status": "not_run",
1029+
"status": "passed",
9971030
"evidence_required": true,
9981031
"fixture_ids": [
9991032
"assignment-overlap-rejected"
1033+
],
1034+
"evidence": [
1035+
"Documentation/Architecture/Release1.4/Advanced.md"
10001036
]
10011037
},
10021038
{
@@ -1005,10 +1041,13 @@
10051041
"title": "Sparse path growth",
10061042
"verification": "setpath container creation/null fill bounded before allocation and overflow.",
10071043
"obligation": "mandatory",
1008-
"status": "not_run",
1044+
"status": "passed",
10091045
"evidence_required": true,
10101046
"fixture_ids": [
10111047
"sparse-growth-fails"
1048+
],
1049+
"evidence": [
1050+
"Documentation/Architecture/Release1.4/Advanced.md"
10121051
]
10131052
},
10141053
{
@@ -1017,11 +1056,14 @@
10171056
"title": "String interpolation streams",
10181057
"verification": "Cartesian holes/literal identity/empty hole; formatter holes only with no eager unbounded strings.",
10191058
"obligation": "mandatory",
1020-
"status": "not_run",
1059+
"status": "passed",
10211060
"evidence_required": true,
10221061
"fixture_ids": [
10231062
"interpolation-generators",
10241063
"interpolation-empty"
1064+
],
1065+
"evidence": [
1066+
"Documentation/Architecture/Release1.4/Advanced.md"
10251067
]
10261068
},
10271069
{
@@ -1030,11 +1072,14 @@
10301072
"title": "Bounded format encoders",
10311073
"verification": "All C4 formatters, strict base64/UTF8, flat CSV/TSV, percent/HTML/POSIX quoting; no shell execution.",
10321074
"obligation": "mandatory",
1033-
"status": "not_run",
1075+
"status": "passed",
10341076
"evidence_required": true,
10351077
"fixture_ids": [
10361078
"format-html",
10371079
"format-base64"
1080+
],
1081+
"evidence": [
1082+
"Documentation/Architecture/Release1.4/Advanced.md"
10381083
]
10391084
},
10401085
{
@@ -1043,10 +1088,13 @@
10431088
"title": "Regex deferral",
10441089
"verification": "Compile-time unavailable diagnostics; no ICU/ECMA substitutions or compatibility claim.",
10451090
"obligation": "mandatory",
1046-
"status": "not_run",
1091+
"status": "passed",
10471092
"evidence_required": true,
10481093
"fixture_ids": [
10491094
"regex-not-advertised"
1095+
],
1096+
"evidence": [
1097+
"Documentation/Architecture/Release1.4/Advanced.md"
10501098
]
10511099
},
10521100
{
@@ -1055,11 +1103,14 @@
10551103
"title": "Other exclusions",
10561104
"verification": "Modules/seq/jq-stream/dates/env/halt/remote/server/converters rejected or absent from truthful help.",
10571105
"obligation": "mandatory",
1058-
"status": "not_run",
1106+
"status": "passed",
10591107
"evidence_required": true,
10601108
"fixture_ids": [
10611109
"numeric-transcendental-deferred",
10621110
"env-not-available"
1111+
],
1112+
"evidence": [
1113+
"Documentation/Architecture/Release1.4/Advanced.md"
10631114
]
10641115
},
10651116
{
@@ -1068,9 +1119,12 @@
10681119
"title": "Every inherited fixture disposition",
10691120
"verification": "119+49 originals retained, actual per-row status/reason/gate/claim, exclusions separated from successes.",
10701121
"obligation": "mandatory",
1071-
"status": "not_run",
1122+
"status": "passed",
10721123
"evidence_required": true,
1073-
"fixture_ids": []
1124+
"fixture_ids": [],
1125+
"evidence": [
1126+
"Documentation/Architecture/Release1.4/Advanced.md"
1127+
]
10741128
},
10751129
{
10761130
"id": "CL074",
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Advanced filter execution
2+
3+
C4 builds on exact arithmetic 10e585d / draft PR #25. The flat immutable plan now
4+
contains lexical function metadata and destructuring patterns. Definitions see
5+
earlier definitions and themselves; forward definitions and same-scope duplicate
6+
signatures fail compilation. Invocation-owned closures capture declaration-time
7+
environments. Filter arguments are code thunks evaluated on the callee input;
8+
value parameters use explicit binding desugaring. Recursion uses arena frames,
9+
not Swift call-stack recursion. Mutable closures/thunks are never shared as Sendable.
10+
11+
Reduce consumes every update result and carries the last; an empty update becomes
12+
null. Foreach extracts each update and carries its last. Independent initialization
13+
results remain ordered. While/until/recurse/walk use explicit continuations, with
14+
finite frames, work and cancellation. Walk reconstructs children before transforming
15+
the parent, preserving exact object keys; array child generators retain all values,
16+
object updates select first/delete empty according to update semantics.
17+
18+
Collections use stable bounded merge sorting and full lexicographic key-result lists.
19+
First stops its generator, last consumes it, and nth scans once, retaining only requested
20+
results in argument order. Any/all short circuit and use empty false/true identities.
21+
Flatten and recursive containment use explicit bounded stacks. Literal strings compare,
22+
count, slice and match by decoded Unicode scalars. No regex engine is a fallback.
23+
24+
Interpolation uses explicit lexer jobs, strict native literal decoding and bounded
25+
Cartesian construction. Formatted interpolation encodes holes while preserving literal
26+
text. Text/JSON/HTML/URI/CSV/TSV/POSIX shell quoting/base64 encoders are owned bounded
27+
code; shell output is inert text. Base64 enforces canonical padding bits and strict
28+
UTF-8, rejecting replacement decoding. Tonumber accepts one exact strict number token.
29+
30+
Assignable values carry invocation-root path provenance. Computed values cannot become
31+
addresses. Path arrays use exact string/integral-number segments, separately from Pointer
32+
text escaping. Setpath preflights array gaps before allocating; null can create a container
33+
but wrong non-null kinds remain errors. Assignment stages targets before RHS effects,
34+
deduplicates exact normalized paths, rejects parent/child overlaps, and emits complete
35+
candidates only. Update takes first RHS/delete empty. Deletions order original array
36+
indices descending at their first diverging segment, including nested targets.
37+
38+
All 38 authored C4 vectors pass. The 119+49 inherited files remain byte-identical:
39+
154 evaluated successes and 14 explicit policy rejections; no policy row is an evaluated
40+
success. The pinned jq 1.8.2 arm64 oracle SHA-256 is
41+
2d75340ba57a4b4b4c8708a21c2dc8e958a48aaa8bba13b27f77f6e4c0eca07e.
42+
Golden SHA-256 c8d1df9cd20754eec4fdb7605cdfafa636eafade19067463809f3e7627ab93ee;
43+
subset e6839542d49ccb3f9119cde5ccd0035036fd1ccb54a1d4da2a2cee21aa0201ab.
44+
Planning labels remain context, not qualification. Exact expected tokens are loaded with
45+
an integer/decimal-token-preserving fixture codec, never a floating arithmetic oracle.
46+
47+
Review tests verify zero live storage/counters after scopes and terminal failures,
48+
configured frame recursion, cancellation after actual loop work and malformed source
49+
replay. They exposed and corrected: walk's transform continuation; interpolation's
50+
closing-string transition; assignment scratch double ownership; and a charge calculated
51+
before queued collection refunds drained. The last now checkpoints before calculating
52+
next usage, preventing refunded capacity from being restored. Failed receipts/logs remain
53+
retained. Full native/safety/docs and clean-source integration remain required.
54+
55+
The full native pre-review lane passed 23 commands at source manifest
56+
`aa742411f3d22bc82c681b03944c12772ad52e41b3773269b0d84b9d4e3a2cbc`: debug/release and ASan 291 functions/199 parameter cases, TSan eight shared-state functions, strict-memory warnings zero, five DocC catalogues, existing 49 public probes and pinned suites. A separate source review then reproduced a reduction followed by a parenthesized outer pipe being misclassified. Whole-span recognition and reduce/foreach regressions correct that case; subsequent targeted and hosted checks bind the revised source.
57+
58+
Matched Swift6.4 wasm32 private arithmetic consumer runs passed 738 exact integer/rational cases in WasmKit0.3.1 and Node26.5.0. This is kernel evidence only: the CLI build fails at the unavailable Glibc adapter and has no WASI executable qualification. Five selected library consumers compiled for iPhoneOS and iPhoneSimulator SDK27.2 without the CLI target. The offline slow-sink 2,000/20,000-record observations retain roughly66.5KB logically; process RSS was not measured in that probe.

0 commit comments

Comments
 (0)