@particle-academy/fancy-conformance 0.17.0 → 0.18.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/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.18.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-academy/fancy-conformance",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Shared cross-language conformance fixtures for the Fancy suite. One contract, N implementations, and a single table that every implementation asserts in its own CI \u2014 so 'parity' is a test result rather than a claim. Ships the fixture data itself, so a Rust, Go or Python runner can consume it without a JavaScript toolchain.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -1545,6 +1545,43 @@
|
|
|
1545
1545
|
"ok": true,
|
|
1546
1546
|
"value": ""
|
|
1547
1547
|
}
|
|
1548
|
+
},
|
|
1549
|
+
{
|
|
1550
|
+
"id": "1101-loose-spelling-does-not-coerce",
|
|
1551
|
+
"title": "The LOOSE spelling does not coerce either -- '3' == 3 is false.",
|
|
1552
|
+
"since": "0.18.0",
|
|
1553
|
+
"tags": [
|
|
1554
|
+
"expr",
|
|
1555
|
+
"equality"
|
|
1556
|
+
],
|
|
1557
|
+
"notes": "BELONGS WITH 0501-0504 and is numbered here only because ids are never renumbered. It exists because the mutant harness found the table could not do what this manifest claimed it did. 0503 pins no-coercion using the STRICT spelling ('3' === in.count) and 0502 compares two values that are equal anyway -- so a runtime whose `==` coerced, which is PHP's and JavaScript's native behaviour and the single most likely port mistake, passed every row. The manifest said a coercing probe 'must fail 0503'. It failed nothing. Prose beside a check, asserting what the check could not express.",
|
|
1558
|
+
"input": {
|
|
1559
|
+
"expression": "'3' == in.count",
|
|
1560
|
+
"context": {
|
|
1561
|
+
"in": {
|
|
1562
|
+
"content": "hello",
|
|
1563
|
+
"count": 3,
|
|
1564
|
+
"deal_id": "D-1",
|
|
1565
|
+
"transcript": null,
|
|
1566
|
+
"items": [
|
|
1567
|
+
1,
|
|
1568
|
+
2
|
|
1569
|
+
],
|
|
1570
|
+
"empty": [],
|
|
1571
|
+
"obj": {},
|
|
1572
|
+
"flag": true,
|
|
1573
|
+
"zero": 0,
|
|
1574
|
+
"blank": ""
|
|
1575
|
+
},
|
|
1576
|
+
"user": {
|
|
1577
|
+
"name": "Ada"
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
},
|
|
1581
|
+
"expected": {
|
|
1582
|
+
"ok": true,
|
|
1583
|
+
"value": false
|
|
1584
|
+
}
|
|
1548
1585
|
}
|
|
1549
1586
|
]
|
|
1550
1587
|
}
|
|
@@ -35,8 +35,9 @@
|
|
|
35
35
|
"`==` AND `===` ARE THE SAME OPERATOR (0501-0503), and neither coerces. Both spellings are accepted because authors write both. Two equality operators that differ subtly is a language that generates bug reports, and there are three runtimes to keep in step.",
|
|
36
36
|
"`&&` AND `||` RETURN THE OPERAND, NOT A BOOLEAN (0401-0404). That is what makes `in.transcript || in.content` a useful fallback rather than merely `true` — and the reported production case wrote exactly that shape.",
|
|
37
37
|
"MALFORMED EXPRESSIONS FAIL (0801-0805) and never return null. A null there would be indistinguishable from an absent path, which is the defect being removed. 0805 pins that a function call does not parse: sandboxing is a security property here, not a style preference, because these expressions arrive from end users and from agents over the wire.",
|
|
38
|
-
"
|
|
38
|
+
"DISCRIMINATION PROBES NOW EXIST, in `tests/discrimination-expr.test.ts`, and writing them found this manifest making a claim the table could not support. It used to say a probe that coerces on `==` \"must fail 0503\". It failed NOTHING: 0503 pins no-coercion using the STRICT spelling ('3' === in.count) and 0502 compares two values that are equal either way, so a runtime whose `==` coerced -- PHP's and JavaScript's native behaviour, and the single likeliest port mistake -- passed every row in the suite. 1101 is the row that makes the claim true. The other two predictions were merely INCOMPLETE rather than wrong: boolean `&&`/`||` also breaks 0402 and 1002, and the probes now assert the EXACT id set, so a row that stops doing the catching cannot be deleted unnoticed.",
|
|
39
39
|
"`.length` (0901-0905) IS the one pseudo-property, and it is load-bearing rather than convenient. Because `[]` is TRUTHY, a consumer with no `.length` would have no way to ask whether a collection is EMPTY -- the grammar would assert that an array which exists is a value and then leave nobody able to test the thing they care about. It is a computed count, not host reach: nothing is called and no prototype is walked, and 0905 pins that nothing else on the chain resolves. Objects deliberately have none (0904), since no count would survive three languages. These rows were added after writing the reference implementation's discrimination tests found the SPEC contradicting the CODE -- the truthiness rule was justified with `.length` while `.length` returned null.",
|
|
40
|
-
"THE TABLE EARNED ITS KEEP ON THE FIRST INDEPENDENT IMPLEMENTATION, exactly as this manifest predicted it would. The PHP port -- written against these rows rather than against the TypeScript source -- failed 1 of 44 on its first run: 0904, that an object has no `.length`. It is not a bug in the port. json_decode('{}', true) and json_decode('[]', true) produce the IDENTICAL value in PHP and array_is_list() calls both a list, so an EMPTY object is indistinguishable from an empty array and the length the array legitimately has is returned. A genuine cross-language expressiveness limit, the same one shared/value-equality/0210 records. Skipped there with the reason attached, and 0906 pins the identical rule with a NON-EMPTY object that every runtime can express -- the same two-row shape as flow/workflow-props 0106/0109."
|
|
40
|
+
"THE TABLE EARNED ITS KEEP ON THE FIRST INDEPENDENT IMPLEMENTATION, exactly as this manifest predicted it would. The PHP port -- written against these rows rather than against the TypeScript source -- failed 1 of 44 on its first run: 0904, that an object has no `.length`. It is not a bug in the port. json_decode('{}', true) and json_decode('[]', true) produce the IDENTICAL value in PHP and array_is_list() calls both a list, so an EMPTY object is indistinguishable from an empty array and the length the array legitimately has is returned. A genuine cross-language expressiveness limit, the same one shared/value-equality/0210 records. Skipped there with the reason attached, and 0906 pins the identical rule with a NON-EMPTY object that every runtime can express -- the same two-row shape as flow/workflow-props 0106/0109.",
|
|
41
|
+
"0502 AND 1101 ARE NOT DUPLICATES, and the difference is the whole point. 0502 asks whether the loose SPELLING is accepted at all; 1101 asks whether it COERCES. A table with only the first reads as covering equality and covers half of it."
|
|
41
42
|
]
|
|
42
43
|
}
|