@particle-academy/fancy-conformance 0.15.0 → 0.16.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.16.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-academy/fancy-conformance",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.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",
|
|
@@ -1390,7 +1390,10 @@
|
|
|
1390
1390
|
"ok": true,
|
|
1391
1391
|
"value": null
|
|
1392
1392
|
},
|
|
1393
|
-
"notes": "Deliberate. There is no count three languages would agree on for an object, and an object used as a collection is rare enough not to justify inventing one. Null here is the ordinary absent-path answer, not a special case."
|
|
1393
|
+
"notes": "Deliberate. There is no count three languages would agree on for an object, and an object used as a collection is rare enough not to justify inventing one. Null here is the ordinary absent-path answer, not a special case. PHP cannot represent this case; see its skip reason and 0906.",
|
|
1394
|
+
"skip": {
|
|
1395
|
+
"php": "Not representable in PHP. json_decode('{}', true) and json_decode('[]', true) produce the IDENTICAL value, and array_is_list() calls both a list -- so an EMPTY object cannot be distinguished from an empty array, and the `.length` an empty array legitimately has is returned. The same limit shared/value-equality/0210 records. 0906 pins the same rule with a NON-EMPTY object, which every language can express."
|
|
1396
|
+
}
|
|
1394
1397
|
},
|
|
1395
1398
|
{
|
|
1396
1399
|
"id": "0905-length-is-not-host-reach",
|
|
@@ -1429,6 +1432,44 @@
|
|
|
1429
1432
|
"value": null
|
|
1430
1433
|
},
|
|
1431
1434
|
"notes": "`.length` is a computed count, not an opening. Nothing else on the prototype chain resolves -- these expressions arrive from end users and from agents, over the wire."
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
"id": "0906-non-empty-object-has-no-length",
|
|
1438
|
+
"title": "A NON-EMPTY object has no `.length` either.",
|
|
1439
|
+
"since": "0.16.0",
|
|
1440
|
+
"tags": [
|
|
1441
|
+
"expr",
|
|
1442
|
+
"length",
|
|
1443
|
+
"deliberate"
|
|
1444
|
+
],
|
|
1445
|
+
"input": {
|
|
1446
|
+
"expression": "user.length",
|
|
1447
|
+
"context": {
|
|
1448
|
+
"in": {
|
|
1449
|
+
"content": "hello",
|
|
1450
|
+
"count": 3,
|
|
1451
|
+
"deal_id": "D-1",
|
|
1452
|
+
"transcript": null,
|
|
1453
|
+
"items": [
|
|
1454
|
+
1,
|
|
1455
|
+
2
|
|
1456
|
+
],
|
|
1457
|
+
"empty": [],
|
|
1458
|
+
"obj": {},
|
|
1459
|
+
"flag": true,
|
|
1460
|
+
"zero": 0,
|
|
1461
|
+
"blank": ""
|
|
1462
|
+
},
|
|
1463
|
+
"user": {
|
|
1464
|
+
"name": "Ada"
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
},
|
|
1468
|
+
"expected": {
|
|
1469
|
+
"ok": true,
|
|
1470
|
+
"value": null
|
|
1471
|
+
},
|
|
1472
|
+
"notes": "The companion to 0904, and the form every runtime can express. PHP cannot distinguish an EMPTY object from an empty array -- both decode to the same value and both read as a list -- so 0904 is skipped there. A non-empty object is unambiguous in all three, which keeps the rule pinned rather than merely skipped. Same shape as flow/workflow-props 0106/0109."
|
|
1432
1473
|
}
|
|
1433
1474
|
]
|
|
1434
1475
|
}
|
|
@@ -36,6 +36,7 @@
|
|
|
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
|
"This suite needs DISCRIMINATION PROBES before it can claim more than drift-guarding — deliberately-wrong evaluators that must each fail an exact set of ids. Notably: one that uses native truthiness (must fail 0301/0302), one that coerces on `==` (must fail 0503), and one that returns booleans from `&&`/`||` (must fail 0401/0403/0404). Not yet written; recorded so a green tick is not read as the stronger claim.",
|
|
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."
|
|
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
41
|
]
|
|
41
42
|
}
|