commit 98f06f8e75491578458723d6812d6c4134f46c6c parent 180995da1577e851a1269b73a3945e0478455d14 Author: James Eversole <james@eversole.co> Date: Mon, 19 Oct 2026 21:41:35 -0500 Automatically interpret inline values and retire scalar record output Default definition cards to Auto: prefer readable text, naturals, decoded text/natural lists, Boolean, bytes, then tree source. Label the selected interpretation, preserve manual choices across recompilation, and keep glyph clicks as open/close toggles. Remove the scalar record codec from both browser runtimes, UI, preparation presets, redundant fixture projections, and dedicated tests. Preserve executable pins and complete native tree goldens; use ordinary tricu projections for parser/lexer edit checks. Add bounded decoded lists with exact large naturals. Validation: nix flake check; generated JS parity; 134 Node tests; Chromium/Firefox probes on Haskell and Zig, narrow layouts, IDE regression suite, all sixteen module goldens on both runtimes; 96 independently reconstructed practical/parser/lexer expected trees. Retained environment bundle identity is unchanged. Diffstat:
36 files changed, 410 insertions(+), 863 deletions(-)
diff --git a/ext/demo-site/README.md b/ext/demo-site/README.md @@ -323,7 +323,7 @@ The Published packages group also contains these `0.1.0` and `0.1.1` interfaces: **Parser combinators** under Examples is the separate `parser-demo` package. Try `"red,green,blue"`, `"red,,blue"`, `"red,"` or `"red green"`. `parseNames` requires complete input; `parsePrefix` exposes any unconsumed suffix. A comma -commits to another lowercase name. Scalar records show the expected label, +commits to another lowercase name. The result tree contains the expected label, remaining input, consumption and commitment, or the accepted names/count. The source is editable in place. Its manifest-pinned imports use the same native header/resolver path as other browser modules. Try changing the lowercase range @@ -331,7 +331,7 @@ to `65 90` to parse uppercase names, or edit a diagnostic label. **Located lexer scans** under Examples is the separate `lexer-demo` package. `scanWord` scans a lowercase ASCII prefix; `scanWhitespace` scans spaces, LF and -TAB. Records show matched text, remaining input, end line/column, character offset +TAB. Result trees contain matched text, remaining input, end line/column, character offset and whether anything was consumed. Try `"hello,world"`, `"abcé"` and whitespace containing a newline/tab. Empty prefixes succeed without consuming anything; these scans return the matching prefix and remaining input. The source is editable: change a @@ -359,7 +359,7 @@ shipped stable builder and pinned native dependency interfaces. Acceptance inclu native builds through the published builder (a local dependency succeeds; a missing dependency fails without emitting a bundle), arithmetic and malformed-byte controls, predicate dispatch/early-stop folds, real formatter cases, and independent -complete parser/lexer records. Publication and a clean indexed import must agree +complete parser/lexer result trees. Publication and a clean indexed import must agree on every manifest before staging. Ordinary packages must fit the browser's 16 MiB/100,000-node input bounds. @@ -486,8 +486,8 @@ Partial and multiple applications are ordinary left-folded Tree Calculus applica The Basic Examples use expression input and the current result interpretations; historical package releases retain their original content. -Value interpretations include text, natural number, Boolean, bytes and scalar -record. `t` can represent zero, false or an empty string/list; interpretation is +Value interpretations include text, natural number, Boolean, bytes and a bounded +list of text/natural values. `t` can represent zero, false or an empty string/list; interpretation is explicit, not inferred. Former tree/list graph-JSON presets now select tricu tree source. The internal bounded graph previews remain available to conformance harnesses, not as a public editor output. @@ -511,18 +511,6 @@ payloads. This narrower profile is not the full Haskell driver/error protocol. The bundle capability list must currently be empty, matching the existing format/profile; that list does not identify which exports produce IO trees. -### Scalar record wire convention - -The generic **Scalar record** result codec renders ordinary tree data as a JSON -object. Wire value: a list of three-item lists `[name tag value]`, with tag 0 for -scalar text, 1 for a safe natural integer, 2 for a canonical Boolean. It is an -explicit DTO convention. Names are unique, nonempty text (128 scalars); at most -32 fields, text values 4096 scalars, aggregate -output 16,384 scalars. Numeric values must be <= JavaScript's safe-integer maximum. -Malformed fields, duplicate names, unknown tags, and invalid scalar values fail -closed. A null-prototype dictionary handles keys such as `__proto__` as data. -Tree source and DAG interpretations expose the actual representation. - ## Export stored definitions Choose **Output → Stored definition**, select a definition and tree @@ -1427,15 +1415,39 @@ TEST_IDE=1 ARBORICX_SITE_ROOT="$SITE" nix shell --inputs-from . nixpkgs#nodejs n ### Inline definition inspection and library discovery -The source gutter's **▶** opens an anchored compiled-definition card. Its -interpretation selector observes the existing binding directly; it never compiles +The source gutter's **▶** toggles an anchored compiled-definition card. Opening +starts with **Auto**, preferring readable text, a natural number, a decoded list +of text/naturals, a Boolean, bytes, then tricu tree source. The status names the +chosen interpretation (for example **Auto → Text**); this is a display heuristic, +not type inference. An empty tree defaults to natural zero. Readable text allows +Unicode letters/marks/numbers/punctuation/symbols/spaces, TAB/LF/CR, and joining +characters, but excludes other controls, private-use and unassigned scalars. +Manual Text still accepts any valid Unicode scalar string. A manual selection +remains selected while the open card refreshes after compilation; reopening uses +Auto again. Both the inspector and evaluator offer **List · text / numbers**: +at most 32 elements, each read as nonempty readable text or a natural, preserving +up to 4,096 natural bits without JS number conversion. Empty elements become zero. +The existing text limit is 4,096 scalars per decoded string. Unsupported list +items fail rather than showing a partial list. + +The interpretation selector observes the existing binding directly; it never compiles an expression, applies arguments, or runs the IO interpreter. Both runtime adapters provide `inspectDefinition`, including private bindings in locally compiled module scope. Published bundles contain only public roots. Observation can reduce or diverge, and Stop terminates the owning Worker. Decoder failures preserve the scope; fatal failures discard it. Source revisions invalidate inline output, and successful compilation refreshes an open card. The separate evaluation panel and -its output/provenance are not changed by inline inspection. +its output/provenance are not changed by inline inspection. Auto tries bounded +decoders sequentially on the same retained binding, without applying arguments. +Reduction itself has no time/fuel ceiling: a decoder can diverge, in which case +Stop discards the Worker rather than guaranteeing a fallback to the next view. + +There is no scalar-object result codec. Practical/parser/lexer demo reports remain +ordinary program data, shown as tree source by default. Their authenticated +bundles and complete independent native tree goldens retain their identities; +only presentation presets changed. Native preparation still checks every report +against independently constructed expected trees. Parser/lexer edit checks use +ordinary tricu projections with Text, not a host schema-specific decoder. **Explore libraries…** is available in the toolbar with or without source. It separates library and definition matches, offers clickable exports and existing diff --git a/ext/demo-site/catalogue.json b/ext/demo-site/catalogue.json @@ -486,7 +486,7 @@ "value": "1500" } ], - "output": "record", + "output": "tricu", "mode": "pure", "presets": { "v1": { @@ -504,7 +504,7 @@ "value": "1500" } ], - "output": "record", + "output": "tricu", "mode": "pure" }, "v2": { @@ -522,7 +522,7 @@ "value": "1500" } ], - "output": "record", + "output": "tricu", "mode": "pure" } }, @@ -555,7 +555,7 @@ ] } ], - "output": "record", + "output": "tricu", "mode": "pure", "presets": { "vendorA": { @@ -578,7 +578,7 @@ ] } ], - "output": "record", + "output": "tricu", "mode": "pure" }, "vendorB": { @@ -601,7 +601,7 @@ ] } ], - "output": "record", + "output": "tricu", "mode": "pure" } }, @@ -633,7 +633,7 @@ "value": true } ], - "output": "record", + "output": "tricu", "mode": "pure", "presets": { "main": { @@ -655,7 +655,7 @@ "value": true } ], - "output": "record", + "output": "tricu", "mode": "pure" } }, @@ -684,7 +684,7 @@ ] } ], - "output": "record", + "output": "tricu", "mode": "pure", "presets": { "v1": { @@ -703,7 +703,7 @@ ] } ], - "output": "record", + "output": "tricu", "mode": "pure" }, "v2": { @@ -722,7 +722,7 @@ ] } ], - "output": "record", + "output": "tricu", "mode": "pure" } }, @@ -744,7 +744,7 @@ "value": "red,green,blue" } ], - "output": "record", + "output": "tricu", "mode": "pure", "presets": { "parseNames": { @@ -754,7 +754,7 @@ "value": "red,green,blue" } ], - "output": "record", + "output": "tricu", "mode": "pure" }, "parsePrefix": { @@ -764,7 +764,7 @@ "value": "red,green,blue" } ], - "output": "record", + "output": "tricu", "mode": "pure" } } @@ -785,7 +785,7 @@ "value": "hello,world" } ], - "output": "record", + "output": "tricu", "mode": "pure", "presets": { "scanWord": { @@ -795,7 +795,7 @@ "value": "hello,world" } ], - "output": "record", + "output": "tricu", "mode": "pure" }, "scanWhitespace": { @@ -805,7 +805,7 @@ "value": " \n\tword" } ], - "output": "record", + "output": "tricu", "mode": "pure" } } diff --git a/ext/demo-site/demos.json b/ext/demo-site/demos.json @@ -868,13 +868,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220202020210210210022102102102102021021002202021021020210210022102020210202102100221021020202021021002210202021021021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002210002222020210202021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002202102102102021021002210202020202102100220202102021021021002210202021020210210022102102102102021021002202102102102021021000202220202102020210210022102102102102021021002210202102102021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002210210202020210210000222210210202021021021002202020210202102100221020202102021021002202020202102102100220202020210210210022102020210202102100220210210210202102100221021021020202102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002000", - "record": { - "status": "ok", - "policyVersion": 1, - "destination": "domestic", - "shippingCents": 0 - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220202020210210210022102102102102021021002202021021020210210022102020210202102100221021020202021021002210202021021021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002210002222020210202021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002202102102102021021002210202020202102100220202102021021021002210202021020210210022102102102102021021002202102102102021021000202220202102020210210022102102102102021021002210202102102021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002210210202020210210000222210210202021021021002202020210202102100221020202102021021002202020202102102100220202020210210210022102020210202102100220210210210202102100221021021020202102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002000" }, { "export": "v1", @@ -885,13 +879,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221021021021020210210022102102021020210210000222202020202102102100221021021021020210210022020210210202102100221020202102021021002210210202020210210022102020210210210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022100022220202102020210210022102021020202102100221021020202102102100220202102021021021002210202021020210210022021021021020210210022102020202021021002202021020210210210022102020210202102100221021021021020210210022021021021020210210002022202021020202102100221021021021020210210022102021021020210210022102021020202102100221021020202102102100220202102021021021002210202021020210210022102102020202102100002222102102020210210210022020202102021021002210202021020210210022020202021021021002202020202102102100221020202102021021002202102102102021021002210210210202021021002210210202020202100221020210202021021002202102102102021021002202021020210210210022102102020210210210002210022102102020210210210210210000", - "record": { - "status": "ok", - "policyVersion": 1, - "destination": "domestic", - "shippingCents": 499 - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221021021021020210210022102102021020210210000222202020202102102100221021021021020210210022020210210202102100221020202102021021002210210202020210210022102020210210210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022100022220202102020210210022102021020202102100221021020202102102100220202102021021021002210202021020210210022021021021020210210022102020202021021002202021020210210210022102020210202102100221021021021020210210022021021021020210210002022202021020202102100221021021021020210210022102021021020210210022102021020202102100221021020202102102100220202102021021021002210202021020210210022102102020202102100002222102102020210210210022020202102021021002210202021020210210022020202021021021002202020202102102100221020202102021021002202102102102021021002210210210202021021002210210202020202100221020210202021021002202102102102021021002202021020210210210022102102020210210210002210022102102020210210210210210000" }, { "export": "v1", @@ -902,13 +890,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220202020210210210022102102102102021021002202021021020210210022102020210202102100221021020202021021002210202021021021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002210002222020210202021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002202102102102021021002210202020202102100220202102021021021002210202021020210210022102102102102021021002202102102102021021000202220202102020210210022102102102102021021002210202102102021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002210210202020210210000222210210202021021021002202020210202102100221020202102021021002202020202102102100220202020210210210022102020210202102100220210210210202102100221021021020202102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002000", - "record": { - "status": "ok", - "policyVersion": 1, - "destination": "domestic", - "shippingCents": 0 - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220202020210210210022102102102102021021002202021021020210210022102020210202102100221021020202021021002210202021021021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002210002222020210202021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002202102102102021021002210202020202102100220202102021021021002210202021020210210022102102102102021021002202102102102021021000202220202102020210210022102102102102021021002210202102102021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002210210202020210210000222210210202021021021002202020210202102100221020202102021021002202020202102102100220202020210210210022102020210202102100220210210210202102100221021021020202102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002000" }, { "export": "v1", @@ -919,13 +901,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220202020210210210022102102102102021021002202021021020210210022102020210202102100221021020202021021002210202021021021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002210002222020210202021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002202102102102021021002210202020202102100220202102021021021002210202021020210210022102102102102021021002202102102102021021000202220202102020210210022102102102102021021002210202102102021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002210210202020210210000222210210202021021021002202020210202102100221020202102021021002202020202102102100220202020210210210022102020210202102100220210210210202102100221021021020202102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002000", - "record": { - "status": "ok", - "policyVersion": 1, - "destination": "domestic", - "shippingCents": 0 - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220202020210210210022102102102102021021002202021021020210210022102020210202102100221021020202021021002210202021021021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002210002222020210202021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002202102102102021021002210202020202102100220202102021021021002210202021020210210022102102102102021021002202102102102021021000202220202102020210210022102102102102021021002210202102102021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002210210202020210210000222210210202021021021002202020210202102100221020202102021021002202020202102102100220202020210210210022102020210202102100220210210210202102100221021021020202102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002000" }, { "export": "v1", @@ -936,13 +912,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221021021021020210210022102102021020210210000222202020202102102100221021021021020210210022020210210202102100221020202102021021002210210202020210210022102020210210210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022100022220202102020210210022102021020202102100221021020202102102100220202102021021021002210202021020210210022021021021020210210022102020202021021002202021020210210210022102020210202102100221021021021020210210022021021021020210210002022202102020210210210022102021020202102100221021021020202102100221020202102021021002210210210210202102100220210210210202102100221020202020210210022020210210202102100002222102102020210210210022020202102021021002210202021020210210022020202021021021002202020202102102100221020202102021021002202102102102021021002210210210202021021002210210202020202100221020210202021021002202102102102021021002202021020210210210022102102020210210210002210022102102102020210210210210210000", - "record": { - "status": "ok", - "policyVersion": 1, - "destination": "regional", - "shippingCents": 999 - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221021021021020210210022102102021020210210000222202020202102102100221021021021020210210022020210210202102100221020202102021021002210210202020210210022102020210210210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022100022220202102020210210022102021020202102100221021020202102102100220202102021021021002210202021020210210022021021021020210210022102020202021021002202021020210210210022102020210202102100221021021021020210210022021021021020210210002022202102020210210210022102021020202102100221021021020202102100221020202102021021002210210210210202102100220210210210202102100221020202020210210022020210210202102100002222102102020210210210022020202102021021002210202021020210210022020202021021021002202020202102102100221020202102021021002202102102102021021002210210210202021021002210210202020202100221020210202021021002202102102102021021002202021020210210210022102102020210210210002210022102102102020210210210210210000" }, { "export": "v1", @@ -953,13 +923,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220202020210210210022102102102102021021002202021021020210210022102020210202102100221021020202021021002210202021021021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002210002222020210202021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002202102102102021021002210202020202102100220202102021021021002210202021020210210022102102102102021021002202102102102021021000202221020202102021021002202102102102021021002202021020210210210022102021020202102100220210202021021021002202102102102021021002210202020202102100220202102021021021002210202021020210210022102102102102021021002202102102102021021002210202020202102100220202102102021021000022221021020202102102100220202021020210210022102020210202102100220202020210210210022020202021021021002210202021020210210022021021021020210210022102102102020210210022102102020202021002210202102020210210022021021021020210210022020210202102102100221021020202102102100022100221020202102020210210202020210000", - "record": { - "status": "ok", - "policyVersion": 1, - "destination": "international", - "shippingCents": 2249 - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220202020210210210022102102102102021021002202021021020210210022102020210202102100221021020202021021002210202021021021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002210002222020210202021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002202102102102021021002210202020202102100220202102021021021002210202021020210210022102102102102021021002202102102102021021000202221020202102021021002202102102102021021002202021020210210210022102021020202102100220210202021021021002202102102102021021002210202020202102100220202102021021021002210202021020210210022102102102102021021002202102102102021021002210202020202102100220202102102021021000022221021020202102102100220202021020210210022102020210202102100220202020210210210022020202021021021002210202021020210210022021021021020210210022102102102020210210022102102020202021002210202102020210210022021021021020210210022020210202102102100221021020202102102100022100221020202102020210210202020210000" }, { "export": "v2", @@ -970,13 +934,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220202020210210210022102102102102021021002202021021020210210022102020210202102100221021020202021021002210202021021021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002202100022220202102020210210022102021020202102100221021020202102102100220202102021021021002210202021020210210022021021021020210210022102020202021021002202021020210210210022102020210202102100221021021021020210210022021021021020210210002022202021020202102100221021021021020210210022102021021020210210022102021020202102100221021020202102102100220202102021021021002210202021020210210022102102020202102100002222102102020210210210022020202102021021002210202021020210210022020202021021021002202020202102102100221020202102021021002202102102102021021002210210210202021021002210210202020202100221020210202021021002202102102102021021002202021020210210210022102102020210210210002210022102020202102021020210210000", - "record": { - "status": "ok", - "policyVersion": 2, - "destination": "domestic", - "shippingCents": 849 - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220202020210210210022102102102102021021002202021021020210210022102020210202102100221021020202021021002210202021021021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002202100022220202102020210210022102021020202102100221021020202102102100220202102021021021002210202021020210210022021021021020210210022102020202021021002202021020210210210022102020210202102100221021021021020210210022021021021020210210002022202021020202102100221021021021020210210022102021021020210210022102021020202102100221021020202102102100220202102021021021002210202021020210210022102102020202102100002222102102020210210210022020202102021021002210202021020210210022020202021021021002202020202102102100221020202102021021002202102102102021021002210210210202021021002210210202020202100221020210202021021002202102102102021021002202021020210210210022102102020210210210002210022102020202102021020210210000" }, { "export": "v2", @@ -987,13 +945,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221021021021020210210022102102021020210210000222202020202102102100221021021021020210210022020210210202102100221020202102021021002210210202020210210022102020210210210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022021000222202021020202102100221020210202021021002210210202021021021002202021020210210210022102020210202102100220210210210202102100221020202020210210022020210202102102100221020202102021021002210210210210202102100220210210210202102100020222020210202021021002210210210210202102100221020210210202102100221020210202021021002210210202021021021002202021020210210210022102020210202102100221021020202021021000022221021020202102102100220202021020210210022102020210202102100220202020210210210022020202021021021002210202021020210210022021021021020210210022102102102020210210022102102020202021002210202102020210210022021021021020210210022020210202102102100221021020202102102100022100221021021020210202102020210000", - "record": { - "status": "ok", - "policyVersion": 2, - "destination": "domestic", - "shippingCents": 599 - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221021021021020210210022102102021020210210000222202020202102102100221021021021020210210022020210210202102100221020202102021021002210210202020210210022102020210210210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022021000222202021020202102100221020210202021021002210210202021021021002202021020210210210022102020210202102100220210210210202102100221020202020210210022020210202102102100221020202102021021002210210210210202102100220210210210202102100020222020210202021021002210210210210202102100221020210210202102100221020210202021021002210210202021021021002202021020210210210022102020210202102100221021020202021021000022221021020202102102100220202021020210210022102020210202102100220202020210210210022020202021021021002210202021020210210022021021021020210210022102102102020210210022102102020202021002210202102020210210022021021021020210210022020210202102102100221021020202102102100022100221021021020210202102020210000" }, { "export": "v2", @@ -1004,13 +956,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220202020210210210022102102102102021021002202021021020210210022102020210202102100221021020202021021002210202021021021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002202100022220202102020210210022102021020202102100221021020202102102100220202102021021021002210202021020210210022021021021020210210022102020202021021002202021020210210210022102020210202102100221021021021020210210022021021021020210210002022202021020202102100221021021021020210210022102021021020210210022102021020202102100221021020202102102100220202102021021021002210202021020210210022102102020202102100002222102102020210210210022020202102021021002210202021020210210022020202021021021002202020202102102100221020202102021021002202102102102021021002210210210202021021002210210202020202100221020210202021021002202102102102021021002202021020210210210022102102020210210210002210022102020202102021020210210000", - "record": { - "status": "ok", - "policyVersion": 2, - "destination": "domestic", - "shippingCents": 849 - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220202020210210210022102102102102021021002202021021020210210022102020210202102100221021020202021021002210202021021021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002202100022220202102020210210022102021020202102100221021020202102102100220202102021021021002210202021020210210022021021021020210210022102020202021021002202021020210210210022102020210202102100221021021021020210210022021021021020210210002022202021020202102100221021021021020210210022102021021020210210022102021020202102100221021020202102102100220202102021021021002210202021020210210022102102020202102100002222102102020210210210022020202102021021002210202021020210210022020202021021021002202020202102102100221020202102021021002202102102102021021002210210210202021021002210210202020202100221020210202021021002202102102102021021002202021020210210210022102102020210210210002210022102020202102021020210210000" }, { "export": "v2", @@ -1021,13 +967,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210210210210202102100221021020210202102100002222020202021021021002210210210210202102100220202102102021021002210202021020210210022102102020202102100221020202102102102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100220210002222020210202021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002202102102102021021002210202020202102100220202102021021021002210202021020210210022102102102102021021002202102102102021021000202220202102020210210022102102102102021021002210202102102021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002210210202020210210000222210210202021021021002202020210202102100221020202102021021002202020202102102100220202020210210210022102020210202102100220210210210202102100221021021020202102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002000", - "record": { - "status": "ok", - "policyVersion": 2, - "destination": "domestic", - "shippingCents": 0 - } + "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210210210210202102100221021020210202102100002222020202021021021002210210210210202102100220202102102021021002210202021020210210022102102020202102100221020202102102102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100220210002222020210202021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002202102102102021021002210202020202102100220202102021021021002210202021020210210022102102102102021021002202102102102021021000202220202102020210210022102102102102021021002210202102102021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002210210202020210210000222210210202021021021002202020210202102100221020202102021021002202020202102102100220202020210210210022102020210202102100220210210210202102100221021021020202102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002000" }, { "export": "v2", @@ -1038,13 +978,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220202020210210210022102102102102021021002202021021020210210022102020210202102100221021020202021021002210202021021021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002202100022220202102020210210022102021020202102100221021020202102102100220202102021021021002210202021020210210022021021021020210210022102020202021021002202021020210210210022102020210202102100221021021021020210210022021021021020210210002022202102020210210210022102021020202102100221021021020202102100221020202102021021002210210210210202102100220210210210202102100221020202020210210022020210210202102100002222102102020210210210022020202102021021002210202021020210210022020202021021021002202020202102102100221020202102021021002202102102102021021002210210210202021021002210210202020202100221020210202021021002202102102102021021002202021020210210210022102102020210210210002210022102102102020210210210210210000", - "record": { - "status": "ok", - "policyVersion": 2, - "destination": "regional", - "shippingCents": 999 - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220202020210210210022102102102102021021002202021021020210210022102020210202102100221021020202021021002210202021021021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002202100022220202102020210210022102021020202102100221021020202102102100220202102021021021002210202021020210210022021021021020210210022102020202021021002202021020210210210022102020210202102100221021021021020210210022021021021020210210002022202102020210210210022102021020202102100221021021020202102100221020202102021021002210210210210202102100220210210210202102100221020202020210210022020210210202102100002222102102020210210210022020202102021021002210202021020210210022020202021021021002202020202102102100221020202102021021002202102102102021021002210210210202021021002210210202020202100221020210202021021002202102102102021021002202021020210210210022102102020210210210002210022102102102020210210210210210000" }, { "export": "v2", @@ -1055,13 +989,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210210210210202102100221021020210202102100002222020202021021021002210210210210202102100220202102102021021002210202021020210210022102102020202102100221020202102102102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100220210002222020210202021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002202102102102021021002210202020202102100220202102021021021002210202021020210210022102102102102021021002202102102102021021000202221020202102021021002202102102102021021002202021020210210210022102021020202102100220210202021021021002202102102102021021002210202020202102100220202102021021021002210202021020210210022102102102102021021002202102102102021021002210202020202102100220202102102021021000022221021020202102102100220202021020210210022102020210202102100220202020210210210022020202021021021002210202021020210210022021021021020210210022102102102020210210022102102020202021002210202102020210210022021021021020210210022020210202102102100221021020202102102100022100221020202102020210210202020210000", - "record": { - "status": "ok", - "policyVersion": 2, - "destination": "international", - "shippingCents": 2249 - } + "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210210210210202102100221021020210202102100002222020202021021021002210210210210202102100220202102102021021002210202021020210210022102102020202102100221020202102102102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100220210002222020210202021021002210202102020210210022102102020210210210022020210202102102100221020202102021021002202102102102021021002210202020202102100220202102021021021002210202021020210210022102102102102021021002202102102102021021000202221020202102021021002202102102102021021002202021020210210210022102021020202102100220210202021021021002202102102102021021002210202020202102100220202102021021021002210202021020210210022102102102102021021002202102102102021021002210202020202102100220202102102021021000022221021020202102102100220202021020210210022102020210202102100220202020210210210022020202021021021002210202021020210210022021021021020210210022102102102020210210022102102020202021002210202102020210210022021021021020210210022020210202102102100221021020202102102100022100221020202102020210210202020210000" }, { "export": "v1", @@ -1072,11 +1000,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020210202100220210210210202102100221021020210202102100220210210210202102100221021021021020210210022102102102021021021002202102102102021021002202020202021002202021020202102100221020210202021021002210210202021021021002202021020210210210022102020210202102100220210210210202102100221020202020210210022020210202102102100221020202102021021002210210210210202102100220210210210202102100220210210210202100000", - "record": { - "status": "error", - "message": "Unknown destination." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020210202100220210210210202102100221021020210202102100220210210210202102100221021021021020210210022102102102021021021002202102102102021021002202020202021002202021020202102100221020210202021021002210210202021021021002202021020210210210022102020210202102100220210210210202102100221020202020210210022020210202102102100221020202102021021002210210210210202102100220210210210202102100220210210210202100000" }, { "export": "v1", @@ -1087,11 +1011,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221021020202102021002210202102021021021002202102020202102100220202102021021021002210210210210202102100220202102021021021002210202020202102100220202102102021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022020210210210210022102021021021021002210202020210210022020202021021002202020202102100220202020210210022020202021021002202020202102100220202020210210022020202020210022102102020202102100221020210202021021002202102102102021021002202021020210210210022102102020210210210022102102021021021002202020202021002210210210202021021002202102020210210210022102020202021021002210202102102021021002210210202021021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022102020202102100220210210210202100220210210210202100221020210202102100220202020210210022020202021021002202020202102100220210210210202100000", - "record": { - "status": "error", - "message": "Subtotal must be <=1000000 cents; grams must be 1..5000." - } + "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221021020202102021002210202102021021021002202102020202102100220202102021021021002210210210210202102100220202102021021021002210202020202102100220202102102021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022020210210210210022102021021021021002210202020210210022020202021021002202020202102100220202020210210022020202021021002202020202102100220202020210210022020202020210022102102020202102100221020210202021021002202102102102021021002202021020210210210022102102020210210210022102102021021021002202020202021002210210210202021021002202102020210210210022102020202021021002210202102102021021002210210202021021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022102020202102100220210210210202100220210210210202100221020210202102100220202020210210022020202021021002202020202102100220210210210202100000" }, { "export": "v1", @@ -1102,11 +1022,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221021020202102021002210202102021021021002202102020202102100220202102021021021002210210210210202102100220202102021021021002210202020202102100220202102102021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022020210210210210022102021021021021002210202020210210022020202021021002202020202102100220202020210210022020202021021002202020202102100220202020210210022020202020210022102102020202102100221020210202021021002202102102102021021002202021020210210210022102102020210210210022102102021021021002202020202021002210210210202021021002202102020210210210022102020202021021002210202102102021021002210210202021021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022102020202102100220210210210202100220210210210202100221020210202102100220202020210210022020202021021002202020202102100220210210210202100000", - "record": { - "status": "error", - "message": "Subtotal must be <=1000000 cents; grams must be 1..5000." - } + "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221021020202102021002210202102021021021002202102020202102100220202102021021021002210210210210202102100220202102021021021002210202020202102100220202102102021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022020210210210210022102021021021021002210202020210210022020202021021002202020202102100220202020210210022020202021021002202020202102100220202020210210022020202020210022102102020202102100221020210202021021002202102102102021021002202021020210210210022102102020210210210022102102021021021002202020202021002210210210202021021002202102020210210210022102020202021021002210202102102021021002210210202021021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022102020202102100220210210210202100220210210210202100221020210202102100220202020210210022020202021021002202020202102100220210210210202100000" }, { "export": "v1", @@ -1117,11 +1033,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221021020202102021002210202102021021021002202102020202102100220202102021021021002210210210210202102100220202102021021021002210202020202102100220202102102021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022020210210210210022102021021021021002210202020210210022020202021021002202020202102100220202020210210022020202021021002202020202102100220202020210210022020202020210022102102020202102100221020210202021021002202102102102021021002202021020210210210022102102020210210210022102102021021021002202020202021002210210210202021021002202102020210210210022102020202021021002210202102102021021002210210202021021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022102020202102100220210210210202100220210210210202100221020210202102100220202020210210022020202021021002202020202102100220210210210202100000", - "record": { - "status": "error", - "message": "Subtotal must be <=1000000 cents; grams must be 1..5000." - } + "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221021020202102021002210202102021021021002202102020202102100220202102021021021002210210210210202102100220202102021021021002210202020202102100220202102102021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022020210210210210022102021021021021002210202020210210022020202021021002202020202102100220202020210210022020202021021002202020202102100220202020210210022020202020210022102102020202102100221020210202021021002202102102102021021002202021020210210210022102102020210210210022102102021021021002202020202021002210210210202021021002202102020210210210022102020202021021002210202102102021021002210210202021021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022102020202102100220210210210202100220210210210202100221020210202102100220202020210210022020202021021002202020202102100220210210210202100000" }, { "export": "v1", @@ -1132,11 +1044,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221021020202102021002210202102021021021002202102020202102100220202102021021021002210210210210202102100220202102021021021002210202020202102100220202102102021021002202020202021002210202020202102100220210210210202102100220202102020210210022020202020210022102102102020210210022021020202102102100221020202020210210022102021021020210210022102102020210210210022020202020210022102021021020210210022102021020210210210022102102020210210210022020210202102102100220202020202100220210202020210210022102021020202102100220202020202100221021020202021021002210202020202102100220210210210202102100221021021021020210210022021021021020210210022102020210202102100221021020202021021002210202020202102100220202102102021021002202020202021002202102102102021021002210202020202102100220202102021021021002210202102021021021002202102020210210210022102020202021021002202021021020210210022020202020210022021021021020210210022102021020210210210022102021021020210210022021020202021021002210202102020210210022021020202102102100221021020202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Subtotal and grams must be canonical natural numbers." - } + "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221021020202102021002210202102021021021002202102020202102100220202102021021021002210210210210202102100220202102021021021002210202020202102100220202102102021021002202020202021002210202020202102100220210210210202102100220202102020210210022020202020210022102102102020210210022021020202102102100221020202020210210022102021021020210210022102102020210210210022020202020210022102021021020210210022102021020210210210022102102020210210210022020210202102102100220202020202100220210202020210210022102021020202102100220202020202100221021020202021021002210202020202102100220210210210202102100221021021021020210210022021021021020210210022102020210202102100221021020202021021002210202020202102100220202102102021021002202020202021002202102102102021021002210202020202102100220202102021021021002210202102021021021002202102020210210210022102020202021021002202021021020210210022020202020210022021021021020210210022102021020210210210022102021021020210210022021020202021021002210202102020210210022021020202102102100221021020202102102100220210210210202100000" }, { "export": "v1", @@ -1147,11 +1055,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221021020202102021002210202102021021021002202102020202102100220202102021021021002210210210210202102100220202102021021021002210202020202102100220202102102021021002202020202021002210202020202102100220210210210202102100220202102020210210022020202020210022102102102020210210022021020202102102100221020202020210210022102021021020210210022102102020210210210022020202020210022102021021020210210022102021020210210210022102102020210210210022020210202102102100220202020202100220210202020210210022102021020202102100220202020202100221021020202021021002210202020202102100220210210210202102100221021021021020210210022021021021020210210022102020210202102100221021020202021021002210202020202102100220202102102021021002202020202021002202102102102021021002210202020202102100220202102021021021002210202102021021021002202102020210210210022102020202021021002202021021020210210022020202020210022021021021020210210022102021020210210210022102021021020210210022021020202021021002210202102020210210022021020202102102100221021020202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Subtotal and grams must be canonical natural numbers." - } + "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221021020202102021002210202102021021021002202102020202102100220202102021021021002210210210210202102100220202102021021021002210202020202102100220202102102021021002202020202021002210202020202102100220210210210202102100220202102020210210022020202020210022102102102020210210022021020202102102100221020202020210210022102021021020210210022102102020210210210022020202020210022102021021020210210022102021020210210210022102102020210210210022020210202102102100220202020202100220210202020210210022102021020202102100220202020202100221021020202021021002210202020202102100220210210210202102100221021021021020210210022021021021020210210022102020210202102100221021020202021021002210202020202102100220202102102021021002202020202021002202102102102021021002210202020202102100220202102021021021002210202102021021021002202102020210210210022102020202021021002202021021020210210022020202020210022021021021020210210022102021020210210210022102021021020210210022021020202021021002210202102020210210022021020202102102100221021020202102102100220210210210202100000" }, { "export": "v1", @@ -1162,11 +1066,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221021020202102021002210202102021021021002202102020202102100220202102021021021002210210210210202102100220202102021021021002210202020202102100220202102102021021002202020202021002210202020202102100220210210210202102100220202102020210210022020202020210022102102102020210210022021020202102102100221020202020210210022102021021020210210022102102020210210210022020202020210022102021021020210210022102021020210210210022102102020210210210022020210202102102100220202020202100220210202020210210022102021020202102100220202020202100221021020202021021002210202020202102100220210210210202102100221021021021020210210022021021021020210210022102020210202102100221021020202021021002210202020202102100220202102102021021002202020202021002202102102102021021002210202020202102100220202102021021021002210202102021021021002202102020210210210022102020202021021002202021021020210210022020202020210022021021021020210210022102021020210210210022102021021020210210022021020202021021002210202102020210210022021020202102102100221021020202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Subtotal and grams must be canonical natural numbers." - } + "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221021020202102021002210202102021021021002202102020202102100220202102021021021002210210210210202102100220202102021021021002210202020202102100220202102102021021002202020202021002210202020202102100220210210210202102100220202102020210210022020202020210022102102102020210210022021020202102102100221020202020210210022102021021020210210022102102020210210210022020202020210022102021021020210210022102021020210210210022102102020210210210022020210202102102100220202020202100220210202020210210022102021020202102100220202020202100221021020202021021002210202020202102100220210210210202102100221021021021020210210022021021021020210210022102020210202102100221021020202021021002210202020202102100220202102102021021002202020202021002202102102102021021002210202020202102100220202102021021021002210202102021021021002202102020210210210022102020202021021002202021021020210210022020202020210022021021021020210210022102021020210210210022102021021020210210022021020202021021002210202102020210210022021020202102102100221021020202102102100220210210210202100000" }, { "export": "v1", @@ -1177,11 +1077,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221021020202102021002210202102021021021002202102020202102100220202102021021021002210210210210202102100220202102021021021002210202020202102100220202102102021021002202020202021002210202020202102100220210210210202102100220202102020210210022020202020210022102102102020210210022021020202102102100221020202020210210022102021021020210210022102102020210210210022020202020210022102021021020210210022102021020210210210022102102020210210210022020210202102102100220202020202100220210202020210210022102021020202102100220202020202100221021020202021021002210202020202102100220210210210202102100221021021021020210210022021021021020210210022102020210202102100221021020202021021002210202020202102100220202102102021021002202020202021002202102102102021021002210202020202102100220202102021021021002210202102021021021002202102020210210210022102020202021021002202021021020210210022020202020210022021021021020210210022102021020210210210022102021021020210210022021020202021021002210202102020210210022021020202102102100221021020202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Subtotal and grams must be canonical natural numbers." - } + "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221021020202102021002210202102021021021002202102020202102100220202102021021021002210210210210202102100220202102021021021002210202020202102100220202102102021021002202020202021002210202020202102100220210210210202102100220202102020210210022020202020210022102102102020210210022021020202102102100221020202020210210022102021021020210210022102102020210210210022020202020210022102021021020210210022102021020210210210022102102020210210210022020210202102102100220202020202100220210202020210210022102021020202102100220202020202100221021020202021021002210202020202102100220210210210202102100221021021021020210210022021021021020210210022102020210202102100221021020202021021002210202020202102100220202102102021021002202020202021002202102102102021021002210202020202102100220202102021021021002210202102021021021002202102020210210210022102020202021021002202021021020210210022020202020210022021021021020210210022102021020210210210022102021021020210210022021020202021021002210202102020210210022021020202102102100221021020202102102100220210210210202100000" } ] }, @@ -1212,13 +1108,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022102102020202102100220202021020210210022102021020202102100221020210210202102100221020202020210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022100022221020210202021021002202102102021021021002210202102020210210022021021021020210210022020210202102102100220202102021020210022102020210210210210022020202021021021002210202102020210210002022210210210210202102100220210202021021021002202021020202102100221020210202021021002202102020210210210022021021021020210022102102020202102100220210202021021021002210202102020210210022102020202021021002202021020210210210022102021020202102100220202102020210210000222210210202020210210022102021020210210210022102102020210210210022020210202102102100221021021021020210210022102021021020210210022102021020202102100220210202021021021000202220210202102020210022102020202021021002210202102102021021002210202102020210210022102102020210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000", - "record": { - "schemaVersion": 1, - "eventType": "order.created", - "customer": "James", - "amountCents": 2499 - } + "result": "2222102102020210210210022102102020202102100220202021020210210022102021020202102100221020210210202102100221020202020210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022100022221020210202021021002202102102021021021002210202102020210210022021021021020210210022020210202102102100220202102021020210022102020210210210210022020202021021021002210202102020210210002022210210210210202102100220210202021021021002202021020202102100221020210202021021002202102020210210210022021021021020210022102102020202102100220210202021021021002210202102020210210022102020202021021002202021020210210210022102021020202102100220202102020210210000222210210202020210210022102021020210210210022102102020210210210022020210202102102100221021021021020210210022102021021020210210022102021020202102100220210202021021021000202220210202102020210022102020202021021002210202102102021021002210202102020210210022102102020210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000" }, { "export": "vendorB", @@ -1227,13 +1117,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022102102020202102100220202021020210210022102021020202102100221020210210202102100221020202020210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022100022221020210202021021002202102102021021021002210202102020210210022021021021020210210022020210202102102100220202102021020210022102020210210210210022020202021021021002210202102020210210002022210210210210202102100220210202021021021002202021020202102100221020210202021021002202102020210210210022021021021020210022102102020202102100220210202021021021002210202102020210210022102020202021021002202021020210210210022102021020202102100220202102020210210000222210210202020210210022102021020210210210022102102020210210210022020210202102102100221021021021020210210022102021021020210210022102021020202102100220210202021021021000202220210202102020210022102020202021021002210202102102021021002210202102020210210022102102020210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000", - "record": { - "schemaVersion": 1, - "eventType": "order.created", - "customer": "James", - "amountCents": 2499 - } + "result": "2222102102020210210210022102102020202102100220202021020210210022102021020202102100221020210210202102100221020202020210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022100022221020210202021021002202102102021021021002210202102020210210022021021021020210210022020210202102102100220202102021020210022102020210210210210022020202021021021002210202102020210210002022210210210210202102100220210202021021021002202021020202102100221020210202021021002202102020210210210022021021021020210022102102020202102100220210202021021021002210202102020210210022102020202021021002202021020210210210022102021020202102100220202102020210210000222210210202020210210022102021020210210210022102102020210210210022020210202102102100221021021021020210210022102021021020210210022102021020202102100220210202021021021000202220210202102020210022102020202021021002210202102102021021002210202102020210210022102102020210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000" }, { "export": "vendorA", @@ -1242,13 +1126,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100221021020202021021002202020210202102100221020210202021021002210202102102021021002210202020202102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100221000222210202102020210210022021021020210210210022102021020202102100220210210210202102100220202102021021021002202021020210202100221020202102102102100220202020210210210022102021020202102100020222102102102102021021002202102020210210210022020210202021021002210202102020210210022021020202102102100220210210210202100220210202021021021002210202102020210210022021021020202102100221020210202102102100220210210210202102100220202102020210210022102021020202102100220202102020210210000222210210202020210210022102021020210210210022102102020210210210022020210202102102100221021021021020210210022102021021020210210022102021020202102100220210202021021021000202220210202102020210022102020202021021002210202102102021021002210202102020210210022102102020210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000", - "record": { - "schemaVersion": 1, - "eventType": "order.refunded", - "customer": "James", - "amountCents": 2499 - } + "result": "22221021020202102102100221021020202021021002202020210202102100221020210202021021002210202102102021021002210202020202102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100221000222210202102020210210022021021020210210210022102021020202102100220210210210202102100220202102021021021002202021020210202100221020202102102102100220202020210210210022102021020202102100020222102102102102021021002202102020210210210022020210202021021002210202102020210210022021020202102102100220210210210202100220210202021021021002210202102020210210022021021020202102100221020210202102102100220210210210202102100220202102020210210022102021020202102100220202102020210210000222210210202020210210022102021020210210210022102102020210210210022020210202102102100221021021021020210210022102021021020210210022102021020202102100220210202021021021000202220210202102020210022102020202021021002210202102102021021002210202102020210210022102102020210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000" }, { "export": "vendorB", @@ -1257,13 +1135,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100221021020202021021002202020210202102100221020210202021021002210202102102021021002210202020202102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100221000222210202102020210210022021021020210210210022102021020202102100220210210210202102100220202102021021021002202021020210202100221020202102102102100220202020210210210022102021020202102100020222102102102102021021002202102020210210210022020210202021021002210202102020210210022021020202102102100220210210210202100220210202021021021002210202102020210210022021021020202102100221020210202102102100220210210210202102100220202102020210210022102021020202102100220202102020210210000222210210202020210210022102021020210210210022102102020210210210022020210202102102100221021021021020210210022102021021020210210022102021020202102100220210202021021021000202220210202102020210022102020202021021002210202102102021021002210202102020210210022102102020210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000", - "record": { - "schemaVersion": 1, - "eventType": "order.refunded", - "customer": "James", - "amountCents": 2499 - } + "result": "22221021020202102102100221021020202021021002202020210202102100221020210202021021002210202102102021021002210202020202102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100221000222210202102020210210022021021020210210210022102021020202102100220210210210202102100220202102021021021002202021020210202100221020202102102102100220202020210210210022102021020202102100020222102102102102021021002202102020210210210022020210202021021002210202102020210210022021020202102102100220210210210202100220210202021021021002210202102020210210022021021020202102100221020210202102102100220210210210202102100220202102020210210022102021020202102100220202102020210210000222210210202020210210022102021020210210210022102102020210210210022020210202102102100221021021021020210210022102021021020210210022102021020202102100220210202021021021000202220210202102020210022102020202021021002210202102102021021002210202102020210210022102102020210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000" }, { "export": "vendorA", @@ -1272,13 +1144,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022102102020202102100220202021020210210022102021020202102100221020210210202102100221020202020210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022100022221020210202021021002202102102021021021002210202102020210210022021021021020210210022020210202102102100220202102021020210022102020210210210210022020202021021021002210202102020210210002022210210210210202102100220210202021021021002202021020202102100221020210202021021002202102020210210210022021021021020210022102102020202102100220210202021021021002210202102020210210022102020202021021002202021020210210210022102021020202102100220202102020210210000222210210202020210210022102021020210210210022102102020210210210022020210202102102100221021021021020210210022102021021020210210022102021020202102100220210202021021021000202221021020210210210202102102100220210202102021021021020210210202102020210022021020202020210202021021020210210210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000", - "record": { - "schemaVersion": 1, - "eventType": "order.created", - "customer": "λ雪🙂", - "amountCents": 2499 - } + "result": "2222102102020210210210022102102020202102100220202021020210210022102021020202102100221020210210202102100221020202020210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022100022221020210202021021002202102102021021021002210202102020210210022021021021020210210022020210202102102100220202102021020210022102020210210210210022020202021021021002210202102020210210002022210210210210202102100220210202021021021002202021020202102100221020210202021021002202102020210210210022021021021020210022102102020202102100220210202021021021002210202102020210210022102020202021021002202021020210210210022102021020202102100220202102020210210000222210210202020210210022102021020210210210022102102020210210210022020210202102102100221021021021020210210022102021021020210210022102021020202102100220210202021021021000202221021020210210210202102102100220210202102021021021020210210202102020210022021020202020210202021021020210210210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000" }, { "export": "vendorB", @@ -1287,13 +1153,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022102102020202102100220202021020210210022102021020202102100221020210210202102100221020202020210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022100022221020210202021021002202102102021021021002210202102020210210022021021021020210210022020210202102102100220202102021020210022102020210210210210022020202021021021002210202102020210210002022210210210210202102100220210202021021021002202021020202102100221020210202021021002202102020210210210022021021021020210022102102020202102100220210202021021021002210202102020210210022102020202021021002202021020210210210022102021020202102100220202102020210210000222210210202020210210022102021020210210210022102102020210210210022020210202102102100221021021021020210210022102021021020210210022102021020202102100220210202021021021000202221021020210210210202102102100220210202102021021021020210210202102020210022021020202020210202021021020210210210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000", - "record": { - "schemaVersion": 1, - "eventType": "order.created", - "customer": "λ雪🙂", - "amountCents": 2499 - } + "result": "2222102102020210210210022102102020202102100220202021020210210022102021020202102100221020210210202102100221020202020210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022100022221020210202021021002202102102021021021002210202102020210210022021021021020210210022020210202102102100220202102021020210022102020210210210210022020202021021021002210202102020210210002022210210210210202102100220210202021021021002202021020202102100221020210202021021002202102020210210210022021021021020210022102102020202102100220210202021021021002210202102020210210022102020202021021002202021020210210210022102021020202102100220202102020210210000222210210202020210210022102021020210210210022102102020210210210022020210202102102100221021021021020210210022102021021020210210022102021020202102100220210202021021021000202221021020210210210202102102100220210202102021021021020210210202102020210022021020202020210202021021020210210210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000" }, { "export": "vendorA", @@ -1302,13 +1162,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100221021020202021021002202020210202102100221020210202021021002210202102102021021002210202020202102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100221000222210202102020210210022021021020210210210022102021020202102100220210210210202102100220202102021021021002202021020210202100221020202102102102100220202020210210210022102021020202102100020222102102102102021021002202102020210210210022020210202021021002210202102020210210022021020202102102100220210210210202100220210202021021021002210202102020210210022021021020202102100221020210202102102100220210210210202102100220202102020210210022102021020202102100220202102020210210000222210210202020210210022102021020210210210022102102020210210210022020210202102102100221021021021020210210022102021021020210210022102021020202102100220210202021021021000202221021020210210210202102102100220210202102021021021020210210202102020210022021020202020210202021021020210210210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000", - "record": { - "schemaVersion": 1, - "eventType": "order.refunded", - "customer": "λ雪🙂", - "amountCents": 2499 - } + "result": "22221021020202102102100221021020202021021002202020210202102100221020210202021021002210202102102021021002210202020202102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100221000222210202102020210210022021021020210210210022102021020202102100220210210210202102100220202102021021021002202021020210202100221020202102102102100220202020210210210022102021020202102100020222102102102102021021002202102020210210210022020210202021021002210202102020210210022021020202102102100220210210210202100220210202021021021002210202102020210210022021021020202102100221020210202102102100220210210210202102100220202102020210210022102021020202102100220202102020210210000222210210202020210210022102021020210210210022102102020210210210022020210202102102100221021021021020210210022102021021020210210022102021020202102100220210202021021021000202221021020210210210202102102100220210202102021021021020210210202102020210022021020202020210202021021020210210210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000" }, { "export": "vendorB", @@ -1317,13 +1171,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100221021020202021021002202020210202102100221020210202021021002210202102102021021002210202020202102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100221000222210202102020210210022021021020210210210022102021020202102100220210210210202102100220202102021021021002202021020210202100221020202102102102100220202020210210210022102021020202102100020222102102102102021021002202102020210210210022020210202021021002210202102020210210022021020202102102100220210210210202100220210202021021021002210202102020210210022021021020202102100221020210202102102100220210210210202102100220202102020210210022102021020202102100220202102020210210000222210210202020210210022102021020210210210022102102020210210210022020210202102102100221021021021020210210022102021021020210210022102021020202102100220210202021021021000202221021020210210210202102102100220210202102021021021020210210202102020210022021020202020210202021021020210210210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000", - "record": { - "schemaVersion": 1, - "eventType": "order.refunded", - "customer": "λ雪🙂", - "amountCents": 2499 - } + "result": "22221021020202102102100221021020202021021002202020210202102100221020210202021021002210202102102021021002210202020202102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100221000222210202102020210210022021021020210210210022102021020202102100220210210210202102100220202102021021021002202021020210202100221020202102102102100220202020210210210022102021020202102100020222102102102102021021002202102020210210210022020210202021021002210202102020210210022021020202102102100220210210210202100220210202021021021002210202102020210210022021021020202102100221020210202102102100220210210210202102100220202102020210210022102021020202102100220202102020210210000222210210202020210210022102021020210210210022102102020210210210022020210202102102100221021021021020210210022102021021020210210022102021020202102100220210202021021021000202221021020210210210202102102100220210202102021021021020210210202102020210022021020202020210202021021020210210210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000" }, { "export": "vendorA", @@ -1332,13 +1180,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100221021020202021021002202020210202102100221020210202021021002210202102102021021002210202020202102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100221000222210202102020210210022021021020210210210022102021020202102100220210210210202102100220202102021021021002202021020210202100221020202102102102100220202020210210210022102021020202102100020222102102102102021021002202102020210210210022020210202021021002210202102020210210022021020202102102100220210210210202100221021020202021021002202102020210210210022102021020202102100221020202020210210022020210202102102100221020210202021021002202021020202102100002222102102020202102100221020210202102102100221021020202102102100220202102021021021002210210210210202102100221020210210202102100221020210202021021002202102020210210210002022202021021021021002210202021020210210022102021021020210210022102102102020210210022020202020210022102102020210210210022021020202102102100221021020202021021002210202102102102100220202021021021021002202020202021002210210210210202102100220210210210202102100221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100221020210210210210022102020202021021002202021021020210210022102021020202102100220210202021021021002202021020210210210022020202102021002210202020210210022102020210202100220210210210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000", - "record": { - "schemaVersion": 1, - "eventType": "order.created", - "customer": "<img src=x onerror=alert(1)>", - "amountCents": 2499 - } + "result": "22221021020202102102100221021020202021021002202020210202102100221020210202021021002210202102102021021002210202020202102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100221000222210202102020210210022021021020210210210022102021020202102100220210210210202102100220202102021021021002202021020210202100221020202102102102100220202020210210210022102021020202102100020222102102102102021021002202102020210210210022020210202021021002210202102020210210022021020202102102100220210210210202100221021020202021021002202102020210210210022102021020202102100221020202020210210022020210202102102100221020210202021021002202021020202102100002222102102020202102100221020210202102102100221021020202102102100220202102021021021002210210210210202102100221020210210202102100221020210202021021002202102020210210210002022202021021021021002210202021020210210022102021021020210210022102102102020210210022020202020210022102102020210210210022021020202102102100221021020202021021002210202102102102100220202021021021021002202020202021002210210210210202102100220210210210202102100221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100221020210210210210022102020202021021002202021021020210210022102021020202102100220210202021021021002202021020210210210022020202102021002210202020210210022102020210202100220210210210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000" }, { "export": "vendorB", @@ -1347,13 +1189,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100221021020202021021002202020210202102100221020210202021021002210202102102021021002210202020202102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100221000222210202102020210210022021021020210210210022102021020202102100220210210210202102100220202102021021021002202021020210202100221020202102102102100220202020210210210022102021020202102100020222102102102102021021002202102020210210210022020210202021021002210202102020210210022021020202102102100220210210210202100221021020202021021002202102020210210210022102021020202102100221020202020210210022020210202102102100221020210202021021002202021020202102100002222102102020202102100221020210202102102100221021020202102102100220202102021021021002210210210210202102100221020210210202102100221020210202021021002202102020210210210002022202021021021021002210202021020210210022102021021020210210022102102102020210210022020202020210022102102020210210210022021020202102102100221021020202021021002210202102102102100220202021021021021002202020202021002210210210210202102100220210210210202102100221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100221020210210210210022102020202021021002202021021020210210022102021020202102100220210202021021021002202021020210210210022020202102021002210202020210210022102020210202100220210210210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000", - "record": { - "schemaVersion": 1, - "eventType": "order.created", - "customer": "<img src=x onerror=alert(1)>", - "amountCents": 2499 - } + "result": "22221021020202102102100221021020202021021002202020210202102100221020210202021021002210202102102021021002210202020202102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100221000222210202102020210210022021021020210210210022102021020202102100220210210210202102100220202102021021021002202021020210202100221020202102102102100220202020210210210022102021020202102100020222102102102102021021002202102020210210210022020210202021021002210202102020210210022021020202102102100220210210210202100221021020202021021002202102020210210210022102021020202102100221020202020210210022020210202102102100221020210202021021002202021020202102100002222102102020202102100221020210202102102100221021020202102102100220202102021021021002210210210210202102100221020210210202102100221020210202021021002202102020210210210002022202021021021021002210202021020210210022102021021020210210022102102102020210210022020202020210022102102020210210210022021020202102102100221021020202021021002210202102102102100220202021021021021002202020202021002210210210210202102100220210210210202102100221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100221020210210210210022102020202021021002202021021020210210022102021020202102100220210202021021021002202021020210210210022020202102021002210202020210210022102020210202100220210210210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000" }, { "export": "vendorA", @@ -1362,13 +1198,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002210210202020210210022020202102021021002210202102020210210022102021021020210210022102020202021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002210002222102021020202102100220210210202102102100221020210202021021002202102102102021021002202021020210210210022020210202102021002210202021021021021002202020202102102100221020210202021021000202221021021021020210210022021020202102102100220202102020210210022102021020202102100220210202021021021002202102102102021002202102020210210210022102021020202102100220210210202021021002210202102021021021002202102102102021021002202021020202102100221020210202021021002202021020202102100002222102102020202102100221020210202102102100221021020202102102100220202102021021021002210210210210202102100221020210210202102100221020210202021021002202102020210210210002022202021021021021002210202021020210210022102021021020210210022102102102020210210022020202020210022102102020210210210022021020202102102100221021020202021021002210202102102102100220202021021021021002202020202021002210210210210202102100220210210210202102100221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100221020210210210210022102020202021021002202021021020210210022102021020202102100220210202021021021002202021020210210210022020202102021002210202020210210022102020210202100220210210210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000", - "record": { - "schemaVersion": 1, - "eventType": "order.refunded", - "customer": "<img src=x onerror=alert(1)>", - "amountCents": 2499 - } + "result": "222210210202021021021002210210202020210210022020202102021021002210202102020210210022102021021020210210022102020202021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002210002222102021020202102100220210210202102102100221020210202021021002202102102102021021002202021020210210210022020210202102021002210202021021021021002202020202102102100221020210202021021000202221021021021020210210022021020202102102100220202102020210210022102021020202102100220210202021021021002202102102102021002202102020210210210022102021020202102100220210210202021021002210202102021021021002202102102102021021002202021020202102100221020210202021021002202021020202102100002222102102020202102100221020210202102102100221021020202102102100220202102021021021002210210210210202102100221020210210202102100221020210202021021002202102020210210210002022202021021021021002210202021020210210022102021021020210210022102102102020210210022020202020210022102102020210210210022021020202102102100221021020202021021002210202102102102100220202021021021021002202020202021002210210210210202102100220210210210202102100221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100221020210210210210022102020202021021002202021021020210210022102021020202102100220210202021021021002202021020210210210022020202102021002210202020210210022102020210202100220210210210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000" }, { "export": "vendorB", @@ -1377,13 +1207,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002210210202020210210022020202102021021002210202102020210210022102021021020210210022102020202021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002210002222102021020202102100220210210202102102100221020210202021021002202102102102021021002202021020210210210022020210202102021002210202021021021021002202020202102102100221020210202021021000202221021021021020210210022021020202102102100220202102020210210022102021020202102100220210202021021021002202102102102021002202102020210210210022102021020202102100220210210202021021002210202102021021021002202102102102021021002202021020202102100221020210202021021002202021020202102100002222102102020202102100221020210202102102100221021020202102102100220202102021021021002210210210210202102100221020210210202102100221020210202021021002202102020210210210002022202021021021021002210202021020210210022102021021020210210022102102102020210210022020202020210022102102020210210210022021020202102102100221021020202021021002210202102102102100220202021021021021002202020202021002210210210210202102100220210210210202102100221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100221020210210210210022102020202021021002202021021020210210022102021020202102100220210202021021021002202021020210210210022020202102021002210202020210210022102020210202100220210210210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000", - "record": { - "schemaVersion": 1, - "eventType": "order.refunded", - "customer": "<img src=x onerror=alert(1)>", - "amountCents": 2499 - } + "result": "222210210202021021021002210210202020210210022020202102021021002210202102020210210022102021021020210210022102020202021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002210002222102021020202102100220210210202102102100221020210202021021002202102102102021021002202021020210210210022020210202102021002210202021021021021002202020202102102100221020210202021021000202221021021021020210210022021020202102102100220202102020210210022102021020202102100220210202021021021002202102102102021002202102020210210210022102021020202102100220210210202021021002210202102021021021002202102102102021021002202021020202102100221020210202021021002202021020202102100002222102102020202102100221020210202102102100221021020202102102100220202102021021021002210210210210202102100221020210210202102100221020210202021021002202102020210210210002022202021021021021002210202021020210210022102021021020210210022102102102020210210022020202020210022102102020210210210022021020202102102100221021020202021021002210202102102102100220202021021021021002202020202021002210210210210202102100220210210210202102100221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100221020210210210210022102020202021021002202021021020210210022102021020202102100220210202021021021002202021020210210210022020202102021002210202020210210022102020210202100220210210210210210000222210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021000221002210210202020202102102102020210000" }, { "export": "vendorA", @@ -1392,11 +1216,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102021020202102100220210202021021021002202102020210210210022102102102102021021002202102020210210210000222210202102102021021002210202102020210210022102102020210210210022102102020210210210022102020202021021002210210210202021021002210202102020210210002022210202102021020210022021021021020210210022102102021020210210022021021021020210210022102102102102021021002210210210202102102100220210210210202102100220202020202100220210210202102102100221020210202021021002202102102102021021002202021020202102100221021021021020210210022021020202102102100220202020202100221020202020202100220202020202100221020210202021021002202102102021021021002210202102020210210022021021021020210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Unknown vendor A event." - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102021020202102100220210202021021021002202102020210210210022102102102102021021002202102020210210210000222210202102102021021002210202102020210210022102102020210210210022102102020210210210022102020202021021002210210210202021021002210202102020210210002022210202102021020210022021021021020210210022102102021020210210022021021021020210210022102102102102021021002210210210202102102100220210210210202102100220202020202100220210210202102102100221020210202021021002202102102102021021002202021020202102100221021021021020210210022021020202102102100220202020202100221020202020202100220202020202100221020210202021021002202102102021021021002210202102020210210022021021021020210210022020210202102102100220210210210202100000" }, { "export": "vendorA", @@ -1405,11 +1225,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102021020202102100220210202021021021002202102020210210210022102102102102021021002202102020210210210000222210202102102021021002210202102020210210022102102020210210210022102102020210210210022102020202021021002210210210202021021002210202102020210210002022210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022102020202021021002202020202021002210210202020210210022102020202021021002202102102102021021002210210210210202102100220210210210202102100221020202102021021002210210202020210210022102020202021021002202021021020210210022020202020210022021021021020210210022102020202021021002202021020210210210022102021020210210210022021020202102102100221020202020210210022020210210202102100220202020202100220202102102102100221020210210210210022102020202102100220202020210210022020202021021002202020202102100220202020210210022020202021021002202020202102100220210210210202100000", - "record": { - "status": "error", - "message": "amountCents must be a canonical natural <=1000000." - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102021020202102100220210202021021021002202102020210210210022102102102102021021002202102020210210210000222210202102102021021002210202102020210210022102102020210210210022102102020210210210022102020202021021002210210210202021021002210202102020210210002022210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022102020202021021002202020202021002210210202020210210022102020202021021002202102102102021021002210210210210202102100220210210210202102100221020202102021021002210210202020210210022102020202021021002202021021020210210022020202020210022021021021020210210022102020202021021002202021020210210210022102021020210210210022021020202102102100221020202020210210022020210210202102100220202020202100220202102102102100221020210210210210022102020202102100220202020210210022020202021021002202020202102100220202020210210022020202021021002202020202102100220210210210202100000" }, { "export": "vendorA", @@ -1418,11 +1234,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102021020202102100220210202021021021002202102020210210210022102102102102021021002202102020210210210000222210202102102021021002210202102020210210022102102020210210210022102102020210210210022102020202021021002210210210202021021002210202102020210210002022210202102021020210022021021021020210210022102102021020210210022021021021020210210022102102102102021021002210210210202102102100220210210210202102100220202020202100220210210202102102100221020210202021021002202102102102021021002202021020202102100221021021021020210210022021020202102102100220202020202100221020202020202100220202020202100221020210202021021002202102102021021021002210202102020210210022021021021020210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Unknown vendor A event." - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102021020202102100220210202021021021002202102020210210210022102102102102021021002202102020210210210000222210202102102021021002210202102020210210022102102020210210210022102102020210210210022102020202021021002210210210202021021002210202102020210210002022210202102021020210022021021021020210210022102102021020210210022021021021020210210022102102102102021021002210210210202102102100220210210210202102100220202020202100220210210202102102100221020210202021021002202102102102021021002202021020202102100221021021021020210210022021020202102102100220202020202100221020202020202100220202020202100221020210202021021002202102102021021021002210202102020210210022021021021020210210022020210202102102100220210210210202100000" }, { "export": "vendorA", @@ -1431,11 +1243,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221021020202021021002210202102021021021002210210202021021021002202021020210210210022102102102102021021002210202102102021021002210202102020210210022021020202102102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210210202021021021002210210202020210210022102020202021021002202021021020210210022102020202021021002202102020210210210022020202020210022020210202102102100221020210202021021002202020210210210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "customer must be scalar text." - } + "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221021020202021021002210202102021021021002210210202021021021002202021020210210210022102102102102021021002210202102102021021002210202102020210210022021020202102102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210210202021021021002210210202020210210022102020202021021002202021021020210210022102020202021021002202102020210210210022020202020210022020210202102102100221020210202021021002202020210210210210022020210202102102100220210210210202100000" }, { "export": "vendorA", @@ -1444,11 +1252,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221020210202020210022020202102102102100220202020210210210022102021020202102100221021020202021021002202021020210210210022102021020202102100220202102020210210022020202020210022102021020202102100220202021021021021002210202020202102100221021020202021021002202021020210210210022020210210202102100221020202102102102100220202020202100220202102021021021002202020210202102100220210202021021021002210202102020210210022102021020202102100220202020202100220210210202021021002210202021020210210022102021020202102100220202102102021021002202021020202102100221021020202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Expected exactly three fields." - } + "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221020210202020210022020202102102102100220202020210210210022102021020202102100221021020202021021002202021020210210210022102021020202102100220202102020210210022020202020210022102021020202102100220202021021021021002210202020202102100221021020202021021002202021020210210210022020210210202102100221020202102102102100220202020202100220202102021021021002202020210202102100220210202021021021002210202102020210210022102021020202102100220202020202100220210210202021021002210202021020210210022102021020202102100220202102102021021002202021020202102100221021020202102102100220210210210202100000" }, { "export": "vendorA", @@ -1457,11 +1261,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221020210202020210022020202102102102100220202020210210210022102021020202102100221021020202021021002202021020210210210022102021020202102100220202102020210210022020202020210022102021020202102100220202021021021021002210202020202102100221021020202021021002202021020210210210022020210210202102100221020202102102102100220202020202100220202102021021021002202020210202102100220210202021021021002210202102020210210022102021020202102100220202020202100220210210202021021002210202021020210210022102021020202102100220202102102021021002202021020202102100221021020202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Expected exactly three fields." - } + "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221020210202020210022020202102102102100220202020210210210022102021020202102100221021020202021021002202021020210210210022102021020202102100220202102020210210022020202020210022102021020202102100220202021021021021002210202020202102100221021020202021021002202021020210210210022020210210202102100221020202102102102100220202020202100220202102021021021002202020210202102100220210202021021021002210202102020210210022102021020202102100220202020202100220210210202021021002210202021020210210022102021020202102100220202102102021021002202021020202102100221021020202102102100220210210210202100000" }, { "export": "vendorB", @@ -1470,11 +1270,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102021020202102100220210202021021021002202102020210210210022102102102102021021002202102020210210210000222210202102102021021002210202102020210210022102102020210210210022102102020210210210022102020202021021002210210210202021021002210202102020210210002022202102020210210210022102021020202102100220210210202021021002210202102021021021002202102102102021021002202021020202102100221020210202021021002202021020202102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210202020202102100220202020202100221021020202021021002210202020202102100220210210210202102100221021021021020210210022021021021020210210022102020210202102100221021020202021021002210202020202102100220202102102021021002202020202021002202102020202021002210210210210202102100221021021021020210210022020210210202102100221020210202021021002210202020202102100220210210210202102100220210210210202100000", - "record": { - "status": "error", - "message": "refunded must be a canonical Boolean." - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102021020202102100220210202021021021002202102020210210210022102102102102021021002202102020210210210000222210202102102021021002210202102020210210022102102020210210210022102102020210210210022102020202021021002210210210202021021002210202102020210210002022202102020210210210022102021020202102100220210210202021021002210202102021021021002202102102102021021002202021020202102100221020210202021021002202021020202102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210202020202102100220202020202100221021020202021021002210202020202102100220210210210202102100221021021021020210210022021021021020210210022102020210202102100221021020202021021002210202020202102100220202102102021021002202020202021002202102020202021002210210210210202102100221021021021020210210022020210210202102100221020210202021021002210202020202102100220210210210202102100220210210210202100000" }, { "export": "vendorB", @@ -1483,11 +1279,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Expected a list." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000" }, { "export": "vendorA", @@ -1496,11 +1288,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Expected a list." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000" }, { "export": "vendorA", @@ -1509,11 +1297,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Expected a list." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000" }, { "export": "vendorA", @@ -1522,11 +1306,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221020210202020210022020202102102102100220202020210210210022102021020202102100221021020202021021002202021020210210210022102021020202102100220202102020210210022020202020210022102021020202102100220202021021021021002210202020202102100221021020202021021002202021020210210210022020210210202102100221020202102102102100220202020202100220202102021021021002202020210202102100220210202021021021002210202102020210210022102021020202102100220202020202100220210210202021021002210202021020210210022102021020202102100220202102102021021002202021020202102100221021020202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Expected exactly three fields." - } + "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221020210202020210022020202102102102100220202020210210210022102021020202102100221021020202021021002202021020210210210022102021020202102100220202102020210210022020202020210022102021020202102100220202021021021021002210202020202102100221021020202021021002202021020210210210022020210210202102100221020202102102102100220202020202100220202102021021021002202020210202102100220210202021021021002210202102020210210022102021020202102100220202020202100220210210202021021002210202021020210210022102021020202102100220202102102021021002202021020202102100221021020202102102100220210210210202100000" }, { "export": "vendorB", @@ -1535,11 +1315,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Expected a list." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000" }, { "export": "vendorB", @@ -1548,11 +1324,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Expected a list." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000" }, { "export": "vendorB", @@ -1561,11 +1333,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221020210202020210022020202102102102100220202020210210210022102021020202102100221021020202021021002202021020210210210022102021020202102100220202102020210210022020202020210022102021020202102100220202021021021021002210202020202102100221021020202021021002202021020210210210022020210210202102100221020202102102102100220202020202100220202102021021021002202020210202102100220210202021021021002210202102020210210022102021020202102100220202020202100220210210202021021002210202021020210210022102021020202102100220202102102021021002202021020202102100221021020202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Expected exactly three fields." - } + "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210210202102100221020210202021021002210210202021021021002210210202021021021002210202020202102100221021021020202102100221020210202021021000202221020210202020210022020202102102102100220202020210210210022102021020202102100221021020202021021002202021020210210210022102021020202102100220202102020210210022020202020210022102021020202102100220202021021021021002210202020202102100221021020202021021002202021020210210210022020210210202102100221020202102102102100220202020202100220202102021021021002202020210202102100220210202021021021002210202102020210210022102021020202102100220202020202100220210210202021021002210202021020210210022102021020202102100220202102102021021002202021020202102100221021020202102102100220210210210202100000" }, { "export": "vendorA", @@ -1574,11 +1342,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102021020202102100220210202021021021002202102020210210210022102102102102021021002202102020210210210000222210202102102021021002210202102020210210022102102020210210210022102102020210210210022102020202021021002210210210202021021002210202102020210210002022210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022102020202021021002202020202021002210210202020210210022102020202021021002202102102102021021002210210210210202102100220210210210202102100221020202102021021002210210202020210210022102020202021021002202021021020210210022020202020210022021021021020210210022102020202021021002202021020210210210022102021020210210210022021020202102102100221020202020210210022020210210202102100220202020202100220202102102102100221020210210210210022102020202102100220202020210210022020202021021002202020202102100220202020210210022020202021021002202020202102100220210210210202100000", - "record": { - "status": "error", - "message": "amountCents must be a canonical natural <=1000000." - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102021020202102100220210202021021021002202102020210210210022102102102102021021002202102020210210210000222210202102102021021002210202102020210210022102102020210210210022102102020210210210022102020202021021002210210210202021021002210202102020210210002022210202020202102100221020210210202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100221021020202020210022102021020202102100220210210210202102100220202102021021021002210210202021021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022102020202021021002202020202021002210210202020210210022102020202021021002202102102102021021002210210210210202102100220210210210202102100221020202102021021002210210202020210210022102020202021021002202021021020210210022020202020210022021021021020210210022102020202021021002202021020210210210022102021020210210210022021020202102102100221020202020210210022020210210202102100220202020202100220202102102102100221020210210210210022102020202102100220202020210210022020202021021002202020202102100220202020210210022020202021021002202020202102100220210210210202100000" } ] }, @@ -1599,14 +1363,7 @@ ], "input": null, "terminal": "", - "result": "222210202020202102100221021020202021021002210210202020210210022102021020202102100220202020210210210022020210202102102100221020210202021021002202021020202102100022021002100222202102102102021021002210202020202102100221020210210202102100221020210202021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002020022221020210202021021002210202102102021021002210202020202102100221020202102021021002202021021020210210022102021020202021002202102020210210210022021020202102102100221021021021020210210022021020202102102100020200222210202020202102100221021021020202102100221020210202021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002020022220202102021021021002210202102020210210022021020202102102100221020210210202102100221021020202102102100221020210202020210022021020202102102100220210202021021021002210210210210202102100220210202021021021000202000", - "record": { - "accepted": true, - "nameError": "", - "emailError": "", - "ageError": "", - "termsError": "" - } + "result": "222210202020202102100221021020202021021002210210202020210210022102021020202102100220202020210210210022020210202102102100221020210202021021002202021020202102100022021002100222202102102102021021002210202020202102100221020210210202102100221020210202021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002020022221020210202021021002210202102102021021002210202020202102100221020202102021021002202021021020210210022102021020202021002202102020210210210022021020202102102100221021021021020210210022021020202102102100020200222210202020202102100221021021020202102100221020210202021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002020022220202102021021021002210202102020210210022021020202102102100221020210210202102100221021020202102102100221020210202020210022021020202102102100220210202021021021002210210210210202102100220210202021021021000202000" }, { "export": "main", @@ -1618,14 +1375,7 @@ ], "input": null, "terminal": "", - "result": "222210202020202102100221021020202021021002210210202020210210022102021020202102100220202020210210210022020210202102102100221020210202021021002202021020202102100022021002100222202102102102021021002210202020202102100221020210210202102100221020210202021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002020022221020210202021021002210202102102021021002210202020202102100221020202102021021002202021021020210210022102021020202021002202102020210210210022021020202102102100221021021021020210210022021020202102102100020200222210202020202102100221021021020202102100221020210202021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002020022220202102021021021002210202102020210210022021020202102102100221020210210202102100221021020202102102100221020210202020210022021020202102102100220210202021021021002210210210210202102100220210202021021021000202000", - "record": { - "accepted": true, - "nameError": "", - "emailError": "", - "ageError": "", - "termsError": "" - } + "result": "222210202020202102100221021020202021021002210210202020210210022102021020202102100220202020210210210022020210202102102100221020210202021021002202021020202102100022021002100222202102102102021021002210202020202102100221020210210202102100221020210202021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002020022221020210202021021002210202102102021021002210202020202102100221020202102021021002202021021020210210022102021020202021002202102020210210210022021020202102102100221021021021020210210022021020202102102100020200222210202020202102100221021021020202102100221020210202021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002020022220202102021021021002210202102020210210022021020202102102100221020210210202102100221021020202102102100221020210202020210022021020202102102100220210202021021021002210210210210202102100220210202021021021000202000" }, { "export": "main", @@ -1637,14 +1387,7 @@ ], "input": null, "terminal": "", - "result": "222210202020202102100221021020202021021002210210202020210210022102021020202102100220202020210210210022020210202102102100221020210202021021002202021020202102100022021002100222202102102102021021002210202020202102100221020210210202102100221020210202021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002020022221020210202021021002210202102102021021002210202020202102100221020202102021021002202021021020210210022102021020202021002202102020210210210022021020202102102100221021021021020210210022021020202102102100020200222210202020202102100221021021020202102100221020210202021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002020022220202102021021021002210202102020210210022021020202102102100221020210210202102100221021020202102102100221020210202020210022021020202102102100220210202021021021002210210210210202102100220210202021021021000202000", - "record": { - "accepted": true, - "nameError": "", - "emailError": "", - "ageError": "", - "termsError": "" - } + "result": "222210202020202102100221021020202021021002210210202020210210022102021020202102100220202020210210210022020210202102102100221020210202021021002202021020202102100022021002100222202102102102021021002210202020202102100221020210210202102100221020210202021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002020022221020210202021021002210202102102021021002210202020202102100221020202102021021002202021021020210210022102021020202021002202102020210210210022021020202102102100221021021021020210210022021020202102102100020200222210202020202102100221021021020202102100221020210202021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002020022220202102021021021002210202102020210210022021020202102102100221020210210202102100221021020202102102100221020210202020210022021020202102102100220210202021021021002210210210210202102100220210202021021021000202000" }, { "export": "main", @@ -1656,14 +1399,7 @@ ], "input": null, "terminal": "", - "result": "2222102020202021021002210210202020210210022102102020202102100221020210202021021002202020202102102100220202102021021021002210202102020210210022020210202021021000220210020022220210210210202102100221020202020210210022102021021020210210022102021020202102100221020210202020210022021020202102102100220210202021021021002210210210210202102100220210202021021021000202220210210210202021002210202020202102100221020210210202102100221020210202021021002202020202021002210202021020210210022102102020210210210022020202020210022021020202102102100221020210202021021002210202020210210210022102021020210210210022102020210202102100220210202021021021002210202102020210210022020210202021021002202102102102021000022221020210202021021002210202102102021021002210202020202102100221020202102021021002202021021020210210022102021020202021002202102020210210210022021020202102102100221021021021020210210022021020202102102100020222102021020202021002210202102102021021002210202020202102100221020202102021021002202021021020210210022020202020210022102021021020210210022102021020210210210022102102020210210210022020210202102102100220202020202100221021020202021021002210210210210202102100220210210210202102100220202102021021021002210202020202102100221020202102021021002202102102102021021002202020202021002202020202020210022020202020210022102020202021021002202102102102021021002202021020202102100220202020202100221020202020210210022020202020210022020210202021021002210210210210202102100220202102021021021002202102102102021000022221020202020210210022102102102020210210022102021020202102100221020210202020210022021020202102102100220210202021021021002210210210210202102100220210202021021021000202221020202020202100221021021020202102100221020210202021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022021021020202102100220210202021021021002210210210210202102100221020210210202102100220202020202100221020202021021002202020210210210022020202020210022020210202102102100221021021021020210210022020202020210022102020202102100220210202021021002202020202102100220210210210202100002222020210202102102100221020210202021021002202102020210210210022102021021020210210022102102020210210210022102021020202021002202102020210210210022021020202102102100221021021021020210210022021020202102102100020222102020202020210022102102020202102100221021020202021021002210202102020210210022020202021021021002202021020210210210022020202020210022020210202102102100220202021020210210022102021020202102100220202020202100220202102021021021002210202102020210210022021020202102102100221020210210202102100221021020202102102100220210210210202100000", - "record": { - "accepted": false, - "nameError": "Name is required.", - "emailError": "Email must contain @ and a dot.", - "ageError": "Age must be from 18 to 120.", - "termsError": "Accept the terms." - } + "result": "2222102020202021021002210210202020210210022102102020202102100221020210202021021002202020202102102100220202102021021021002210202102020210210022020210202021021000220210020022220210210210202102100221020202020210210022102021021020210210022102021020202102100221020210202020210022021020202102102100220210202021021021002210210210210202102100220210202021021021000202220210210210202021002210202020202102100221020210210202102100221020210202021021002202020202021002210202021020210210022102102020210210210022020202020210022021020202102102100221020210202021021002210202020210210210022102021020210210210022102020210202102100220210202021021021002210202102020210210022020210202021021002202102102102021000022221020210202021021002210202102102021021002210202020202102100221020202102021021002202021021020210210022102021020202021002202102020210210210022021020202102102100221021021021020210210022021020202102102100020222102021020202021002210202102102021021002210202020202102100221020202102021021002202021021020210210022020202020210022102021021020210210022102021020210210210022102102020210210210022020210202102102100220202020202100221021020202021021002210210210210202102100220210210210202102100220202102021021021002210202020202102100221020202102021021002202102102102021021002202020202021002202020202020210022020202020210022102020202021021002202102102102021021002202021020202102100220202020202100221020202020210210022020202020210022020210202021021002210210210210202102100220202102021021021002202102102102021000022221020202020210210022102102102020210210022102021020202102100221020210202020210022021020202102102100220210202021021021002210210210210202102100220210202021021021000202221020202020202100221021021020202102100221020210202021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022021021020202102100220210202021021021002210210210210202102100221020210210202102100220202020202100221020202021021002202020210210210022020202020210022020210202102102100221021021021020210210022020202020210022102020202102100220210202021021002202020202102100220210210210202100002222020210202102102100221020210202021021002202102020210210210022102021021020210210022102102020210210210022102021020202021002202102020210210210022021020202102102100221021021021020210210022021020202102102100020222102020202020210022102102020202102100221021020202021021002210202102020210210022020202021021021002202021020210210210022020202020210022020210202102102100220202021020210210022102021020202102100220202020202100220202102021021021002210202102020210210022021020202102102100221020210210202102100221021020202102102100220210210210202100000" }, { "export": "main", @@ -1675,14 +1411,7 @@ ], "input": null, "terminal": "", - "result": "22221020202020210210022102102020202102100221021020202021021002210202102020210210022020202021021021002202021020210210210022102021020202102100220202102020210210002202100200222202102102102021021002210202020202102100221020210210202102100221020210202021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002020022221020210202021021002210202102102021021002210202020202102100221020202102021021002202021021020210210022102021020202021002202102020210210210022021020202102102100221021021021020210210022021020202102102100020200222210202020202102100221021021020202102100221020210202021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002022210202020202021002210210210202021021002210202102020210210022020202020210022102021021020210210022102021020210210210022102102020210210210022020210202102102100220202020202100220210202020210210022102021020202102100220202020202100220210210202021021002202102020210210210022102102102102021021002210202102102021021002202020202021002210202020210210022020202102102100220202020202100220202102021021021002210210210210202102100220202020202100221020202021021002202102020210210022020202021021002202102102102021000022220202102021021021002210202102020210210022021020202102102100221020210210202102100221021020202102102100221020210202020210022021020202102102100220210202021021021002210210210210202102100220210202021021021000202000", - "record": { - "accepted": false, - "nameError": "", - "emailError": "", - "ageError": "Age must be from 18 to 120.", - "termsError": "" - } + "result": "22221020202020210210022102102020202102100221021020202021021002210202102020210210022020202021021021002202021020210210210022102021020202102100220202102020210210002202100200222202102102102021021002210202020202102100221020210210202102100221020210202021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002020022221020210202021021002210202102102021021002210202020202102100221020202102021021002202021021020210210022102021020202021002202102020210210210022021020202102102100221021021021020210210022021020202102102100020200222210202020202102100221021021020202102100221020210202021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002022210202020202021002210210210202021021002210202102020210210022020202020210022102021021020210210022102021020210210210022102102020210210210022020210202102102100220202020202100220210202020210210022102021020202102100220202020202100220210210202021021002202102020210210210022102102102102021021002210202102102021021002202020202021002210202020210210022020202102102100220202020202100220202102021021021002210210210210202102100220202020202100221020202021021002202102020210210022020202021021002202102102102021000022220202102021021021002210202102020210210022021020202102102100221020210210202102100221021020202102102100221020210202020210022021020202102102100220210202021021021002210210210210202102100220210202021021021000202000" }, { "export": "main", @@ -1694,14 +1423,7 @@ ], "input": null, "terminal": "", - "result": "222210202020202102100221021020202021021002210210202020210210022102021020202102100220202020210210210022020210202102102100221020210202021021002202021020202102100022021002002222021021021020210210022102020202021021002210202102102021021002210202102020210210022102021020202021002202102020210210210022021020202102102100221021021021020210210022021020202102102100020222021021021020202100221020202020210210022102021021020210210022102021020202102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210210202021021021002210210202020210210022102020202021021002202021021020210210022102020202021021002202102020210210210022020202020210022020210202102102100221020210202021021002202020210210210210022020210202102102100220210210210202100002222102021020202102100221020210210202102100221020202020210210022102020210202102100220202102102021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002022210202102020202100221020210210202102100221020202020210210022102020210202102100220202102102021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022102102020210210210022102102020202102100221020202020210210022020210210202102100221020202020210210022021020202102102100220202020202100220202102021021021002210202102020210210022020202102102102100220202102021021021002202102102102021000022221020202020210210022102102102020210210022102021020202102100221020210202020210022021020202102102100220210202021021021002210210210210202102100220210202021021021000202221020202020202100221021021020202102100221020210202021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022102020202021021002202020202021002210210202020210210022102020202021021002202102102102021021002210210210210202102100220210210210202102100221020202102021021002210210202020210210022102020202021021002202021021020210210022020202020210022021021021020210210022102020202021021002202021020210210210022102021020210210210022021020202102102100221020202020210210022020210210202102100220210210210202100002222020210202102102100221020210202021021002202102020210210210022102021021020210210022102102020210210210022102021020202021002202102020210210210022021020202102102100221021021021020210210022021020202102102100020222102020202020210022102102020202102100221021020202021021002210202102020210210022020202021021021002202021020210210210022020202020210022020210202102102100220202021020210210022102021020202102100220202020202100220202102021021021002210202102020210210022021020202102102100221020210210202102100221021020202102102100220210210210202100000", - "record": { - "accepted": false, - "nameError": "Name must be scalar text.", - "emailError": "Email must be scalar text.", - "ageError": "Age must be a canonical natural.", - "termsError": "Accept the terms." - } + "result": "222210202020202102100221021020202021021002210210202020210210022102021020202102100220202020210210210022020210202102102100221020210202021021002202021020202102100022021002002222021021021020210210022102020202021021002210202102102021021002210202102020210210022102021020202021002202102020210210210022021020202102102100221021021021020210210022021020202102102100020222021021021020202100221020202020210210022102021021020210210022102021020202102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210210202021021021002210210202020210210022102020202021021002202021021020210210022102020202021021002202102020210210210022020202020210022020210202102102100221020210202021021002202020210210210210022020210202102102100220210210210202100002222102021020202102100221020210210202102100221020202020210210022102020210202102100220202102102021021002210202102020202100220210202021021021002202102020210210210022102102102102021021002202102020210210210002022210202102020202100221020210210202102100221020202020210210022102020210202102100220202102102021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022102102020210210210022102102020202102100221020202020210210022020210210202102100221020202020210210022021020202102102100220202020202100220202102021021021002210202102020210210022020202102102102100220202102021021021002202102102102021000022221020202020210210022102102102020210210022102021020202102100221020210202020210022021020202102102100220210202021021021002210210210210202102100220210202021021021000202221020202020202100221021021020202102100221020210202021021002202020202021002210202102102021021002210202102021021021002210210202021021021002202021020210210210022020202020210022021020202021021002210202102020210210022020202020210022102020202021021002202020202021002210210202020210210022102020202021021002202102102102021021002210210210210202102100220210210210202102100221020202102021021002210210202020210210022102020202021021002202021021020210210022020202020210022021021021020210210022102020202021021002202021020210210210022102021020210210210022021020202102102100221020202020210210022020210210202102100220210210210202100002222020210202102102100221020210202021021002202102020210210210022102021021020210210022102102020210210210022102021020202021002202102020210210210022021020202102102100221021021021020210210022021020202102102100020222102020202020210022102102020202102100221021020202021021002210202102020210210022020202021021021002202021020210210210022020202020210022020210202102102100220202021020210210022102021020202102100220202020202100220202102021021021002210202102020210210022021020202102102100221020210210202102100221021020202102102100220210210210202100000" } ] }, @@ -1719,12 +1441,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100221021020202021021002202020210202102100221020210202021021002210202102102021021002210202020202102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100221000222202021020202102100221020202102021021002210210202021021021002202020202102102100220202102102021021002210202020202102100221020202102102102100220210210210202021002210202020202102100221020210210202102100221020210202021021000202220210202102020210022102020202021021002210202102102021021002210202102020210210022102102020210210210000222210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100020222021020210202102100221020202020210210022102021021020210210022102021020202102100221021020202102102100220202020202021002210202102020210210022020202102102102100221020202020210210022102021021020210210022020202021021021002202021021020210210022102021020202102100220210210210202100221021021021020210210022021020202102102100221021021020202102100000", - "record": { - "schemaVersion": 1, - "displayName": "James", - "email": "james@example.org" - } + "result": "22221021020202102102100221021020202021021002202020210202102100221020210202021021002210202102102021021002210202020202102100220210210202102021002210202102020210210022021020202102102100221021020202102102100221020202102021021002210210210210202102100220210210210202102100022100221000222202021020202102100221020202102021021002210210202021021021002202020202102102100220202102102021021002210202020202102100221020202102102102100220210210210202021002210202020202102100221020210210202102100221020210202021021000202220210202102020210022102020202021021002210202102102021021002210202102020210210022102102020210210210000222210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100020222021020210202102100221020202020210210022102021021020210210022102021020202102100221021020202102102100220202020202021002210202102020210210022020202102102102100221020202020210210022102021021020210210022020202021021021002202021021020210210022102021020202102100220210210210202100221021021021020210210022021020202102102100221021021020202102100000" }, { "export": "v1", @@ -1733,12 +1450,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002210210202020210210022020202102021021002210202102020210210022102021021020210210022102020202021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002210002222020210202021021002210202021020210210022102102020210210210022020202021021021002202021021020210210022102020202021021002210202021021021021002202102102102020210022102020202021021002210202102102021021002210202102020210210002022210210202102102102021021021002202102021020210210210202102102021020202100220210202020202102020210210202102102102102100002222102021020202102100221020210210202102100221020202020210210022102020210202102100220202102102021021000202000", - "record": { - "schemaVersion": 1, - "displayName": "λ雪🙂", - "email": "" - } + "result": "222210210202021021021002210210202020210210022020202102021021002210202102020210210022102021021020210210022102020202021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002210002222020210202021021002210202021020210210022102102020210210210022020202021021021002202021021020210210022102020202021021002210202021021021021002202102102102020210022102020202021021002210202102102021021002210202102020210210002022210210202102102102021021021002202102021020210210210202102102021020202100220210202020202102020210210202102102102102100002222102021020202102100221020210210202102100221020202020210210022102020210202102100220202102102021021000202000" }, { "export": "v1", @@ -1747,12 +1459,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002210210202020210210022020202102021021002210202102020210210022102021021020210210022102020202021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002210002222020210202021021002210202021020210210022102102020210210210022020202021021021002202021021020210210022102020202021021002210202021021021021002202102102102020210022102020202021021002210202102102021021002210202102020210210002022202021021021021002210210202021021021002210210202020210210022021020202102102100221020202102021021002202020202102102100220202102021021021002202102102102102100002222102021020202102100221020210210202102100221020202020210210022102020210202102100220202102102021021000202221020202020210210022021020202021002202102020202102100220202020202021002210202102020210210022020202102102102100221020202020210210022102021021020210210022020202021021021002202021021020210210022102021020202102100220210210210202100221021021021020210210022021020202102102100221021021020202102100000", - "record": { - "schemaVersion": 1, - "displayName": "<script>", - "email": "a\"b@example.org" - } + "result": "222210210202021021021002210210202020210210022020202102021021002210202102020210210022102021021020210210022102020202021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002210002222020210202021021002210202021020210210022102102020210210210022020202021021021002202021021020210210022102020202021021002210202021021021021002202102102102020210022102020202021021002210202102102021021002210202102020210210002022202021021021021002210210202021021021002210210202020210210022021020202102102100221020202102021021002202020202102102100220202102021021021002202102102102102100002222102021020202102100221020210210202102100221020202020210210022102020210202102100220202102102021021000202221020202020210210022021020202021002202102020202102100220202020202021002210202102020210210022020202102102102100221020202020210210022102021021020210210022020202021021021002202021021020210210022102021020202102100220210210210202100221021021021020210210022021020202102102100221021021020202102100000" }, { "export": "v1", @@ -1761,11 +1468,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210210202102102021002202102102102021021002210202020202102100221020210210202102100221020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100221020210210210202100220210210210202100000", - "record": { - "status": "error", - "message": "Expected [name email]." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210210202102102021002202102102102021021002210202020202102100221020210210202102100221020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100221020210210210202100220210210210202100000" }, { "export": "v1", @@ -1774,11 +1477,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210210202102102021002202102102102021021002210202020202102100221020210210202102100221020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100221020210210210202100220210210210202100000", - "record": { - "status": "error", - "message": "Expected [name email]." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210210202102102021002202102102102021021002210202020202102100221020210210202102100221020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100221020210210210202100220210210210202100000" }, { "export": "v1", @@ -1787,11 +1486,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210210202102102021002202102102102021021002210202020202102100221020210210202102100221020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100221020210210210202100220210210210202100000", - "record": { - "status": "error", - "message": "Expected [name email]." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210210202102102021002202102102102021021002210202020202102100221020210210202102100221020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100221020210210210202100220210210210202100000" }, { "export": "v1", @@ -1800,11 +1495,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222021021021020202100221020202020210210022102021021020210210022102021020202102100220202020202100221020202020210210022021021021020210210022020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210210202021021021002210210202020210210022102020202021021002202021021020210210022102020202021021002202102020210210210022020202020210022020210202102102100221020210202021021002202020210210210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Name and email must be scalar text." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222021021021020202100221020202020210210022102021021020210210022102021020202102100220202020202100221020202020210210022021021021020210210022020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210210202021021021002210210202020210210022102020202021021002202021021020210210022102020202021021002202102020210210210022020202020210022020210202102102100221020210202021021002202020210210210210022020210202102102100220210210210202100000" }, { "export": "v1", @@ -1813,11 +1504,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Expected a list." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000" }, { "export": "v2", @@ -1826,13 +1513,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002210210202020210210022020202102021021002210202102020210210022102021021020210210022102020202021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002202100022220202102020210210022102020210202102100221021020202102102100220202020210210210022020210210202102100221020202020210210022102020210210210210022021021021020202100221020202020210210022102021021020210210022102021020202102100020222021020210202021002210202020202102100221020210210202102100221020210202021021002210210202021021021000022221020210202021021002210202102102021021002210202020202102100221020202102021021002202021021020210210002022202102021020210210022102020202021021002210202102102021021002210202102020210210022102102020210210210022020202020202100221020210202021021002202020210210210210022102020202021021002210202102102021021002202020202102102100220202102102021021002210202102020210210022021021021020210022102102102102021021002202102020210210210022102102102020210210000222210202102102021021002210202020202102100220210202021021021002210210202102021021002210202102020210210022020210202102102100221020202102021021002202102102102021021002210210210202021021002210210210210202021002202020202102102100220202102021021021002210202021020202100220210210210202102100022021002000", - "record": { - "schemaVersion": 2, - "displayName": "James", - "email": "james@example.org", - "marketingOptIn": false - } + "result": "222210210202021021021002210210202020210210022020202102021021002210202102020210210022102021021020210210022102020202021021002202102102021020210022102021020202102100220210202021021021002210210202021021021002210202021020210210022102102102102021021002202102102102021021000221002202100022220202102020210210022102020210202102100221021020202102102100220202020210210210022020210210202102100221020202020210210022102020210210210210022021021021020202100221020202020210210022102021021020210210022102021020202102100020222021020210202021002210202020202102100221020210210202102100221020210202021021002210210202021021021000022221020210202021021002210202102102021021002210202020202102100221020202102021021002202021021020210210002022202102021020210210022102020202021021002210202102102021021002210202102020210210022102102020210210210022020202020202100221020210202021021002202020210210210210022102020202021021002210202102102021021002202020202102102100220202102102021021002210202102020210210022021021021020210022102102102102021021002202102020210210210022102102102020210210000222210202102102021021002210202020202102100220210202021021021002210210202102021021002210202102020210210022020210202102102100221020202102021021002202102102102021021002210210210202021021002210210210210202021002202020202102102100220202102021021021002210202021020202100220210210210202102100022021002000" }, { "export": "v2", @@ -1841,13 +1522,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022102102020202102100220202021020210210022102021020202102100221020210210202102100221020202020210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022021000222202021020202102100221020202102021021002210210202021021021002202020202102102100220202102102021021002210202020202102100221020202102102102100220210210210202021002210202020202102100221020210210202102100221020210202021021000202221021020210210210202102102100220210202102021021021020210210202102020210022021020202020210202021021020210210210210210000222210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100020200222210202102102021021002210202020202102100220210202021021021002210210202102021021002210202102020210210022020210202102102100221020202102021021002202102102102021021002210210210202021021002210210210210202021002202020202102102100220202102021021021002210202021020202100220210210210202102100022021002000", - "record": { - "schemaVersion": 2, - "displayName": "λ雪🙂", - "email": "", - "marketingOptIn": false - } + "result": "2222102102020210210210022102102020202102100220202021020210210022102021020202102100221020210210202102100221020202020210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022021000222202021020202102100221020202102021021002210210202021021021002202020202102102100220202102102021021002210202020202102100221020202102102102100220210210210202021002210202020202102100221020210210202102100221020210202021021000202221021020210210210202102102100220210202102021021021020210210202102020210022021020202020210202021021020210210210210210000222210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100020200222210202102102021021002210202020202102100220210202021021021002210210202102021021002210202102020210210022020210202102102100221020202102021021002202102102102021021002210210210202021021002210210210210202021002202020202102102100220202102021021021002210202021020202100220210210210202102100022021002000" }, { "export": "v2", @@ -1856,13 +1531,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022102102020202102100220202021020210210022102021020202102100221020210210202102100221020202020210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022021000222202021020202102100221020202102021021002210210202021021021002202020202102102100220202102102021021002210202020202102100221020202102102102100220210210210202021002210202020202102100221020210210202102100221020210202021021000202220202102102102100221021020202102102100221021020202021021002202102020210210210022102020210202102100220202020210210210022020210202102102100220210210210210210000222210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100020222102020202021021002202102020202100220210202020210210022020202020202100221020210202021021002202020210210210210022102020202021021002210202102102021021002202020202102102100220202102102021021002210202102020210210022021021021020210022102102102102021021002202102020210210210022102102102020210210000222210202102102021021002210202020202102100220210202021021021002210210202102021021002210202102020210210022020210202102102100221020202102021021002202102102102021021002210210210202021021002210210210210202021002202020202102102100220202102021021021002210202021020202100220210210210202102100022021002000", - "record": { - "schemaVersion": 2, - "displayName": "<script>", - "email": "a\"b@example.org", - "marketingOptIn": false - } + "result": "2222102102020210210210022102102020202102100220202021020210210022102021020202102100221020210210202102100221020202020210210022021021020210202100221020210202021021002202102020210210210022102102020210210210022102020210202102100221021021021020210210022021021021020210210002210022021000222202021020202102100221020202102021021002210210202021021021002202020202102102100220202102102021021002210202020202102100221020202102102102100220210210210202021002210202020202102100221020210210202102100221020210202021021000202220202102102102100221021020202102102100221021020202021021002202102020210210210022102020210202102100220202020210210210022020210202102102100220210210210210210000222210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100020222102020202021021002202102020202100220210202020210210022020202020202100221020210202021021002202020210210210210022102020202021021002210202102102021021002202020202102102100220202102102021021002210202102020210210022021021021020210022102102102102021021002202102020210210210022102102102020210210000222210202102102021021002210202020202102100220210202021021021002210210202102021021002210202102020210210022020210202102102100221020202102021021002202102102102021021002210210210202021021002210210210210202021002202020202102102100220202102021021021002210202021020202100220210210210202102100022021002000" }, { "export": "v2", @@ -1871,11 +1540,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210210202102102021002202102102102021021002210202020202102100221020210210202102100221020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100221020210210210202100220210210210202100000", - "record": { - "status": "error", - "message": "Expected [name email]." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210210202102102021002202102102102021021002210202020202102100221020210210202102100221020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100221020210210210202100220210210210202100000" }, { "export": "v2", @@ -1884,11 +1549,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210210202102102021002202102102102021021002210202020202102100221020210210202102100221020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100221020210210210202100220210210210202100000", - "record": { - "status": "error", - "message": "Expected [name email]." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210210202102102021002202102102102021021002210202020202102100221020210210202102100221020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100221020210210210202100220210210210202100000" }, { "export": "v2", @@ -1897,11 +1558,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210210202102102021002202102102102021021002210202020202102100221020210210202102100221020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100221020210210210202100220210210210202100000", - "record": { - "status": "error", - "message": "Expected [name email]." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210210202102102021002202102102102021021002210202020202102100221020210210202102100221020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100221020210210210202100220210210210202100000" }, { "export": "v2", @@ -1910,11 +1567,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222021021021020202100221020202020210210022102021021020210210022102021020202102100220202020202100221020202020210210022021021021020210210022020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210210202021021021002210210202020210210022102020202021021002202021021020210210022102020202021021002202102020210210210022020202020210022020210202102102100221020210202021021002202020210210210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Name and email must be scalar text." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222021021021020202100221020202020210210022102021021020210210022102021020202102100220202020202100221020202020210210022021021021020210210022020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210210202021021021002210210202020210210022102020202021021002202021021020210210022102020202021021002202102020210210210022020202020210022020210202102102100221020210202021021002202020210210210210022020210202102102100220210210210202100000" }, { "export": "v2", @@ -1923,11 +1576,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Expected a list." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000" }, { "export": "v1", @@ -1936,11 +1585,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Expected a list." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000" }, { "export": "v1", @@ -1949,11 +1594,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210210202102102021002202102102102021021002210202020202102100221020210210202102100221020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100221020210210210202100220210210210202100000", - "record": { - "status": "error", - "message": "Expected [name email]." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210210202102102021002202102102102021021002210202020202102100221020210210202102100221020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100221020210210210202100220210210210202100000" }, { "export": "v1", @@ -1962,11 +1603,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222021021021020202100221020202020210210022102021021020210210022102021020202102100220202020202100221020202020210210022021021021020210210022020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210210202021021021002210210202020210210022102020202021021002202021021020210210022102020202021021002202102020210210210022020202020210022020210202102102100221020210202021021002202020210210210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Name and email must be scalar text." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222021021021020202100221020202020210210022102021021020210210022102021020202102100220202020202100221020202020210210022021021021020210210022020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210210202021021021002210210202020210210022102020202021021002202021021020210210022102020202021021002202102020210210210022020202020210022020210202102102100221020210202021021002202020210210210210022020210202102102100220210210210202100000" }, { "export": "v1", @@ -1975,11 +1612,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222021021021020202100221020202020210210022102021021020210210022102021020202102100220202020202100221020202020210210022021021021020210210022020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210210202021021021002210210202020210210022102020202021021002202021021020210210022102020202021021002202102020210210210022020202020210022020210202102102100221020210202021021002202020210210210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Name and email must be scalar text." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222021021021020202100221020202020210210022102021021020210210022102021020202102100220202020202100221020202020210210022021021021020210210022020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210210202021021021002210210202020210210022102020202021021002202021021020210210022102020202021021002202102020210210210022020202020210022020210202102102100221020210202021021002202020210210210210022020210202102102100220210210210202100000" }, { "export": "v2", @@ -1988,11 +1621,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Expected a list." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210202020202102100220202020202100220202102102021021002210202021020210210022102102020210210210022020210202102102100220210210210202100000" }, { "export": "v2", @@ -2001,11 +1630,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210210202102102021002202102102102021021002210202020202102100221020210210202102100221020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100221020210210210202100220210210210202100000", - "record": { - "status": "error", - "message": "Expected [name email]." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222102021020202021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021002202020202021002210210202102102021002202102102102021021002210202020202102100221020210210202102100221020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100221020210210210202100220210210210202100000" }, { "export": "v2", @@ -2014,11 +1639,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222021021021020202100221020202020210210022102021021020210210022102021020202102100220202020202100221020202020210210022021021021020210210022020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210210202021021021002210210202020210210022102020202021021002202021021020210210022102020202021021002202102020210210210022020202020210022020210202102102100221020210202021021002202020210210210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Name and email must be scalar text." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222021021021020202100221020202020210210022102021021020210210022102021020202102100220202020202100221020202020210210022021021021020210210022020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210210202021021021002210210202020210210022102020202021021002202021021020210210022102020202021021002202102020210210210022020202020210022020210202102102100221020210202021021002202020210210210210022020210202102102100220210210210202100000" }, { "export": "v2", @@ -2027,11 +1648,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222021021021020202100221020202020210210022102021021020210210022102021020202102100220202020202100221020202020210210022021021021020210210022020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210210202021021021002210210202020210210022102020202021021002202021021020210210022102020202021021002202102020210210210022020202020210022020210202102102100221020210202021021002202020210210210210022020210202102102100220210210210202100000", - "record": { - "status": "error", - "message": "Name and email must be scalar text." - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021021020210210022102021020202102100221021020202102102100221021020202102102100221020202020210210022102102102020210210022102021020202102100020222021021021020202100221020202020210210022102021021020210210022102021020202102100220202020202100221020202020210210022021021021020210210022020210202021021002202020202021002210202102020210210022102021021020210210022102020202021021002210202021020210210022020210210202102100220202020202100221020210210202102100221020210202102102100221021020202102102100220202102021021021002202020202021002202102020202102100221020210202021021002202020202021002210210202021021021002210210202020210210022102020202021021002202021021020210210022102020202021021002202102020210210210022020202020210022020210202102102100221020210202021021002202020210210210210022020210202102102100220210210210202100000" } ] } diff --git a/ext/demo-site/demos/practical-support.tri b/ext/demo-site/demos/practical-support.tri @@ -18,7 +18,8 @@ text? [char | rest] = case scalar? char of _ = false text? _ = false --- Scalar record: [fieldName tag value], where tags 0/1/2 mean text/natural/bool. +-- Retained environment probe data: [fieldName tag value]. +-- Tags 0/1/2 denote text/natural/bool; there is no special site output decoder. stringField name value = [name 0 value] numberField name value = [name 1 value] boolField name value = [name 2 value] diff --git a/ext/demo-site/dist/auto-interpretation.js b/ext/demo-site/dist/auto-interpretation.js @@ -0,0 +1,23 @@ +import { readableText } from './codecs.js'; +export const interpretationLabels = { + string: 'Text', number: 'Natural number', values: 'List · text / numbers', + bool: 'Boolean', bytes: 'Bytes', tricu: 'tricu · t source', triangle: '△ source', dag: 'DAG · shared △', ternary: 'Ternary', +}; +// A readability preference, not type inference. Empty text loses to natural zero; +// valid-but-invisible Unicode/control sequences remain available via manual Text. +export async function autoInterpretation(inspect, disposed) { + for (const output of ['string', 'number', 'values', 'bool', 'bytes']) { + try { + const result = await inspect(output); + if (result.type === 'string' && (typeof result.value !== 'string' || !readableText(result.value))) + continue; + return result; + } + catch (error) { + // A failed decoder is recoverable; a poisoned runtime is not another hint. + if (disposed()) + throw error; + } + } + return inspect('tricu'); +} diff --git a/ext/demo-site/dist/codecs.js b/ext/demo-site/dist/codecs.js @@ -129,7 +129,7 @@ export function makeLiteral(graph, value) { } } export function outputType(input) { - if (!['tree', 'string', 'number', 'bool', 'bytes', 'list', 'record', 'tricu', 'triangle', 'dag', 'ternary'].includes(String(input))) + if (!['tree', 'string', 'number', 'bool', 'bytes', 'list', 'values', 'tricu', 'triangle', 'dag', 'ternary'].includes(String(input))) throw new Error('Unsupported output codec'); return input; } @@ -139,7 +139,7 @@ export function view(graph, handle, type) { case 'triangle': case 'dag': case 'ternary': return treeResult(graph.snapshot(handle), type); - case 'record': return { type, value: readRecord(graph, handle) }; + case 'values': return { type, value: readList(graph, handle, 32).map(id => readScalar(graph, id)) }; case 'tree': return { type, value: graph.preview(handle) }; case 'string': return { type, value: readText(graph, handle) }; case 'number': return { type, value: readNatural(graph, handle).toString() }; @@ -160,42 +160,27 @@ export function view(graph, handle, type) { case 'list': return { type, value: readList(graph, handle, 32).map(id => graph.preview(id, 8)) }; } } -// Portable scalar-record convention, independent of executable semantics. -// List of [text key, natural tag, value]; 0 text, 1 safe natural, 2 Boolean. -export function readRecord(graph, handle) { - const result = Object.create(null); - let scalars = 0; - for (const row of readList(graph, handle, 32)) { - const fields = readList(graph, row, 3); - if (fields.length !== 3) - throw new Error('Record field must be [name tag value]'); - const name = readText(graph, fields[0], 128), tag = readNatural(graph, fields[1]); - if (!name || Object.hasOwn(result, name)) - throw new Error('Record field names must be nonempty and unique'); - let value; - if (tag === 0n) - value = readText(graph, fields[2]); - else if (tag === 1n) { - const n = readNatural(graph, fields[2]); - if (n > BigInt(Number.MAX_SAFE_INTEGER)) - throw new Error('Record number exceeds safe integer range'); - value = Number(n); - } - else if (tag === 2n) { - const node = graph.observe(fields[2]).node; - if (node.kind === 'leaf') - value = false; - else if (node.kind === 'stem' && graph.observe(node.child).node.kind === 'leaf') - value = true; - else - throw new Error('Invalid record Boolean'); - } - else - throw new Error('Unsupported record field tag'); - scalars += Array.from(name).length + (typeof value === 'string' ? Array.from(value).length : String(value).length); - if (scalars > 16_384) - throw new Error('Record output limit exceeded'); - result[name] = value; +// Deliberately conservative display policy shared by Auto and decoded lists. +// Unicode letters/marks/numbers/punctuation/symbols/spaces, text whitespace and +// joining characters are readable; controls/private-use/unassigned scalars aren't. +export function readableText(value) { + return value.length > 0 && /^[\p{L}\p{M}\p{N}\p{P}\p{S}\p{Zs}\t\n\r\u200c\u200d]+$/u.test(value); +} +export function readScalar(graph, handle) { + try { + const value = readText(graph, handle); + if (readableText(value)) + return { type: 'string', value }; } - return result; + catch { /* Try a natural interpretation of this same tree. */ } + return { type: 'number', value: readNatural(graph, handle).toString() }; +} +export function valueText(result) { + if ('file' in result) + return result.file.text; + if (result.type === 'values') + return '[' + result.value.map(item => item.type === 'string' ? JSON.stringify(item.value) : item.value).join(' ') + ']'; + if (result.type === 'tree' || result.type === 'list') + throw new Error('Choose a source interpretation for trees'); + return typeof result.value === 'string' ? result.value : JSON.stringify(result.value, null, 2); } diff --git a/ext/demo-site/dist/definition-inspector.js b/ext/demo-site/dist/definition-inspector.js @@ -1,5 +1,6 @@ import { tokenize } from './syntax.js'; -import { outputType } from './codecs.js'; +import { outputType, valueText } from './codecs.js'; +import { interpretationLabels } from './auto-interpretation.js'; // Decoration only. The runtime resolves names; this never parses executable code. export function definitionSites(source) { const seen = new Set(); @@ -10,13 +11,7 @@ export function definitionSites(source) { return true; }).map(token => ({ name: token.text, start: token.start })); } -export function inspectionText(result) { - if ('file' in result) - return result.file.text; - if (result.type === 'tree' || result.type === 'list') - throw new Error('Choose a source interpretation for trees'); - return typeof result.value === 'string' ? result.value : JSON.stringify(result.value, null, 2); -} +export { valueText as inspectionText } from './codecs.js'; export function definitionInspector(input, request) { const wrapper = input.parentElement; wrapper.classList.add('has-definition-inspector'); @@ -30,7 +25,7 @@ export function definitionInspector(input, request) { card.setAttribute('aria-label', 'Compiled definition'); const title = document.createElement('strong'), format = document.createElement('select'); format.setAttribute('aria-label', 'Definition interpretation'); - for (const [value, label] of [['tricu', 'tricu · t source'], ['triangle', '△ source'], ['dag', 'DAG · shared △'], ['ternary', 'Ternary'], ['string', 'Text'], ['number', 'Natural number'], ['bool', 'Boolean'], ['bytes', 'Bytes'], ['record', 'Scalar record']]) + for (const [value, label] of [['auto', 'Auto'], ['tricu', 'tricu · t source'], ['triangle', '△ source'], ['dag', 'DAG · shared △'], ['ternary', 'Ternary'], ['string', 'Text'], ['number', 'Natural number'], ['bool', 'Boolean'], ['bytes', 'Bytes'], ['values', 'List · text / numbers']]) format.add(new Option(label, value)); const close = document.createElement('button'); close.textContent = 'Close'; @@ -85,7 +80,7 @@ export function definitionInspector(input, request) { pending = ++serial; status.textContent = 'Reading compiled tree… Stop is available in the toolbar.'; result.textContent = ''; - request(pending, selected, outputType(format.value)); + request(pending, selected, format.value === 'auto' ? 'auto' : outputType(format.value)); } function schedule() { if (scheduled) @@ -99,6 +94,7 @@ export function definitionInspector(input, request) { return; } selected = name; + format.value = 'auto'; title.textContent = name; card.hidden = false; last = ''; @@ -193,8 +189,8 @@ export function definitionInspector(input, request) { pending = undefined; if (!selected || !ready) return true; - status.textContent = message.type === 'inspection-error' ? `Cannot interpret this tree: ${message.message}` : `Compiled definition · ${format.selectedOptions[0].textContent} · No arguments applied; IO is not executed.`; - const value = message.type === 'inspected' ? inspectionText(message.result) : ''; + status.textContent = message.type === 'inspection-error' ? `Cannot interpret this tree: ${message.message}` : `Compiled definition · ${format.value === 'auto' ? 'Auto → ' + (interpretationLabels[message.result.type] ?? message.result.type) : format.selectedOptions[0].textContent} · No arguments applied; IO is not executed.`; + const value = message.type === 'inspected' ? valueText(message.result) : ''; result.textContent = value.slice(0, 16_384); if (value.length > 16_384) status.textContent += ' · Preview: first 16,384 characters.'; diff --git a/ext/demo-site/dist/output-app.js b/ext/demo-site/dist/output-app.js @@ -1,3 +1,4 @@ +import { valueText } from './codecs.js'; // One output surface. The saved payload carries its own provenance/format; // changing controls cannot relabel an earlier result or change its download. export function createOutput() { @@ -25,8 +26,8 @@ export function createOutput() { } if (value.type === 'tree' || value.type === 'list') throw new Error('Select tricu source or DAG to inspect tree results'); - const content = typeof value.value === 'string' ? value.value : JSON.stringify(value.value, null, 2); - show(content, value.type === 'record' || value.type === 'bytes' ? 'result.json' : 'result.txt', `${description} · ${value.type}`); + const content = valueText(value); + show(content, value.type === 'bytes' ? 'result.json' : 'result.txt', `${description} · ${value.type}`); } copy.onclick = async () => { const value = saved; diff --git a/ext/demo-site/dist/wasm-worker.js b/ext/demo-site/dist/wasm-worker.js @@ -1,3 +1,4 @@ +import { autoInterpretation } from './auto-interpretation.js'; import { importPlan } from './import-plan.js'; import { localModuleInputs, validateLocalModule } from './local-modules.js'; import { resumeValue } from './io.js'; @@ -99,7 +100,10 @@ scope.onmessage = ({ data }) => { try { // Observe the existing binding with no arguments, expression compilation, // or IO interpreter. Observation/decoding can still require reduction. - const result = await session.inspectDefinition(m['name'], outputType(m['output'])); + const name = m['name']; + const result = m['output'] === 'auto' + ? await autoInterpretation(output => session.inspectDefinition(name, output), () => session.disposed) + : await session.inspectDefinition(name, outputType(m['output'])); send({ type: 'inspected', id, result }); } catch (e) { diff --git a/ext/demo-site/environments.json b/ext/demo-site/environments.json @@ -26,7 +26,7 @@ "boolField", "failure" ], - "sourceSha256": "1b5358c15eaabc74273a0d5395d12793137b257019b2c07d03818852505068bb" + "sourceSha256": "b2c591705e681706411d416bb33db5f6cdf310b6a0241e5df85e049dfeb73ebb" } } } diff --git a/ext/demo-site/index.html b/ext/demo-site/index.html @@ -62,7 +62,7 @@ <div class="output-toolbar" role="group" aria-label="Evaluation settings"> <div><label for="output-target">Output</label><select id="output-target"><option value="result">Evaluated result</option><option value="definition">Stored definition</option></select></div> <div><label for="export" title="Select a stored definition or seed the expression with a call">Definition</label><select id="export" disabled></select></div> - <div><label for="output-type">Interpretation</label><select id="output-type"><option value="tricu">tricu · t source</option><option value="triangle">△ source</option><option value="dag">DAG · shared △</option><option value="ternary">Ternary</option><option value="string">Text</option><option value="number">Natural number</option><option value="bool">Boolean</option><option value="bytes">Bytes</option><option value="record">Scalar record</option></select></div> + <div><label for="output-type">Interpretation</label><select id="output-type"><option value="tricu">tricu · t source</option><option value="triangle">△ source</option><option value="dag">DAG · shared △</option><option value="ternary">Ternary</option><option value="string">Text</option><option value="number">Natural number</option><option value="bool">Boolean</option><option value="bytes">Bytes</option><option value="values">List · text / numbers</option></select></div> <div><label for="mode">Execution</label><select id="mode"><option value="pure">Pure value</option><option value="io">Text / line IO</option></select></div> </div> <div id="expression-inputs"><label for="expression-editor">Expression <span>· use the loaded definitions</span></label><textarea id="expression-editor" rows="3" maxlength="32768" spellcheck="false" autocapitalize="off" autocorrect="off" aria-describedby="expression-help"></textarea><p id="expression-help" class="hint">Use literals, applications and bindings from the current scope. Declare imports in the source editor.</p></div> diff --git a/ext/demo-site/lexer-demo.json b/ext/demo-site/lexer-demo.json @@ -13,15 +13,7 @@ ], "input": null, "terminal": "", - "result": "222210202102102021021002210202020202102100220202102021021021002210210202020210210022020202102021021002210202102020210210022020210202021021000202220202021020210210022102021020202102100220202102102021021002202021021020210210022102102102102021021000022220210202021021021002210202102020210210022102021021020210210022102020202021021002210202021020210210022021021021020210210022102020210202102100220210210210202102100221021021020202102100020222020210210202100221021021020210210210022102102102102021021002202102020210210210022020210210202102100220202102020210210000222202021021020210210022102020210202102100220210210210202102100221020210202021021000221002210002222102102020202102100221021021021020210210022020210210202102100221020210202102102100221020210210202102100220210210210202102100022100220210210002222102102102102021021002202102102020210210022021021020202102100221021020202102102100221020210202021021002202021020210210210002210022102021000222210210202020210210022102102102102021021002202102102102021021002210210202021021021002210202102021021021002210202102102021021002210202102020210210022020210202021021000220210021000", - "record": { - "matched": "hello", - "remaining": ",world", - "line": 1, - "column": 6, - "offset": 5, - "consumed": true - } + "result": "222210202102102021021002210202020202102100220202102021021021002210210202020210210022020202102021021002210202102020210210022020210202021021000202220202021020210210022102021020202102100220202102102021021002202021021020210210022102102102102021021000022220210202021021021002210202102020210210022102021021020210210022102020202021021002210202021020210210022021021021020210210022102020210202102100220210210210202102100221021021020202102100020222020210210202100221021021020210210210022102102102102021021002202102020210210210022020210210202102100220202102020210210000222202021021020210210022102020210202102100220210210210202102100221020210202021021000221002210002222102102020202102100221021021021020210210022020210210202102100221020210202102102100221020210210202102100220210210210202102100022100220210210002222102102102102021021002202102102020210210022021021020202102100221021020202102102100221020210202021021002202021020210210210002210022102021000222210210202020210210022102102102102021021002202102102102021021002210210202021021021002210202102021021021002210202102102021021002210202102020210210022020210202021021000220210021000" }, { "export": "scanWord", @@ -30,15 +22,7 @@ ], "input": null, "terminal": "", - "result": "22221020210210202102100221020202020210210022020210202102102100221021020202021021002202020210202102100221020210202021021002202021020202102100020200222202102020210210210022102021020202102100221020210210202102100221020202020210210022102020210202102100220210210210202102100221020202102021021002202102102102021021002210210210202021021000202002222020210210202102100221020202102021021002202102102102021021002210202102020210210002210022100022221021020202021021002210210210210202102100220202102102021021002210202102021021021002210202102102021021002202102102102021021000221002210002222102102102102021021002202102102020210210022021021020202102100221021020202102102100221020210202021021002202021020210210210002210020022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002000", - "record": { - "matched": "", - "remaining": "", - "line": 1, - "column": 1, - "offset": 0, - "consumed": false - } + "result": "22221020210210202102100221020202020210210022020210202102102100221021020202021021002202020210202102100221020210202021021002202021020202102100020200222202102020210210210022102021020202102100221020210210202102100221020202020210210022102020210202102100220210210210202102100221020202102021021002202102102102021021002210210210202021021000202002222020210210202102100221020202102021021002202102102102021021002210202102020210210002210022100022221021020202021021002210210210210202102100220202102102021021002210202102021021021002210202102102021021002202102102102021021000221002210002222102102102102021021002202102102020210210022021021020202102100221021020202102102100221020210202021021002202021020210210210002210020022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002000" }, { "export": "scanWord", @@ -47,15 +31,7 @@ ], "input": null, "terminal": "", - "result": "222210202102102021021002210202020202102100220202102021021021002210210202020210210022020202102021021002210202102020210210022020210202021021000202002222021020202102102100221020210202021021002210202102102021021002210202020202102100221020202102021021002202102102102021021002210202021020210210022021021021020210210022102102102020210210002022202020210202021002210202102020210210022020210210202102100220202102102021021002210210210210202102100002222020210210202102100221020202102021021002202102102102021021002210202102020210210002210022100022221021020202021021002210210210210202102100220202102102021021002210202102021021021002210202102102021021002202102102102021021000221002210002222102102102102021021002202102102020210210022021021020202102100221021020202102102100221020210202021021002202021020210210210002210020022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002000", - "record": { - "matched": "", - "remaining": "Hello", - "line": 1, - "column": 1, - "offset": 0, - "consumed": false - } + "result": "222210202102102021021002210202020202102100220202102021021021002210210202020210210022020202102021021002210202102020210210022020210202021021000202002222021020202102102100221020210202021021002210202102102021021002210202020202102100221020202102021021002202102102102021021002210202021020210210022021021021020210210022102102102020210210002022202020210202021002210202102020210210022020210210202102100220202102102021021002210210210210202102100002222020210210202102100221020202102021021002202102102102021021002210202102020210210002210022100022221021020202021021002210210210210202102100220202102102021021002210202102021021021002210202102102021021002202102102102021021000221002210002222102102102102021021002202102102020210210022021021020202102100221021020202102102100221020210202021021002202021020210210210002210020022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002000" }, { "export": "scanWord", @@ -64,15 +40,7 @@ ], "input": null, "terminal": "", - "result": "2222102021021020210210022102020202021021002202021020210210210022102102020202102100220202021020210210022102021020202102100220202102020210210002022210202020202102100220210202020210210022102102020202102100002222021020202102102100221020210202021021002210202102102021021002210202020202102100221020202102021021002202102102102021021002210202021020210210022021021021020210210022102102102020210210002022210202021020210210210000222202021021020210210022102020210202102100220210210210202102100221020210202021021000221002210002222102102020202102100221021021021020210210022020210210202102100221020210202102102100221020210210202102100220210210210202102100022100220202100022221021021021020210210022021021020202102100220210210202021021002210210202021021021002210202102020210210022020210202102102100022100221021000222210210202020210210022102102102102021021002202102102102021021002210210202021021021002210202102021021021002210202102102021021002210202102020210210022020210202021021000220210021000", - "record": { - "matched": "abc", - "remaining": "\u00e9", - "line": 1, - "column": 4, - "offset": 3, - "consumed": true - } + "result": "2222102021021020210210022102020202021021002202021020210210210022102102020202102100220202021020210210022102021020202102100220202102020210210002022210202020202102100220210202020210210022102102020202102100002222021020202102102100221020210202021021002210202102102021021002210202020202102100221020202102021021002202102102102021021002210202021020210210022021021021020210210022102102102020210210002022210202021020210210210000222202021021020210210022102020210202102100220210210210202102100221020210202021021000221002210002222102102020202102100221021021021020210210022020210210202102100221020210202102102100221020210210202102100220210210210202102100022100220202100022221021021021020210210022021021020202102100220210210202021021002210210202021021021002210202102020210210022020210202102102100022100221021000222210210202020210210022102102102102021021002202102102102021021002210210202021021021002210202102021021021002210202102102021021002210202102020210210022020210202021021000220210021000" }, { "export": "scanWhitespace", @@ -81,15 +49,7 @@ ], "input": null, "terminal": "", - "result": "222210202102102021021002210202020202102100220202102021021021002210210202020210210022020202102021021002210202102020210210022020210202021021000202220202020202100220210202100221020202100002222021020202102102100221020210202021021002210202102102021021002210202020202102100221020202102021021002202102102102021021002210202021020210210022021021021020210210022102102102020210210002022210210210202102102100221021021021020210210022021020202102102100220202102020210210000222202021021020210210022102020210202102100220210210210202102100221020210202021021000221002202100022221021020202021021002210210210210202102100220202102102021021002210202102021021021002210202102102021021002202102102102021021000221002202100022221021021021020210210022021021020202102100220210210202021021002210210202021021021002210202102020210210022020210202102102100022100221021000222210210202020210210022102102102102021021002202102102102021021002210210202021021021002210202102021021021002210202102102021021002210202102020210210022020210202021021000220210021000", - "record": { - "matched": " \n\t", - "remaining": "word", - "line": 2, - "column": 2, - "offset": 3, - "consumed": true - } + "result": "222210202102102021021002210202020202102100220202102021021021002210210202020210210022020202102021021002210202102020210210022020210202021021000202220202020202100220210202100221020202100002222021020202102102100221020210202021021002210202102102021021002210202020202102100221020202102021021002202102102102021021002210202021020210210022021021021020210210022102102102020210210002022210210210202102102100221021021021020210210022021020202102102100220202102020210210000222202021021020210210022102020210202102100220210210210202102100221020210202021021000221002202100022221021020202021021002210210210210202102100220202102102021021002210202102021021021002210202102102021021002202102102102021021000221002202100022221021021021020210210022021021020202102100220210210202021021002210210202021021021002210202102020210210022020210202102102100022100221021000222210210202020210210022102102102102021021002202102102102021021002210210202021021021002210202102021021021002210202102102021021002210202102020210210022020210202021021000220210021000" }, { "export": "scanWhitespace", @@ -98,15 +58,7 @@ ], "input": null, "terminal": "", - "result": "22221020210210202102100221020202020210210022020210202102102100221021020202021021002202020210202102100221020210202021021002202021020202102100020222021020210022021020210000222202102020210210210022102021020202102100221020210210202102100221020202020210210022102020210202102100220210210210202102100221020202102021021002202102102102021021002210210210202021021000202221020210202021021002202102102102021021002202021020202102100002222020210210202102100221020202102021021002202102102102021021002210202102020210210002210022102100022221021020202021021002210210210210202102100220202102102021021002210202102021021021002210202102102021021002202102102102021021000221002210002222102102102102021021002202102102020210210022021021020202102100221021020202102102100221020210202021021002202021020210210210002210022021000222210210202020210210022102102102102021021002202102102102021021002210210202021021021002210202102021021021002210202102102021021002210202102020210210022020210202021021000220210021000", - "record": { - "matched": "\n\n", - "remaining": "end", - "line": 3, - "column": 1, - "offset": 2, - "consumed": true - } + "result": "22221020210210202102100221020202020210210022020210202102102100221021020202021021002202020210202102100221020210202021021002202021020202102100020222021020210022021020210000222202102020210210210022102021020202102100221020210210202102100221020202020210210022102020210202102100220210210210202102100221020202102021021002202102102102021021002210210210202021021000202221020210202021021002202102102102021021002202021020202102100002222020210210202102100221020202102021021002202102102102021021002210202102020210210002210022102100022221021020202021021002210210210210202102100220202102102021021002210202102021021021002210202102102021021002202102102102021021000221002210002222102102102102021021002202102102020210210022021021020202102100221021020202102102100221020210202021021002202021020210210210002210022021000222210210202020210210022102102102102021021002202102102102021021002210210202021021021002210202102021021021002210202102102021021002210202102020210210022020210202021021000220210021000" }, { "export": "scanWhitespace", @@ -115,15 +67,7 @@ ], "input": null, "terminal": "", - "result": "22221020210210202102100221020202020210210022020210202102102100221021020202021021002202020210202102100221020210202021021002202021020202102100020200222202102020210210210022102021020202102100221020210210202102100221020202020210210022102020210202102100220210210210202102100221020202102021021002202102102102021021002210210210202021021000202221020210210022021020210022102102102021021021002210210210210202102100220210202021021021002202021020202102100002222020210210202102100221020202102021021002202102102102021021002210202102020210210002210022100022221021020202021021002210210210210202102100220202102102021021002210202102021021021002210202102102021021002202102102102021021000221002210002222102102102102021021002202102102020210210022021021020202102100221021020202102102100221020210202021021002202021020210210210002210020022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002000", - "record": { - "matched": "", - "remaining": "\r\nword", - "line": 1, - "column": 1, - "offset": 0, - "consumed": false - } + "result": "22221020210210202102100221020202020210210022020210202102102100221021020202021021002202020210202102100221020210202021021002202021020202102100020200222202102020210210210022102021020202102100221020210210202102100221020202020210210022102020210202102100220210210210202102100221020202102021021002202102102102021021002210210210202021021000202221020210210022021020210022102102102021021021002210210210210202102100220210202021021021002202021020202102100002222020210210202102100221020202102021021002202102102102021021002210202102020210210002210022100022221021020202021021002210210210210202102100220202102102021021002210202102021021021002210202102102021021002202102102102021021000221002210002222102102102102021021002202102102020210210022021021020202102100221021020202102102100221020210202021021002202021020210210210002210020022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002000" }, { "export": "scanWhitespace", @@ -132,15 +76,7 @@ ], "input": null, "terminal": "", - "result": "2222102021021020210210022102020202021021002202021020210210210022102102020202102100220202021020210210022102021020202102100220202102020210210002020022220210202021021021002210202102020210210022102021021020210210022102020202021021002210202021020210210022021021021020210210022102020210202102100220210210210202102100221021021020202102100020222102020210202102102100002222020210210202102100221020202102021021002202102102102021021002210202102020210210002210022100022221021020202021021002210210210210202102100220202102102021021002210202102021021021002210202102102021021002202102102102021021000221002210002222102102102102021021002202102102020210210022021021020202102100221021020202102102100221020210202021021002202021020210210210002210020022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002000", - "record": { - "matched": "", - "remaining": "\u00e9", - "line": 1, - "column": 1, - "offset": 0, - "consumed": false - } + "result": "2222102021021020210210022102020202021021002202021020210210210022102102020202102100220202021020210210022102021020202102100220202102020210210002020022220210202021021021002210202102020210210022102021021020210210022102020202021021002210202021020210210022021021021020210210022102020210202102100220210210210202102100221021021020202102100020222102020210202102102100002222020210210202102100221020202102021021002202102102102021021002210202102020210210002210022100022221021020202021021002210210210210202102100220202102102021021002210202102021021021002210202102102021021002202102102102021021000221002210002222102102102102021021002202102102020210210022021021020202102100221021020202102102100221020210202021021002202021020210210210002210020022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002000" } ] } diff --git a/ext/demo-site/parser-demo.json b/ext/demo-site/parser-demo.json @@ -13,15 +13,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221021021021020210210022102102021020210210000222202102102102021021002210202020202102100221020210210202102100221020210202021021002210210202021021021000202220210202021021021002210202102020210210022020210202021021002202021021020210022020202020210022102102102020210210022021020202102102100221020210202021021002210202102020210210022021021021020210210022020210210202100220202020202100220210202020210210022020210210202102100221020210202102102100221020210202021021000022221021020202021021002210210210210202102100221020210202102102100220210210210202102100220202102021021021000221002210210002222021020202102102100221020210202021021002210202102102021021002210202020202102100221020202102021021002202102102102021021002210202021020210210022021021021020210210022102102102020210210002020022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002100222210210202020210210022102102102102021021002210202102102021021002210202102102021021002210202021020210210022020210202102102100220202102021021021002210202102020210210022020210202021021000220210021000", - "record": { - "status": "ok", - "names": "red, green, blue", - "count": 3, - "remaining": "", - "consumed": true, - "committed": true - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221021021021020210210022102102021020210210000222202102102102021021002210202020202102100221020210210202102100221020210202021021002210210202021021021000202220210202021021021002210202102020210210022020210202021021002202021021020210022020202020210022102102102020210210022021020202102102100221020210202021021002210202102020210210022021021021020210210022020210210202100220202020202100220210202020210210022020210210202102100221020210202102102100221020210202021021000022221021020202021021002210210210210202102100221020210202102102100220210210210202102100220202102021021021000221002210210002222021020202102102100221020210202021021002210202102102021021002210202020202102100221020202102021021002202102102102021021002210202021020210210022021021021020210210022102102102020210210002020022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002100222210210202020210210022102102102102021021002210202102102021021002210202102102021021002210202021020210210022020210202102102100220202102021021021002210202102020210210022020210202021021000220210021000" }, { "export": "parseNames", @@ -30,15 +22,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220210210210202102100221020202020210210022102021021020210210022102021020202102100221021020202102102100020222021020202102102100221020210202021021002202021020202102100002222102102020202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100022100221000222202102020210210210022102021020202102100221020210210202102100221020202020210210022102020210202102100220210210210202102100221020202102021021002202102102102021021002210210210202021021000202002222102102020202102100221021021021020210210022021021021020210210022102102020210210210022102021020210210210022102021021020210210022102021020202102100220202102020210210002202100210022221021020202021021002210210210210202102100221020210210202102100221020210210202102100221020202102021021002202021020210210210022020210202102102100221020210202021021002202021020202102100022021002000", - "record": { - "status": "ok", - "names": "red", - "count": 1, - "remaining": "", - "consumed": true, - "committed": false - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220210210210202102100221020202020210210022102021021020210210022102021020202102100221021020202102102100020222021020202102102100221020210202021021002202021020202102100002222102102020202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100022100221000222202102020210210210022102021020202102100221020210210202102100221020202020210210022102020210202102100220210210210202102100221020202102021021002202102102102021021002210210210202021021000202002222102102020202102100221021021021020210210022021021021020210210022102102020210210210022102021020210210210022102021021020210210022102021020202102100220202102020210210002202100210022221021020202021021002210210210210202102100221020210210202102100221020210210202102100221020202102021021002202021020210210210022020210202102102100221020210202021021002202021020202102100022021002000" }, { "export": "parseNames", @@ -47,14 +31,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021020202102100220202021021021021002202020202102102100221020210202021021002210210202020210210022020210202102102100221020210202021021002202021020202102100020222020210210202102100221021021021020210210022102102102021021021002210202102020210210022021020202102102100221021020202021021002210202020202102100221021020202102102100221020210202021021002202020202021002202102102102021021002210202020202102100221020210210202102100221020210202021021000022220210202021021021002210202102020210210022102021021020210210022102020202021021002210202021020210210022021021021020210210022102020210202102100220210210210202102100221021021020202102100020222020210210202100220210202020210210022020210210202102100221020210202102102100221020210202021021000022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002100222210210202020210210022102102102102021021002210202102102021021002210202102102021021002210202021020210210022020210202102102100220202102021021021002210202102020210210022020210202021021000220210021000", - "record": { - "status": "error", - "expected": "lowercase name", - "remaining": ",blue", - "consumed": true, - "committed": true - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021020202102100220202021021021021002202020202102102100221020210202021021002210210202020210210022020210202102102100221020210202021021002202021020202102100020222020210210202102100221021021021020210210022102102102021021021002210202102020210210022021020202102102100221021020202021021002210202020202102100221021020202102102100221020210202021021002202020202021002202102102102021021002210202020202102100221020210210202102100221020210202021021000022220210202021021021002210202102020210210022102021021020210210022102020202021021002210202021020210210022021021021020210210022102020210202102100220210210210202102100221021021020202102100020222020210210202100220210202020210210022020210210202102100221020210202102102100221020210202021021000022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002100222210210202020210210022102102102102021021002210202102102021021002210202102102021021002210202021020210210022020210202102102100220202102021021021002210202102020210210022020210202021021000220210021000" }, { "export": "parseNames", @@ -63,14 +40,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102021020202102100220210202021021021002202102020210210210022102102102102021021002202102020210210210000222210202102020210210022020202102102102100220202020210210210022102021020202102100221021020202021021002202021020210210210022102021020202102100220202102020210210002022202021021020210210022102102102102021021002210210210202102102100221020210202021021002202102020210210210022102102020202102100221020202020210210022102102020210210210022102021020202102100220202020202100220210210210202102100221020202020210210022102021021020210210022102021020202102100002222021020202102102100221020210202021021002210202102102021021002210202020202102100221020202102021021002202102102102021021002210202021020210210022021021021020210210022102102102020210210002020022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002100222210210202020210210022102102102102021021002210202102102021021002210202102102021021002210202021020210210022020210202102102100220202102021021021002210202102020210210022020210202021021000220210021000", - "record": { - "status": "error", - "expected": "lowercase name", - "remaining": "", - "consumed": true, - "committed": true - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102021020202102100220210202021021021002202102020210210210022102102102102021021002202102020210210210000222210202102020210210022020202102102102100220202020210210210022102021020202102100221021020202021021002202021020210210210022102021020202102100220202102020210210002022202021021020210210022102102102102021021002210210210202102102100221020210202021021002202102020210210210022102102020202102100221020202020210210022102102020210210210022102021020202102100220202020202100220210210210202102100221020202020210210022102021021020210210022102021020202102100002222021020202102102100221020210202021021002210202102102021021002210202020202102100221020202102021021002202102102102021021002210202021020210210022021021021020210210022102102102020210210002020022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002100222210210202020210210022102102102102021021002210202102102021021002210202102102021021002210202021020210210022020210202102102100220202102021021021002210202102020210210022020210202021021000220210021000" }, { "export": "parseNames", @@ -79,14 +49,7 @@ ], "input": null, "terminal": "", - "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021020202102100220202021021021021002202020202102102100221020210202021021002210210202020210210022020210202102102100221020210202021021002202021020202102100020222020210210202102100221021021021020210210022102102102021021021002210202102020210210022021020202102102100221021020202021021002210202020202102100221021020202102102100221020210202021021002202020202021002202102102102021021002210202020202102100221020210210202102100221020210202021021000022220210202021021021002210202102020210210022102021021020210210022102020202021021002210202021020210210022021021021020210210022102020210202102100220210210210202102100221021021020202102100020200222210210202020210210022102102102102021021002202102102102021021002210210202021021021002210202102021021021002210202102102021021002210202102020210210022020210202021021000220210020022221021020202021021002210210210210202102100221020210210202102100221020210210202102100221020202102021021002202021020210210210022020210202102102100221020210202021021002202021020202102100022021002000", - "record": { - "status": "error", - "expected": "lowercase name", - "remaining": "", - "consumed": false, - "committed": false - } + "result": "22221021020202102102100220202102021021021002210202020202102100220202102021021021002210202102021021021002210210202021021021000202221020210202021021002202102020210210210022021020202102102100221021021021020210210022021020202102102100002222102021020202102100220202021021021021002202020202102102100221020210202021021002210210202020210210022020210202102102100221020210202021021002202021020202102100020222020210210202102100221021021021020210210022102102102021021021002210202102020210210022021020202102102100221021020202021021002210202020202102100221021020202102102100221020210202021021002202020202021002202102102102021021002210202020202102100221020210210202102100221020210202021021000022220210202021021021002210202102020210210022102021021020210210022102020202021021002210202021020210210022021021021020210210022102020210202102100220210210210202102100221021021020202102100020200222210210202020210210022102102102102021021002202102102102021021002210210202021021021002210202102021021021002210202102102021021002210202102020210210022020210202021021000220210020022221021020202021021002210210210210202102100221020210210202102100221020210210202102100221020202102021021002202021020210210210022020210202102102100221020210202021021002202021020202102100022021002000" }, { "export": "parseNames", @@ -95,14 +58,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210202021021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021000202220202102102021021002210210210210202102100221021021020210210210022102021020202102100220210202021021021002210210202020210210022102020202021021002210210202021021021002210202102020210210022020202020210022021021021020210210022102020202021021002210202102102021021002210202102020210210000222202102020210210210022102021020202102100221020210210202102100221020202020210210022102020210202102100220210210210202102100221020202102021021002202102102102021021002210210210202021021000202220210202021020210022102021020202102100220202102020210210000222210210202020210210022102102102102021021002202102102102021021002210210202021021021002210202102021021021002210202102102021021002210202102020210210022020210202021021000220210020022221021020202021021002210210210210202102100221020210210202102100221020210210202102100221020202102021021002202021020210210210022020210202102102100221020210202021021002202021020202102100022021002000", - "record": { - "status": "error", - "expected": "lowercase name", - "remaining": "Red", - "consumed": false, - "committed": false - } + "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210202021021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021000202220202102102021021002210210210210202102100221021021020210210210022102021020202102100220210202021021021002210210202020210210022102020202021021002210210202021021021002210202102020210210022020202020210022021021021020210210022102020202021021002210202102102021021002210202102020210210000222202102020210210210022102021020202102100221020210210202102100221020202020210210022102020210202102100220210210210202102100221020202102021021002202102102102021021002210210210202021021000202220210202021020210022102021020202102100220202102020210210000222210210202020210210022102102102102021021002202102102102021021002210210202021021021002210202102021021021002210202102102021021002210202102020210210022020210202021021000220210020022221021020202021021002210210210210202102100221020210210202102100221020210210202102100221020202102021021002202021020210210210022020210202102102100221020210202021021002202021020202102100022021002000" }, { "export": "parseNames", @@ -111,14 +67,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102021020202102100220210202021021021002202102020210210210022102102102102021021002202102020210210210000222210202102020210210022020202102102102100220202020210210210022102021020202102100221021020202021021002202021020210210210022102021020202102100220202102020210210002022210202102020210210022021021021020210210022020210202021021002202020202021002210210210210202102100220210210202021021002202020202021002210202021020210210022021021021020210210022020202021021021002210202102021021021002202021020210210210000222202102020210210210022102021020202102100221020210210202102100221020202020210210022102020210202102100220210210210202102100221020202102021021002202102102102021021002210210210202021021000202220202020202100221021021020202102100220210202021021021002210202102020210210022102021020202102100220210210210202102100002222102102020202102100221021021021020210210022021021021020210210022102102020210210210022102021020210210210022102021021020210210022102021020202102100220202102020210210002202100210022221021020202021021002210210210210202102100221020210210202102100221020210210202102100221020202102021021002202021020210210210022020210202102102100221020210202021021002202021020202102100022021002000", - "record": { - "status": "error", - "expected": "end of input", - "remaining": " green", - "consumed": true, - "committed": false - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102021020202102100220210202021021021002202102020210210210022102102102102021021002202102020210210210000222210202102020210210022020202102102102100220202020210210210022102021020202102100221021020202021021002202021020210210210022102021020202102100220202102020210210002022210202102020210210022021021021020210210022020210202021021002202020202021002210210210210202102100220210210202021021002202020202021002210202021020210210022021021021020210210022020202021021021002210202102021021021002202021020210210210000222202102020210210210022102021020202102100221020210210202102100221020202020210210022102020210202102100220210210210202102100221020202102021021002202102102102021021002210210210202021021000202220202020202100221021021020202102100220210202021021021002210202102020210210022102021020202102100220210210210202102100002222102102020202102100221021021021020210210022021021021020210210022102102020210210210022102021020210210210022102021021020210210022102021020202102100220202102020210210002202100210022221021020202021021002210210210210202102100221020210210202102100221020210210202102100221020202102021021002202021020210210210022020210202102102100221020210202021021002202021020202102100022021002000" }, { "export": "parseNames", @@ -127,14 +76,7 @@ ], "input": null, "terminal": "", - "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210202021021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021000202221020210202021021002202102102102021021002202021020202102100220202020202100221021021021020210210022021021020202102100220202020202100221020202102021021002202102102102021021002202020202102102100221020210202102102100220202102021021021000022220210202021021021002210202102020210210022102021021020210210022102020202021021002210202021020210210022021021021020210210022102020210202102100220210210210202102100221021021020202102100020222102020202021000022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002100222210210202020210210022102102102102021021002210202102102021021002210202102102021021002210202021020210210022020210202102102100220202102021021021002210202102020210210022020210202021021000220210021000", - "record": { - "status": "error", - "expected": "end of input", - "remaining": "!", - "consumed": true, - "committed": true - } + "result": "222210210202021021021002202021020210210210022102020202021021002202021020210210210022102021020210210210022102102020210210210002022210202102020210210022021020202102102100220210202021021021002210210210210202102100220210202021021021000022221020210202021021002202020210210210210022020202021021021002210202102020210210022102102020202102100220202102021021021002210202102020210210022020210202021021000202221020210202021021002202102102102021021002202021020202102100220202020202100221021021021020210210022021021020202102100220202020202100221020202102021021002202102102102021021002202020202102102100221020210202102102100220202102021021021000022220210202021021021002210202102020210210022102021021020210210022102020202021021002210202021020210210022021021021020210210022102020210202102100220210210210202102100221021021020202102100020222102020202021000022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002100222210210202020210210022102102102102021021002210202102102021021002210202102102021021002210202021020210210022020210202102102100220202102021021021002210202102020210210022020210202021021000220210021000" }, { "export": "parsePrefix", @@ -143,15 +85,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220210210210202102100221020202020210210022102021021020210210022102021020202102100221021020202102102100020222021020202102102100221020210202021021002202021020202102100002222102102020202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100022100221000222202102020210210210022102021020202102100221020210210202102100221020202020210210022102020210202102100220210210210202102100221020202102021021002202102102102021021002210210210202021021000202220202020202100221021021020202102100220210202021021021002210202102020210210022102021020202102100220210210210202102100002222102102020202102100221021021021020210210022021021021020210210022102102020210210210022102021020210210210022102021021020210210022102021020202102100220202102020210210002202100210022221021020202021021002210210210210202102100221020210210202102100221020210210202102100221020202102021021002202021020210210210022020210202102102100221020210202021021002202021020202102100022021002000", - "record": { - "status": "ok", - "names": "red", - "count": 1, - "remaining": " green", - "consumed": true, - "committed": false - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220210210210202102100221020202020210210022102021021020210210022102021020202102100221021020202102102100020222021020202102102100221020210202021021002202021020202102100002222102102020202102100221021021021020210210022102021020210210210022021021021020210210022020210202102102100022100221000222202102020210210210022102021020202102100221020210210202102100221020202020210210022102020210202102100220210210210202102100221020202102021021002202102102102021021002210210210202021021000202220202020202100221021021020202102100220210202021021021002210202102020210210022102021020202102100220210210210202102100002222102102020202102100221021021021020210210022021021021020210210022102102020210210210022102021020210210210022102021021020210210022102021020202102100220202102020210210002202100210022221021020202021021002210210210210202102100221020210210202102100221020210210202102100221020202102021021002202021020210210210022020210202102102100221020210202021021002202021020202102100022021002000" }, { "export": "parsePrefix", @@ -160,15 +94,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220210210210202102100221020202020210210022102021021020210210022102021020202102100221021020202102102100020222021020202102102100221020210202021021002202021020202102100220202102102021002202020202021002210210210202021021002202102020210210210022102021020202102100221020210202021021002202102102102021021000022221021020202021021002210210210210202102100221020210202102102100220210210210202102100220202102021021021000221002202100022220210202021021021002210202102020210210022102021021020210210022102020202021021002210202021020210210022021021021020210210022102020210202102100220210210210202102100221021021020202102100020222102020202021000022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002100222210210202020210210022102102102102021021002210202102102021021002210202102102021021002210202021020210210022020210202102102100220202102021021021002210202102020210210022020210202021021000220210021000", - "record": { - "status": "ok", - "names": "red, green", - "count": 2, - "remaining": "!", - "consumed": true, - "committed": true - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102102102102021021002210210202102021021000022220210210210202102100221020202020210210022102021021020210210022102021020202102100221021020202102102100020222021020202102102100221020210202021021002202021020202102100220202102102021002202020202021002210210210202021021002202102020210210210022102021020202102100221020210202021021002202102102102021021000022221021020202021021002210210210210202102100221020210202102102100220210210210202102100220202102021021021000221002202100022220210202021021021002210202102020210210022102021021020210210022102020202021021002210202021020210210022021021021020210210022102020210202102100220210210210202102100221021021020202102100020222102020202021000022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002100222210210202020210210022102102102102021021002210202102102021021002210202102102021021002210202021020210210022020210202102102100220202102021021021002210202102020210210022020210202021021000220210021000" }, { "export": "parsePrefix", @@ -177,14 +103,7 @@ ], "input": null, "terminal": "", - "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102021020202102100220210202021021021002202102020210210210022102102102102021021002202102020210210210000222210202102020210210022020202102102102100220202020210210210022102021020202102100221021020202021021002202021020210210210022102021020202102100220202102020210210002022202021021020210210022102102102102021021002210210210202102102100221020210202021021002202102020210210210022102102020202102100221020202020210210022102102020210210210022102021020202102100220202020202100220210210210202102100221020202020210210022102021021020210210022102021020202102100002222021020202102102100221020210202021021002210202102102021021002210202020202102100221020202102021021002202102102102021021002210202021020210210022021021021020210210022102102102020210210002020022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002100222210210202020210210022102102102102021021002210202102102021021002210202102102021021002210202021020210210022020210202102102100220202102021021021002210202102020210210022020210202021021000220210021000", - "record": { - "status": "error", - "expected": "lowercase name", - "remaining": "", - "consumed": true, - "committed": true - } + "result": "2222102102020210210210022020210202102102100221020202020210210022020210202102102100221020210202102102100221021020202102102100020222102021020202102100220210202021021021002202102020210210210022102102102102021021002202102020210210210000222210202102020210210022020202102102102100220202020210210210022102021020202102100221021020202021021002202021020210210210022102021020202102100220202102020210210002022202021021020210210022102102102102021021002210210210202102102100221020210202021021002202102020210210210022102102020202102100221020202020210210022102102020210210210022102021020202102100220202020202100220210210210202102100221020202020210210022102021021020210210022102021020202102100002222021020202102102100221020210202021021002210202102102021021002210202020202102100221020202102021021002202102102102021021002210202021020210210022021021021020210210022102102102020210210002020022221021020202021021002210210210210202102100220210210210202102100221021020202102102100221020210202102102100221020210210202102100221020210202021021002202021020202102100022021002100222210210202020210210022102102102102021021002210202102102021021002210202102102021021002210202021020210210022020210202102102100220202102021021021002210202102020210210022020210202021021000220210021000" } ] } diff --git a/ext/demo-site/practical.py b/ext/demo-site/practical.py @@ -1,4 +1,4 @@ -"""Portable demo presets and independent expected records for prepare.py.""" +"""Portable demo presets and independent expected values for prepare.py.""" def literal(value): if isinstance(value, bool): return dict(type='bool', value=value) if isinstance(value, int): return dict(type='number', value=str(value)) @@ -15,10 +15,10 @@ def settings(): } result = {} for name, (title, export, args, exports) in defaults.items(): - presets = {e: dict(arguments=[literal(v) for v in args], output='record', mode='pure') for e in exports} + presets = {e: dict(arguments=[literal(v) for v in args], output='tricu', mode='pure') for e in exports} if name == 'events': presets['vendorB']['arguments'] = [literal(['James', False, 2499])] result[name] = dict(title=title, exports=exports, export=export, args=[literal(v) for v in args], - output='record', mode='pure', presets=presets) + output='tricu', mode='pure', presets=presets) return result diff --git a/ext/demo-site/prepare-showcase.py b/ext/demo-site/prepare-showcase.py @@ -58,7 +58,7 @@ def parser_cases(): ] -def record_tree(record): +def summary_tree(record): def scalar(value): if isinstance(value, bool): return '10' if value else '0' if isinstance(value, int): return of_number(value) @@ -308,11 +308,11 @@ def main(): for export, text, expected in parser_cases(): actual = run('arboricx', 'run', '--store', store, '--module', parser_manifest, '--name', export, '--arg', text, '--format', 'ternary') - assert actual == record_tree(expected), (export, text, actual[:200], expected) - goldens.append(dict(export=export, arguments=[of_string(text)], input=None, terminal='', result=actual, record=expected)) + assert actual == summary_tree(expected), (export, text, actual[:200], expected) + goldens.append(dict(export=export, arguments=[of_string(text)], input=None, terminal='', result=actual)) release = published('parser-demo', 'Parser combinators: complete input, prefixes and committed errors', parser_bundle, 'parser') source = (HERE / 'demos/parser.tri').read_bytes() - preset = dict(arguments=[dict(type='string', value='red,green,blue')], output='record', mode='pure') + preset = dict(arguments=[dict(type='string', value='red,green,blue')], output='tricu', mode='pure') demo = dict(id='parser', preparation='native', environment='empty', category='Language & Runtime Explorations', title='Parser combinators', hash=release['hash'], source=source.decode(), sourceSha256=hashlib.sha256(source).hexdigest(), export='parseNames', **preset, presets={name: preset for name in ['parseNames', 'parsePrefix']}) @@ -324,12 +324,12 @@ def main(): for export, text, expected in lexer_cases(): actual = run('arboricx', 'run', '--store', store, '--module', lexer_manifest, '--name', export, '--arg', text, '--format', 'ternary') - assert actual == record_tree(expected), (export, text, actual[:200], expected) - cases.append(dict(export=export, arguments=[of_string(text)], input=None, terminal='', result=actual, record=expected)) + assert actual == summary_tree(expected), (export, text, actual[:200], expected) + cases.append(dict(export=export, arguments=[of_string(text)], input=None, terminal='', result=actual)) release = published('lexer-demo', 'Located scans: matched prefix, remainder and character positions', lexer_bundle, 'lexer') source = (HERE / 'demos/lexer.tri').read_bytes() - word = dict(arguments=[dict(type='string', value='hello,world')], output='record', mode='pure') - whitespace = dict(arguments=[dict(type='string', value=' \n\tword')], output='record', mode='pure') + word = dict(arguments=[dict(type='string', value='hello,world')], output='tricu', mode='pure') + whitespace = dict(arguments=[dict(type='string', value=' \n\tword')], output='tricu', mode='pure') demos.append(dict(id='lexer', preparation='native', environment='empty', category='Language & Runtime Explorations', title='Located lexer scans', hash=release['hash'], source=source.decode(), sourceSha256=hashlib.sha256(source).hexdigest(), export='scanWord', **word, presets=dict(scanWord=word, scanWhitespace=whitespace))) diff --git a/ext/demo-site/prepare.py b/ext/demo-site/prepare.py @@ -194,7 +194,7 @@ def main(): if kind == 'tree': return value if kind == 'bool': return '10' if value else '0' return of_list([encode_literal(v) for v in value]) - def encode_record(record): + def encode_fields(record): fields = [] for key, value in record.items(): tag = 2 if isinstance(value, bool) else (1 if isinstance(value, int) else 0) @@ -216,7 +216,7 @@ def main(): bundle_hash = digest(bundle) package_bytes[bundle_hash] = bundle cases = [] - def check(export, arguments, expected, terminal='', line=None, record=None): + def check(export, arguments, expected, terminal='', line=None): argv = [] for i, argument in enumerate(arguments): path = temp / f'argument{i}.tree' @@ -228,11 +228,10 @@ def main(): input=(line + '\n').encode() if line is not None else None) assert output == terminal + expected, (name, export, arguments, output) captured = dict(export=export, arguments=arguments, input=line, terminal=terminal, result=expected) - if record is not None: captured['record'] = record cases.append(captured) if name in practical_cases: for export, arguments, record in practical_cases[name]: - check(export, [encode_literal(v) for v in arguments], encode_record(record), record=record) + check(export, [encode_literal(v) for v in arguments], encode_fields(record)) elif name in tutorial_cases: for export, arguments, expected in tutorial_cases[name]: check(export, [encode_literal(a) for a in arguments], encode_literal(expected)) @@ -266,11 +265,11 @@ def main(): demand_cases = [] probes = { 'events': [('unknown-event', 'vendorA ["unknown" (q q) (q q)]', - encode_record(dict(status='error', message='Unknown vendor A event.'))), + encode_fields(dict(status='error', message='Unknown vendor A event.'))), ('invalid-boolean', 'vendorB [(q q) 2 (q q)]', - encode_record(dict(status='error', message='refunded must be a canonical Boolean.')))], + encode_fields(dict(status='error', message='refunded must be a canonical Boolean.')))], 'shipping': [('invalid-subtotal', 'v1 (q q) (t t) (q q)', - encode_record(dict(status='error', message='Subtotal and grams must be canonical natural numbers.')))], + encode_fields(dict(status='error', message='Subtotal and grams must be canonical natural numbers.')))], 'microscope': [('shape-with-opaque-children', 'shape (t (q q) (q q))', of_string('Fork'))], 'rgb': [('invalid-first-byte', 'main [(t t) (q q) (q q)]', of_string('A channel is not a canonical byte (0-255).'))], diff --git a/ext/demo-site/reference-input/getting-started.md b/ext/demo-site/reference-input/getting-started.md @@ -35,13 +35,20 @@ least one export. `!export *` exposes its local definitions. ## Inspect a compiled definition Click **▶** beside a top-level definition to open its tree inside the source -editor. Choose an interpretation to read it as source, a natural number, text, -or another supported encoding. Interpretations assign meaning to tree shapes; +editor. **Auto** tries readable text, a natural number, a list of text/naturals, +a Boolean, bytes, then tree source, and labels its choice (for example +**Auto → Text**). This is a display preference, not an inferred type. Empty trees +default to natural zero. Control characters (except TAB/LF/CR), private-use and +unassigned Unicode do not count as readable text, but remain available through +manual Text. Choose another interpretation whenever the default meaning is not +the one you intend. Lists decode up to 32 text/natural elements; numbers retain +their exact decimal representation, including values beyond JS safe integers. Interpretations assign meaning to tree shapes; an incompatible decoder reports an error without changing the definition. No arguments are applied and IO is never executed. The separate Expression and Evaluate controls remain available below Source for calls and IO. -Open inspections refresh after successful compilation. Editing, failed +Open inspections refresh after successful compilation, preserving a manual interpretation. +Clicking ▶ again closes the card; reopening starts with Auto. Editing, failed compilation, and Stop clear the old tree. Published packages expose only their public definitions; private bindings become inspectable after editing compiles the source locally. Reading/decoding trees can require reduction and can diverge; diff --git a/ext/demo-site/src/auto-interpretation.ts b/ext/demo-site/src/auto-interpretation.ts @@ -0,0 +1,22 @@ +import { readableText, type OutputType, type ValueView } from './codecs.js'; + +export type InspectionFormat = OutputType | 'auto'; +export const interpretationLabels: Partial<Record<OutputType, string>> = { + string: 'Text', number: 'Natural number', values: 'List · text / numbers', + bool: 'Boolean', bytes: 'Bytes', tricu: 'tricu · t source', triangle: '△ source', dag: 'DAG · shared △', ternary: 'Ternary', +}; +// A readability preference, not type inference. Empty text loses to natural zero; +// valid-but-invisible Unicode/control sequences remain available via manual Text. +export async function autoInterpretation(inspect: (output: OutputType) => Promise<ValueView>, disposed: () => boolean): Promise<ValueView> { + for (const output of ['string', 'number', 'values', 'bool', 'bytes'] as const) { + try { + const result = await inspect(output); + if (result.type === 'string' && (typeof result.value !== 'string' || !readableText(result.value))) continue; + return result; + } catch (error) { + // A failed decoder is recoverable; a poisoned runtime is not another hint. + if (disposed()) throw error; + } + } + return inspect('tricu'); +} diff --git a/ext/demo-site/src/codecs.ts b/ext/demo-site/src/codecs.ts @@ -4,9 +4,11 @@ import { Graph, type NodeId, type GraphPreview } from './graph.js'; export type Literal = { type: 'string' | 'number' | 'tree'; value: string } | { type: 'bool'; value: boolean } | { type: 'bytes'; value: number[] } | { type: 'list'; value: Literal[] }; -export type OutputType = TreeResultFormat | 'tree' | 'string' | 'number' | 'bool' | 'bytes' | 'list' | 'record'; +export type OutputType = TreeResultFormat | 'tree' | 'string' | 'number' | 'bool' | 'bytes' | 'list' | 'values'; +export type DecodedScalar = { type: 'string' | 'number'; value: string }; export type ValueView = { type: TreeResultFormat; value: string; file: TreeFile } | { type: 'tree'; value: GraphPreview } - | { type: Exclude<OutputType, 'tree' | TreeResultFormat>; value: string | boolean | number[] | GraphPreview[] | Record<string, string | number | boolean> }; + | { type: 'values'; value: DecodedScalar[] } + | { type: Exclude<OutputType, 'tree' | 'values' | TreeResultFormat>; value: string | boolean | number[] | GraphPreview[] }; export const TEXT_LIMIT = 4096; export function natural(graph: Graph, value: bigint): NodeId { if (value < 0n || value.toString(2).length > 4096) throw new Error('Natural number limit exceeded'); @@ -108,13 +110,13 @@ export function makeLiteral(graph: Graph, value: Literal): NodeId { } } export function outputType(input: unknown): OutputType { - if (!['tree', 'string', 'number', 'bool', 'bytes', 'list', 'record', 'tricu', 'triangle', 'dag', 'ternary'].includes(String(input))) throw new Error('Unsupported output codec'); + if (!['tree', 'string', 'number', 'bool', 'bytes', 'list', 'values', 'tricu', 'triangle', 'dag', 'ternary'].includes(String(input))) throw new Error('Unsupported output codec'); return input as OutputType; } export function view(graph: Graph, handle: NodeId, type: OutputType): ValueView { switch (type) { case 'tricu': case 'triangle': case 'dag': case 'ternary': return treeResult(graph.snapshot(handle), type); - case 'record': return { type, value: readRecord(graph, handle) }; + case 'values': return { type, value: readList(graph, handle, 32).map(id => readScalar(graph, id)) }; case 'tree': return { type, value: graph.preview(handle) }; case 'string': return { type, value: readText(graph, handle) }; case 'number': return { type, value: readNatural(graph, handle).toString() }; @@ -131,31 +133,22 @@ export function view(graph: Graph, handle: NodeId, type: OutputType): ValueView } } -// Portable scalar-record convention, independent of executable semantics. -// List of [text key, natural tag, value]; 0 text, 1 safe natural, 2 Boolean. -export function readRecord(graph: Graph, handle: NodeId): Record<string, string | number | boolean> { - const result: Record<string, string | number | boolean> = Object.create(null) as Record<string, string | number | boolean>; - let scalars = 0; - for (const row of readList(graph, handle, 32)) { - const fields = readList(graph, row, 3); - if (fields.length !== 3) throw new Error('Record field must be [name tag value]'); - const name = readText(graph, fields[0]!, 128), tag = readNatural(graph, fields[1]!); - if (!name || Object.hasOwn(result, name)) throw new Error('Record field names must be nonempty and unique'); - let value: string | number | boolean; - if (tag === 0n) value = readText(graph, fields[2]!); - else if (tag === 1n) { - const n = readNatural(graph, fields[2]!); - if (n > BigInt(Number.MAX_SAFE_INTEGER)) throw new Error('Record number exceeds safe integer range'); - value = Number(n); - } else if (tag === 2n) { - const node = graph.observe(fields[2]!).node; - if (node.kind === 'leaf') value = false; - else if (node.kind === 'stem' && graph.observe(node.child).node.kind === 'leaf') value = true; - else throw new Error('Invalid record Boolean'); - } else throw new Error('Unsupported record field tag'); - scalars += Array.from(name).length + (typeof value === 'string' ? Array.from(value).length : String(value).length); - if (scalars > 16_384) throw new Error('Record output limit exceeded'); - result[name] = value; - } - return result; +// Deliberately conservative display policy shared by Auto and decoded lists. +// Unicode letters/marks/numbers/punctuation/symbols/spaces, text whitespace and +// joining characters are readable; controls/private-use/unassigned scalars aren't. +export function readableText(value: string): boolean { + return value.length > 0 && /^[\p{L}\p{M}\p{N}\p{P}\p{S}\p{Zs}\t\n\r\u200c\u200d]+$/u.test(value); +} +export function readScalar(graph: Graph, handle: NodeId): DecodedScalar { + try { + const value = readText(graph, handle); + if (readableText(value)) return { type: 'string', value }; + } catch { /* Try a natural interpretation of this same tree. */ } + return { type: 'number', value: readNatural(graph, handle).toString() }; +} +export function valueText(result: ValueView): string { + if ('file' in result) return result.file.text; + if (result.type === 'values') return '[' + result.value.map(item => item.type === 'string' ? JSON.stringify(item.value) : item.value).join(' ') + ']'; + if (result.type === 'tree' || result.type === 'list') throw new Error('Choose a source interpretation for trees'); + return typeof result.value === 'string' ? result.value : JSON.stringify(result.value, null, 2); } diff --git a/ext/demo-site/src/definition-inspector.ts b/ext/demo-site/src/definition-inspector.ts @@ -1,5 +1,6 @@ import { tokenize } from './syntax.js'; -import { outputType, type OutputType, type ValueView } from './codecs.js'; +import { outputType, valueText } from './codecs.js'; +import { interpretationLabels, type InspectionFormat } from './auto-interpretation.js'; import type { InspectionReply } from './protocol.js'; // Decoration only. The runtime resolves names; this never parses executable code. @@ -10,12 +11,8 @@ export function definitionSites(source: string): { name: string; start: number } seen.add(token.text); return true; }).map(token => ({ name: token.text, start: token.start })); } -export function inspectionText(result: ValueView): string { - if ('file' in result) return result.file.text; - if (result.type === 'tree' || result.type === 'list') throw new Error('Choose a source interpretation for trees'); - return typeof result.value === 'string' ? result.value : JSON.stringify(result.value, null, 2); -} -export function definitionInspector(input: HTMLTextAreaElement, request: (id: number, name: string, output: OutputType) => void) { +export { valueText as inspectionText } from './codecs.js'; +export function definitionInspector(input: HTMLTextAreaElement, request: (id: number, name: string, output: InspectionFormat) => void) { const wrapper = input.parentElement!; wrapper.classList.add('has-definition-inspector'); const gutter = document.createElement('div'); gutter.className = 'definition-gutter'; wrapper.append(gutter); @@ -23,7 +20,7 @@ export function definitionInspector(input: HTMLTextAreaElement, request: (id: nu card.id = 'inline-definition'; card.setAttribute('aria-label', 'Compiled definition'); const title = document.createElement('strong'), format = document.createElement('select'); format.setAttribute('aria-label', 'Definition interpretation'); - for (const [value, label] of [['tricu', 'tricu · t source'], ['triangle', '△ source'], ['dag', 'DAG · shared △'], ['ternary', 'Ternary'], ['string', 'Text'], ['number', 'Natural number'], ['bool', 'Boolean'], ['bytes', 'Bytes'], ['record', 'Scalar record']]) format.add(new Option(label, value)); + for (const [value, label] of [['auto', 'Auto'], ['tricu', 'tricu · t source'], ['triangle', '△ source'], ['dag', 'DAG · shared △'], ['ternary', 'Ternary'], ['string', 'Text'], ['number', 'Natural number'], ['bool', 'Boolean'], ['bytes', 'Bytes'], ['values', 'List · text / numbers']]) format.add(new Option(label, value)); const close = document.createElement('button'); close.textContent = 'Close'; close.type = 'button'; const heading = document.createElement('div'); heading.className = 'definition-card-heading'; heading.append(title, format, close); const status = document.createElement('p'); status.className = 'hint'; status.setAttribute('role', 'status'); @@ -59,7 +56,7 @@ export function definitionInspector(input: HTMLTextAreaElement, request: (id: nu if (!selected || !ready || busy || pending !== undefined) return; const key = `${generation}:${selected}:${format.value}`; if (last === key) return; last = key; pending = ++serial; status.textContent = 'Reading compiled tree… Stop is available in the toolbar.'; result.textContent = ''; - request(pending, selected, outputType(format.value)); + request(pending, selected, format.value === 'auto' ? 'auto' : outputType(format.value)); } function schedule(): void { if (scheduled) return; scheduled = true; @@ -67,7 +64,7 @@ export function definitionInspector(input: HTMLTextAreaElement, request: (id: nu } function choose(name: string): void { if (selected === name && !card.hidden) { hide(); return; } - selected = name; title.textContent = name; card.hidden = false; last = ''; result.textContent = ''; + selected = name; format.value = 'auto'; title.textContent = name; card.hidden = false; last = ''; result.textContent = ''; for (const [key, button] of buttons) button.setAttribute('aria-expanded', String(key === name)); position(); schedule(); } @@ -121,8 +118,8 @@ export function definitionInspector(input: HTMLTextAreaElement, request: (id: nu if (message.id !== pending) return false; pending = undefined; if (!selected || !ready) return true; - status.textContent = message.type === 'inspection-error' ? `Cannot interpret this tree: ${message.message}` : `Compiled definition · ${format.selectedOptions[0]!.textContent} · No arguments applied; IO is not executed.`; - const value = message.type === 'inspected' ? inspectionText(message.result) : ''; + status.textContent = message.type === 'inspection-error' ? `Cannot interpret this tree: ${message.message}` : `Compiled definition · ${format.value === 'auto' ? 'Auto → ' + (interpretationLabels[message.result.type] ?? message.result.type) : format.selectedOptions[0]!.textContent} · No arguments applied; IO is not executed.`; + const value = message.type === 'inspected' ? valueText(message.result) : ''; result.textContent = value.slice(0, 16_384); if (value.length > 16_384) status.textContent += ' · Preview: first 16,384 characters.'; position(); return true; diff --git a/ext/demo-site/src/output-app.ts b/ext/demo-site/src/output-app.ts @@ -1,4 +1,4 @@ -import type { ValueView } from './codecs.js'; +import { valueText, type ValueView } from './codecs.js'; import type { TreeFile } from './tree-export.js'; // One output surface. The saved payload carries its own provenance/format; // changing controls cannot relabel an earlier result or change its download. @@ -21,8 +21,8 @@ export function createOutput() { function result(value: ValueView, description: string): void { if ('file' in value) { file(value.file, 'result', `${description} · ${value.type}`); return; } if (value.type === 'tree' || value.type === 'list') throw new Error('Select tricu source or DAG to inspect tree results'); - const content = typeof value.value === 'string' ? value.value : JSON.stringify(value.value, null, 2); - show(content, value.type === 'record' || value.type === 'bytes' ? 'result.json' : 'result.txt', `${description} · ${value.type}`); + const content = valueText(value); + show(content, value.type === 'bytes' ? 'result.json' : 'result.txt', `${description} · ${value.type}`); } copy.onclick = async () => { const value = saved; if (!value) return; diff --git a/ext/demo-site/src/protocol.ts b/ext/demo-site/src/protocol.ts @@ -12,7 +12,7 @@ export interface CatalogueEntry { presets?: Record<string, { arguments: unknown[]; output: OutputType; mode: 'pure' | 'io' }>; } export type InspectionReply = { type: 'inspected'; id: number; result: ValueView } | { type: 'inspection-error'; id: number; message: string; fatal: boolean }; -export type ClientMessage = { type: 'inspect'; id: number; name: string; output: OutputType } +export type ClientMessage = { type: 'inspect'; id: number; name: string; output: import('./auto-interpretation.js').InspectionFormat } | { type: 'load'; hash: BundleHash; localId?: string } | { type: 'run'; export: string; arguments: unknown; expression?: string; output: OutputType; mode: 'pure' | 'io'; step: boolean } | { type: 'download' } diff --git a/ext/demo-site/src/wasm-worker.ts b/ext/demo-site/src/wasm-worker.ts @@ -1,3 +1,4 @@ +import { autoInterpretation } from './auto-interpretation.js'; import { importPlan } from './import-plan.js'; import { localModuleInputs, validateLocalModule } from './local-modules.js'; import { resumeValue } from './io.js'; @@ -71,7 +72,10 @@ scope.onmessage = ({ data }) => { try { // Observe the existing binding with no arguments, expression compilation, // or IO interpreter. Observation/decoding can still require reduction. - const result = await session.inspectDefinition(m['name'], outputType(m['output'])); + const name = m['name']; + const result = m['output'] === 'auto' + ? await autoInterpretation(output => session!.inspectDefinition(name, output), () => session!.disposed) + : await session.inspectDefinition(name, outputType(m['output'])); send({ type: 'inspected', id, result }); } catch (e) { send({ type: 'inspection-error', id, message: e instanceof Error ? e.message : String(e), fatal: session.disposed }); } } else if (m['type'] === 'run') { diff --git a/ext/demo-site/test/auto-interpretation.test.mjs b/ext/demo-site/test/auto-interpretation.test.mjs @@ -0,0 +1,41 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import {Graph} from '../dist/graph.js'; +import {makeLiteral,readableText,valueText,view,outputType,natural,list} from '../dist/codecs.js'; +import {autoInterpretation} from '../dist/auto-interpretation.js'; +const n=value=>({type:'number',value:String(value)}),s=value=>({type:'string',value}); +const auto=literal=>{const g=new Graph(),h=makeLiteral(g,literal);return autoInterpretation(type=>Promise.resolve(view(g,h,type)),()=>false);}; +test('Auto chooses readable text, naturals, decoded lists, Boolean, bytes and source',async()=>{ + for(const text of ['hello','λ雪🙂','a\nb\t','👨👩👧👦'])assert.deepEqual(await auto(s(text)),{type:'string',value:text}); + assert.deepEqual(await auto(n(42)),{type:'number',value:'42'}); + assert.deepEqual(await auto(s('')),{type:'number',value:'0'}); + assert.deepEqual(await auto({type:'bool',value:false}),{type:'number',value:'0'}); + assert.deepEqual(await auto({type:'bool',value:true}),{type:'bool',value:true}); + assert.deepEqual(await auto({type:'list',value:[s('hello'),n(42),n(2n**100n),s('')]}),{type:'values',value:[s('hello'),n(42),n(2n**100n),n(0)]}); + const bytes=Array(33).fill(128);assert.deepEqual(await auto({type:'bytes',value:bytes}),{type:'bytes',value:bytes}); + assert.equal((await auto({type:'tree',value:'21100'})).type,'tricu'); +}); +test('readability is a preference, not a claim about types; explicit Text stays available',async()=>{ + for(const text of ['', '\0', '\x01', '\u202e', '\ue000','\u0378'])assert.equal(readableText(text),false,JSON.stringify(text)); + // The same list admits Unicode, byte and number-list views. Prefer readable text. + assert.deepEqual(await auto({type:'list',value:[n(65),n(66)]}),{type:'string',value:'AB'}); + const g=new Graph(),h=makeLiteral(g,s('\0'));assert.deepEqual(view(g,h,'string'),s('\0')); + assert.notEqual((await auto(s('\0'))).type,'string'); +}); +test('decoded lists preserve large natural values and fail closed on unsupported items/bounds',()=>{ + const g=new Graph(); + const h=makeLiteral(g,{type:'list',value:[s('a'),n(2n**100n)]}); + assert.equal(valueText(view(g,h,'values')),`["a" ${2n**100n}]`); + assert.throws(()=>view(g,makeLiteral(g,{type:'list',value:[{type:'bool',value:true}]}),'values'),/number/); + assert.throws(()=>view(g,list(g,Array(33).fill(g.leaf)),'values'),/limit/); + assert.throws(()=>view(g,list(g,[list(g,Array(4097).fill(natural(g,65n)))]),'values'),/number bit/); + assert.throws(()=>outputType('record'),/Unsupported/); +}); +test('Auto stops on fatal errors, falls back once, and does not hide a failed tree observation',async()=>{ + const calls=[],fatal=Error('disposed'); + await assert.rejects(autoInterpretation(async type=>{calls.push(type);throw fatal;},()=>true),/disposed/); + assert.deepEqual(calls,['string']); + const attempted=[]; + await assert.rejects(autoInterpretation(async type=>{attempted.push(type);throw Error('observation failed');},()=>false),/observation failed/); + assert.deepEqual(attempted,['string','number','values','bool','bytes','tricu']); +}); diff --git a/ext/demo-site/test/backend-benchmark.mjs b/ext/demo-site/test/backend-benchmark.mjs @@ -26,7 +26,7 @@ export async function run(control,backend,memoryOnly=false){ const entry=catalogue.find(e=>e.hash===demo.hash),c=demo.haskellCases[0];assert(entry,'Missing fixture catalogue entry'); const output=entry.presets?.[c.export]?.output??entry.output; const graph=new Graph(),expected=view(graph,graph.fromTernary(c.result),output); - assert(output!=='tree'&&output!=='list','Benchmark requires complete scalar/record observation'); + assert(output!=='tree'&&output!=='list','Benchmark requires complete value/tree observation'); return {name,demo,entry,c,output,expected}; }); await mark('baseline');await pause(memoryOnly?3000:700); @@ -35,7 +35,7 @@ export async function run(control,backend,memoryOnly=false){ try{ await w.request({type:'load',hash:demo.hash,localId:name},'loaded');const readyMs=performance.now()-start; const result=await w.request({type:'run',export:c.export,arguments:c.arguments.map(value=>({type:'tree',value})),output,mode:demo.mode},'done',c.input??''); - assert(JSON.stringify(result.message.result)===JSON.stringify(expected),'Published result '+name); + assert(JSON.stringify({type:result.message.result.type,value:result.message.result.value})===JSON.stringify({type:expected.type,value:expected.value}),'Published result '+name); assert(result.terminal===c.terminal,'Published terminal '+name); report.packages.push({name,readyMs,runMs:result.ms,linearBytes:result.message.stats.linearMemoryBytes}); if(memoryOnly){await mark('live-package:'+name);await pause(1500);} @@ -50,7 +50,7 @@ export async function run(control,backend,memoryOnly=false){ await mark('runs:'+name); for(let i=0;i<21;i++){ const r=await w.request({type:'run',export:c.export,arguments:c.arguments.map(value=>({type:'tree',value})),output,mode:demo.mode},'done',c.input??''); - assert(JSON.stringify(r.message.result)===JSON.stringify(expected),'Compiled result '+name); + assert(JSON.stringify({type:r.message.result.type,value:r.message.result.value})===JSON.stringify({type:expected.type,value:expected.value}),'Compiled result '+name); assert(r.terminal===c.terminal,'Compiled terminal '+name); row.runs.push({ms:r.ms,linearBytes:r.message.stats.linearMemoryBytes}); } diff --git a/ext/demo-site/test/graph.test.mjs b/ext/demo-site/test/graph.test.mjs @@ -80,7 +80,6 @@ for (const [name, demo] of Object.entries(data.demos)) { const result=demo.mode==='io'?await runIO(g,applied,h):applied; assert.equal(g.toTernary(result), golden.result); assert.equal(h.state.terminal, golden.terminal); - if(golden.record)assert.deepEqual({...view(g,result,'record').value},golden.record); } }); } diff --git a/ext/demo-site/test/import-picker-probe.mjs b/ext/demo-site/test/import-picker-probe.mjs @@ -31,6 +31,10 @@ export async function run(control,backend='haskell-wasm'){ let invalid=false;try{await session.inspectDefinition('private','string');}catch{invalid=true;} assert(invalid,'Invalid interpretation rejected'); assert((await session.inspectDefinition('answer','number')).value==='42','Decoder failure preserves definitions'); + await session.compile('!export samples\nsamples = ["hello" 42 1267650600228229401496703205376]','empty'); + const samples=await session.inspectDefinition('samples','values'); + assert(JSON.stringify(samples.value)===JSON.stringify([{type:'string',value:'hello'},{type:'number',value:'42'},{type:'number',value:'1267650600228229401496703205376'}]),'Bounded decoded scalar list, including exact big naturals'); + await session.compile('!export answer\nanswer = 42','empty'); const stage=await session.inspectModule(`-- 🐕\n!import ${math.manifest} as N\n!export answer\nanswer = 1`); assert(stage.imports[0][0]===math.manifest&&stage.imports[0][1]==='N','Native header response'); assert((await session.runExpression('answer','number','pure',host)).value==='42','Inspection preserves compiled scope'); @@ -43,7 +47,10 @@ export async function run(control,backend='haskell-wasm'){ const inspectButton=name=>document.querySelector(`[aria-label="Inspect compiled definition ${name}"]`); inspectButton('greeting').click();await wait(()=>!document.querySelector('.definition-card select').disabled,'published inspection'); const interpretation=value=>{const select=document.querySelector('.definition-card select');select.value=value;select.dispatchEvent(new Event('change'));}; - interpretation('string');await wait(()=>document.querySelector('.definition-card pre').textContent==='Hello, world!','published text interpretation'); + await wait(()=>document.querySelector('.definition-card pre').textContent==='Hello, world!','automatic published text interpretation'); + assert(document.querySelector('.definition-card select').value==='auto'&&document.querySelector('.definition-card [role=status]').textContent.includes('Auto → Text'),'Auto identifies its chosen interpretation'); + inspectButton('greeting').click();assert(document.querySelector('.definition-card').hidden,'Second glyph click closes, not cycles'); + inspectButton('greeting').click();await wait(()=>document.querySelector('.definition-card pre').textContent==='Hello, world!','reopen Auto'); assert(el('result').textContent===''&&el('terminal').textContent==='','Inspection does not alter evaluator output or IO'); interpretation('number');await wait(()=>document.querySelector('.definition-card [role=status]').textContent.includes('Cannot interpret'),'invalid view'); interpretation('string');await wait(()=>document.querySelector('.definition-card pre').textContent==='Hello, world!','view recovery'); @@ -57,9 +64,20 @@ export async function run(control,backend='haskell-wasm'){ input('source-editor','!export answer\nidentity x = x\nanswer = identity private\nprivate = 7'); assert(document.querySelector('.definition-card pre').textContent==='','Edit invalidates old inline value immediately'); await wait(()=>document.querySelector('.definition-card pre').textContent==='7','open inspection refreshes after compilation'); + assert(document.querySelector('.definition-card select').value==='number','Manual interpretation persists across edits'); assert(el('expression-editor').value==='answer','Inline inspection does not change expression'); input('source-editor','!export answer\nanswer = (');await status('Compilation failed'); assert(document.querySelector('.definition-card pre').textContent==='','Failed compilation cannot display previous tree'); + input('source-editor','!export answer\nanswer = 42\nzero = t\nyes = t t\nidentity x = x\nsamples = ["hello" 42]');await status('Compiled'); + for(const [name,value,label] of [['zero','0','Natural number'],['yes','true','Boolean'],['samples','["hello" 42]','List · text / numbers']]){ + inspectButton(name).click();await wait(()=>document.querySelector('.definition-card pre').textContent===value,'Auto '+name); + assert(document.querySelector('.definition-card [role=status]').textContent.includes('Auto → '+label),'Visible Auto interpretation '+name); + inspectButton(name).click(); + } + inspectButton('identity').click();await wait(()=>document.querySelector('.definition-card [role=status]').textContent.includes('Auto → tricu'),'function falls back to source');inspectButton('identity').click(); + input('expression-editor','samples');change('output-type','values');el('run').click();await status('Finished'); + assert(el('result').textContent==='["hello" 42]','Decoded list also available for separate evaluation'); + change('output-type','number'); input('source-editor','!export answer\nanswer = 42\nloop = (x : x x) (x : x x)');await status('Compiled'); inspectButton('loop').click();await wait(()=>el('status').textContent==='Inspecting loop','divergent observation started'); el('stop').click();await wait(()=>!el('add-import').disabled,'inspection Stop'); @@ -123,5 +141,5 @@ export async function run(control,backend='haskell-wasm'){ assert(el('insert-import').disabled&&!el('try-library').hidden,'Source-free exploration offers try rather than insertion'); el('try-library').click();await status('Ready'); assert(el('program-picker').value==='package:tricu-lib-native-math','Explorer loads selected library'); - return {userAgent:navigator.userAgent,checks:['inline compiled/public/private definitions; interpretation recovery; edit refresh and failed-compile invalidation; cancellable observation; anchored result card; separate definition search; draft-preserving try; source-free explorer; static agent references; complete published interfaces; general documented examples; native read-only header inspection; export search; exact imports; undo; existing import jump; namespace conflicts; malformed source copy fallback; cancellation; local-file discovery'],backend}; + return {userAgent:navigator.userAgent,checks:['automatic text/natural/list/Boolean/source interpretation; sticky manual formats; open/close behavior; inline compiled/public/private definitions; interpretation recovery; edit refresh and failed-compile invalidation; cancellable observation; anchored result card; separate definition search; draft-preserving try; source-free explorer; static agent references; complete published interfaces; general documented examples; native read-only header inspection; export search; exact imports; undo; existing import jump; namespace conflicts; malformed source copy fallback; cancellation; local-file discovery'],backend}; } diff --git a/ext/demo-site/test/live-ux-probe.mjs b/ext/demo-site/test/live-ux-probe.mjs @@ -34,7 +34,7 @@ export async function run(control,backend='haskell-wasm',alreadyUsed=false){ }; input('expression-editor',[c.export,...c.arguments.map((arg,i)=>typedSource(graph.fromTernary(arg),templates[i]))].join(' ')); const expected=view(graph,graph.fromTernary(c.result),el('output-type').value); - assert(!['tree','list'].includes(expected.type),'Full scalar/record golden required'); + assert(!['tree','list'].includes(expected.type),'Full value/tree golden required'); el('run').click(); if(demo.mode==='io'){await status('Waiting for input');input('line-input',c.input);el('input-form').requestSubmit();} await status('Finished'); diff --git a/ext/demo-site/test/module-probe.mjs b/ext/demo-site/test/module-probe.mjs @@ -125,19 +125,25 @@ export async function run(control,backend='haskell-wasm'){ equal(el('result').textContent,'43','Stop/recompile reconstructs verified imports'); // Edit the actual parser/lexer examples, not a scratch copy; verify changed // behavior, then restore the authenticated original and its behavior. - for(const [id,before,after,expression,field,want,original] of [ - ['parser','N.inRange c 97 122','N.inRange c 65 90','parseNames "RED,GREEN"','status','ok','error'], - ['lexer','N.inRange character 97 122','N.inRange character 65 90','scanWord "HELLO,world"','matched','HELLO',''], + for(const [id,before,after,expression,want,original] of [ + ['parser','N.inRange c 97 122','N.inRange c 65 90','parseNames "RED,GREEN"','ok','error'], + ['lexer','N.inRange character 97 122','N.inRange character 65 90','scanWord "HELLO,world"','HELLO',''], ]){ change('program-picker','demo:'+id);await status('Ready'); assert(!el('source-editor').hidden&&!el('source-editor').readOnly,'Editable '+id); const source=el('source-editor').value;assert(source.includes(before),'Known predicate'); input('source-editor',source.replace(before,after));el('compile').click();await status('Compiled'); - input('expression-editor',expression);change('output-type','record');el('run').click();await status('Finished'); - equal(JSON.parse(el('result').textContent)[field],want,'Edited '+id+' result'); + input('expression-editor',`let + firstValue [[_ _ value] | _] = value + firstValue _ = "" + in firstValue (${expression})`);change('output-type','string');el('run').click();await status('Finished'); + equal(el('result').textContent,want,'Edited '+id+' result'); el('restore-source').click();await status('Ready');equal(el('source-editor').value,source,'Restore '+id); - input('expression-editor',expression);change('output-type','record');el('run').click();await status('Finished'); - equal(JSON.parse(el('result').textContent)[field],original,'Restored '+id+' behavior'); + input('expression-editor',`let + firstValue [[_ _ value] | _] = value + firstValue _ = "" + in firstValue (${expression})`);change('output-type','string');el('run').click();await status('Finished'); + equal(el('result').textContent,original,'Restored '+id+' behavior'); } return {userAgent:navigator.userAgent,checks:['all sixteen editable demos match native goldens; parser/lexer edit and restore; native headers; qualified/open imports; full reexports; retained private/import scope; collision/diagnostic controls; transport and manifest faults; no capabilities; repeated replacement/GC; actual page Stop/recompile']}; } diff --git a/ext/demo-site/test/packages.test.mjs b/ext/demo-site/test/packages.test.mjs @@ -5,7 +5,9 @@ import {createHash} from 'node:crypto'; import {packageIndex,packageReleases,environmentProfile} from '../dist/packages.js'; import {decodeBundle,loadBundle} from '../dist/bundle.js'; import {Graph} from '../dist/graph.js'; +import {text} from '../dist/codecs.js'; import {BROWSER_BUDGET} from '../dist/execution.js'; +const encodedText=value=>{const g=new Graph();return g.toTernary(text(g,value));}; const read=name=>readFile(new URL('../'+name,import.meta.url)); test('named versions and demo environments are validated and pinned',async()=>{ @@ -87,8 +89,8 @@ test('native parser demo source and goldens are authenticated with an editable n assert.equal(createHash('sha256').update(demo.source).digest('hex'),demo.sourceSha256); assert.equal(demo.source,await read('demos/parser.tri').then(b=>b.toString())); assert.equal(goldens.hash,demo.hash);assert.equal(goldens.sourceSha256,demo.sourceSha256); - assert.ok(goldens.haskellCases.some(c=>c.record.status==='error'&&c.record.committed)); - assert.ok(goldens.haskellCases.some(c=>c.export==='parsePrefix'&&c.record.status==='ok'&&c.record.remaining)); + assert.ok(goldens.haskellCases.some(c=>c.export==='parseNames'&&c.arguments[0]===encodedText('red,'))); + assert.ok(goldens.haskellCases.some(c=>c.export==='parsePrefix'&&c.arguments[0]===encodedText('red green'))); }); test('both indexed compiler packages retain their exact independently authenticated artifacts',async()=>{ @@ -132,8 +134,8 @@ test('new practical libraries expose complete interfaces and lexer reference sou assert.equal(demo.source,await read('demos/lexer.tri').then(b=>b.toString())); assert.equal(createHash('sha256').update(demo.source).digest('hex'),demo.sourceSha256); assert.equal(goldens.hash,demo.hash);assert.equal(goldens.sourceSha256,demo.sourceSha256); - assert.ok(goldens.haskellCases.some(c=>c.record.line===2&&c.record.offset===3)); - assert.ok(goldens.haskellCases.some(c=>c.record.remaining==='é')); + assert.ok(goldens.haskellCases.some(c=>c.export==='scanWhitespace'&&c.arguments[0]===encodedText(' \n\tword'))); + assert.ok(goldens.haskellCases.some(c=>c.export==='scanWord'&&c.arguments[0]===encodedText('abcé'))); }); test('release choices are newest-first, numeric, independent of publication order and non-mutating',()=>{ diff --git a/ext/demo-site/test/record.test.mjs b/ext/demo-site/test/record.test.mjs @@ -1,23 +0,0 @@ -import test from 'node:test'; -import assert from 'node:assert/strict'; -import {Graph} from '../dist/graph.js'; -import {list,text,natural,readRecord,outputType,view} from '../dist/codecs.js'; -test('portable scalar records decode names/types safely with bounded output',()=>{ - const g=new Graph(); - const field=(name,tag,value)=>list(g,[text(g,name),natural(g,BigInt(tag)),value]); - const record=fields=>list(g,fields); - const root=record([field('name',0,text(g,'λ雪🙂')),field('cents',1,natural(g,2499n)),field('accepted',2,g.stem(g.leaf)),field('__proto__',0,text(g,'ordinary key'))]); - const decoded=readRecord(g,root); - assert.equal(Object.getPrototypeOf(decoded),null);assert.equal(decoded.__proto__,'ordinary key'); - assert.equal(JSON.parse(JSON.stringify(decoded)).cents,2499);assert.equal(decoded.accepted,true); - assert.equal(outputType('record'),'record');assert.deepEqual(view(g,root,'record').value,decoded); - assert.throws(()=>readRecord(g,record([field('x',0,text(g,'a')),field('x',0,text(g,'b'))])),/unique/); - assert.throws(()=>readRecord(g,record([field('',0,text(g,'a'))])),/nonempty/); - assert.throws(()=>readRecord(g,record([field('x',3,g.leaf)])),/tag/); - assert.throws(()=>readRecord(g,record([field('x',1,natural(g,2n**53n))])),/safe integer/); - assert.throws(()=>readRecord(g,record([field('x',2,g.fork(g.leaf,g.leaf))])),/Boolean/); - assert.throws(()=>readRecord(g,record([list(g,[text(g,'x'),g.leaf])])),/name tag value/); - assert.throws(()=>readRecord(g,record([field('x',0,list(g,[natural(g,0xd800n)]))])),/scalar/); - assert.throws(()=>readRecord(g,record(Array.from({length:33},(_,i)=>field(String(i),0,g.leaf)))),/List decode limit/); - assert.throws(()=>readRecord(g,record(Array.from({length:5},(_,i)=>field(String(i),0,text(g,'a'.repeat(4096)))))),/output limit/); -}); diff --git a/ext/demo-site/test/site.test.mjs b/ext/demo-site/test/site.test.mjs @@ -10,7 +10,7 @@ test('single flowing editor starts before ecosystem, without tabs or graph JSON assert.ok(html.indexOf('id="editor"')<html.indexOf('id="ecosystem"')); const ids=[...html.matchAll(/\bid="([^"]+)"/g)].map(m=>m[1]);assert.equal(ids.length,new Set(ids).size); const choices=html.match(/<select id="output-type">([\s\S]*?)<\/select>/)[1]; - for(const value of ['tricu','triangle','dag','string','number','record'])assert.ok(choices.includes(`value="${value}"`)); + for(const value of ['tricu','triangle','dag','string','number','values'])assert.ok(choices.includes(`value="${value}"`)); assert.doesNotMatch(choices,/value="tree"|value="list"/); assert.match(choices,/<option value="triangle">△ source<\/option>/); assert.doesNotMatch(choices,/Lambada/i); diff --git a/ext/demo-site/test/zig-session-probe.mjs b/ext/demo-site/test/zig-session-probe.mjs @@ -42,9 +42,10 @@ export async function run() { await rejects(()=>invoke({type:'list',value:[{type:'number',value:'256'}]},'bytes'),/byte/); await rejects(()=>invoke({type:'list',value:[{type:'number',value:'55296'}]},'string'),/status 5/); await rejects(()=>invoke({type:'string',value:'\ud800'},'string'),/surrogate/); - const record={type:'list',value:[{type:'list',value:[{type:'string',value:'__proto__'},{type:'number',value:'0'},{type:'string',value:'safe'}]}]}; - const decoded=(await invoke(record,'record')).value;assert(Object.hasOwn(decoded,'__proto__')&&decoded.__proto__==='safe','Prototype-safe record'); - await rejects(()=>invoke({type:'list',value:[record.value[0],record.value[0]]},'record'),/unique/); + const scalars={type:'list',value:[{type:'string',value:'λ🙂'},{type:'number',value:'1267650600228229401496703205376'}]}; + equal((await invoke(scalars,'values')).value,scalars.value,'Decoded list preserves text and exact big naturals'); + await rejects(()=>invoke({type:'list',value:[{type:'bool',value:true}]},'values'),/number/); + await rejects(()=>invoke({type:'list',value:Array(33).fill({type:'number',value:'42'})},'values'),/limit/); equal((await invoke({type:'list',value:[{type:'number',value:'42'}]},'list')).value.length,1,'List'); const original=await bytes(intro.hash); await rejects(()=>s.load(original,'0'.repeat(64)),/SHA-256 mismatch/); @@ -57,7 +58,7 @@ export async function run() { report.memory.push(s.diagnostics().linearMemoryBytes); } assert(Math.max(...report.memory.slice(25))<=Math.max(...report.memory.slice(0,25))+65536,'Memory failed to plateau'); - report.checks.push('117 complete published goldens; IO GC/trace ordering/limits; seven codecs/negative controls; physical sharing; ownership and memory plateau'); + report.checks.push('117 complete published goldens; IO GC/trace ordering/limits; scalar/list/tree codecs and negative controls; physical sharing; ownership and memory plateau'); const greet=fixtures.demos.greet;await s.load(await bytes(greet.hash),greet.hash); let entered;const paused=new Promise(resolve=>{entered=resolve;}); const running=s.run(greet.haskellCases[0].export,[],'string','io',{...host(''),before:()=>{entered();return new Promise(()=>{});}}); diff --git a/ext/haskell-wasm/BrowserRuntime.hs b/ext/haskell-wasm/BrowserRuntime.hs @@ -5,7 +5,7 @@ module BrowserRuntime where import Runtime.Tree import Runtime.Value import Control.Exception (evaluate) -import Control.Monad (unless, forM_, foldM) +import Control.Monad (unless, forM_) import Data.Array (Array, listArray, (!), elems) import Data.Bits ((.|.), shiftL) import qualified Data.ByteString as BS @@ -14,7 +14,8 @@ import qualified Data.Text.Encoding as Text import qualified Data.IntMap.Strict as IM import qualified Data.IntSet as IS import Data.IORef -import Data.Char (ord) +import Data.Char (ord, generalCategory, GeneralCategory(Space)) +import System.IO.Error (catchIOError) import Data.List (intercalate) import System.Mem.StableName import Data.Word (Word32) @@ -150,27 +151,17 @@ view kind tree=do xs<-boundedList 4096 tree A <$> mapM (\x->do n<-natural x;unless(n<=255)(fail "Invalid byte");pure(N n)) xs "list"->boundedList 32 tree >>= fmap A . mapM (preview 8) - "record"->do - rows<-boundedList 32 tree - (_,_,values)<-foldM record ([],0,[]) rows - pure(O(reverse values)) + "values"->boundedList 32 tree >>= fmap A . mapM scalar _->fail "Unsupported output codec" pure(O[("type",S kind),("value",value)]) where - record (names,size,values) row=do - xs<-boundedList 3 row - (key,tag,t)<-case xs of [a,b,c]->pure(a,b,c);_->fail "Record field must be [name tag value]" - name<-text 128 key - unless(not(null name)&&name `notElem` names)(fail "Record field names must be nonempty and unique") - code<-natural tag - (value,len)<-case code of - 0->do s<-text 4096 t;pure(S s,length s) - 1->do n<-natural t;unless(n<=9007199254740991)(fail "Record number exceeds safe integer range");pure(N n,length(show n)) - 2->do b<-boolean t;pure(B b,if b then 4 else 5) - _->fail "Unsupported record field tag" - let total=size+length name+len - unless(total<=16384)(fail "Record output limit exceeded") - pure(name:names,total,(name,value):values) + scalar t=catchIOError (do + s<-text 4096 t + unless(not(null s) && all readable s)(fail "Not readable text") + pure(O[("type",S "string"),("value",S s)])) (\_ -> do + n<-natural t + pure(O[("type",S "number"),("value",S(show n))])) + readable c=generalCategory c<=Space || c `elem` "\t\n\r\x200c\x200d" -- Explicit action machine. Events contain no tree handles; the RTS owns all -- continuations while the browser is waiting. Each resume consumes a fresh token. diff --git a/ext/haskell-wasm/README.md b/ext/haskell-wasm/README.md @@ -137,7 +137,7 @@ execution in a replacement Worker. `browser-parity.mjs` additionally checks all eight curated authenticated packages against 117 existing Haskell result/terminal goldens, including four Conversation IO cases, then compiles all eight sources using the empty/practical environments. -It checks all seven output codecs, invalid bytes/scalars/records, authentication +It checks scalar/list/tree output codecs, invalid bytes/scalars/list elements, authentication and profile rejection (failed loads preserve exports; failed compile replacements invalidate them), a 40-level exponentially shared tree, bounded preview, immutable and runtime DAG export, and refusal to diff --git a/ext/haskell-wasm/browser-parity.mjs b/ext/haskell-wasm/browser-parity.mjs @@ -58,17 +58,13 @@ export async function runParity(){ await rejects(()=>request({type:'evaluate',name:id,arguments:[{type:'number',value:'256'}],output:'bool'}),/Boolean/); await rejects(()=>request({type:'evaluate',name:id,arguments:[{type:'list',value:[{type:'number',value:'256'}]}],output:'bytes'}),/Invalid byte/); await rejects(()=>request({type:'evaluate',name:id,arguments:[{type:'list',value:[{type:'number',value:'55296'}]}],output:'string'}),/Surrogate/); - const record={type:'list',value:[ - {type:'list',value:[{type:'string',value:'__proto__'},{type:'number',value:'0'},{type:'string',value:'safe'}]}, - {type:'list',value:[{type:'string',value:'n'},{type:'number',value:'1'},{type:'number',value:'42'}]}, - {type:'list',value:[{type:'string',value:'b'},{type:'number',value:'2'},{type:'bool',value:true}]} - ]}; - const decoded=(await request({type:'evaluate',name:id,arguments:[record],output:'record'})).value; - assert(Object.hasOwn(decoded,'__proto__')&&decoded.__proto__==='safe'&&decoded.n===42&&decoded.b===true,'Record codec / prototype key'); - await rejects(()=>request({type:'evaluate',name:id,arguments:[{type:'list',value:[record.value[0],record.value[0]]}],output:'record'}),/unique/); + const scalars={type:'list',value:[{type:'string',value:'λ🙂'},{type:'number',value:'1267650600228229401496703205376'}]}; + equal((await request({type:'evaluate',name:id,arguments:[scalars],output:'values'})).value,scalars.value,'Decoded list preserves scalar values and big naturals'); + await rejects(()=>request({type:'evaluate',name:id,arguments:[{type:'list',value:[{type:'bool',value:true}]}],output:'values'}),/number/); + await rejects(()=>request({type:'evaluate',name:id,arguments:[{type:'list',value:Array(33).fill({type:'number',value:'42'})}],output:'values'}),/limit/); const list=(await request({type:'evaluate',name:id,arguments:[{type:'list',value:[{type:'number',value:'42'},{type:'bool',value:true}]}],output:'list'})).value; equal(list.length,2,'List codec');assert(list.every(v=>Array.isArray(v.nodes)),'List previews'); - report.checks.push('authenticated arbitrary bundle load; failed loads preserve previous exports; all seven site codecs and negative controls'); + report.checks.push('authenticated arbitrary bundle load; failed loads preserve previous exports; scalar/list/tree site codecs and negative controls'); await load('exponential'); const preview=await request({type:'preview',name:'root',limit:8}); assert(preview.truncated&&preview.nodes.length===8,'Bounded preview must truncate');