@fuaran-ui/conformance 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/manifest.json +81 -1
- package/corpus/nodes/composite-tabs-panels.json +1 -1
- package/corpus/nodes/controls-closure.json +1 -1
- package/corpus/nodes/tabs-1.json +1 -1
- package/corpus/snapshot.json +4 -0
- package/corpus/teleport/tp-reject-bad-base64.json +1 -0
- package/corpus/teleport/tp-reject-chainhead-injected.json +1 -0
- package/corpus/teleport/tp-reject-inflate-bomb.json +1 -0
- package/corpus/teleport/tp-reject-missing-digest.json +1 -0
- package/corpus/teleport/tp-reject-not-a-bundle.json +1 -0
- package/corpus/teleport/tp-reject-oversize-encoded.json +1 -0
- package/corpus/teleport/tp-reject-tampered-state.json +1 -0
- package/corpus/teleport/tp-reject-unsupported-version.json +1 -0
- package/corpus/teleport/tp-wizard-step1.expected.json +1 -0
- package/corpus/teleport/tp-wizard-step1.json +1 -0
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +5 -3
package/corpus/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": 1,
|
|
3
3
|
"schema": "schema.json",
|
|
4
4
|
"idl": "idl.json",
|
|
5
|
-
"description": "Fuaran canonical wire-format conformance corpus. node-round-trip / op-round-trip fixtures: decode inputFile, re-encode, assert byte-equal to expectedFile. reject fixtures: decode inputFile, assert DecodeError.Code = expectedErrorCode and DecodeError.Path starts with expectedPath. lenient-accept fixtures (WIRE_FORMAT 16): decode the SHORTHAND inputFile, re-encode, assert byte-equal to expectedFile (the verbose canonical form) — a conformant host MUST accept the shorthand and normalise it; rejecting it, or decoding it to different bytes, is non-conformant. envelope-round-trip / envelope-reject fixtures (WIRE_FORMAT 15): read the $profile/$payload envelope, negotiate the authored profile against the host's own core@1.0, then either re-render byte-equal to expectedFile (Current/Behind — unknown kinds preserved verbatim, must-ignore-but-preserve) or refuse a Foreign profile with expectedErrorCode FOREIGN_PROFILE at expectedPath. elicitation-round-trip / elicitation-reject fixtures (WIRE_FORMAT 18): decode with the decoder-named entry point (elicitation = the envelope codec, elicitation-outcome = the outcome codec), then either re-encode byte-equal to expectedFile or assert the structured refusal (expectedErrorCode at a path starting with expectedPath). elicitation-answer-accept / elicitation-answer-reject fixtures (WIRE_FORMAT 18.4): the inputFile pairs {answer, contract}; run the host's answer-conformance validation and assert acceptance or the expected refusal. contract-card-round-trip / contract-card-reject fixtures (WIRE_FORMAT 25): decode with the decoder-named entry point (contract-card = the single-card codec, contract-card-bundle = the bundle codec), then either re-encode byte-equal to expectedFile or assert the structured refusal (expectedErrorCode at a path starting with expectedPath). A card is NOT a node — it is the description a host reads to label and prop-validate a Custom node it has no renderer for — so it is its own family and never appears in nodes/. See fuaran-dotnet/docs/WIRE_FORMAT.md.",
|
|
5
|
+
"description": "Fuaran canonical wire-format conformance corpus. node-round-trip / op-round-trip fixtures: decode inputFile, re-encode, assert byte-equal to expectedFile. reject fixtures: decode inputFile, assert DecodeError.Code = expectedErrorCode and DecodeError.Path starts with expectedPath. lenient-accept fixtures (WIRE_FORMAT 16): decode the SHORTHAND inputFile, re-encode, assert byte-equal to expectedFile (the verbose canonical form) — a conformant host MUST accept the shorthand and normalise it; rejecting it, or decoding it to different bytes, is non-conformant. envelope-round-trip / envelope-reject fixtures (WIRE_FORMAT 15): read the $profile/$payload envelope, negotiate the authored profile against the host's own core@1.0, then either re-render byte-equal to expectedFile (Current/Behind — unknown kinds preserved verbatim, must-ignore-but-preserve) or refuse a Foreign profile with expectedErrorCode FOREIGN_PROFILE at expectedPath. elicitation-round-trip / elicitation-reject fixtures (WIRE_FORMAT 18): decode with the decoder-named entry point (elicitation = the envelope codec, elicitation-outcome = the outcome codec), then either re-encode byte-equal to expectedFile or assert the structured refusal (expectedErrorCode at a path starting with expectedPath). elicitation-answer-accept / elicitation-answer-reject fixtures (WIRE_FORMAT 18.4): the inputFile pairs {answer, contract}; run the host's answer-conformance validation and assert acceptance or the expected refusal. contract-card-round-trip / contract-card-reject fixtures (WIRE_FORMAT 25): decode with the decoder-named entry point (contract-card = the single-card codec, contract-card-bundle = the bundle codec), then either re-encode byte-equal to expectedFile or assert the structured refusal (expectedErrorCode at a path starting with expectedPath). A card is NOT a node — it is the description a host reads to label and prop-validate a Custom node it has no renderer for — so it is its own family and never appears in nodes/. teleport-decode / teleport-reject fixtures (WIRE_FORMAT 17): read the inputFile document ({encoded, limits?}), decode the encoded teleport bundle with the teleport entry point under the limits the document names (its own defaults when it names none), then either re-render the verified envelope — with its payload NORMALISED by the ordinary node decoder, so expectedFile is the decode expectation and not the carried bytes — byte-equal to expectedFile, or assert the structured refusal (expectedErrorCode at a path starting with expectedPath). The refusal vocabulary is the one WIRE_FORMAT 17.4 names (InvalidFormat / InvalidJson / InvalidEnvelope / UnsupportedVersion / DigestMismatch / Oversize / TreeDecode / HistoryDecode / TreeInvalid), NOT the eight DecodeError codes: a bundle is a container the node decoder runs inside. See fuaran-dotnet/docs/WIRE_FORMAT.md.",
|
|
6
6
|
"kinds": [
|
|
7
7
|
"Badge",
|
|
8
8
|
"Box",
|
|
@@ -4385,6 +4385,86 @@
|
|
|
4385
4385
|
"expectedErrorCode": "WRONG_TYPE",
|
|
4386
4386
|
"expectedPath": "$.style.tone",
|
|
4387
4387
|
"description": "Style.tone is integer not string"
|
|
4388
|
+
},
|
|
4389
|
+
{
|
|
4390
|
+
"id": "tp-wizard-step1",
|
|
4391
|
+
"kind": "teleport-decode",
|
|
4392
|
+
"decoder": "teleport",
|
|
4393
|
+
"inputFile": "teleport/tp-wizard-step1.json",
|
|
4394
|
+
"expectedFile": "teleport/tp-wizard-step1.expected.json",
|
|
4395
|
+
"description": "the reference bundle: a 3-step signup wizard resumed on step 1, name + email filled — produced by the reference encoder, so a second host decoding it byte-for-byte IS the cross-host claim. Its carried tree spells TextSource.Literal in the decode-accepted envelope form, so expectedFile is the NORMALISED twin (bare strings, WIRE_FORMAT 3.5 and 16) and not the input bytes — a decoder that treats the payload as opaque JSON fails here, which is the point (WIRE_FORMAT 17.6)"
|
|
4396
|
+
},
|
|
4397
|
+
{
|
|
4398
|
+
"id": "tp-reject-bad-base64",
|
|
4399
|
+
"kind": "teleport-reject",
|
|
4400
|
+
"decoder": "teleport",
|
|
4401
|
+
"inputFile": "teleport/tp-reject-bad-base64.json",
|
|
4402
|
+
"expectedErrorCode": "InvalidFormat",
|
|
4403
|
+
"expectedPath": "$",
|
|
4404
|
+
"description": "the reference bundle with one payload character outside the RFC 4648 5 alphabet — refused before any inflate work (WIRE_FORMAT 17.4 step 2)"
|
|
4405
|
+
},
|
|
4406
|
+
{
|
|
4407
|
+
"id": "tp-reject-chainhead-injected",
|
|
4408
|
+
"kind": "teleport-reject",
|
|
4409
|
+
"decoder": "teleport",
|
|
4410
|
+
"inputFile": "teleport/tp-reject-chainhead-injected.json",
|
|
4411
|
+
"expectedErrorCode": "DigestMismatch",
|
|
4412
|
+
"expectedPath": "$.digest",
|
|
4413
|
+
"description": "a chainHead member added to the reference envelope, its digest left alone — binding a bundle to a position it never held is the tamper WIRE_FORMAT 17.3 names first (17.4 step 4)"
|
|
4414
|
+
},
|
|
4415
|
+
{
|
|
4416
|
+
"id": "tp-reject-inflate-bomb",
|
|
4417
|
+
"kind": "teleport-reject",
|
|
4418
|
+
"decoder": "teleport",
|
|
4419
|
+
"inputFile": "teleport/tp-reject-inflate-bomb.json",
|
|
4420
|
+
"expectedErrorCode": "Oversize",
|
|
4421
|
+
"expectedPath": "$",
|
|
4422
|
+
"description": "a 367-character bundle inflating to 262144 bytes against a maxDecodedBytes of 65536 — the deflate-bomb guard, which is why the inflate cap is normative (WIRE_FORMAT 17.1, 17.4 step 1)"
|
|
4423
|
+
},
|
|
4424
|
+
{
|
|
4425
|
+
"id": "tp-reject-missing-digest",
|
|
4426
|
+
"kind": "teleport-reject",
|
|
4427
|
+
"decoder": "teleport",
|
|
4428
|
+
"inputFile": "teleport/tp-reject-missing-digest.json",
|
|
4429
|
+
"expectedErrorCode": "InvalidEnvelope",
|
|
4430
|
+
"expectedPath": "$.digest",
|
|
4431
|
+
"description": "the reference envelope with its digest member removed — an unsigned envelope is refused by shape, never accepted as one with nothing to check (WIRE_FORMAT 17.4 step 3)"
|
|
4432
|
+
},
|
|
4433
|
+
{
|
|
4434
|
+
"id": "tp-reject-not-a-bundle",
|
|
4435
|
+
"kind": "teleport-reject",
|
|
4436
|
+
"decoder": "teleport",
|
|
4437
|
+
"inputFile": "teleport/tp-reject-not-a-bundle.json",
|
|
4438
|
+
"expectedErrorCode": "InvalidFormat",
|
|
4439
|
+
"expectedPath": "$",
|
|
4440
|
+
"description": "an ordinary string carrying no FT1. tag (WIRE_FORMAT 17.4 step 2)"
|
|
4441
|
+
},
|
|
4442
|
+
{
|
|
4443
|
+
"id": "tp-reject-oversize-encoded",
|
|
4444
|
+
"kind": "teleport-reject",
|
|
4445
|
+
"decoder": "teleport",
|
|
4446
|
+
"inputFile": "teleport/tp-reject-oversize-encoded.json",
|
|
4447
|
+
"expectedErrorCode": "Oversize",
|
|
4448
|
+
"expectedPath": "$",
|
|
4449
|
+
"description": "the reference bundle against a maxEncodedChars of 256 — the size gate fires before any decompression work, so a valid bundle is refused purely for exceeding the limits the vector names (WIRE_FORMAT 17.4 step 1)"
|
|
4450
|
+
},
|
|
4451
|
+
{
|
|
4452
|
+
"id": "tp-reject-tampered-state",
|
|
4453
|
+
"kind": "teleport-reject",
|
|
4454
|
+
"decoder": "teleport",
|
|
4455
|
+
"inputFile": "teleport/tp-reject-tampered-state.json",
|
|
4456
|
+
"expectedErrorCode": "DigestMismatch",
|
|
4457
|
+
"expectedPath": "$.digest",
|
|
4458
|
+
"description": "one state value rewritten in the reference envelope, its digest left alone — resuming a bundle whose captured state was edited in transit is what the integrity check exists to prevent (WIRE_FORMAT 17.4 step 4)"
|
|
4459
|
+
},
|
|
4460
|
+
{
|
|
4461
|
+
"id": "tp-reject-unsupported-version",
|
|
4462
|
+
"kind": "teleport-reject",
|
|
4463
|
+
"decoder": "teleport",
|
|
4464
|
+
"inputFile": "teleport/tp-reject-unsupported-version.json",
|
|
4465
|
+
"expectedErrorCode": "UnsupportedVersion",
|
|
4466
|
+
"expectedPath": "$.bundle",
|
|
4467
|
+
"description": "the reference envelope re-stamped teleport@2 with its digest correctly recomputed, so the version refusal is what bites rather than the digest — an unrecognised envelope version is refused BY NAME, never decoded on the guess that the shape is close enough (WIRE_FORMAT 17.2, 17.4 step 3)"
|
|
4388
4468
|
}
|
|
4389
4469
|
]
|
|
4390
4470
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"composite-tabs-panels","kind":{"$type":"Tabs","
|
|
1
|
+
{"id":"composite-tabs-panels","kind":{"$type":"Tabs","activeTag":{"$type":"Static","value":"overview"},"children":[{"id":"overview-panel","kind":{"$type":"Box","children":[{"id":"spark-1","kind":{"$type":"Sparkline","source":{"$type":"Static","value":[1,2,3,2,4]}}},{"id":"badge-1","kind":{"$type":"Badge","label":"Beta","variant":"Info"}}],"heading":"This month","layout":{"$type":"Grid","cols":2,"gap":16},"role":"Card"}},{"id":"settings-panel","kind":{"$type":"Box","children":[{"id":"preferences-form","kind":{"$type":"Form","fields":[{"id":"displayName","kind":{"$type":"Text","value":{"$type":"Static","value":"Ada Lovelace"}},"label":"Display name","required":true},{"id":"theme","kind":{"$type":"Choice","options":{"$type":"Static","value":[{"label":"Light","value":"light"},{"label":"Dark","value":"dark"}]},"value":{"$type":"Static","value":"dark"}},"label":"Theme","required":true}],"onSubmit":{"$type":"Call","endpoint":"/api/preferences"},"submitLabel":"Save preferences"}}],"heading":"Preferences","layout":{"$type":"Flex","direction":"Vertical","gap":12,"wrap":false},"role":"Card"}}],"tabHeaders":[{"icon":"chart-glyph","label":"Overview"},{"disabled":{"$type":"Static","value":false},"label":"Settings"}],"tabTags":["overview","settings"]}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"controls-closure","kind":{"$type":"Box","children":[{"id":"closure-tabs","kind":{"$type":"Tabs","
|
|
1
|
+
{"id":"controls-closure","kind":{"$type":"Box","children":[{"id":"closure-tabs","kind":{"$type":"Tabs","activeTag":{"$type":"Static","value":"overview"},"children":[{"id":"markdown-1","kind":{"$type":"Markdown","text":"Updated hourly."}},{"id":"spark-1","kind":{"$type":"Sparkline","source":{"$type":"Static","value":[1,2,3,2,4]}}}],"onSelect":"<closure>","onSelectTag":"<closure>","tabTags":["overview","detail"]}},{"id":"closure-disclosure","kind":{"$type":"Disclosure","children":[{"id":"markdown-2","kind":{"$type":"Markdown","text":"Updated hourly."}}],"defaultOpen":false,"heading":"Advanced","onToggle":"<closure>","open":{"$type":"Static","value":false}}},{"id":"closure-multiselect","kind":{"$type":"Select","label":"Tags","multiple":true,"onChange":"<closure>","onChangeMulti":"<closure>","source":{"$type":"Static","value":[{"label":"Red","value":"red"}]},"value":{"$type":"Static"},"values":{"$type":"Static","value":["red"]}}}],"layout":{"$type":"Flex","direction":"Vertical","wrap":false},"role":"Group"}}
|
package/corpus/nodes/tabs-1.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"tabs-1","kind":{"$type":"Tabs","
|
|
1
|
+
{"id":"tabs-1","kind":{"$type":"Tabs","children":[{"id":"metric-1","kind":{"$type":"Metric","format":{"$type":"Currency","code":"GBP"},"icon":"trending-up","label":"Revenue","subtext":"vs last month","tone":"Brand","trend":{"$type":"Static","value":0.07},"trendFormat":{"$type":"Percent","decimals":1},"value":{"$type":"Static","value":1234.5}}}],"onSelect":"<closure>"}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"encoded":"FT1.q1ZKKs1LyUlVslIqSc1JLcgvKnEwVNJRSslM*y0uAYoaWSYbJ5omJSUbWpinpRkbWlgkJ5mbmRmbplgaGZqZm6akmBulJZobGJgYGBsZJielGpiZpSQaplkmp6aZWyYnAc0qLkksAVpQr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sGJsxkkKxNck5-cWlRqh1QCsnWgqL89CJgVFNodzwothQMFfLTFIwVHjVMUUAOw3g0n6ZlpuakYLMRT6pJ0wUncMpcqaXlBzTESktLASWboLlOF5LVKLXKFWQKyC7sORbdUnCKoNTOAKAhICvjNfLySxQqU0sUUvOAilJTNDHiQBdeIFBqqUdqYlGKQllmIrE2g8ocim0NARqiUAwsufDYCswBOYmV-aUoZrnlpIJSWUpmETBjgAozK6Ww1CJw3ACFy4sSgaVOWmJOcSqwfIGWeu5F-aUFQAOB5mWkJqZk5qXjdZxfarkCsADNL80rAZWUVHGCMzCMQV4CAA","limits":{"maxEncodedChars":256}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"encoded":"FT1.rZThahNBEMdfZRn8oGEjd4lNmkOkVap-qKUQEURKmNudS5dsdo_dubRpCfgQPqFPInulJY2xKOfHu5n5__6zszu3UDZOW4ICmCzVPvBRDhK0mVNkKGAwUUM8KEuVH46rapgfHqpyPBoND_RkkI_GB1qPBxWOs-xVNhzkqqRsNNKYVxNF1XiiSpAQGZmguAVaorFQAGo8Qod2zUahfUlubhyBBIfLZORkReKYGdWCAkioLTooACQEqigEtHdfkamGIpPAhMupuUmlsJHAgVoaKkUxmtJYw-v0I_i2z0Bz413KNDq1XfexrkHCwjid0p7xuk55b_01SFCXxupADopvtw8FCR33lEyZ6ro1jYrNiqatxe04slEgYYW2ISiyzZ8A2R71TxgW2l85SC1f83bo1DClg7mPwFffBKGJ0dgIm81GbmnnHbXPjVoIFO1cdqQHHaVPMfK27QsJ3k3JkkrR18r62AR6A4-odfDzQDF2ZM_StEQufCWG4uf3H2L7DGc7nVaGrI7_dmuqfnvBu7ns9c5wSUWvJ441ilO_IouKdt31755aV9RJUkms_S92F9reiK7Mc4suIWfPnWexJhbkmALpF7_NoP-wELpCPxIGLVYG_5acdk5n6mfCpYjmhp6gXkiwuPbNI633lq7bJR1IcVpmBXyh0M4GJFwFrKGo0EbayPut9yH4poZW75JQGzd_0twZXQlUyjeO06b8LxbeYdCppV8"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"encoded":"FT1.rZTbahsxEIZfRQy9aI1c7LWT9S6lpC09XDgh4FIoJZhZadYRlqVF0voQY-hD9An7JEUbEmzXDS3bS2lG__ePRpotFLWRmiCHQJoq68JFAhykmpEPkAMO-5SeJQNRYplmQpZJ1ktHfaRBlg7PkqLMikEi-ueUFIPzXpEVSNkIcZSlg3Q47PeAgw8YCPIt0AKVjpoSL9Cg3gQlUL8kM1OGgIPBRTTyRiIb2yVpFHG30mggB-DgqCTnUN-vfKAK8h6HQLiYqLt4FHYcgqOGhkKQ96pQWoVN3HC2qdPRTFkTM5WMZVddrCrgMFdGxrRnYVPFvLd2DRzErdLSkYH82_bxQET7E0cmgaqKHHBAEdSSJo3F_TgGJYDDEnVNkPd2fwL0TqhfoptLuzIQS16H_dBYBYoX8xCBr7Z2TFJApT3sdju-p91vqX2txJwha_pyJJ20lB6jD_u2bzhYMyFNIkZfCW197eg1HFArZ2eOvG_JnsZusT6zJRuwn99_sP07nB5VWirS0v_bqym7zQNv57LTucIF5Z0OO_gmR-6691-tLep9VIms0z_2GNq8iLbMa40mIqfPjQ1sQ4GRCeRIvvitB93HgdAW-onQSbZU-LfkOHNaUz8TLphXd_QE9YaDxo2tD7Q-aFo3Q9qRCHGY5fCFXNMb4LByWEFeova04w9T76OzdQWN3i2hVGb2pLkrWjEUwtYmxEn5Xyy8QydjSb8A"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"bundle":"teleport@1","digest":"29c3a5bbc187ff3188cb76635d921675dd72fa70040321cbe066da1f9cef79cb","state":{"email":"ada@analytical.engine","name":"Ada Lovelace","plan":"","referral":"","step":0,"teamSize":""},"tree":{"accessibility":{"role":"region"},"id":"tp-app","kind":{"$type":"Box","children":[{"id":"tp-steps","kind":{"$type":"Stepper","activeStep":{"$type":"Static","value":0},"children":[{"id":"tp-s0","kind":{"$type":"Markdown","text":"Your details"}},{"id":"tp-s1","kind":{"$type":"Markdown","text":"Pick a plan"}},{"id":"tp-s2","kind":{"$type":"Markdown","text":"Last details"}}],"onSelect":"<closure>"}},{"id":"tp-progress","kind":{"$type":"Markdown","text":"_Step 1 of 3 — Your details_"}},{"id":"tp-fields","kind":{"$type":"Box","children":[{"id":"tp-f-name","kind":{"$type":"Markdown","text":"**Name:** Ada Lovelace"}},{"id":"tp-f-email","kind":{"$type":"Markdown","text":"**Email:** ada@analytical.engine"}},{"id":"tp-f-plan","kind":{"$type":"Markdown","text":"**Plan:** _(not yet entered)_"}},{"id":"tp-f-referral","kind":{"$type":"Markdown","text":"**Heard via:** _(not yet entered)_"}},{"id":"tp-f-team","kind":{"$type":"Markdown","text":"**Team size:** _(not yet entered)_"}}],"layout":{"$type":"Flex","direction":"Vertical","wrap":false},"role":"Group"}}],"heading":"New account","layout":{"$type":"Flex","direction":"Vertical","wrap":false},"role":"Card"}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"encoded":"FT1.q1ZKKs1LyUlVslIqSc1JLcgvKnEwVNJRSslMTy0uAYoaWSYbJ5omJSUbWpinpRkbWlgkJ5mbmRmbplgaGZqZm6akmBulJZobGJgYGBsZJielGpiZpSQaplkmp6aZWyYnAc0qLkksAVpQrZSam5iZAzQzMSXRITEvMaeyJDM5MUcvNS89My8VqDAvMRfkEMeURAWf_LLUnMRkkGhBTmIeUBTIKkpNSy0qSgQZATY2tUDJykAH6PDE3ODMKpBWpVogtygVbFticnJqcXFmUmZOZkklSKAoH-zPotT0zPw8kMrMFJC3C3QTCwqA5mVn5gH51UoqJZUFIHVO-RVA0eSMzJyUolSgC6Kr4RpAVhdj0RIMFC9ILQLKJCaXZJalgvio8olALwOlyxJzSoECBkBHYLfAAIvpvolF2Sn55XlAqZLUCmDkIKR8MktSQQEDk1GKzC8tUkhJLQEGeLFSbW2tDpLZoPilxOyAzORshUQFcLygGW1EodE-icUlyM6O1VHKzwsGJsxkkKxNck5-cWlRqh1QCsnWgqL89CJgVFNodzwothQMFfLTFIwVHjVMUUAOw3g0n6ZlpuakYLMRT6pJ0wUncMpcqaXlBzTESktLASWboLlOF5LVKLXKFWQKyC7sORbdUnCKoNTOAKAhICvjNfLySxQqU0sUUvOAilJTNDHiQBdeIFBqqUdqYlGKQllmIrE2g8ocim0NARqiUAwsufDYCswBOYmV-aUoZrnlpIJSWUpmETBjgAozK6Ww1CJw3ACFy4sSgaVOWmJOcSqwfIGWeu5F-aUFQAOB5mWkJqZk5qXjdZxfarkCsADNL80rAZWUVHGCMzCMQV4CAA"}
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/report.ts","../src/corpus.ts","../src/run.ts","../src/cli.ts"],"names":["report","adapter"],"mappings":";;;;;;;;AAwEO,IAAM,cAAA,GAAiB,CAAC,IAAA,KAAwC;AACrE,EAAA,IAAI,IAAA,CAAK,KAAK,CAAC,CAAA,KAAM,EAAE,MAAA,KAAW,MAAM,GAAG,OAAO,gBAAA;AAClD,EAAA,IAAI,IAAA,CAAK,IAAA,CAAK,CAAC,CAAA,KAAM,CAAA,CAAE,aAAa,CAAA,CAAE,MAAA,KAAW,SAAS,CAAA,EAAG,OAAO,sBAAA;AACpE,EAAA,OAAO,YAAA;AACT,CAAA;AAEA,IAAM,cAAyC,EAAE,IAAA,EAAM,UAAK,IAAA,EAAM,QAAA,EAAK,SAAS,QAAA,EAAI;AAG7E,IAAM,YAAA,GAAe,CAACA,OAAAA,KAAsC;AACjE,EAAA,MAAM,QAAkB,EAAC;AACzB,EAAA,MAAM,IAAA,GACJA,OAAAA,CAAO,cAAA,CAAe,OAAA,KAAY,SAC9BA,OAAAA,CAAO,cAAA,CAAe,IAAA,GACtB,CAAA,EAAGA,QAAO,cAAA,CAAe,IAAI,CAAA,CAAA,EAAIA,OAAAA,CAAO,eAAe,OAAO,CAAA,CAAA;AACpE,EAAA,KAAA,CAAM,KAAK,CAAA,qCAAA,CAAuC,CAAA;AAClD,EAAA,KAAA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AAkC,OAAO,CAAA,CAAE,CAAA;AACzD;AAEA,OAAA,CAAQ,IAAA;AAAA,EACN,OAAO,OAAA,KAAY,YAAA,GAAe,IAAI,MAAA,CAAO,OAAA,KAAY,yBAAyB,CAAA,GAAI;AACxF,CAAA","file":"cli.js","sourcesContent":["// ============================================================================\n// @fuaran-ui/conformance — the certification report.\n//\n// One `LegResult` per conformance leg. A leg is `skipped` (never attempted)\n// when the adapter lacks the hooks it needs — that is a capability statement,\n// not a failure. The verdict distinguishes the three honest outcomes:\n//\n// conformant every mandatory leg attempted and passed\n// partially-conformant every attempted leg passed; ≥1 mandatory leg skipped\n// non-conformant ≥1 attempted leg failed\n//\n// so a partial host (decode-only, node-only, …) certifies the legs it\n// implements rather than receiving a blanket fail.\n// ============================================================================\n\nimport type { ImplementationInfo } from './adapter.js';\n\nexport type LegId =\n | 'node-decode'\n | 'node-byte-identity'\n | 'node-reject'\n | 'op-decode'\n | 'op-byte-identity'\n | 'op-reject'\n | 'lenient-accept'\n | 'envelope-round-trip'\n | 'envelope-reject'\n | 'elicitation-round-trip'\n | 'elicitation-reject'\n | 'elicitation-answer'\n | 'contract-card-round-trip'\n | 'contract-card-reject'\n | 'schema-validation'\n | 'apply';\n\nexport type LegStatus = 'pass' | 'fail' | 'skipped';\n\nexport interface FixtureFailure {\n readonly fixtureId: string;\n readonly summary: string;\n readonly detail?: string;\n}\n\nexport interface LegResult {\n readonly leg: LegId;\n /** Mandatory legs must all pass for the `conformant` verdict. */\n readonly mandatory: boolean;\n readonly status: LegStatus;\n /** Why the leg was not attempted (only when `status === 'skipped'`). */\n readonly skipReason?: string;\n readonly fixturesTotal: number;\n readonly fixturesPassed: number;\n readonly failures: readonly FixtureFailure[];\n}\n\nexport type Verdict = 'conformant' | 'partially-conformant' | 'non-conformant';\n\nexport interface ConformanceReport {\n readonly kit: { readonly name: string; readonly version: string };\n readonly implementation: ImplementationInfo;\n readonly corpus: {\n readonly manifestVersion: number;\n readonly digest: string;\n readonly fixtureCount: number;\n readonly source: 'bundled' | 'external';\n };\n readonly legs: readonly LegResult[];\n readonly verdict: Verdict;\n /** ISO-8601 generation timestamp. */\n readonly generatedAt: string;\n}\n\nexport const computeVerdict = (legs: readonly LegResult[]): Verdict => {\n if (legs.some((l) => l.status === 'fail')) return 'non-conformant';\n if (legs.some((l) => l.mandatory && l.status === 'skipped')) return 'partially-conformant';\n return 'conformant';\n};\n\nconst statusGlyph: Record<LegStatus, string> = { pass: '✓', fail: '✗', skipped: '–' };\n\n/** Render a report as a human-readable text block (what the CLI prints). */\nexport const formatReport = (report: ConformanceReport): string => {\n const lines: string[] = [];\n const impl =\n report.implementation.version === undefined\n ? report.implementation.name\n : `${report.implementation.name} ${report.implementation.version}`;\n lines.push(`Fuaran wire-format conformance report`);\n lines.push(` kit ${report.kit.name}@${report.kit.version}`);\n lines.push(` implementation ${impl}`);\n lines.push(\n ` corpus v${report.corpus.manifestVersion} (${report.corpus.fixtureCount} fixtures, ${report.corpus.source})`,\n );\n lines.push(` corpus digest sha256:${report.corpus.digest}`);\n lines.push(` generated ${report.generatedAt}`);\n lines.push('');\n for (const leg of report.legs) {\n const tier = leg.mandatory ? 'mandatory' : 'optional ';\n const counts =\n leg.status === 'skipped'\n ? (leg.skipReason ?? 'skipped')\n : `${leg.fixturesPassed}/${leg.fixturesTotal}`;\n lines.push(` ${statusGlyph[leg.status]} ${leg.leg.padEnd(20)} ${tier} ${counts}`);\n for (const f of leg.failures) {\n lines.push(` ${f.fixtureId}: ${f.summary}`);\n if (f.detail !== undefined)\n for (const detailLine of f.detail.split('\\n')) lines.push(` ${detailLine}`);\n }\n }\n lines.push('');\n lines.push(` verdict: ${report.verdict.toUpperCase()}`);\n if (report.verdict === 'partially-conformant') {\n const skipped = report.legs\n .filter((l) => l.mandatory && l.status === 'skipped')\n .map((l) => l.leg);\n lines.push(` (mandatory legs not attempted: ${skipped.join(', ')})`);\n }\n lines.push(\n ` Certification is per corpus version — re-certify when the corpus advances (WIRE_FORMAT.md §11).`,\n );\n // What a green report does NOT say. Every leg above is a codec or byte-parity\n // check, so it certifies the SOURCE and FALLBACK tiers; the declared\n // client-only rich tier sits outside every parity comparison by contract, and\n // a host that ships none of it is degraded-by-declaration rather than\n // non-conformant. Naming the artefact here is the difference between a reader\n // knowing that and inferring it.\n lines.push(\n ` Scope: the parity legs certify the fallback tier. Which kinds declare a client-only`,\n );\n lines.push(\n ` rich tier outside it is in the corpus artefact render-fidelity.json (WIRE_FORMAT.md §13).`,\n );\n return lines.join('\\n');\n};\n","// ============================================================================\n// @fuaran-ui/conformance — corpus loading + versioning.\n//\n// The package bundles a snapshot of the canonical wire-format conformance\n// corpus under `corpus/` — manifest.json + schema.json + every fixture family\n// the manifest enumerates — so a third party needs nothing beyond\n// `npm install` to certify. The snapshot is synced from the authoritative\n// `wire-format-fixtures/` corpus by `scripts/sync-corpus.mjs`, and the same\n// script's `--check` mode guards it byte-for-byte from the package's own test\n// suite, so it cannot silently drift from the authority.\n//\n// Every report names the corpus it certified against: the manifest `version`\n// plus a SHA-256 digest over the manifest, the schema, and every fixture\n// payload in manifest order. Certification is per corpus version — content\n// advances with the spec (WIRE_FORMAT.md §11), and a report against an older\n// digest does not certify conformance with a newer one.\n// ============================================================================\n\nimport { createHash } from 'node:crypto';\nimport { readFileSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nexport type FixtureKind =\n | 'node-round-trip'\n | 'op-round-trip'\n | 'reject'\n | 'lenient-accept'\n // WIRE_FORMAT.md §15 wire-versioning envelope + tolerance.\n | 'envelope-round-trip'\n | 'envelope-reject'\n // WIRE_FORMAT.md §18 elicitation envelope + answer conformance.\n | 'elicitation-round-trip'\n | 'elicitation-reject'\n | 'elicitation-answer-accept'\n | 'elicitation-answer-reject'\n // WIRE_FORMAT.md §25 contract cards. Its OWN family, never `nodes/` — a card is\n // not a node, so the node round-trip law says nothing about it.\n | 'contract-card-round-trip'\n | 'contract-card-reject';\n\nexport interface CorpusFixture {\n readonly id: string;\n readonly kind: FixtureKind;\n readonly decoder:\n | 'node'\n | 'op'\n | 'elicitation'\n | 'elicitation-outcome'\n | 'elicitation-answer'\n | 'contract-card'\n | 'contract-card-bundle';\n readonly inputFile: string;\n readonly expectedFile?: string;\n readonly expectedErrorCode?: string;\n readonly expectedPath?: string;\n readonly description: string;\n}\n\ninterface Manifest {\n readonly version: number;\n readonly schema: string;\n readonly description: string;\n readonly fixtures: readonly CorpusFixture[];\n}\n\nexport interface Corpus {\n /** Absolute directory the corpus was loaded from. */\n readonly root: string;\n /** `bundled` (the package snapshot) or `external` (a caller-supplied root). */\n readonly source: 'bundled' | 'external';\n /** The manifest `version` field — the corpus major version. */\n readonly manifestVersion: number;\n readonly fixtures: readonly CorpusFixture[];\n /** SHA-256 (hex) over manifest.json + schema.json + every fixture payload in manifest order. */\n readonly digest: string;\n /** The canonical Draft 2020-12 JSON Schema (wire-format-fixtures/schema.json). */\n readonly schema: object;\n /** Read a corpus-relative payload file as UTF-8 text. */\n readonly read: (relPath: string) => string;\n}\n\n/** The bundled snapshot directory, resolved relative to the built module. */\nconst bundledRoot = (): string =>\n // dist/index.js → ../corpus (tsup `shims: true` provides import.meta.url under CJS).\n fileURLToPath(new URL('../corpus/', import.meta.url));\n\n/**\n * Load the conformance corpus. With no options, loads the snapshot bundled in\n * this package; pass `corpusRoot` to certify against an external corpus\n * checkout (e.g. the workspace `wire-format-fixtures/` directory).\n */\nexport const loadCorpus = (options?: { readonly corpusRoot?: string }): Corpus => {\n const external = options?.corpusRoot;\n const root = external ?? bundledRoot();\n const read = (relPath: string): string => readFileSync(join(root, relPath), 'utf8');\n\n const manifestText = read('manifest.json');\n const manifest = JSON.parse(manifestText) as Manifest;\n\n const hash = createHash('sha256');\n hash.update(manifestText);\n hash.update(read(manifest.schema));\n for (const f of manifest.fixtures) {\n hash.update(read(f.inputFile));\n if (f.expectedFile !== undefined && f.expectedFile !== f.inputFile)\n hash.update(read(f.expectedFile));\n }\n\n return {\n root,\n source: external === undefined ? 'bundled' : 'external',\n manifestVersion: manifest.version,\n fixtures: manifest.fixtures,\n digest: hash.digest('hex'),\n schema: JSON.parse(read(manifest.schema)) as object,\n read,\n };\n};\n","// ============================================================================\n// @fuaran-ui/conformance — the runner.\n//\n// Drives a candidate implementation (the `ConformanceAdapter`) over the\n// canonical corpus and produces a per-leg `ConformanceReport`. The assertion\n// semantics are exactly those of the in-house cross-implementation gate\n// (wire-format-fixtures/conformance/cross-host-conformance.mjs + the F#\n// Fuaran.UI.JsonDecode.Tests suite), packaged behind the adapter seam:\n//\n// node-decode / op-decode decode(inputFile) succeeds on every accept\n// fixture (the host accepts everything the\n// contract admits).\n// node-byte-identity / encode(decode(inputFile)) is byte-identical\n// op-byte-identity to expectedFile — the committed corpus IS\n// the canonical form, so byte-equality with it\n// is byte-equality with every conformant host.\n// node-reject / op-reject decode(inputFile) fails with the manifest's\n// expectedErrorCode at a path starting with\n// expectedPath (WIRE_FORMAT.md §6).\n// lenient-accept decode(inputFile) — a §16 SHORTHAND form —\n// succeeds AND encode(decode(inputFile)) is\n// byte-identical to expectedFile (the verbose\n// canonical form). Mandatory: a host that\n// rejects the shorthand, or normalises it to\n// different bytes, silently strands AI authors\n// (WIRE_FORMAT.md §16 normative block).\n// schema-validation the host's re-encoded output validates\n// against the canonical Draft 2020-12 schema\n// (schema.json) — only outputs that already\n// passed byte-identity are validated.\n// apply reserved; corpus v1 ships no apply fixtures.\n//\n// Exceptions thrown by adapter hooks are recorded as fixture failures, never\n// propagated — a crashing codec is a non-conformance finding, not a runner\n// crash.\n// ============================================================================\n\n// The named class export is the one binding ajv's CJS dist exposes identically\n// under every loader (NodeNext ESM, CJS require, bundlers) — the default-import\n// interop differs per loader and is avoided deliberately.\nimport { Ajv2020 } from 'ajv/dist/2020.js';\n\nimport type { AdapterDecodeResult, ConformanceAdapter, ImplementationInfo } from './adapter.js';\nimport { loadCorpus, type Corpus, type CorpusFixture } from './corpus.js';\nimport {\n computeVerdict,\n type ConformanceReport,\n type FixtureFailure,\n type LegId,\n type LegResult,\n} from './report.js';\n\nexport const KIT_NAME = '@fuaran-ui/conformance';\nexport const KIT_VERSION = '0.1.0';\n\nexport interface RunOptions {\n /** Names the candidate implementation in the report. */\n readonly implementation: ImplementationInfo;\n /** Certify against an external corpus checkout instead of the bundled snapshot. */\n readonly corpusRoot?: string;\n}\n\n// Fixtures are single-line compact JSON without a trailing newline; strip at\n// most one defensively so an editor/git autocrlf touch on a corpus payload\n// can't masquerade as a host divergence (the in-house gate's convention).\nconst canon = (s: string): string => s.replace(/\\r?\\n$/, '');\n\n/** First byte offset at which two strings differ, with a context window. */\nconst firstDiff = (expected: string, actual: string): string => {\n const n = Math.min(expected.length, actual.length);\n let i = 0;\n while (i < n && expected[i] === actual[i]) i++;\n const from = Math.max(0, i - 30);\n const win = (s: string): string => JSON.stringify(s.slice(from, i + 30));\n return (\n `byte offset ${i} (length canonical=${expected.length}, host=${actual.length})\\n` +\n ` canonical …${win(expected)}…\\n` +\n ` host …${win(actual)}…`\n );\n};\n\nconst messageOf = (err: unknown): string => (err instanceof Error ? err.message : String(err));\n\ninterface LegAccumulator {\n total: number;\n passed: number;\n failures: FixtureFailure[];\n}\n\nconst newAcc = (): LegAccumulator => ({ total: 0, passed: 0, failures: [] });\n\nconst toLeg = (\n leg: LegId,\n mandatory: boolean,\n acc: LegAccumulator | undefined,\n skipReason?: string,\n): LegResult =>\n acc === undefined\n ? {\n leg,\n mandatory,\n status: 'skipped',\n ...(skipReason === undefined ? {} : { skipReason }),\n fixturesTotal: 0,\n fixturesPassed: 0,\n failures: [],\n }\n : {\n leg,\n mandatory,\n status: acc.failures.length === 0 ? 'pass' : 'fail',\n fixturesTotal: acc.total,\n fixturesPassed: acc.passed,\n failures: acc.failures,\n };\n\n/** Run the certification kit: corpus × adapter → report. */\nexport const runConformance = (\n adapter: ConformanceAdapter,\n options: RunOptions,\n): ConformanceReport => {\n const corpus: Corpus = loadCorpus(\n options.corpusRoot === undefined ? undefined : { corpusRoot: options.corpusRoot },\n );\n\n // `allErrors: false` is load-bearing, not a default left unset.\n //\n // The canonical schema is recursive (a node's children are nodes) and its node\n // position is an `anyOf` over the whole kind vocabulary. Under `allErrors:\n // true` ajv explores every alternative at every level instead of stopping at\n // the first match, so validation cost is EXPONENTIAL in node depth: measured\n // against this schema at 653ms for a 6-deep tree, 5.9s at 7, 46s at 8, and\n // no return at all by 24. With `allErrors: false` the same documents validate\n // in under a millisecond at every depth to 24.\n //\n // That matters here specifically because WIRE_FORMAT §21 sets max node depth\n // at 24 and rule 1 requires every conformant host to ACCEPT a document at the\n // limit — so the corpus now carries one, and a kit that cannot validate the\n // deepest legal document is a kit that cannot certify conformance. It went\n // unnoticed until then because the corpus's previous deepest tree was three\n // levels, where the cost is about 5ms.\n //\n // ajv's own guidance says the same thing for the same reason: `allErrors` is\n // not recommended when validating untrusted input, because it is a\n // denial-of-service vector. This kit validates whatever a corpus hands it,\n // which is exactly that case — and a hang in the tool that certifies\n // hostile-input handling is the least acceptable place for it.\n //\n // The cost is that a schema failure reports its FIRST error rather than all\n // of them. That is the right trade: the leg's job is a pass/fail verdict on\n // whether a host emits schema-valid wire, and one accurate error locates the\n // defect as well as twenty do.\n const ajv = new Ajv2020({ strict: false, allErrors: false });\n const schemaValid = ajv.compile(corpus.schema);\n\n const accepts = (decoder: 'node' | 'op'): readonly CorpusFixture[] =>\n corpus.fixtures.filter(\n (f) => f.decoder === decoder && (f.kind === 'node-round-trip' || f.kind === 'op-round-trip'),\n );\n const rejects = (decoder: 'node' | 'op'): readonly CorpusFixture[] =>\n corpus.fixtures.filter((f) => f.decoder === decoder && f.kind === 'reject');\n const lenients = (decoder: 'node' | 'op'): readonly CorpusFixture[] =>\n corpus.fixtures.filter((f) => f.decoder === decoder && f.kind === 'lenient-accept');\n\n // Per-leg accumulators — undefined means the adapter lacks the hooks for the leg.\n const accs = new Map<LegId, LegAccumulator>();\n const acc = (leg: LegId): LegAccumulator => {\n let a = accs.get(leg);\n if (a === undefined) {\n a = newAcc();\n accs.set(leg, a);\n }\n return a;\n };\n\n const runSide = (\n decoder: 'node' | 'op',\n decode: ((json: string) => AdapterDecodeResult) | undefined,\n encode: ((value: unknown) => string) | undefined,\n ): void => {\n const decodeLeg: LegId = decoder === 'node' ? 'node-decode' : 'op-decode';\n const byteLeg: LegId = decoder === 'node' ? 'node-byte-identity' : 'op-byte-identity';\n const rejectLeg: LegId = decoder === 'node' ? 'node-reject' : 'op-reject';\n\n if (decode === undefined) return;\n\n for (const f of accepts(decoder)) {\n const input = corpus.read(f.inputFile);\n const d = acc(decodeLeg);\n d.total++;\n\n let decoded: AdapterDecodeResult;\n try {\n decoded = decode(input);\n } catch (err) {\n d.failures.push({\n fixtureId: f.id,\n summary: 'decoder THREW on an accept fixture (a conformant decoder never throws)',\n detail: messageOf(err),\n });\n continue;\n }\n if (!decoded.ok) {\n d.failures.push({\n fixtureId: f.id,\n summary: 'decoder rejected an accept fixture',\n detail: `${decoded.error.code} at ${decoded.error.path}${decoded.error.message === undefined ? '' : ` — ${decoded.error.message}`}`,\n });\n continue;\n }\n d.passed++;\n\n if (encode === undefined) continue;\n const b = acc(byteLeg);\n b.total++;\n const expected = canon(corpus.read(f.expectedFile ?? f.inputFile));\n let actual: string;\n try {\n actual = encode(decoded.value);\n } catch (err) {\n b.failures.push({\n fixtureId: f.id,\n summary: 'encoder THREW re-encoding a decoded accept fixture',\n detail: messageOf(err),\n });\n continue;\n }\n if (actual !== expected) {\n b.failures.push({\n fixtureId: f.id,\n summary: 'encoder output diverges from the canonical form',\n detail: firstDiff(expected, actual),\n });\n continue;\n }\n b.passed++;\n\n // Schema-validate the host's own (byte-identical) output — proves the\n // host emits schema-valid wire, not merely corpus-identical wire.\n const s = acc('schema-validation');\n s.total++;\n if (schemaValid(JSON.parse(actual))) {\n s.passed++;\n } else {\n s.failures.push({\n fixtureId: f.id,\n summary: 'encoder output fails the canonical JSON Schema (schema.json)',\n detail: (schemaValid.errors ?? [])\n .map((e) => `${e.instancePath === '' ? '$' : e.instancePath} ${e.message ?? ''}`)\n .join('\\n'),\n });\n }\n }\n\n // Lenient-accept (§16): the shorthand MUST decode, and MUST normalise to\n // the verbose canonical bytes. Needs both hooks — with decode only, the\n // leg stays unattempted (skipped), same capability semantics as\n // byte-identity.\n if (encode !== undefined) {\n for (const f of lenients(decoder)) {\n const input = corpus.read(f.inputFile);\n const l = acc('lenient-accept');\n l.total++;\n\n let decoded: AdapterDecodeResult;\n try {\n decoded = decode(input);\n } catch (err) {\n l.failures.push({\n fixtureId: f.id,\n summary: 'decoder THREW on a §16 shorthand (a conformant decoder accepts it)',\n detail: messageOf(err),\n });\n continue;\n }\n if (!decoded.ok) {\n l.failures.push({\n fixtureId: f.id,\n summary: 'decoder rejected a §16 shorthand (MUST accept — WIRE_FORMAT §16)',\n detail: `${decoded.error.code} at ${decoded.error.path}${decoded.error.message === undefined ? '' : ` — ${decoded.error.message}`}`,\n });\n continue;\n }\n\n let actual: string;\n try {\n actual = encode(decoded.value);\n } catch (err) {\n l.failures.push({\n fixtureId: f.id,\n summary: 'encoder THREW re-encoding a decoded §16 shorthand',\n detail: messageOf(err),\n });\n continue;\n }\n const expected = canon(corpus.read(f.expectedFile ?? f.inputFile));\n if (actual !== expected) {\n l.failures.push({\n fixtureId: f.id,\n summary: 'shorthand normalisation diverges from the verbose canonical form',\n detail: firstDiff(expected, actual),\n });\n continue;\n }\n l.passed++;\n }\n }\n\n for (const f of rejects(decoder)) {\n const input = corpus.read(f.inputFile);\n const r = acc(rejectLeg);\n r.total++;\n\n let decoded: AdapterDecodeResult;\n try {\n decoded = decode(input);\n } catch (err) {\n r.failures.push({\n fixtureId: f.id,\n summary: 'decoder THREW on a reject fixture (must return a structured error)',\n detail: messageOf(err),\n });\n continue;\n }\n if (decoded.ok) {\n r.failures.push({\n fixtureId: f.id,\n summary: 'decoder ACCEPTED a reject fixture',\n detail: `expected ${f.expectedErrorCode} at ${f.expectedPath}`,\n });\n continue;\n }\n if (decoded.error.code !== f.expectedErrorCode) {\n r.failures.push({\n fixtureId: f.id,\n summary: 'decode-error CODE diverges from the canonical error',\n detail: `expected ${f.expectedErrorCode}, got ${decoded.error.code} (path ${decoded.error.path})`,\n });\n continue;\n }\n if (!decoded.error.path.startsWith(f.expectedPath ?? '$')) {\n r.failures.push({\n fixtureId: f.id,\n summary: 'decode-error PATH diverges from the canonical error',\n detail: `expected prefix ${f.expectedPath}, got ${decoded.error.path} (code ${decoded.error.code})`,\n });\n continue;\n }\n r.passed++;\n }\n };\n\n runSide('node', adapter.decodeNode, adapter.encodeNode);\n runSide('op', adapter.decodeOp, adapter.encodeOp);\n\n // Envelope / tolerance (WIRE_FORMAT.md §15). `negotiateEnvelope` reads the\n // envelope, negotiates against the host's own core@1.0, and either refuses a\n // Foreign profile or returns the whole envelope re-encoded (unknown kinds\n // preserved). A round-trip fixture asserts the re-encode is byte-identical to\n // expectedFile; a reject fixture asserts the FOREIGN_PROFILE refusal.\n const negotiateEnvelope = adapter.negotiateEnvelope;\n if (negotiateEnvelope !== undefined) {\n const byKind = (kind: 'envelope-round-trip' | 'envelope-reject'): readonly CorpusFixture[] =>\n corpus.fixtures.filter((f) => f.kind === kind);\n\n for (const f of byKind('envelope-round-trip')) {\n const a = acc('envelope-round-trip');\n a.total++;\n const input = corpus.read(f.inputFile);\n let r: AdapterDecodeResult;\n try {\n r = negotiateEnvelope(input);\n } catch (err) {\n a.failures.push({\n fixtureId: f.id,\n summary:\n 'negotiateEnvelope THREW on a round-trip fixture (must return a structured result)',\n detail: messageOf(err),\n });\n continue;\n }\n if (!r.ok) {\n a.failures.push({\n fixtureId: f.id,\n summary:\n 'negotiateEnvelope refused a round-trip fixture (Current/Behind must be tolerated)',\n detail: `${r.error.code} at ${r.error.path}`,\n });\n continue;\n }\n const expected = canon(corpus.read(f.expectedFile ?? f.inputFile));\n if (typeof r.value !== 'string' || r.value !== expected) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'envelope re-encode diverges from the canonical form (must-ignore-but-preserve)',\n detail:\n typeof r.value === 'string' ? firstDiff(expected, r.value) : 'value was not a string',\n });\n continue;\n }\n a.passed++;\n }\n\n for (const f of byKind('envelope-reject')) {\n const a = acc('envelope-reject');\n a.total++;\n const input = corpus.read(f.inputFile);\n let r: AdapterDecodeResult;\n try {\n r = negotiateEnvelope(input);\n } catch (err) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'negotiateEnvelope THREW on a reject fixture (must return a structured error)',\n detail: messageOf(err),\n });\n continue;\n }\n if (r.ok) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'negotiateEnvelope ACCEPTED a Foreign artifact (must hard-refuse)',\n detail: `expected ${f.expectedErrorCode} at ${f.expectedPath}`,\n });\n continue;\n }\n if (r.error.code !== f.expectedErrorCode) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'refusal CODE diverges from the canonical error',\n detail: `expected ${f.expectedErrorCode}, got ${r.error.code} (path ${r.error.path})`,\n });\n continue;\n }\n if (!r.error.path.startsWith(f.expectedPath ?? '$')) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'refusal PATH diverges from the canonical error',\n detail: `expected prefix ${f.expectedPath}, got ${r.error.path}`,\n });\n continue;\n }\n a.passed++;\n }\n }\n\n // Elicitation envelope + answer conformance (WIRE_FORMAT.md §18).\n // `roundTripElicitation` decodes with the fixture's decoder-named entry\n // point and re-encodes; `validateAnswerDocument` runs the §18.4 answer-\n // conformance gate over a {answer, contract} document.\n const roundTripElicitation = adapter.roundTripElicitation;\n if (roundTripElicitation !== undefined) {\n const elDecoder = (f: CorpusFixture): 'elicitation' | 'elicitation-outcome' =>\n f.decoder === 'elicitation-outcome' ? 'elicitation-outcome' : 'elicitation';\n\n for (const f of corpus.fixtures.filter((x) => x.kind === 'elicitation-round-trip')) {\n const a = acc('elicitation-round-trip');\n a.total++;\n const input = corpus.read(f.inputFile);\n let r: AdapterDecodeResult;\n try {\n r = roundTripElicitation(elDecoder(f), input);\n } catch (err) {\n a.failures.push({\n fixtureId: f.id,\n summary:\n 'roundTripElicitation THREW on a round-trip fixture (must return a structured result)',\n detail: messageOf(err),\n });\n continue;\n }\n if (!r.ok) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'roundTripElicitation refused a round-trip fixture',\n detail: `${r.error.code} at ${r.error.path}`,\n });\n continue;\n }\n const expected = canon(corpus.read(f.expectedFile ?? f.inputFile));\n if (typeof r.value !== 'string' || r.value !== expected) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'elicitation re-encode diverges from the canonical form',\n detail:\n typeof r.value === 'string' ? firstDiff(expected, r.value) : 'value was not a string',\n });\n continue;\n }\n a.passed++;\n }\n\n for (const f of corpus.fixtures.filter((x) => x.kind === 'elicitation-reject')) {\n const a = acc('elicitation-reject');\n a.total++;\n const input = corpus.read(f.inputFile);\n let r: AdapterDecodeResult;\n try {\n r = roundTripElicitation(elDecoder(f), input);\n } catch (err) {\n a.failures.push({\n fixtureId: f.id,\n summary:\n 'roundTripElicitation THREW on a reject fixture (must return a structured error)',\n detail: messageOf(err),\n });\n continue;\n }\n if (r.ok) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'roundTripElicitation ACCEPTED a reject fixture',\n detail: `expected ${f.expectedErrorCode} at ${f.expectedPath}`,\n });\n continue;\n }\n if (r.error.code !== f.expectedErrorCode) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'refusal CODE diverges from the canonical error',\n detail: `expected ${f.expectedErrorCode}, got ${r.error.code} (path ${r.error.path})`,\n });\n continue;\n }\n if (!r.error.path.startsWith(f.expectedPath ?? '$')) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'refusal PATH diverges from the canonical error',\n detail: `expected prefix ${f.expectedPath}, got ${r.error.path}`,\n });\n continue;\n }\n a.passed++;\n }\n }\n\n // Contract cards (WIRE_FORMAT.md §25). Same shape as the elicitation legs —\n // decode with the fixture's decoder-named entry point, re-encode, compare —\n // and deliberately NOT mandatory: §25 adoption is its own bar, recorded in the\n // §11.0 table beside the byte-parity one.\n const roundTripContractCard = adapter.roundTripContractCard;\n if (roundTripContractCard !== undefined) {\n const cardDecoder = (f: CorpusFixture): 'contract-card' | 'contract-card-bundle' =>\n f.decoder === 'contract-card-bundle' ? 'contract-card-bundle' : 'contract-card';\n\n for (const f of corpus.fixtures.filter((x) => x.kind === 'contract-card-round-trip')) {\n const a = acc('contract-card-round-trip');\n a.total++;\n const input = corpus.read(f.inputFile);\n let r: AdapterDecodeResult;\n try {\n r = roundTripContractCard(cardDecoder(f), input);\n } catch (err) {\n a.failures.push({\n fixtureId: f.id,\n summary:\n 'roundTripContractCard THREW on a round-trip fixture (must return a structured result)',\n detail: messageOf(err),\n });\n continue;\n }\n if (!r.ok) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'roundTripContractCard refused a round-trip fixture',\n detail: `${r.error.code} at ${r.error.path}`,\n });\n continue;\n }\n const expected = canon(corpus.read(f.expectedFile ?? f.inputFile));\n if (typeof r.value !== 'string' || r.value !== expected) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'card re-encode diverges from the canonical form',\n detail:\n typeof r.value === 'string' ? firstDiff(expected, r.value) : 'value was not a string',\n });\n continue;\n }\n a.passed++;\n }\n\n for (const f of corpus.fixtures.filter((x) => x.kind === 'contract-card-reject')) {\n const a = acc('contract-card-reject');\n a.total++;\n const input = corpus.read(f.inputFile);\n let r: AdapterDecodeResult;\n try {\n r = roundTripContractCard(cardDecoder(f), input);\n } catch (err) {\n a.failures.push({\n fixtureId: f.id,\n summary:\n 'roundTripContractCard THREW on a reject fixture (must return a structured error)',\n detail: messageOf(err),\n });\n continue;\n }\n if (r.ok) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'roundTripContractCard ACCEPTED a reject fixture',\n detail: `expected ${f.expectedErrorCode} at ${f.expectedPath}`,\n });\n continue;\n }\n if (r.error.code !== f.expectedErrorCode) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'refusal CODE diverges from the canonical error',\n detail: `expected ${f.expectedErrorCode}, got ${r.error.code} (path ${r.error.path})`,\n });\n continue;\n }\n if (!r.error.path.startsWith(f.expectedPath ?? '$')) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'refusal PATH diverges from the canonical error',\n detail: `expected prefix ${f.expectedPath}, got ${r.error.path}`,\n });\n continue;\n }\n a.passed++;\n }\n }\n\n const validateAnswerDocument = adapter.validateAnswerDocument;\n if (validateAnswerDocument !== undefined) {\n for (const f of corpus.fixtures.filter(\n (x) => x.kind === 'elicitation-answer-accept' || x.kind === 'elicitation-answer-reject',\n )) {\n const a = acc('elicitation-answer');\n a.total++;\n const input = corpus.read(f.inputFile);\n let r: AdapterDecodeResult;\n try {\n r = validateAnswerDocument(input);\n } catch (err) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'validateAnswerDocument THREW (must return a structured result)',\n detail: messageOf(err),\n });\n continue;\n }\n if (f.kind === 'elicitation-answer-accept') {\n if (!r.ok) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'validateAnswerDocument refused a conforming answer',\n detail: `${r.error.code} at ${r.error.path}`,\n });\n continue;\n }\n a.passed++;\n continue;\n }\n if (r.ok) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'validateAnswerDocument ACCEPTED a nonconforming answer',\n detail: `expected ${f.expectedErrorCode} at ${f.expectedPath}`,\n });\n continue;\n }\n if (r.error.code !== f.expectedErrorCode) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'refusal CODE diverges from the canonical error',\n detail: `expected ${f.expectedErrorCode}, got ${r.error.code} (path ${r.error.path})`,\n });\n continue;\n }\n if (!r.error.path.startsWith(f.expectedPath ?? '$')) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'refusal PATH diverges from the canonical error',\n detail: `expected prefix ${f.expectedPath}, got ${r.error.path}`,\n });\n continue;\n }\n a.passed++;\n }\n }\n\n const need = (hooks: readonly string[]): string =>\n `adapter does not provide ${hooks.join(' + ')}`;\n const hasSchemaInput = adapter.encodeNode !== undefined || adapter.encodeOp !== undefined;\n\n const legs: LegResult[] = [\n toLeg('node-decode', true, accs.get('node-decode'), need(['decodeNode'])),\n toLeg(\n 'node-byte-identity',\n true,\n accs.get('node-byte-identity'),\n need(['decodeNode', 'encodeNode']),\n ),\n toLeg('node-reject', true, accs.get('node-reject'), need(['decodeNode'])),\n toLeg('op-decode', true, accs.get('op-decode'), need(['decodeOp'])),\n toLeg('op-byte-identity', true, accs.get('op-byte-identity'), need(['decodeOp', 'encodeOp'])),\n toLeg('op-reject', true, accs.get('op-reject'), need(['decodeOp'])),\n toLeg(\n 'lenient-accept',\n true,\n accs.get('lenient-accept'),\n need(['a decode + encode hook pair (node and/or op)']),\n ),\n toLeg(\n 'envelope-round-trip',\n true,\n accs.get('envelope-round-trip'),\n need(['negotiateEnvelope']),\n ),\n toLeg('envelope-reject', true, accs.get('envelope-reject'), need(['negotiateEnvelope'])),\n toLeg(\n 'elicitation-round-trip',\n true,\n accs.get('elicitation-round-trip'),\n need(['roundTripElicitation']),\n ),\n toLeg(\n 'elicitation-reject',\n true,\n accs.get('elicitation-reject'),\n need(['roundTripElicitation']),\n ),\n toLeg(\n 'elicitation-answer',\n true,\n accs.get('elicitation-answer'),\n need(['validateAnswerDocument']),\n ),\n toLeg(\n 'schema-validation',\n true,\n accs.get('schema-validation'),\n hasSchemaInput\n ? need(['a decode hook for the encode hooks provided'])\n : need(['encodeNode and/or encodeOp']),\n ),\n // NOT mandatory — see the `roundTripContractCard` doc comment: §25 adoption\n // is a separate bar from wire conformance, so a byte-perfect host that holds\n // no card reader must not be reported non-conformant for it.\n toLeg(\n 'contract-card-round-trip',\n false,\n accs.get('contract-card-round-trip'),\n need(['roundTripContractCard']),\n ),\n toLeg(\n 'contract-card-reject',\n false,\n accs.get('contract-card-reject'),\n need(['roundTripContractCard']),\n ),\n toLeg('apply', false, undefined, 'corpus v1 ships no apply fixtures — leg reserved'),\n ];\n\n return {\n kit: { name: KIT_NAME, version: KIT_VERSION },\n implementation: options.implementation,\n corpus: {\n manifestVersion: corpus.manifestVersion,\n digest: corpus.digest,\n fixtureCount: corpus.fixtures.length,\n source: corpus.source,\n },\n legs,\n verdict: computeVerdict(legs),\n generatedAt: new Date().toISOString(),\n };\n};\n","#!/usr/bin/env node\n// ============================================================================\n// @fuaran-ui/conformance — CLI.\n//\n// fuaran-conformance <adapter-module> [--corpus <dir>] [--json <file>]\n//\n// <adapter-module> is a path to a JS/TS-compiled module that exports the\n// candidate implementation:\n//\n// export const adapter = { decodeNode, encodeNode, decodeOp, encodeOp };\n// export const implementation = { name: 'my-host', version: '1.2.3' };\n//\n// (or the same two fields on the default export). Prints the human-readable\n// report; `--json` additionally writes the structured report. Exit codes:\n// 0 = conformant, 2 = partially-conformant, 1 = non-conformant or usage error.\n// ============================================================================\n\nimport { writeFileSync } from 'node:fs';\nimport { resolve } from 'node:path';\nimport { pathToFileURL } from 'node:url';\n\nimport type { ConformanceAdapter, ImplementationInfo } from './adapter.js';\nimport { formatReport } from './report.js';\nimport { runConformance } from './run.js';\n\ninterface AdapterModule {\n readonly adapter?: ConformanceAdapter;\n readonly implementation?: ImplementationInfo;\n readonly default?: {\n readonly adapter?: ConformanceAdapter;\n readonly implementation?: ImplementationInfo;\n };\n}\n\nconst usage = (): never => {\n console.error(\n 'Usage: fuaran-conformance <adapter-module> [--corpus <dir>] [--json <file>]\\n\\n' +\n ' <adapter-module> module exporting `adapter` (decode/encode hooks) and\\n' +\n ' `implementation` ({ name, version? })\\n' +\n ' --corpus <dir> certify against an external corpus checkout instead of\\n' +\n ' the snapshot bundled with this package\\n' +\n ' --json <file> also write the structured report as JSON\\n',\n );\n process.exit(1);\n};\n\nconst args = process.argv.slice(2);\nlet modulePath: string | undefined;\nlet corpusRoot: string | undefined;\nlet jsonOut: string | undefined;\n\nfor (let i = 0; i < args.length; i++) {\n const arg = args[i];\n if (arg === '--corpus') corpusRoot = args[++i] ?? usage();\n else if (arg === '--json') jsonOut = args[++i] ?? usage();\n else if (modulePath === undefined && arg !== undefined && !arg.startsWith('--')) {\n modulePath = arg;\n } else usage();\n}\nif (modulePath === undefined) usage();\n\nconst loaded = (await import(pathToFileURL(resolve(modulePath as string)).href)) as AdapterModule;\nconst adapter = loaded.adapter ?? loaded.default?.adapter;\nconst implementation = loaded.implementation ?? loaded.default?.implementation;\nif (adapter === undefined || implementation === undefined) {\n console.error(\n `The adapter module must export \\`adapter\\` and \\`implementation\\` ` +\n `(named or on the default export). Loaded: ${modulePath}`,\n );\n process.exit(1);\n}\n\nconst report = runConformance(adapter, {\n implementation,\n ...(corpusRoot === undefined ? {} : { corpusRoot }),\n});\n\nconsole.log(formatReport(report));\nif (jsonOut !== undefined) {\n writeFileSync(jsonOut, JSON.stringify(report, null, 2) + '\\n', 'utf8');\n console.log(`\\nStructured report written to ${jsonOut}`);\n}\n\nprocess.exit(\n report.verdict === 'conformant' ? 0 : report.verdict === 'partially-conformant' ? 2 : 1,\n);\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/report.ts","../src/corpus.ts","../src/run.ts","../src/cli.ts"],"names":["report","adapter"],"mappings":";;;;;;;;AAwEO,IAAM,cAAA,GAAiB,CAAC,IAAA,KAAwC;AACrE,EAAA,IAAI,IAAA,CAAK,KAAK,CAAC,CAAA,KAAM,EAAE,MAAA,KAAW,MAAM,GAAG,OAAO,gBAAA;AAClD,EAAA,IAAI,IAAA,CAAK,IAAA,CAAK,CAAC,CAAA,KAAM,CAAA,CAAE,aAAa,CAAA,CAAE,MAAA,KAAW,SAAS,CAAA,EAAG,OAAO,sBAAA;AACpE,EAAA,OAAO,YAAA;AACT,CAAA;AAEA,IAAM,cAAyC,EAAE,IAAA,EAAM,UAAK,IAAA,EAAM,QAAA,EAAK,SAAS,QAAA,EAAI;AAG7E,IAAM,YAAA,GAAe,CAACA,OAAAA,KAAsC;AACjE,EAAA,MAAM,QAAkB,EAAC;AACzB,EAAA,MAAM,IAAA,GACJA,OAAAA,CAAO,cAAA,CAAe,OAAA,KAAY,SAC9BA,OAAAA,CAAO,cAAA,CAAe,IAAA,GACtB,CAAA,EAAGA,Q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EAAA,aAAA,CAAc,OAAA,EAAS,KAAK,SAAA,CAAU,MAAA,EAAQ,MAAM,CAAC,CAAA,GAAI,MAAM,MAAM,CAAA;AACrE,EAAA,OAAA,CAAQ,GAAA,CAAI;AAAA,6BAAA,EAAkC,OAAO,CAAA,CAAE,CAAA;AACzD;AAEA,OAAA,CAAQ,IAAA;AAAA,EACN,OAAO,OAAA,KAAY,YAAA,GAAe,IAAI,MAAA,CAAO,OAAA,KAAY,yBAAyB,CAAA,GAAI;AACxF,CAAA","file":"cli.js","sourcesContent":["// ============================================================================\n// @fuaran-ui/conformance — the certification report.\n//\n// One `LegResult` per conformance leg. A leg is `skipped` (never attempted)\n// when the adapter lacks the hooks it needs — that is a capability statement,\n// not a failure. The verdict distinguishes the three honest outcomes:\n//\n// conformant every mandatory leg attempted and passed\n// partially-conformant every attempted leg passed; ≥1 mandatory leg skipped\n// non-conformant ≥1 attempted leg failed\n//\n// so a partial host (decode-only, node-only, …) certifies the legs it\n// implements rather than receiving a blanket fail.\n// ============================================================================\n\nimport type { ImplementationInfo } from './adapter.js';\n\nexport type LegId =\n | 'node-decode'\n | 'node-byte-identity'\n | 'node-reject'\n | 'op-decode'\n | 'op-byte-identity'\n | 'op-reject'\n | 'lenient-accept'\n | 'envelope-round-trip'\n | 'envelope-reject'\n | 'elicitation-round-trip'\n | 'elicitation-reject'\n | 'elicitation-answer'\n | 'contract-card-round-trip'\n | 'contract-card-reject'\n | 'schema-validation'\n | 'apply';\n\nexport type LegStatus = 'pass' | 'fail' | 'skipped';\n\nexport interface FixtureFailure {\n readonly fixtureId: string;\n readonly summary: string;\n readonly detail?: string;\n}\n\nexport interface LegResult {\n readonly leg: LegId;\n /** Mandatory legs must all pass for the `conformant` verdict. */\n readonly mandatory: boolean;\n readonly status: LegStatus;\n /** Why the leg was not attempted (only when `status === 'skipped'`). */\n readonly skipReason?: string;\n readonly fixturesTotal: number;\n readonly fixturesPassed: number;\n readonly failures: readonly FixtureFailure[];\n}\n\nexport type Verdict = 'conformant' | 'partially-conformant' | 'non-conformant';\n\nexport interface ConformanceReport {\n readonly kit: { readonly name: string; readonly version: string };\n readonly implementation: ImplementationInfo;\n readonly corpus: {\n readonly manifestVersion: number;\n readonly digest: string;\n readonly fixtureCount: number;\n readonly source: 'bundled' | 'external';\n };\n readonly legs: readonly LegResult[];\n readonly verdict: Verdict;\n /** ISO-8601 generation timestamp. */\n readonly generatedAt: string;\n}\n\nexport const computeVerdict = (legs: readonly LegResult[]): Verdict => {\n if (legs.some((l) => l.status === 'fail')) return 'non-conformant';\n if (legs.some((l) => l.mandatory && l.status === 'skipped')) return 'partially-conformant';\n return 'conformant';\n};\n\nconst statusGlyph: Record<LegStatus, string> = { pass: '✓', fail: '✗', skipped: '–' };\n\n/** Render a report as a human-readable text block (what the CLI prints). */\nexport const formatReport = (report: ConformanceReport): string => {\n const lines: string[] = [];\n const impl =\n report.implementation.version === undefined\n ? report.implementation.name\n : `${report.implementation.name} ${report.implementation.version}`;\n lines.push(`Fuaran wire-format conformance report`);\n lines.push(` kit ${report.kit.name}@${report.kit.version}`);\n lines.push(` implementation ${impl}`);\n lines.push(\n ` corpus v${report.corpus.manifestVersion} (${report.corpus.fixtureCount} fixtures, ${report.corpus.source})`,\n );\n lines.push(` corpus digest sha256:${report.corpus.digest}`);\n lines.push(` generated ${report.generatedAt}`);\n lines.push('');\n for (const leg of report.legs) {\n const tier = leg.mandatory ? 'mandatory' : 'optional ';\n const counts =\n leg.status === 'skipped'\n ? (leg.skipReason ?? 'skipped')\n : `${leg.fixturesPassed}/${leg.fixturesTotal}`;\n lines.push(` ${statusGlyph[leg.status]} ${leg.leg.padEnd(20)} ${tier} ${counts}`);\n for (const f of leg.failures) {\n lines.push(` ${f.fixtureId}: ${f.summary}`);\n if (f.detail !== undefined)\n for (const detailLine of f.detail.split('\\n')) lines.push(` ${detailLine}`);\n }\n }\n lines.push('');\n lines.push(` verdict: ${report.verdict.toUpperCase()}`);\n if (report.verdict === 'partially-conformant') {\n const skipped = report.legs\n .filter((l) => l.mandatory && l.status === 'skipped')\n .map((l) => l.leg);\n lines.push(` (mandatory legs not attempted: ${skipped.join(', ')})`);\n }\n lines.push(\n ` Certification is per corpus version — re-certify when the corpus advances (WIRE_FORMAT.md §11).`,\n );\n // What a green report does NOT say. Every leg above is a codec or byte-parity\n // check, so it certifies the SOURCE and FALLBACK tiers; the declared\n // client-only rich tier sits outside every parity comparison by contract, and\n // a host that ships none of it is degraded-by-declaration rather than\n // non-conformant. Naming the artefact here is the difference between a reader\n // knowing that and inferring it.\n lines.push(\n ` Scope: the parity legs certify the fallback tier. Which kinds declare a client-only`,\n );\n lines.push(\n ` rich tier outside it is in the corpus artefact render-fidelity.json (WIRE_FORMAT.md §13).`,\n );\n return lines.join('\\n');\n};\n","// ============================================================================\n// @fuaran-ui/conformance — corpus loading + versioning.\n//\n// The package bundles a snapshot of the canonical wire-format conformance\n// corpus under `corpus/` — manifest.json + schema.json + every fixture family\n// the manifest enumerates — so a third party needs nothing beyond\n// `npm install` to certify. The snapshot is synced from the authoritative\n// `wire-format-fixtures/` corpus by `scripts/sync-corpus.mjs`, and the same\n// script's `--check` mode guards it byte-for-byte from the package's own test\n// suite, so it cannot silently drift from the authority.\n//\n// Every report names the corpus it certified against: the manifest `version`\n// plus a SHA-256 digest over the manifest, the schema, and every fixture\n// payload in manifest order. Certification is per corpus version — content\n// advances with the spec (WIRE_FORMAT.md §11), and a report against an older\n// digest does not certify conformance with a newer one.\n// ============================================================================\n\nimport { createHash } from 'node:crypto';\nimport { readFileSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nexport type FixtureKind =\n | 'node-round-trip'\n | 'op-round-trip'\n | 'reject'\n | 'lenient-accept'\n // WIRE_FORMAT.md §15 wire-versioning envelope + tolerance.\n | 'envelope-round-trip'\n | 'envelope-reject'\n // WIRE_FORMAT.md §18 elicitation envelope + answer conformance.\n | 'elicitation-round-trip'\n | 'elicitation-reject'\n | 'elicitation-answer-accept'\n | 'elicitation-answer-reject'\n // WIRE_FORMAT.md §25 contract cards. Its OWN family, never `nodes/` — a card is\n // not a node, so the node round-trip law says nothing about it.\n | 'contract-card-round-trip'\n | 'contract-card-reject'\n // WIRE_FORMAT.md §17 teleport bundles. Declared because the manifest carries\n // them and this type describes the manifest — but this kit runs NO leg over\n // them, and the omission is structural rather than an oversight: a teleport\n // decoder is asynchronous (it inflates a DEFLATE stream through the platform's\n // own decompressor), and `runConformance` is synchronous by contract. Giving\n // the kit a teleport leg means an async runner entry point, which is a change\n // to this package's public shape and its own piece of work. Until then the\n // family is certified host-side, and `test/self-certification.test.ts` names\n // it as the one excluded set rather than letting the accounting quietly\n // stop adding up.\n | 'teleport-decode'\n | 'teleport-reject';\n\nexport interface CorpusFixture {\n readonly id: string;\n readonly kind: FixtureKind;\n readonly decoder:\n | 'node'\n | 'op'\n | 'elicitation'\n | 'elicitation-outcome'\n | 'elicitation-answer'\n | 'contract-card'\n | 'contract-card-bundle'\n | 'teleport';\n readonly inputFile: string;\n readonly expectedFile?: string;\n readonly expectedErrorCode?: string;\n readonly expectedPath?: string;\n readonly description: string;\n}\n\ninterface Manifest {\n readonly version: number;\n readonly schema: string;\n readonly description: string;\n readonly fixtures: readonly CorpusFixture[];\n}\n\nexport interface Corpus {\n /** Absolute directory the corpus was loaded from. */\n readonly root: string;\n /** `bundled` (the package snapshot) or `external` (a caller-supplied root). */\n readonly source: 'bundled' | 'external';\n /** The manifest `version` field — the corpus major version. */\n readonly manifestVersion: number;\n readonly fixtures: readonly CorpusFixture[];\n /** SHA-256 (hex) over manifest.json + schema.json + every fixture payload in manifest order. */\n readonly digest: string;\n /** The canonical Draft 2020-12 JSON Schema (wire-format-fixtures/schema.json). */\n readonly schema: object;\n /** Read a corpus-relative payload file as UTF-8 text. */\n readonly read: (relPath: string) => string;\n}\n\n/** The bundled snapshot directory, resolved relative to the built module. */\nconst bundledRoot = (): string =>\n // dist/index.js → ../corpus (tsup `shims: true` provides import.meta.url under CJS).\n fileURLToPath(new URL('../corpus/', import.meta.url));\n\n/**\n * Load the conformance corpus. With no options, loads the snapshot bundled in\n * this package; pass `corpusRoot` to certify against an external corpus\n * checkout (e.g. the workspace `wire-format-fixtures/` directory).\n */\nexport const loadCorpus = (options?: { readonly corpusRoot?: string }): Corpus => {\n const external = options?.corpusRoot;\n const root = external ?? bundledRoot();\n const read = (relPath: string): string => readFileSync(join(root, relPath), 'utf8');\n\n const manifestText = read('manifest.json');\n const manifest = JSON.parse(manifestText) as Manifest;\n\n const hash = createHash('sha256');\n hash.update(manifestText);\n hash.update(read(manifest.schema));\n for (const f of manifest.fixtures) {\n hash.update(read(f.inputFile));\n if (f.expectedFile !== undefined && f.expectedFile !== f.inputFile)\n hash.update(read(f.expectedFile));\n }\n\n return {\n root,\n source: external === undefined ? 'bundled' : 'external',\n manifestVersion: manifest.version,\n fixtures: manifest.fixtures,\n digest: hash.digest('hex'),\n schema: JSON.parse(read(manifest.schema)) as object,\n read,\n };\n};\n","// ============================================================================\n// @fuaran-ui/conformance — the runner.\n//\n// Drives a candidate implementation (the `ConformanceAdapter`) over the\n// canonical corpus and produces a per-leg `ConformanceReport`. The assertion\n// semantics are exactly those of the in-house cross-implementation gate\n// (wire-format-fixtures/conformance/cross-host-conformance.mjs + the F#\n// Fuaran.UI.JsonDecode.Tests suite), packaged behind the adapter seam:\n//\n// node-decode / op-decode decode(inputFile) succeeds on every accept\n// fixture (the host accepts everything the\n// contract admits).\n// node-byte-identity / encode(decode(inputFile)) is byte-identical\n// op-byte-identity to expectedFile — the committed corpus IS\n// the canonical form, so byte-equality with it\n// is byte-equality with every conformant host.\n// node-reject / op-reject decode(inputFile) fails with the manifest's\n// expectedErrorCode at a path starting with\n// expectedPath (WIRE_FORMAT.md §6).\n// lenient-accept decode(inputFile) — a §16 SHORTHAND form —\n// succeeds AND encode(decode(inputFile)) is\n// byte-identical to expectedFile (the verbose\n// canonical form). Mandatory: a host that\n// rejects the shorthand, or normalises it to\n// different bytes, silently strands AI authors\n// (WIRE_FORMAT.md §16 normative block).\n// schema-validation the host's re-encoded output validates\n// against the canonical Draft 2020-12 schema\n// (schema.json) — only outputs that already\n// passed byte-identity are validated.\n// apply reserved; corpus v1 ships no apply fixtures.\n//\n// Exceptions thrown by adapter hooks are recorded as fixture failures, never\n// propagated — a crashing codec is a non-conformance finding, not a runner\n// crash.\n// ============================================================================\n\n// The named class export is the one binding ajv's CJS dist exposes identically\n// under every loader (NodeNext ESM, CJS require, bundlers) — the default-import\n// interop differs per loader and is avoided deliberately.\nimport { Ajv2020 } from 'ajv/dist/2020.js';\n\nimport type { AdapterDecodeResult, ConformanceAdapter, ImplementationInfo } from './adapter.js';\nimport { loadCorpus, type Corpus, type CorpusFixture } from './corpus.js';\nimport {\n computeVerdict,\n type ConformanceReport,\n type FixtureFailure,\n type LegId,\n type LegResult,\n} from './report.js';\n\nexport const KIT_NAME = '@fuaran-ui/conformance';\nexport const KIT_VERSION = '0.1.0';\n\nexport interface RunOptions {\n /** Names the candidate implementation in the report. */\n readonly implementation: ImplementationInfo;\n /** Certify against an external corpus checkout instead of the bundled snapshot. */\n readonly corpusRoot?: string;\n}\n\n// Fixtures are single-line compact JSON without a trailing newline; strip at\n// most one defensively so an editor/git autocrlf touch on a corpus payload\n// can't masquerade as a host divergence (the in-house gate's convention).\nconst canon = (s: string): string => s.replace(/\\r?\\n$/, '');\n\n/** First byte offset at which two strings differ, with a context window. */\nconst firstDiff = (expected: string, actual: string): string => {\n const n = Math.min(expected.length, actual.length);\n let i = 0;\n while (i < n && expected[i] === actual[i]) i++;\n const from = Math.max(0, i - 30);\n const win = (s: string): string => JSON.stringify(s.slice(from, i + 30));\n return (\n `byte offset ${i} (length canonical=${expected.length}, host=${actual.length})\\n` +\n ` canonical …${win(expected)}…\\n` +\n ` host …${win(actual)}…`\n );\n};\n\nconst messageOf = (err: unknown): string => (err instanceof Error ? err.message : String(err));\n\ninterface LegAccumulator {\n total: number;\n passed: number;\n failures: FixtureFailure[];\n}\n\nconst newAcc = (): LegAccumulator => ({ total: 0, passed: 0, failures: [] });\n\nconst toLeg = (\n leg: LegId,\n mandatory: boolean,\n acc: LegAccumulator | undefined,\n skipReason?: string,\n): LegResult =>\n acc === undefined\n ? {\n leg,\n mandatory,\n status: 'skipped',\n ...(skipReason === undefined ? {} : { skipReason }),\n fixturesTotal: 0,\n fixturesPassed: 0,\n failures: [],\n }\n : {\n leg,\n mandatory,\n status: acc.failures.length === 0 ? 'pass' : 'fail',\n fixturesTotal: acc.total,\n fixturesPassed: acc.passed,\n failures: acc.failures,\n };\n\n/** Run the certification kit: corpus × adapter → report. */\nexport const runConformance = (\n adapter: ConformanceAdapter,\n options: RunOptions,\n): ConformanceReport => {\n const corpus: Corpus = loadCorpus(\n options.corpusRoot === undefined ? undefined : { corpusRoot: options.corpusRoot },\n );\n\n // `allErrors: false` is load-bearing, not a default left unset.\n //\n // The canonical schema is recursive (a node's children are nodes) and its node\n // position is an `anyOf` over the whole kind vocabulary. Under `allErrors:\n // true` ajv explores every alternative at every level instead of stopping at\n // the first match, so validation cost is EXPONENTIAL in node depth: measured\n // against this schema at 653ms for a 6-deep tree, 5.9s at 7, 46s at 8, and\n // no return at all by 24. With `allErrors: false` the same documents validate\n // in under a millisecond at every depth to 24.\n //\n // That matters here specifically because WIRE_FORMAT §21 sets max node depth\n // at 24 and rule 1 requires every conformant host to ACCEPT a document at the\n // limit — so the corpus now carries one, and a kit that cannot validate the\n // deepest legal document is a kit that cannot certify conformance. It went\n // unnoticed until then because the corpus's previous deepest tree was three\n // levels, where the cost is about 5ms.\n //\n // ajv's own guidance says the same thing for the same reason: `allErrors` is\n // not recommended when validating untrusted input, because it is a\n // denial-of-service vector. This kit validates whatever a corpus hands it,\n // which is exactly that case — and a hang in the tool that certifies\n // hostile-input handling is the least acceptable place for it.\n //\n // The cost is that a schema failure reports its FIRST error rather than all\n // of them. That is the right trade: the leg's job is a pass/fail verdict on\n // whether a host emits schema-valid wire, and one accurate error locates the\n // defect as well as twenty do.\n const ajv = new Ajv2020({ strict: false, allErrors: false });\n const schemaValid = ajv.compile(corpus.schema);\n\n const accepts = (decoder: 'node' | 'op'): readonly CorpusFixture[] =>\n corpus.fixtures.filter(\n (f) => f.decoder === decoder && (f.kind === 'node-round-trip' || f.kind === 'op-round-trip'),\n );\n const rejects = (decoder: 'node' | 'op'): readonly CorpusFixture[] =>\n corpus.fixtures.filter((f) => f.decoder === decoder && f.kind === 'reject');\n const lenients = (decoder: 'node' | 'op'): readonly CorpusFixture[] =>\n corpus.fixtures.filter((f) => f.decoder === decoder && f.kind === 'lenient-accept');\n\n // Per-leg accumulators — undefined means the adapter lacks the hooks for the leg.\n const accs = new Map<LegId, LegAccumulator>();\n const acc = (leg: LegId): LegAccumulator => {\n let a = accs.get(leg);\n if (a === undefined) {\n a = newAcc();\n accs.set(leg, a);\n }\n return a;\n };\n\n const runSide = (\n decoder: 'node' | 'op',\n decode: ((json: string) => AdapterDecodeResult) | undefined,\n encode: ((value: unknown) => string) | undefined,\n ): void => {\n const decodeLeg: LegId = decoder === 'node' ? 'node-decode' : 'op-decode';\n const byteLeg: LegId = decoder === 'node' ? 'node-byte-identity' : 'op-byte-identity';\n const rejectLeg: LegId = decoder === 'node' ? 'node-reject' : 'op-reject';\n\n if (decode === undefined) return;\n\n for (const f of accepts(decoder)) {\n const input = corpus.read(f.inputFile);\n const d = acc(decodeLeg);\n d.total++;\n\n let decoded: AdapterDecodeResult;\n try {\n decoded = decode(input);\n } catch (err) {\n d.failures.push({\n fixtureId: f.id,\n summary: 'decoder THREW on an accept fixture (a conformant decoder never throws)',\n detail: messageOf(err),\n });\n continue;\n }\n if (!decoded.ok) {\n d.failures.push({\n fixtureId: f.id,\n summary: 'decoder rejected an accept fixture',\n detail: `${decoded.error.code} at ${decoded.error.path}${decoded.error.message === undefined ? '' : ` — ${decoded.error.message}`}`,\n });\n continue;\n }\n d.passed++;\n\n if (encode === undefined) continue;\n const b = acc(byteLeg);\n b.total++;\n const expected = canon(corpus.read(f.expectedFile ?? f.inputFile));\n let actual: string;\n try {\n actual = encode(decoded.value);\n } catch (err) {\n b.failures.push({\n fixtureId: f.id,\n summary: 'encoder THREW re-encoding a decoded accept fixture',\n detail: messageOf(err),\n });\n continue;\n }\n if (actual !== expected) {\n b.failures.push({\n fixtureId: f.id,\n summary: 'encoder output diverges from the canonical form',\n detail: firstDiff(expected, actual),\n });\n continue;\n }\n b.passed++;\n\n // Schema-validate the host's own (byte-identical) output — proves the\n // host emits schema-valid wire, not merely corpus-identical wire.\n const s = acc('schema-validation');\n s.total++;\n if (schemaValid(JSON.parse(actual))) {\n s.passed++;\n } else {\n s.failures.push({\n fixtureId: f.id,\n summary: 'encoder output fails the canonical JSON Schema (schema.json)',\n detail: (schemaValid.errors ?? [])\n .map((e) => `${e.instancePath === '' ? '$' : e.instancePath} ${e.message ?? ''}`)\n .join('\\n'),\n });\n }\n }\n\n // Lenient-accept (§16): the shorthand MUST decode, and MUST normalise to\n // the verbose canonical bytes. Needs both hooks — with decode only, the\n // leg stays unattempted (skipped), same capability semantics as\n // byte-identity.\n if (encode !== undefined) {\n for (const f of lenients(decoder)) {\n const input = corpus.read(f.inputFile);\n const l = acc('lenient-accept');\n l.total++;\n\n let decoded: AdapterDecodeResult;\n try {\n decoded = decode(input);\n } catch (err) {\n l.failures.push({\n fixtureId: f.id,\n summary: 'decoder THREW on a §16 shorthand (a conformant decoder accepts it)',\n detail: messageOf(err),\n });\n continue;\n }\n if (!decoded.ok) {\n l.failures.push({\n fixtureId: f.id,\n summary: 'decoder rejected a §16 shorthand (MUST accept — WIRE_FORMAT §16)',\n detail: `${decoded.error.code} at ${decoded.error.path}${decoded.error.message === undefined ? '' : ` — ${decoded.error.message}`}`,\n });\n continue;\n }\n\n let actual: string;\n try {\n actual = encode(decoded.value);\n } catch (err) {\n l.failures.push({\n fixtureId: f.id,\n summary: 'encoder THREW re-encoding a decoded §16 shorthand',\n detail: messageOf(err),\n });\n continue;\n }\n const expected = canon(corpus.read(f.expectedFile ?? f.inputFile));\n if (actual !== expected) {\n l.failures.push({\n fixtureId: f.id,\n summary: 'shorthand normalisation diverges from the verbose canonical form',\n detail: firstDiff(expected, actual),\n });\n continue;\n }\n l.passed++;\n }\n }\n\n for (const f of rejects(decoder)) {\n const input = corpus.read(f.inputFile);\n const r = acc(rejectLeg);\n r.total++;\n\n let decoded: AdapterDecodeResult;\n try {\n decoded = decode(input);\n } catch (err) {\n r.failures.push({\n fixtureId: f.id,\n summary: 'decoder THREW on a reject fixture (must return a structured error)',\n detail: messageOf(err),\n });\n continue;\n }\n if (decoded.ok) {\n r.failures.push({\n fixtureId: f.id,\n summary: 'decoder ACCEPTED a reject fixture',\n detail: `expected ${f.expectedErrorCode} at ${f.expectedPath}`,\n });\n continue;\n }\n if (decoded.error.code !== f.expectedErrorCode) {\n r.failures.push({\n fixtureId: f.id,\n summary: 'decode-error CODE diverges from the canonical error',\n detail: `expected ${f.expectedErrorCode}, got ${decoded.error.code} (path ${decoded.error.path})`,\n });\n continue;\n }\n if (!decoded.error.path.startsWith(f.expectedPath ?? '$')) {\n r.failures.push({\n fixtureId: f.id,\n summary: 'decode-error PATH diverges from the canonical error',\n detail: `expected prefix ${f.expectedPath}, got ${decoded.error.path} (code ${decoded.error.code})`,\n });\n continue;\n }\n r.passed++;\n }\n };\n\n runSide('node', adapter.decodeNode, adapter.encodeNode);\n runSide('op', adapter.decodeOp, adapter.encodeOp);\n\n // Envelope / tolerance (WIRE_FORMAT.md §15). `negotiateEnvelope` reads the\n // envelope, negotiates against the host's own core@1.0, and either refuses a\n // Foreign profile or returns the whole envelope re-encoded (unknown kinds\n // preserved). A round-trip fixture asserts the re-encode is byte-identical to\n // expectedFile; a reject fixture asserts the FOREIGN_PROFILE refusal.\n const negotiateEnvelope = adapter.negotiateEnvelope;\n if (negotiateEnvelope !== undefined) {\n const byKind = (kind: 'envelope-round-trip' | 'envelope-reject'): readonly CorpusFixture[] =>\n corpus.fixtures.filter((f) => f.kind === kind);\n\n for (const f of byKind('envelope-round-trip')) {\n const a = acc('envelope-round-trip');\n a.total++;\n const input = corpus.read(f.inputFile);\n let r: AdapterDecodeResult;\n try {\n r = negotiateEnvelope(input);\n } catch (err) {\n a.failures.push({\n fixtureId: f.id,\n summary:\n 'negotiateEnvelope THREW on a round-trip fixture (must return a structured result)',\n detail: messageOf(err),\n });\n continue;\n }\n if (!r.ok) {\n a.failures.push({\n fixtureId: f.id,\n summary:\n 'negotiateEnvelope refused a round-trip fixture (Current/Behind must be tolerated)',\n detail: `${r.error.code} at ${r.error.path}`,\n });\n continue;\n }\n const expected = canon(corpus.read(f.expectedFile ?? f.inputFile));\n if (typeof r.value !== 'string' || r.value !== expected) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'envelope re-encode diverges from the canonical form (must-ignore-but-preserve)',\n detail:\n typeof r.value === 'string' ? firstDiff(expected, r.value) : 'value was not a string',\n });\n continue;\n }\n a.passed++;\n }\n\n for (const f of byKind('envelope-reject')) {\n const a = acc('envelope-reject');\n a.total++;\n const input = corpus.read(f.inputFile);\n let r: AdapterDecodeResult;\n try {\n r = negotiateEnvelope(input);\n } catch (err) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'negotiateEnvelope THREW on a reject fixture (must return a structured error)',\n detail: messageOf(err),\n });\n continue;\n }\n if (r.ok) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'negotiateEnvelope ACCEPTED a Foreign artifact (must hard-refuse)',\n detail: `expected ${f.expectedErrorCode} at ${f.expectedPath}`,\n });\n continue;\n }\n if (r.error.code !== f.expectedErrorCode) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'refusal CODE diverges from the canonical error',\n detail: `expected ${f.expectedErrorCode}, got ${r.error.code} (path ${r.error.path})`,\n });\n continue;\n }\n if (!r.error.path.startsWith(f.expectedPath ?? '$')) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'refusal PATH diverges from the canonical error',\n detail: `expected prefix ${f.expectedPath}, got ${r.error.path}`,\n });\n continue;\n }\n a.passed++;\n }\n }\n\n // Elicitation envelope + answer conformance (WIRE_FORMAT.md §18).\n // `roundTripElicitation` decodes with the fixture's decoder-named entry\n // point and re-encodes; `validateAnswerDocument` runs the §18.4 answer-\n // conformance gate over a {answer, contract} document.\n const roundTripElicitation = adapter.roundTripElicitation;\n if (roundTripElicitation !== undefined) {\n const elDecoder = (f: CorpusFixture): 'elicitation' | 'elicitation-outcome' =>\n f.decoder === 'elicitation-outcome' ? 'elicitation-outcome' : 'elicitation';\n\n for (const f of corpus.fixtures.filter((x) => x.kind === 'elicitation-round-trip')) {\n const a = acc('elicitation-round-trip');\n a.total++;\n const input = corpus.read(f.inputFile);\n let r: AdapterDecodeResult;\n try {\n r = roundTripElicitation(elDecoder(f), input);\n } catch (err) {\n a.failures.push({\n fixtureId: f.id,\n summary:\n 'roundTripElicitation THREW on a round-trip fixture (must return a structured result)',\n detail: messageOf(err),\n });\n continue;\n }\n if (!r.ok) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'roundTripElicitation refused a round-trip fixture',\n detail: `${r.error.code} at ${r.error.path}`,\n });\n continue;\n }\n const expected = canon(corpus.read(f.expectedFile ?? f.inputFile));\n if (typeof r.value !== 'string' || r.value !== expected) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'elicitation re-encode diverges from the canonical form',\n detail:\n typeof r.value === 'string' ? firstDiff(expected, r.value) : 'value was not a string',\n });\n continue;\n }\n a.passed++;\n }\n\n for (const f of corpus.fixtures.filter((x) => x.kind === 'elicitation-reject')) {\n const a = acc('elicitation-reject');\n a.total++;\n const input = corpus.read(f.inputFile);\n let r: AdapterDecodeResult;\n try {\n r = roundTripElicitation(elDecoder(f), input);\n } catch (err) {\n a.failures.push({\n fixtureId: f.id,\n summary:\n 'roundTripElicitation THREW on a reject fixture (must return a structured error)',\n detail: messageOf(err),\n });\n continue;\n }\n if (r.ok) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'roundTripElicitation ACCEPTED a reject fixture',\n detail: `expected ${f.expectedErrorCode} at ${f.expectedPath}`,\n });\n continue;\n }\n if (r.error.code !== f.expectedErrorCode) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'refusal CODE diverges from the canonical error',\n detail: `expected ${f.expectedErrorCode}, got ${r.error.code} (path ${r.error.path})`,\n });\n continue;\n }\n if (!r.error.path.startsWith(f.expectedPath ?? '$')) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'refusal PATH diverges from the canonical error',\n detail: `expected prefix ${f.expectedPath}, got ${r.error.path}`,\n });\n continue;\n }\n a.passed++;\n }\n }\n\n // Contract cards (WIRE_FORMAT.md §25). Same shape as the elicitation legs —\n // decode with the fixture's decoder-named entry point, re-encode, compare —\n // and deliberately NOT mandatory: §25 adoption is its own bar, recorded in the\n // §11.0 table beside the byte-parity one.\n const roundTripContractCard = adapter.roundTripContractCard;\n if (roundTripContractCard !== undefined) {\n const cardDecoder = (f: CorpusFixture): 'contract-card' | 'contract-card-bundle' =>\n f.decoder === 'contract-card-bundle' ? 'contract-card-bundle' : 'contract-card';\n\n for (const f of corpus.fixtures.filter((x) => x.kind === 'contract-card-round-trip')) {\n const a = acc('contract-card-round-trip');\n a.total++;\n const input = corpus.read(f.inputFile);\n let r: AdapterDecodeResult;\n try {\n r = roundTripContractCard(cardDecoder(f), input);\n } catch (err) {\n a.failures.push({\n fixtureId: f.id,\n summary:\n 'roundTripContractCard THREW on a round-trip fixture (must return a structured result)',\n detail: messageOf(err),\n });\n continue;\n }\n if (!r.ok) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'roundTripContractCard refused a round-trip fixture',\n detail: `${r.error.code} at ${r.error.path}`,\n });\n continue;\n }\n const expected = canon(corpus.read(f.expectedFile ?? f.inputFile));\n if (typeof r.value !== 'string' || r.value !== expected) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'card re-encode diverges from the canonical form',\n detail:\n typeof r.value === 'string' ? firstDiff(expected, r.value) : 'value was not a string',\n });\n continue;\n }\n a.passed++;\n }\n\n for (const f of corpus.fixtures.filter((x) => x.kind === 'contract-card-reject')) {\n const a = acc('contract-card-reject');\n a.total++;\n const input = corpus.read(f.inputFile);\n let r: AdapterDecodeResult;\n try {\n r = roundTripContractCard(cardDecoder(f), input);\n } catch (err) {\n a.failures.push({\n fixtureId: f.id,\n summary:\n 'roundTripContractCard THREW on a reject fixture (must return a structured error)',\n detail: messageOf(err),\n });\n continue;\n }\n if (r.ok) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'roundTripContractCard ACCEPTED a reject fixture',\n detail: `expected ${f.expectedErrorCode} at ${f.expectedPath}`,\n });\n continue;\n }\n if (r.error.code !== f.expectedErrorCode) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'refusal CODE diverges from the canonical error',\n detail: `expected ${f.expectedErrorCode}, got ${r.error.code} (path ${r.error.path})`,\n });\n continue;\n }\n if (!r.error.path.startsWith(f.expectedPath ?? '$')) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'refusal PATH diverges from the canonical error',\n detail: `expected prefix ${f.expectedPath}, got ${r.error.path}`,\n });\n continue;\n }\n a.passed++;\n }\n }\n\n const validateAnswerDocument = adapter.validateAnswerDocument;\n if (validateAnswerDocument !== undefined) {\n for (const f of corpus.fixtures.filter(\n (x) => x.kind === 'elicitation-answer-accept' || x.kind === 'elicitation-answer-reject',\n )) {\n const a = acc('elicitation-answer');\n a.total++;\n const input = corpus.read(f.inputFile);\n let r: AdapterDecodeResult;\n try {\n r = validateAnswerDocument(input);\n } catch (err) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'validateAnswerDocument THREW (must return a structured result)',\n detail: messageOf(err),\n });\n continue;\n }\n if (f.kind === 'elicitation-answer-accept') {\n if (!r.ok) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'validateAnswerDocument refused a conforming answer',\n detail: `${r.error.code} at ${r.error.path}`,\n });\n continue;\n }\n a.passed++;\n continue;\n }\n if (r.ok) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'validateAnswerDocument ACCEPTED a nonconforming answer',\n detail: `expected ${f.expectedErrorCode} at ${f.expectedPath}`,\n });\n continue;\n }\n if (r.error.code !== f.expectedErrorCode) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'refusal CODE diverges from the canonical error',\n detail: `expected ${f.expectedErrorCode}, got ${r.error.code} (path ${r.error.path})`,\n });\n continue;\n }\n if (!r.error.path.startsWith(f.expectedPath ?? '$')) {\n a.failures.push({\n fixtureId: f.id,\n summary: 'refusal PATH diverges from the canonical error',\n detail: `expected prefix ${f.expectedPath}, got ${r.error.path}`,\n });\n continue;\n }\n a.passed++;\n }\n }\n\n const need = (hooks: readonly string[]): string =>\n `adapter does not provide ${hooks.join(' + ')}`;\n const hasSchemaInput = adapter.encodeNode !== undefined || adapter.encodeOp !== undefined;\n\n const legs: LegResult[] = [\n toLeg('node-decode', true, accs.get('node-decode'), need(['decodeNode'])),\n toLeg(\n 'node-byte-identity',\n true,\n accs.get('node-byte-identity'),\n need(['decodeNode', 'encodeNode']),\n ),\n toLeg('node-reject', true, accs.get('node-reject'), need(['decodeNode'])),\n toLeg('op-decode', true, accs.get('op-decode'), need(['decodeOp'])),\n toLeg('op-byte-identity', true, accs.get('op-byte-identity'), need(['decodeOp', 'encodeOp'])),\n toLeg('op-reject', true, accs.get('op-reject'), need(['decodeOp'])),\n toLeg(\n 'lenient-accept',\n true,\n accs.get('lenient-accept'),\n need(['a decode + encode hook pair (node and/or op)']),\n ),\n toLeg(\n 'envelope-round-trip',\n true,\n accs.get('envelope-round-trip'),\n need(['negotiateEnvelope']),\n ),\n toLeg('envelope-reject', true, accs.get('envelope-reject'), need(['negotiateEnvelope'])),\n toLeg(\n 'elicitation-round-trip',\n true,\n accs.get('elicitation-round-trip'),\n need(['roundTripElicitation']),\n ),\n toLeg(\n 'elicitation-reject',\n true,\n accs.get('elicitation-reject'),\n need(['roundTripElicitation']),\n ),\n toLeg(\n 'elicitation-answer',\n true,\n accs.get('elicitation-answer'),\n need(['validateAnswerDocument']),\n ),\n toLeg(\n 'schema-validation',\n true,\n accs.get('schema-validation'),\n hasSchemaInput\n ? need(['a decode hook for the encode hooks provided'])\n : need(['encodeNode and/or encodeOp']),\n ),\n // NOT mandatory — see the `roundTripContractCard` doc comment: §25 adoption\n // is a separate bar from wire conformance, so a byte-perfect host that holds\n // no card reader must not be reported non-conformant for it.\n toLeg(\n 'contract-card-round-trip',\n false,\n accs.get('contract-card-round-trip'),\n need(['roundTripContractCard']),\n ),\n toLeg(\n 'contract-card-reject',\n false,\n accs.get('contract-card-reject'),\n need(['roundTripContractCard']),\n ),\n toLeg('apply', false, undefined, 'corpus v1 ships no apply fixtures — leg reserved'),\n ];\n\n return {\n kit: { name: KIT_NAME, version: KIT_VERSION },\n implementation: options.implementation,\n corpus: {\n manifestVersion: corpus.manifestVersion,\n digest: corpus.digest,\n fixtureCount: corpus.fixtures.length,\n source: corpus.source,\n },\n legs,\n verdict: computeVerdict(legs),\n generatedAt: new Date().toISOString(),\n };\n};\n","#!/usr/bin/env node\n// ============================================================================\n// @fuaran-ui/conformance — CLI.\n//\n// fuaran-conformance <adapter-module> [--corpus <dir>] [--json <file>]\n//\n// <adapter-module> is a path to a JS/TS-compiled module that exports the\n// candidate implementation:\n//\n// export const adapter = { decodeNode, encodeNode, decodeOp, encodeOp };\n// export const implementation = { name: 'my-host', version: '1.2.3' };\n//\n// (or the same two fields on the default export). Prints the human-readable\n// report; `--json` additionally writes the structured report. Exit codes:\n// 0 = conformant, 2 = partially-conformant, 1 = non-conformant or usage error.\n// ============================================================================\n\nimport { writeFileSync } from 'node:fs';\nimport { resolve } from 'node:path';\nimport { pathToFileURL } from 'node:url';\n\nimport type { ConformanceAdapter, ImplementationInfo } from './adapter.js';\nimport { formatReport } from './report.js';\nimport { runConformance } from './run.js';\n\ninterface AdapterModule {\n readonly adapter?: ConformanceAdapter;\n readonly implementation?: ImplementationInfo;\n readonly default?: {\n readonly adapter?: ConformanceAdapter;\n readonly implementation?: ImplementationInfo;\n };\n}\n\nconst usage = (): never => {\n console.error(\n 'Usage: fuaran-conformance <adapter-module> [--corpus <dir>] [--json <file>]\\n\\n' +\n ' <adapter-module> module exporting `adapter` (decode/encode hooks) and\\n' +\n ' `implementation` ({ name, version? })\\n' +\n ' --corpus <dir> certify against an external corpus checkout instead of\\n' +\n ' the snapshot bundled with this package\\n' +\n ' --json <file> also write the structured report as JSON\\n',\n );\n process.exit(1);\n};\n\nconst args = process.argv.slice(2);\nlet modulePath: string | undefined;\nlet corpusRoot: string | undefined;\nlet jsonOut: string | undefined;\n\nfor (let i = 0; i < args.length; i++) {\n const arg = args[i];\n if (arg === '--corpus') corpusRoot = args[++i] ?? usage();\n else if (arg === '--json') jsonOut = args[++i] ?? usage();\n else if (modulePath === undefined && arg !== undefined && !arg.startsWith('--')) {\n modulePath = arg;\n } else usage();\n}\nif (modulePath === undefined) usage();\n\nconst loaded = (await import(pathToFileURL(resolve(modulePath as string)).href)) as AdapterModule;\nconst adapter = loaded.adapter ?? loaded.default?.adapter;\nconst implementation = loaded.implementation ?? loaded.default?.implementation;\nif (adapter === undefined || implementation === undefined) {\n console.error(\n `The adapter module must export \\`adapter\\` and \\`implementation\\` ` +\n `(named or on the default export). Loaded: ${modulePath}`,\n );\n process.exit(1);\n}\n\nconst report = runConformance(adapter, {\n implementation,\n ...(corpusRoot === undefined ? {} : { corpusRoot }),\n});\n\nconsole.log(formatReport(report));\nif (jsonOut !== undefined) {\n writeFileSync(jsonOut, JSON.stringify(report, null, 2) + '\\n', 'utf8');\n console.log(`\\nStructured report written to ${jsonOut}`);\n}\n\nprocess.exit(\n report.verdict === 'conformant' ? 0 : report.verdict === 'partially-conformant' ? 2 : 1,\n);\n"]}
|