Files
Zecheng Zhang 90a20bd169 fix: stop masking backend failures as missing paths, widen TS conformance (#633)
Three fixes from an audit of the TypeScript side.

1. WorkspaceFS.exists/isDir/isFile caught every exception and returned
   false, so an auth failure, timeout, or backend bug read back as "this
   path does not exist". Python already had the right answer: it swallows
   only (FileNotFoundError, ValueError), where ValueError is the registry's
   "no mount matches path". Added noMount() plus an isMissingPath()
   predicate and applied it to the three probes, to pathExists/isDirectory
   in the copy helpers, and to the same pattern in realpath and df, both of
   which had already diverged from their narrow Python twins.

2. LanceDB blob decoding called the Node global Buffer inside the
   runtime-agnostic core package, which breaks in browsers. It now uses the
   existing decodeBase64 helper, matching its qdrant sibling. The two gmail
   base64url helpers moved onto the shared helpers as well.

3. TypeScript conformance only ran against RAM while Python ran RAM, disk
   and Redis. The runner now covers all three with fresh backend state per
   case, and all 34 cases pass on every backend. Teardown is split so
   clearing Redis happens before Workspace.close() destroys the client,
   rather than silently opening a second connection per case.

Also wired integ/runners/parity.py into CI as integ-shared-parity and added
it to the gate; it existed but nothing ran it. Locally it compares 5386
case/target pairs with no mismatches. Added conformance/** to the python and
typescript workflow path filters, which did not trigger those suites before.

The test stubs that faked backend errors as new Error("not found") or
new Error("ENOENT"), with the code in the message instead of on the error,
now use enoent() like real backends do.
2026-07-24 23:02:00 -07:00

155 lines
2.7 KiB
JSON

{
"command": "wc",
"cases": [
{
"id": "wc_default",
"cmd": "wc /data/a.txt",
"matrix": {
"python": [
"ram",
"disk",
"redis"
],
"typescript": [
"ram",
"disk",
"redis"
]
},
"expect": {
"exit": 0,
"stdout_text": " 5 5 24 /data/a.txt\n",
"stderr_text": ""
}
},
{
"id": "wc_lines",
"cmd": "wc -l /data/a.txt",
"matrix": {
"python": [
"ram",
"disk",
"redis"
],
"typescript": [
"ram",
"disk",
"redis"
]
},
"expect": {
"exit": 0,
"stdout_text": "5 /data/a.txt\n",
"stderr_text": ""
}
},
{
"id": "wc_words",
"cmd": "wc -w /data/a.txt",
"matrix": {
"python": [
"ram",
"disk",
"redis"
],
"typescript": [
"ram",
"disk",
"redis"
]
},
"expect": {
"exit": 0,
"stdout_text": "5 /data/a.txt\n",
"stderr_text": ""
}
},
{
"id": "wc_bytes",
"cmd": "wc -c /data/a.txt",
"matrix": {
"python": [
"ram",
"disk",
"redis"
],
"typescript": [
"ram",
"disk",
"redis"
]
},
"expect": {
"exit": 0,
"stdout_text": "24 /data/a.txt\n",
"stderr_text": ""
}
},
{
"id": "wc_no_trailing_newline",
"cmd": "wc /data/no_nl.txt",
"matrix": {
"python": [
"ram",
"disk",
"redis"
],
"typescript": [
"ram",
"disk",
"redis"
]
},
"expect": {
"exit": 0,
"stdout_text": " 0 3 19 /data/no_nl.txt\n",
"stderr_text": ""
}
},
{
"id": "wc_stdin",
"cmd": "wc",
"stdin_text": "a\nb\n",
"matrix": {
"python": [
"ram",
"disk",
"redis"
],
"typescript": [
"ram",
"disk",
"redis"
]
},
"expect": {
"exit": 0,
"stdout_text": " 2 2 4\n",
"stderr_text": ""
}
},
{
"id": "wc_lines_stdin",
"cmd": "wc -l",
"stdin_text": "a\nb\n",
"matrix": {
"python": [
"ram",
"disk",
"redis"
],
"typescript": [
"ram",
"disk",
"redis"
]
},
"expect": {
"exit": 0,
"stdout_text": "2\n",
"stderr_text": ""
}
}
]
}