@sanning/proof 0.11.1 → 0.13.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/README.md +43 -8
- package/dist/agent-proof.d.ts +2 -2
- package/dist/agent-proof.js +4 -4
- package/dist/case-file.d.ts +126 -0
- package/dist/case-file.js +349 -0
- package/dist/case.d.ts +199 -43
- package/dist/case.js +522 -146
- package/dist/cli.d.ts +132 -1
- package/dist/cli.js +1140 -96
- package/dist/crypto.d.ts +1 -1
- package/dist/crypto.js +5 -1
- package/dist/declaration.d.ts +58 -52
- package/dist/declaration.js +256 -33
- package/dist/evidence.d.ts +2 -0
- package/dist/evidence.js +134 -19
- package/dist/exit-codes.d.ts +17 -0
- package/dist/exit-codes.js +50 -0
- package/dist/grading.d.ts +28 -13
- package/dist/grading.js +90 -31
- package/dist/handoff.d.ts +16 -1
- package/dist/handoff.js +91 -16
- package/dist/index.d.ts +10 -7
- package/dist/index.js +15 -7
- package/dist/message-parts.d.ts +11 -9
- package/dist/message-parts.js +11 -9
- package/dist/types.d.ts +1 -0
- package/dist/verifier.d.ts +9 -2
- package/dist/verifier.js +28 -12
- package/dist/zip-reader.d.ts +50 -0
- package/dist/zip-reader.js +220 -0
- package/package.json +2 -2
- package/src/agent-proof.ts +4 -4
- package/src/case-file.ts +419 -0
- package/src/case.ts +651 -156
- package/src/cli.ts +1325 -100
- package/src/crypto.ts +5 -1
- package/src/declaration.ts +248 -52
- package/src/evidence.ts +142 -21
- package/src/exit-codes.ts +54 -0
- package/src/grading.ts +109 -52
- package/src/handoff.ts +108 -17
- package/src/index.ts +60 -3
- package/src/message-parts.ts +11 -9
- package/src/types.ts +5 -0
- package/src/verifier.ts +35 -13
- package/src/zip-reader.ts +229 -0
- package/vectors/README.md +56 -3
- package/vectors/case-file-index.json +668 -0
- package/vectors/case-split.json +1102 -0
- package/vectors/pack-grading.json +68 -4
- package/vectors/stamp-on-chain.json +3 -3
|
@@ -0,0 +1,1102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "How `case` reads folders into packs: the verify page's splitting rule (sanning-io/verify-page src/lib/case.ts splitCase, src/lib/pack.ts assemble) over a walk whose rules are the command's own, and the bundle.json reader that verify and case share. Restated in both kernels and pinned here. Written by tools/gen-vectors/gen_case_split_vectors.py, whose expectations are literals, not kernel output. A tree row lists what to create under an empty folder <root>: a file (path, hex), a folder (dir), a symbolic link (symlink, its target as written), a file whose path is bytes (path_hex), or `files` empty files in a folder (fill). `args` are paths under <root>, and <root> in an expected error stands for that folder. File contents are lowercase hex.",
|
|
3
|
+
"limits": {
|
|
4
|
+
"max_json_depth": 512,
|
|
5
|
+
"max_walk_depth": 32,
|
|
6
|
+
"max_walk_entries": 50000
|
|
7
|
+
},
|
|
8
|
+
"parses": [
|
|
9
|
+
{
|
|
10
|
+
"bytes": "efbbbf7b2261223a317d",
|
|
11
|
+
"description": "A leading byte-order mark is kept by the decode, and it is not JSON. verify has always refused it; the page drops it.",
|
|
12
|
+
"expected": {
|
|
13
|
+
"error": "p/bundle.json is not valid JSON"
|
|
14
|
+
},
|
|
15
|
+
"id": "bom-refused"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"bytes": "7b2261223a2278ff79227d",
|
|
19
|
+
"description": "An ill-formed byte inside a string becomes U+FFFD, not a refusal.",
|
|
20
|
+
"expected": {
|
|
21
|
+
"value": {
|
|
22
|
+
"a": "x�y"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"id": "ill-formed-utf8-in-a-string"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"bytes": "5b2241f0808042eda08043e08044f490808045c0af46e28247ff48225d",
|
|
29
|
+
"description": "One U+FFFD per maximal subpart, as WHATWG TextDecoder reads it: a truncated 4-byte lead, an encoded surrogate, an overlong, a code point above U+10FFFF, an overlong 2-byte form, a truncated 3-byte sequence and a lone FF.",
|
|
30
|
+
"expected": {
|
|
31
|
+
"value": [
|
|
32
|
+
"A���B���C��D����E��F�G�H"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"id": "ill-formed-utf8-maximal-subparts"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"bytes": "7b2261223a4e614e7d",
|
|
39
|
+
"description": "JSON has no NaN.",
|
|
40
|
+
"expected": {
|
|
41
|
+
"error": "p/bundle.json is not valid JSON"
|
|
42
|
+
},
|
|
43
|
+
"id": "nan-refused"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"bytes": "5b2d496e66696e6974795d",
|
|
47
|
+
"description": "JSON has no Infinity.",
|
|
48
|
+
"expected": {
|
|
49
|
+
"error": "p/bundle.json is not valid JSON"
|
|
50
|
+
},
|
|
51
|
+
"id": "infinity-refused"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"bytes": "504b0304",
|
|
55
|
+
"description": "Not JSON at all.",
|
|
56
|
+
"expected": {
|
|
57
|
+
"error": "p/bundle.json is not valid JSON"
|
|
58
|
+
},
|
|
59
|
+
"id": "not-json"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"bytes": "5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5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d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d",
|
|
63
|
+
"description": "512 nested arrays are read. `compact` is the value as compact JSON, which stands in for a value this deep.",
|
|
64
|
+
"expected": {
|
|
65
|
+
"compact": "[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[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5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d",
|
|
71
|
+
"description": "513 nested arrays are refused before they are parsed.",
|
|
72
|
+
"expected": {
|
|
73
|
+
"error": "p/bundle.json nests deeper than 512 levels"
|
|
74
|
+
},
|
|
75
|
+
"id": "depth-over-the-limit"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"bytes": "7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a7b2261223a5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d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b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b7b",
|
|
87
|
+
"description": "The depth scan runs first, so text that is both too deep and not JSON is named as too deep.",
|
|
88
|
+
"expected": {
|
|
89
|
+
"error": "p/bundle.json nests deeper than 512 levels"
|
|
90
|
+
},
|
|
91
|
+
"id": "depth-scan-before-parse"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"bytes": "5b225c225b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b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[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
"id": "brackets-in-strings-do-not-count"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"trees": [
|
|
105
|
+
{
|
|
106
|
+
"args": [
|
|
107
|
+
"decision-file"
|
|
108
|
+
],
|
|
109
|
+
"description": "The credit-demo decision file, unpacked: packs under evidence/packs/<side>/, exhibits as zips under evidence/exhibits/, and memo, manifest and documents beside them. Two packs. The exhibit zip is a FILE outside every pack and is never opened, although it holds a bundle.json of its own. logs/.DS_Store is unaccounted, not a record.",
|
|
110
|
+
"expected": {
|
|
111
|
+
"not_regular": [],
|
|
112
|
+
"outside": [
|
|
113
|
+
"decision-file/HOW-TO-VERIFY.txt",
|
|
114
|
+
"decision-file/evidence/documents/policy.pdf",
|
|
115
|
+
"decision-file/evidence/exhibits/checker-as-received.zip",
|
|
116
|
+
"decision-file/evidence/outputs/checker-review.json",
|
|
117
|
+
"decision-file/evidence/run.json",
|
|
118
|
+
"decision-file/manifest.json",
|
|
119
|
+
"decision-file/memo.pdf",
|
|
120
|
+
"decision-file/memo.txt"
|
|
121
|
+
],
|
|
122
|
+
"packs": [
|
|
123
|
+
{
|
|
124
|
+
"bundle_path": "decision-file/evidence/packs/checker/bundle.json",
|
|
125
|
+
"content": {
|
|
126
|
+
"c-1": "6331",
|
|
127
|
+
"c-2": "6332"
|
|
128
|
+
},
|
|
129
|
+
"ref": "decision-file/evidence/packs/checker",
|
|
130
|
+
"unaccounted": []
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"bundle_path": "decision-file/evidence/packs/underwriter/bundle.json",
|
|
134
|
+
"content": {
|
|
135
|
+
"u-1": "7531"
|
|
136
|
+
},
|
|
137
|
+
"ref": "decision-file/evidence/packs/underwriter",
|
|
138
|
+
"unaccounted": [
|
|
139
|
+
"logs/.DS_Store"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
"id": "decision-file-unpacked",
|
|
145
|
+
"tree": [
|
|
146
|
+
{
|
|
147
|
+
"hex": "255044462d312e34",
|
|
148
|
+
"path": "decision-file/memo.pdf"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"hex": "6d656d6f",
|
|
152
|
+
"path": "decision-file/memo.txt"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"hex": "7b7d",
|
|
156
|
+
"path": "decision-file/manifest.json"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"hex": "756e7a6970",
|
|
160
|
+
"path": "decision-file/HOW-TO-VERIFY.txt"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"hex": "7b7d",
|
|
164
|
+
"path": "decision-file/evidence/run.json"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"hex": "25504446",
|
|
168
|
+
"path": "decision-file/evidence/documents/policy.pdf"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"hex": "7b7d",
|
|
172
|
+
"path": "decision-file/evidence/outputs/checker-review.json"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
176
|
+
"path": "decision-file/evidence/packs/underwriter/bundle.json"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"hex": "7531",
|
|
180
|
+
"path": "decision-file/evidence/packs/underwriter/logs/u-1.json"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"hex": "00",
|
|
184
|
+
"path": "decision-file/evidence/packs/underwriter/logs/.DS_Store"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
188
|
+
"path": "decision-file/evidence/packs/checker/bundle.json"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"hex": "6331",
|
|
192
|
+
"path": "decision-file/evidence/packs/checker/logs/c-1.json"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"hex": "6332",
|
|
196
|
+
"path": "decision-file/evidence/packs/checker/logs/c-2.json"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"hex": "504b03041400000008000000375d408bd69528000000260000000b00000062756e646c652e6a736f6eab562a2e484d8e2f4b2d2acecccf53b2522a4ecccbcbcc4bd74b2dcb4c49cd4b4ed52f3354aa0500504b03041400000008000000375da12ad75e04000000020000000d0000006c6f67732f632d312e6a736f6e4b360400504b010214031400000008000000375d408bd69528000000260000000b000000000000000000000080010000000062756e646c652e6a736f6e504b010214031400000008000000375da12ad75e04000000020000000d00000000000000000000008001510000006c6f67732f632d312e6a736f6e504b0506000000000200020074000000800000000000",
|
|
200
|
+
"path": "decision-file/evidence/exhibits/checker-as-received.zip"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"args": [
|
|
206
|
+
"decision-file"
|
|
207
|
+
],
|
|
208
|
+
"description": "Packs zipped inside the folder and nothing else. No bundle.json at any path, so the folder is refused, and the hint says to unzip first.",
|
|
209
|
+
"expected": {
|
|
210
|
+
"error": "No bundle.json found. An evidence pack contains bundle.json plus logs/.",
|
|
211
|
+
"hint": "It holds 2 .zip file(s) (decision-file/evidence/packs/checker.zip, …), and case never opens a .zip inside a folder. Pass the .zip itself, or unzip it first (for example, unzip file.zip -d case/) and pass the folder."
|
|
212
|
+
},
|
|
213
|
+
"id": "zipped-packs-only",
|
|
214
|
+
"tree": [
|
|
215
|
+
{
|
|
216
|
+
"hex": "6d656d6f",
|
|
217
|
+
"path": "decision-file/memo.txt"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"hex": "504b03041400000008000000375d408bd69528000000260000000b00000062756e646c652e6a736f6eab562a2e484d8e2f4b2d2acecccf53b2522a4ecccbcbcc4bd74b2dcb4c49cd4b4ed52f3354aa0500504b010214031400000008000000375d408bd69528000000260000000b000000000000000000000080010000000062756e646c652e6a736f6e504b0506000000000100010039000000510000000000",
|
|
221
|
+
"path": "decision-file/evidence/packs/underwriter.zip"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"hex": "504b03041400000008000000375d408bd69528000000260000000b00000062756e646c652e6a736f6eab562a2e484d8e2f4b2d2acecccf53b2522a4ecccbcbcc4bd74b2dcb4c49cd4b4ed52f3354aa0500504b010214031400000008000000375d408bd69528000000260000000b000000000000000000000080010000000062756e646c652e6a736f6e504b0506000000000100010039000000510000000000",
|
|
225
|
+
"path": "decision-file/evidence/packs/checker.zip"
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"args": [
|
|
231
|
+
"pack.zip"
|
|
232
|
+
],
|
|
233
|
+
"description": "A .zip named on the command line is read as a case file (evidence-bundle §5.6, v1.20 A25): <name>.zip is read at <name>/<entry>, the folder unzip <name>.zip -d <name> makes, so the archive and its unpacked folder give one reading.",
|
|
234
|
+
"expected": {
|
|
235
|
+
"not_regular": [],
|
|
236
|
+
"outside": [],
|
|
237
|
+
"packs": [
|
|
238
|
+
{
|
|
239
|
+
"bundle_path": "pack/bundle.json",
|
|
240
|
+
"content": {
|
|
241
|
+
"x": "78"
|
|
242
|
+
},
|
|
243
|
+
"ref": "pack",
|
|
244
|
+
"unaccounted": []
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
"id": "zip-argument-read",
|
|
249
|
+
"tree": [
|
|
250
|
+
{
|
|
251
|
+
"hex": "504b03041400000008000000375d408bd69528000000260000000b00000062756e646c652e6a736f6eab562a2e484d8e2f4b2d2acecccf53b2522a4ecccbcbcc4bd74b2dcb4c49cd4b4ed52f3354aa0500504b03041400000008000000375d8316dc8c03000000010000000b0000006c6f67732f782e6a736f6eab0000504b010214031400000008000000375d408bd69528000000260000000b000000000000000000000080010000000062756e646c652e6a736f6e504b010214031400000008000000375d8316dc8c03000000010000000b00000000000000000000008001510000006c6f67732f782e6a736f6e504b05060000000002000200720000007d0000000000",
|
|
252
|
+
"path": "pack.zip"
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"args": [
|
|
258
|
+
"PACK.Zip"
|
|
259
|
+
],
|
|
260
|
+
"description": "The extension is matched without regard to ASCII case, and bytes that are not a .zip archive refuse the input.",
|
|
261
|
+
"expected": {
|
|
262
|
+
"error": "<root>/PACK.Zip is not a readable .zip archive",
|
|
263
|
+
"hint": null
|
|
264
|
+
},
|
|
265
|
+
"id": "zip-argument-any-case",
|
|
266
|
+
"tree": [
|
|
267
|
+
{
|
|
268
|
+
"hex": "504b",
|
|
269
|
+
"path": "PACK.Zip"
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"args": [
|
|
275
|
+
"bundle.json"
|
|
276
|
+
],
|
|
277
|
+
"description": "A file that is not a .zip is not a folder either.",
|
|
278
|
+
"expected": {
|
|
279
|
+
"error": "<root>/bundle.json is not a folder or a .zip. Pass pack folders, the folder that holds them, or a case file.",
|
|
280
|
+
"hint": null
|
|
281
|
+
},
|
|
282
|
+
"id": "file-argument-refused",
|
|
283
|
+
"tree": [
|
|
284
|
+
{
|
|
285
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
286
|
+
"path": "bundle.json"
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"args": [
|
|
292
|
+
"case-4b19de"
|
|
293
|
+
],
|
|
294
|
+
"description": "A case file, unzipped: packs a and b under packs/<ref>/, and the index, the command and every report/ file outside every pack. The case file needs no new splitting rule. The zip under report/ is a file like any other and is never opened, although it holds a bundle.json.",
|
|
295
|
+
"expected": {
|
|
296
|
+
"not_regular": [],
|
|
297
|
+
"outside": [
|
|
298
|
+
"case-4b19de/HOW-TO-VERIFY.txt",
|
|
299
|
+
"case-4b19de/contents.json",
|
|
300
|
+
"case-4b19de/report/README.txt",
|
|
301
|
+
"case-4b19de/report/memo.pdf",
|
|
302
|
+
"case-4b19de/report/nested.zip"
|
|
303
|
+
],
|
|
304
|
+
"packs": [
|
|
305
|
+
{
|
|
306
|
+
"bundle_path": "case-4b19de/packs/a/bundle.json",
|
|
307
|
+
"content": {
|
|
308
|
+
"x": "78"
|
|
309
|
+
},
|
|
310
|
+
"ref": "case-4b19de/packs/a",
|
|
311
|
+
"unaccounted": []
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"bundle_path": "case-4b19de/packs/b/bundle.json",
|
|
315
|
+
"content": {},
|
|
316
|
+
"ref": "case-4b19de/packs/b",
|
|
317
|
+
"unaccounted": []
|
|
318
|
+
}
|
|
319
|
+
]
|
|
320
|
+
},
|
|
321
|
+
"id": "case-file-unpacked",
|
|
322
|
+
"tree": [
|
|
323
|
+
{
|
|
324
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
325
|
+
"path": "case-4b19de/packs/a/bundle.json"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"hex": "78",
|
|
329
|
+
"path": "case-4b19de/packs/a/logs/x.json"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
333
|
+
"path": "case-4b19de/packs/b/bundle.json"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"hex": "7b7d",
|
|
337
|
+
"path": "case-4b19de/contents.json"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"hex": "756e7a6970",
|
|
341
|
+
"path": "case-4b19de/HOW-TO-VERIFY.txt"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"hex": "4e6f742065766964656e6365",
|
|
345
|
+
"path": "case-4b19de/report/README.txt"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"hex": "25504446",
|
|
349
|
+
"path": "case-4b19de/report/memo.pdf"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"hex": "504b03041400000008000000375d408bd69528000000260000000b00000062756e646c652e6a736f6eab562a2e484d8e2f4b2d2acecccf53b2522a4ecccbcbcc4bd74b2dcb4c49cd4b4ed52f3354aa0500504b010214031400000008000000375d408bd69528000000260000000b000000000000000000000080010000000062756e646c652e6a736f6e504b0506000000000100010039000000510000000000",
|
|
353
|
+
"path": "case-4b19de/report/nested.zip"
|
|
354
|
+
}
|
|
355
|
+
]
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"args": [
|
|
359
|
+
"case-4b19de.zip"
|
|
360
|
+
],
|
|
361
|
+
"description": "The same case file named as case-4b19de.zip: the same split, key for key.",
|
|
362
|
+
"expected": {
|
|
363
|
+
"not_regular": [],
|
|
364
|
+
"outside": [
|
|
365
|
+
"case-4b19de/HOW-TO-VERIFY.txt",
|
|
366
|
+
"case-4b19de/contents.json",
|
|
367
|
+
"case-4b19de/report/README.txt",
|
|
368
|
+
"case-4b19de/report/memo.pdf",
|
|
369
|
+
"case-4b19de/report/nested.zip"
|
|
370
|
+
],
|
|
371
|
+
"packs": [
|
|
372
|
+
{
|
|
373
|
+
"bundle_path": "case-4b19de/packs/a/bundle.json",
|
|
374
|
+
"content": {
|
|
375
|
+
"x": "78"
|
|
376
|
+
},
|
|
377
|
+
"ref": "case-4b19de/packs/a",
|
|
378
|
+
"unaccounted": []
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"bundle_path": "case-4b19de/packs/b/bundle.json",
|
|
382
|
+
"content": {},
|
|
383
|
+
"ref": "case-4b19de/packs/b",
|
|
384
|
+
"unaccounted": []
|
|
385
|
+
}
|
|
386
|
+
]
|
|
387
|
+
},
|
|
388
|
+
"id": "case-file-zip",
|
|
389
|
+
"tree": [
|
|
390
|
+
{
|
|
391
|
+
"hex": "504b03041400000008000000375d408bd6952800000026000000130000007061636b732f612f62756e646c652e6a736f6eab562a2e484d8e2f4b2d2acecccf53b2522a4ecccbcbcc4bd74b2dcb4c49cd4b4ed52f3354aa0500504b03041400000008000000375d8316dc8c0300000001000000130000007061636b732f612f6c6f67732f782e6a736f6eab0000504b03041400000008000000375d408bd6952800000026000000130000007061636b732f622f62756e646c652e6a736f6eab562a2e484d8e2f4b2d2acecccf53b2522a4ecccbcbcc4bd74b2dcb4c49cd4b4ed52f3354aa0500504b03041400000008000000375d43bfa6a304000000020000000d000000636f6e74656e74732e6a736f6eabae0500504b03041400000008000000375dc654b591070000000500000011000000484f572d544f2d5645524946592e7478742bcdabca2c0000504b03041400000008000000375d47efbb750e0000000c000000110000007265706f72742f524541444d452e747874f3cb2f51482dcb4c49cd4b4e0500504b03041400000008000000375d04c0bed106000000040000000f0000007265706f72742f6d656d6f2e706466530d70710300504b03041400000008000000375d88567fd66c000000a0000000110000007265706f72742f6e65737465642e7a69700bf0666611616060e00062f35887ee6b5335802c3520e606e2a4d2bc949c54bdace2fcbcd5615a7a1ebe7dfadeba5ae7ce9c0fde14a4e577e6f4e933ded7bd754ffb789ef5f6bbaa6f1cb28a9521c09b91498419b79130d0c0c8806a4180372b1b488811082d817420581900504b010214031400000008000000375d408bd69528000000260000001300000000000000000000008001000000007061636b732f612f62756e646c652e6a736f6e504b010214031400000008000000375d8316dc8c03000000010000001300000000000000000000008001590000007061636b732f612f6c6f67732f782e6a736f6e504b010214031400000008000000375d408bd695280000002600000013000000000000000000000080018d0000007061636b732f622f62756e646c652e6a736f6e504b010214031400000008000000375d43bfa6a304000000020000000d00000000000000000000008001e6000000636f6e74656e74732e6a736f6e504b010214031400000008000000375dc654b5910700000005000000110000000000000000000000800115010000484f572d544f2d5645524946592e747874504b010214031400000008000000375d47efbb750e0000000c00000011000000000000000000000080014b0100007265706f72742f524541444d452e747874504b010214031400000008000000375d04c0bed106000000040000000f00000000000000000000008001880100007265706f72742f6d656d6f2e706466504b010214031400000008000000375d88567fd66c000000a00000001100000000000000000000008001bb0100007265706f72742f6e65737465642e7a6970504b05060000000008000800f8010000560200000000",
|
|
392
|
+
"path": "case-4b19de.zip"
|
|
393
|
+
}
|
|
394
|
+
]
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"args": [
|
|
398
|
+
"p.zip"
|
|
399
|
+
],
|
|
400
|
+
"description": "Entries a reader refuses are listed as outside every pack and never read, even under the pack's logs/: an absolute name, a .. segment, a backslash, a symbolic link, a compression method other than stored or deflate, and an encrypted entry. A stored entry is read.",
|
|
401
|
+
"expected": {
|
|
402
|
+
"not_regular": [
|
|
403
|
+
"p//abs.json",
|
|
404
|
+
"p/logs/../up.json",
|
|
405
|
+
"p/logs/bz.json",
|
|
406
|
+
"p/logs/enc.json",
|
|
407
|
+
"p/logs/link.json",
|
|
408
|
+
"p/logs\\back.json"
|
|
409
|
+
],
|
|
410
|
+
"outside": [
|
|
411
|
+
"p//abs.json",
|
|
412
|
+
"p/logs/../up.json",
|
|
413
|
+
"p/logs/bz.json",
|
|
414
|
+
"p/logs/enc.json",
|
|
415
|
+
"p/logs/link.json",
|
|
416
|
+
"p/logs\\back.json"
|
|
417
|
+
],
|
|
418
|
+
"packs": [
|
|
419
|
+
{
|
|
420
|
+
"bundle_path": "p/bundle.json",
|
|
421
|
+
"content": {
|
|
422
|
+
"ok": "6f6b",
|
|
423
|
+
"stored": "73"
|
|
424
|
+
},
|
|
425
|
+
"ref": "p",
|
|
426
|
+
"unaccounted": []
|
|
427
|
+
}
|
|
428
|
+
]
|
|
429
|
+
},
|
|
430
|
+
"id": "zip-entries-refused",
|
|
431
|
+
"tree": [
|
|
432
|
+
{
|
|
433
|
+
"hex": "504b03041400000008000000375d408bd69528000000260000000b00000062756e646c652e6a736f6eab562a2e484d8e2f4b2d2acecccf53b2522a4ecccbcbcc4bd74b2dcb4c49cd4b4ed52f3354aa0500504b03041400000008000000375d47dddc7904000000020000000c0000006c6f67732f6f6b2e6a736f6ecbcf0600504b03041400000008000000375d43beb7e80300000001000000090000002f6162732e6a736f6e4b0400504b03041400000008000000375d3e6a6df203000000010000000f0000006c6f67732f2e2e2f75702e6a736f6e2b0500504b03041400000008000000375df9efbe7103000000010000000e0000006c6f67735c6261636b2e6a736f6e4b0200504b03041400000008000000375dfc2f6f4608000000060000000e0000006c6f67732f6c696e6b2e6a736f6e2b492c4a4f2d0100504b03041400000000000000375d0bcf0e1b0100000001000000100000006c6f67732f73746f7265642e6a736f6e73504b03042e0000000c000000375daf77d26225000000010000000c0000006c6f67732f627a2e6a736f6e425a68393141592653597ec98b7a00000000800010200021184682ee48a70a120fd9316f40504b03041400010008000000375d5a7adaef03000000010000000d0000006c6f67732f656e632e6a736f6e4b0500504b010214031400000008000000375d408bd69528000000260000000b000000000000000000000080010000000062756e646c652e6a736f6e504b010214031400000008000000375d47dddc7904000000020000000c00000000000000000000008001510000006c6f67732f6f6b2e6a736f6e504b010214031400000008000000375d43beb7e8030000000100000009000000000000000000000080017f0000002f6162732e6a736f6e504b010214031400000008000000375d3e6a6df203000000010000000f00000000000000000000008001a90000006c6f67732f2e2e2f75702e6a736f6e504b010214031400000008000000375df9efbe7103000000010000000e00000000000000000000008001d90000006c6f67735c6261636b2e6a736f6e504b010214031400000008000000375dfc2f6f4608000000060000000e0000000000000000000000ffa1080100006c6f67732f6c696e6b2e6a736f6e504b010214031400000000000000375d0bcf0e1b010000000100000010000000000000000000000080013c0100006c6f67732f73746f7265642e6a736f6e504b01022e032e0000000c000000375daf77d26225000000010000000c000000000000000000000080016b0100006c6f67732f627a2e6a736f6e504b010214031400010008000000375d5a7adaef03000000010000000d00000000000000000000008001ba0100006c6f67732f656e632e6a736f6e504b0506000000000900090012020000e80100000000",
|
|
434
|
+
"path": "p.zip"
|
|
435
|
+
}
|
|
436
|
+
]
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"args": [
|
|
440
|
+
"p.zip"
|
|
441
|
+
],
|
|
442
|
+
"description": "An entry whose bytes do not match the CRC-32 the archive records for them refuses the archive: which bytes are the file is not settled.",
|
|
443
|
+
"expected": {
|
|
444
|
+
"error": "<root>/p.zip holds bundle.json, which cannot be read",
|
|
445
|
+
"hint": null
|
|
446
|
+
},
|
|
447
|
+
"id": "zip-crc-mismatch",
|
|
448
|
+
"tree": [
|
|
449
|
+
{
|
|
450
|
+
"hex": "504b03041400000008000000215a418bd69528000000260000000b00000062756e646c652e6a736f6eab562a2e484d8e2f4b2d2acecccf53b2522a4ecccbcbcc4bd74b2dcb4c49cd4b4ed52f3354aa0500504b010214001400000008000000215a418bd69528000000260000000b000000000000000000000000000000000062756e646c652e6a736f6e504b0506000000000100010039000000510000000000",
|
|
451
|
+
"path": "p.zip"
|
|
452
|
+
}
|
|
453
|
+
]
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"args": [
|
|
457
|
+
"p.zip"
|
|
458
|
+
],
|
|
459
|
+
"description": "Data after the end of an entry's deflate stream, inside the size the archive records, refuses the archive: one zip library reads past it and another stops, so the two kernels would read two files.",
|
|
460
|
+
"expected": {
|
|
461
|
+
"error": "<root>/p.zip holds bundle.json, which cannot be read",
|
|
462
|
+
"hint": null
|
|
463
|
+
},
|
|
464
|
+
"id": "zip-trailing-deflate-data",
|
|
465
|
+
"tree": [
|
|
466
|
+
{
|
|
467
|
+
"hex": "504b03041400000008000000215a408bd6952d000000260000000b00000062756e646c652e6a736f6eab562a2e484d8e2f4b2d2acecccf53b2522a4ecccbcbcc4bd74b2dcb4c49cd4b4ed52f3354aa0500006a756e6b504b010214001400000008000000215a408bd6952d000000260000000b000000000000000000000000000000000062756e646c652e6a736f6e504b0506000000000100010039000000560000000000",
|
|
468
|
+
"path": "p.zip"
|
|
469
|
+
}
|
|
470
|
+
]
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"args": [
|
|
474
|
+
"p.zip"
|
|
475
|
+
],
|
|
476
|
+
"description": "An archive holding one name twice is refused whole: which of the two is the file is a choice two zip libraries make differently.",
|
|
477
|
+
"expected": {
|
|
478
|
+
"error": "<root>/p.zip holds bundle.json twice",
|
|
479
|
+
"hint": null
|
|
480
|
+
},
|
|
481
|
+
"id": "zip-name-twice",
|
|
482
|
+
"tree": [
|
|
483
|
+
{
|
|
484
|
+
"hex": "504b03041400000000000000375d408bd69526000000260000000b00000062756e646c652e6a736f6e7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d504b03041400000000000000375d43bfa6a302000000020000000b00000062756e646c652e6a736f6e7b7d504b010214031400000000000000375d408bd69526000000260000000b000000000000000000000080010000000062756e646c652e6a736f6e504b010214031400000000000000375d43bfa6a302000000020000000b000000000000000000000080014f00000062756e646c652e6a736f6e504b05060000000002000200720000007a0000000000",
|
|
485
|
+
"path": "p.zip"
|
|
486
|
+
}
|
|
487
|
+
]
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"args": [
|
|
491
|
+
"nope"
|
|
492
|
+
],
|
|
493
|
+
"description": "A path that does not exist.",
|
|
494
|
+
"expected": {
|
|
495
|
+
"error": "cannot read <root>/nope",
|
|
496
|
+
"hint": null
|
|
497
|
+
},
|
|
498
|
+
"id": "missing-argument",
|
|
499
|
+
"tree": []
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"args": [
|
|
503
|
+
"empty"
|
|
504
|
+
],
|
|
505
|
+
"description": "An empty folder. Refused, with no hint.",
|
|
506
|
+
"expected": {
|
|
507
|
+
"error": "No bundle.json found. An evidence pack contains bundle.json plus logs/.",
|
|
508
|
+
"hint": null
|
|
509
|
+
},
|
|
510
|
+
"id": "empty",
|
|
511
|
+
"tree": [
|
|
512
|
+
{
|
|
513
|
+
"dir": true,
|
|
514
|
+
"path": "empty"
|
|
515
|
+
}
|
|
516
|
+
]
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"args": [
|
|
520
|
+
"pack"
|
|
521
|
+
],
|
|
522
|
+
"description": "One pack folder: its ref is the folder's own name, which is how the page names the files of a dropped folder.",
|
|
523
|
+
"expected": {
|
|
524
|
+
"not_regular": [],
|
|
525
|
+
"outside": [
|
|
526
|
+
"pack/README"
|
|
527
|
+
],
|
|
528
|
+
"packs": [
|
|
529
|
+
{
|
|
530
|
+
"bundle_path": "pack/bundle.json",
|
|
531
|
+
"content": {
|
|
532
|
+
"e-1": "6f6e65"
|
|
533
|
+
},
|
|
534
|
+
"ref": "pack",
|
|
535
|
+
"unaccounted": []
|
|
536
|
+
}
|
|
537
|
+
]
|
|
538
|
+
},
|
|
539
|
+
"id": "one-pack-folder",
|
|
540
|
+
"tree": [
|
|
541
|
+
{
|
|
542
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
543
|
+
"path": "pack/bundle.json"
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"hex": "6f6e65",
|
|
547
|
+
"path": "pack/logs/e-1.json"
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"hex": "72",
|
|
551
|
+
"path": "pack/README"
|
|
552
|
+
}
|
|
553
|
+
]
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"args": [
|
|
557
|
+
"case"
|
|
558
|
+
],
|
|
559
|
+
"description": "A pack nested inside another pack's folder is its own pack, and a file belongs to the DEEPEST root whose bundle.json or logs/ it sits in. case/a/b/notes.txt is under case/a/ but not under its logs/, so it is outside, and case/a/logs/sub/z.json is under case/a's logs/ but nested, so it is unaccounted.",
|
|
560
|
+
"expected": {
|
|
561
|
+
"not_regular": [],
|
|
562
|
+
"outside": [
|
|
563
|
+
"case/a/b/notes.txt"
|
|
564
|
+
],
|
|
565
|
+
"packs": [
|
|
566
|
+
{
|
|
567
|
+
"bundle_path": "case/a/bundle.json",
|
|
568
|
+
"content": {
|
|
569
|
+
"x": "78"
|
|
570
|
+
},
|
|
571
|
+
"ref": "case/a",
|
|
572
|
+
"unaccounted": [
|
|
573
|
+
"logs/sub/z.json"
|
|
574
|
+
]
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
"bundle_path": "case/a/b/bundle.json",
|
|
578
|
+
"content": {
|
|
579
|
+
"y": "79"
|
|
580
|
+
},
|
|
581
|
+
"ref": "case/a/b",
|
|
582
|
+
"unaccounted": []
|
|
583
|
+
}
|
|
584
|
+
]
|
|
585
|
+
},
|
|
586
|
+
"id": "longest-root-wins",
|
|
587
|
+
"tree": [
|
|
588
|
+
{
|
|
589
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
590
|
+
"path": "case/a/bundle.json"
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"hex": "78",
|
|
594
|
+
"path": "case/a/logs/x.json"
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"hex": "7a",
|
|
598
|
+
"path": "case/a/logs/sub/z.json"
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
602
|
+
"path": "case/a/b/bundle.json"
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"hex": "79",
|
|
606
|
+
"path": "case/a/b/logs/y.json"
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"hex": "6e",
|
|
610
|
+
"path": "case/a/b/notes.txt"
|
|
611
|
+
}
|
|
612
|
+
]
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
"args": [
|
|
616
|
+
"case"
|
|
617
|
+
],
|
|
618
|
+
"description": "case/a/logs/bundle.json is a bundle.json, so case/a/logs/ is a root, and it is longer than case/a/, so that file is the second pack's and not a record of the first.",
|
|
619
|
+
"expected": {
|
|
620
|
+
"not_regular": [],
|
|
621
|
+
"outside": [],
|
|
622
|
+
"packs": [
|
|
623
|
+
{
|
|
624
|
+
"bundle_path": "case/a/bundle.json",
|
|
625
|
+
"content": {
|
|
626
|
+
"e": "65"
|
|
627
|
+
},
|
|
628
|
+
"ref": "case/a",
|
|
629
|
+
"unaccounted": []
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
"bundle_path": "case/a/logs/bundle.json",
|
|
633
|
+
"content": {},
|
|
634
|
+
"ref": "case/a/logs",
|
|
635
|
+
"unaccounted": []
|
|
636
|
+
}
|
|
637
|
+
]
|
|
638
|
+
},
|
|
639
|
+
"id": "bundle-under-logs-is-its-own-pack",
|
|
640
|
+
"tree": [
|
|
641
|
+
{
|
|
642
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
643
|
+
"path": "case/a/bundle.json"
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
647
|
+
"path": "case/a/logs/bundle.json"
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"hex": "65",
|
|
651
|
+
"path": "case/a/logs/e.json"
|
|
652
|
+
}
|
|
653
|
+
]
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"args": [
|
|
657
|
+
"case"
|
|
658
|
+
],
|
|
659
|
+
"description": "Roots and outside paths sort by UTF-16 code unit, JavaScript's default sort: U+1F600 is the surrogate pair D83D DE00, which sorts BEFORE U+FF01 although its code point is larger.",
|
|
660
|
+
"expected": {
|
|
661
|
+
"not_regular": [],
|
|
662
|
+
"outside": [
|
|
663
|
+
"case/z.txt",
|
|
664
|
+
"case/😀.txt",
|
|
665
|
+
"case/!.txt"
|
|
666
|
+
],
|
|
667
|
+
"packs": [
|
|
668
|
+
{
|
|
669
|
+
"bundle_path": "case/😀/bundle.json",
|
|
670
|
+
"content": {},
|
|
671
|
+
"ref": "case/😀",
|
|
672
|
+
"unaccounted": []
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
"bundle_path": "case/!/bundle.json",
|
|
676
|
+
"content": {},
|
|
677
|
+
"ref": "case/!",
|
|
678
|
+
"unaccounted": []
|
|
679
|
+
}
|
|
680
|
+
]
|
|
681
|
+
},
|
|
682
|
+
"id": "utf16-order",
|
|
683
|
+
"tree": [
|
|
684
|
+
{
|
|
685
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
686
|
+
"path": "case/!/bundle.json"
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
690
|
+
"path": "case/😀/bundle.json"
|
|
691
|
+
},
|
|
692
|
+
{
|
|
693
|
+
"hex": "",
|
|
694
|
+
"path": "case/!.txt"
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
"hex": "",
|
|
698
|
+
"path": "case/😀.txt"
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"hex": "",
|
|
702
|
+
"path": "case/z.txt"
|
|
703
|
+
}
|
|
704
|
+
]
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"args": [
|
|
708
|
+
"case"
|
|
709
|
+
],
|
|
710
|
+
"description": "What a record file is: logs/<id>.json, one level, the suffix matched exactly and at the very end. logs/a.json.json is the record a.json. A trailing newline after .json is not the end of the name. The event id __proto__ is kept as a record, because the kernels key content by a map. THE PAGE DIFFERS HERE, and it is the page's defect: its assemble() keys content by a plain object, so the assignment replaces the prototype and that record reads as undisclosed. A folder named bundle.json is not a pack.",
|
|
711
|
+
"expected": {
|
|
712
|
+
"not_regular": [],
|
|
713
|
+
"outside": [
|
|
714
|
+
"case/p/bundle.json\n",
|
|
715
|
+
"case/p/xbundle.json",
|
|
716
|
+
"case/q/bundle.json/x"
|
|
717
|
+
],
|
|
718
|
+
"packs": [
|
|
719
|
+
{
|
|
720
|
+
"bundle_path": "case/p/bundle.json",
|
|
721
|
+
"content": {
|
|
722
|
+
"__proto__": "32",
|
|
723
|
+
"a.json": "31"
|
|
724
|
+
},
|
|
725
|
+
"ref": "case/p",
|
|
726
|
+
"unaccounted": [
|
|
727
|
+
"logs/.json",
|
|
728
|
+
"logs/b.JSON",
|
|
729
|
+
"logs/c.json\n",
|
|
730
|
+
"logs/d/e.json"
|
|
731
|
+
]
|
|
732
|
+
}
|
|
733
|
+
]
|
|
734
|
+
},
|
|
735
|
+
"id": "record-file-names",
|
|
736
|
+
"tree": [
|
|
737
|
+
{
|
|
738
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
739
|
+
"path": "case/p/bundle.json"
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"hex": "31",
|
|
743
|
+
"path": "case/p/logs/a.json.json"
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"hex": "32",
|
|
747
|
+
"path": "case/p/logs/__proto__.json"
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"hex": "33",
|
|
751
|
+
"path": "case/p/logs/.json"
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
"hex": "34",
|
|
755
|
+
"path": "case/p/logs/b.JSON"
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
"hex": "35",
|
|
759
|
+
"path": "case/p/logs/c.json\n"
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"hex": "36",
|
|
763
|
+
"path": "case/p/logs/d/e.json"
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
"hex": "37",
|
|
767
|
+
"path": "case/p/bundle.json\n"
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"hex": "38",
|
|
771
|
+
"path": "case/p/xbundle.json"
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"hex": "39",
|
|
775
|
+
"path": "case/q/bundle.json/x"
|
|
776
|
+
}
|
|
777
|
+
]
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"args": [
|
|
781
|
+
"a",
|
|
782
|
+
"b"
|
|
783
|
+
],
|
|
784
|
+
"description": "Several folders are read as one folder holding them, each under its own name.",
|
|
785
|
+
"expected": {
|
|
786
|
+
"not_regular": [],
|
|
787
|
+
"outside": [],
|
|
788
|
+
"packs": [
|
|
789
|
+
{
|
|
790
|
+
"bundle_path": "a/bundle.json",
|
|
791
|
+
"content": {
|
|
792
|
+
"x": "78"
|
|
793
|
+
},
|
|
794
|
+
"ref": "a",
|
|
795
|
+
"unaccounted": []
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"bundle_path": "b/bundle.json",
|
|
799
|
+
"content": {},
|
|
800
|
+
"ref": "b",
|
|
801
|
+
"unaccounted": []
|
|
802
|
+
}
|
|
803
|
+
]
|
|
804
|
+
},
|
|
805
|
+
"id": "several-folders",
|
|
806
|
+
"tree": [
|
|
807
|
+
{
|
|
808
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
809
|
+
"path": "a/bundle.json"
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
"hex": "78",
|
|
813
|
+
"path": "a/logs/x.json"
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
817
|
+
"path": "b/bundle.json"
|
|
818
|
+
}
|
|
819
|
+
]
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
"args": [
|
|
823
|
+
"x/pack",
|
|
824
|
+
"y/pack"
|
|
825
|
+
],
|
|
826
|
+
"description": "Two folders that would land at one name refuse rather than merge.",
|
|
827
|
+
"expected": {
|
|
828
|
+
"error": "<root>/x/pack and <root>/y/pack would both be read as pack/; rename one",
|
|
829
|
+
"hint": null
|
|
830
|
+
},
|
|
831
|
+
"id": "several-folders-one-name",
|
|
832
|
+
"tree": [
|
|
833
|
+
{
|
|
834
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
835
|
+
"path": "x/pack/bundle.json"
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
839
|
+
"path": "y/pack/bundle.json"
|
|
840
|
+
}
|
|
841
|
+
]
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"args": [
|
|
845
|
+
"case"
|
|
846
|
+
],
|
|
847
|
+
"description": "No symbolic link is followed. A link to a file under a pack's logs/ is not a record, a link named bundle.json is not a pack, and a link to a folder, a loop and a dangling link are each listed once. Every link is outside every pack and in not_regular; none is opened.",
|
|
848
|
+
"expected": {
|
|
849
|
+
"not_regular": [
|
|
850
|
+
"case/dangling",
|
|
851
|
+
"case/elsewhere",
|
|
852
|
+
"case/loop",
|
|
853
|
+
"case/p/logs/f.json",
|
|
854
|
+
"case/q/bundle.json"
|
|
855
|
+
],
|
|
856
|
+
"outside": [
|
|
857
|
+
"case/dangling",
|
|
858
|
+
"case/elsewhere",
|
|
859
|
+
"case/loop",
|
|
860
|
+
"case/p/logs/f.json",
|
|
861
|
+
"case/q/bundle.json",
|
|
862
|
+
"case/secret.txt"
|
|
863
|
+
],
|
|
864
|
+
"packs": [
|
|
865
|
+
{
|
|
866
|
+
"bundle_path": "case/p/bundle.json",
|
|
867
|
+
"content": {
|
|
868
|
+
"e": "65"
|
|
869
|
+
},
|
|
870
|
+
"ref": "case/p",
|
|
871
|
+
"unaccounted": []
|
|
872
|
+
}
|
|
873
|
+
]
|
|
874
|
+
},
|
|
875
|
+
"id": "symlinks-listed-outside-not-read",
|
|
876
|
+
"tree": [
|
|
877
|
+
{
|
|
878
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
879
|
+
"path": "case/p/bundle.json"
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
"hex": "65",
|
|
883
|
+
"path": "case/p/logs/e.json"
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
"path": "case/p/logs/f.json",
|
|
887
|
+
"symlink": "../../secret.txt"
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
"hex": "73",
|
|
891
|
+
"path": "case/secret.txt"
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"path": "case/q/bundle.json",
|
|
895
|
+
"symlink": "../p/bundle.json"
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
"path": "case/loop",
|
|
899
|
+
"symlink": "."
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
"path": "case/dangling",
|
|
903
|
+
"symlink": "nowhere"
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"path": "case/elsewhere",
|
|
907
|
+
"symlink": "../outside-the-case"
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
911
|
+
"path": "outside-the-case/bundle.json"
|
|
912
|
+
}
|
|
913
|
+
]
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
"args": [
|
|
917
|
+
"link"
|
|
918
|
+
],
|
|
919
|
+
"description": "A link named on the command line is not followed either.",
|
|
920
|
+
"expected": {
|
|
921
|
+
"error": "<root>/link is a symbolic link, which case does not follow; pass the folder it points to",
|
|
922
|
+
"hint": null
|
|
923
|
+
},
|
|
924
|
+
"id": "symlink-argument-refused",
|
|
925
|
+
"tree": [
|
|
926
|
+
{
|
|
927
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
928
|
+
"path": "real/bundle.json"
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
"path": "link",
|
|
932
|
+
"symlink": "real"
|
|
933
|
+
}
|
|
934
|
+
]
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
"args": [
|
|
938
|
+
"link/"
|
|
939
|
+
],
|
|
940
|
+
"description": "A trailing slash does not turn a link into a folder: the name is checked without it.",
|
|
941
|
+
"expected": {
|
|
942
|
+
"error": "<root>/link/ is a symbolic link, which case does not follow; pass the folder it points to",
|
|
943
|
+
"hint": null
|
|
944
|
+
},
|
|
945
|
+
"id": "symlink-argument-trailing-slash",
|
|
946
|
+
"tree": [
|
|
947
|
+
{
|
|
948
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
949
|
+
"path": "real/bundle.json"
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
"path": "link",
|
|
953
|
+
"symlink": "real"
|
|
954
|
+
}
|
|
955
|
+
]
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"args": [
|
|
959
|
+
"case"
|
|
960
|
+
],
|
|
961
|
+
"description": "A folder 32 levels below the argument is read, and a file inside it is listed.",
|
|
962
|
+
"expected": {
|
|
963
|
+
"not_regular": [],
|
|
964
|
+
"outside": [
|
|
965
|
+
"case/d1/d2/d3/d4/d5/d6/d7/d8/d9/d10/d11/d12/d13/d14/d15/d16/d17/d18/d19/d20/d21/d22/d23/d24/d25/d26/d27/d28/d29/d30/d31/d32/x.txt"
|
|
966
|
+
],
|
|
967
|
+
"packs": [
|
|
968
|
+
{
|
|
969
|
+
"bundle_path": "case/p/bundle.json",
|
|
970
|
+
"content": {},
|
|
971
|
+
"ref": "case/p",
|
|
972
|
+
"unaccounted": []
|
|
973
|
+
}
|
|
974
|
+
]
|
|
975
|
+
},
|
|
976
|
+
"id": "depth-at-the-limit",
|
|
977
|
+
"tree": [
|
|
978
|
+
{
|
|
979
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
980
|
+
"path": "case/p/bundle.json"
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
"hex": "78",
|
|
984
|
+
"path": "case/d1/d2/d3/d4/d5/d6/d7/d8/d9/d10/d11/d12/d13/d14/d15/d16/d17/d18/d19/d20/d21/d22/d23/d24/d25/d26/d27/d28/d29/d30/d31/d32/x.txt"
|
|
985
|
+
}
|
|
986
|
+
]
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
"args": [
|
|
990
|
+
"case"
|
|
991
|
+
],
|
|
992
|
+
"description": "A folder 33 levels below the argument refuses the whole input, beside an honest pack.",
|
|
993
|
+
"expected": {
|
|
994
|
+
"error": "<root>/case is nested more than 32 folders deep; refusing to read it",
|
|
995
|
+
"hint": null
|
|
996
|
+
},
|
|
997
|
+
"id": "depth-over-the-limit",
|
|
998
|
+
"tree": [
|
|
999
|
+
{
|
|
1000
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
1001
|
+
"path": "case/p/bundle.json"
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
"dir": true,
|
|
1005
|
+
"path": "case/d1/d2/d3/d4/d5/d6/d7/d8/d9/d10/d11/d12/d13/d14/d15/d16/d17/d18/d19/d20/d21/d22/d23/d24/d25/d26/d27/d28/d29/d30/d31/d32/d33"
|
|
1006
|
+
}
|
|
1007
|
+
]
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
"args": [
|
|
1011
|
+
"case"
|
|
1012
|
+
],
|
|
1013
|
+
"description": "Exactly 50000 names are listed (case/: many and p; p/: bundle.json; many/: 49997 files), and the input is read. outside_count stands in for a list this long.",
|
|
1014
|
+
"expected": {
|
|
1015
|
+
"not_regular": [],
|
|
1016
|
+
"outside_count": 49997,
|
|
1017
|
+
"packs": [
|
|
1018
|
+
{
|
|
1019
|
+
"bundle_path": "case/p/bundle.json",
|
|
1020
|
+
"content": {},
|
|
1021
|
+
"ref": "case/p",
|
|
1022
|
+
"unaccounted": []
|
|
1023
|
+
}
|
|
1024
|
+
]
|
|
1025
|
+
},
|
|
1026
|
+
"id": "entries-at-the-limit",
|
|
1027
|
+
"tree": [
|
|
1028
|
+
{
|
|
1029
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
1030
|
+
"path": "case/p/bundle.json"
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
"files": 49997,
|
|
1034
|
+
"fill": "case/many"
|
|
1035
|
+
}
|
|
1036
|
+
]
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
"args": [
|
|
1040
|
+
"case"
|
|
1041
|
+
],
|
|
1042
|
+
"description": "One name more than 50000 refuses the whole input.",
|
|
1043
|
+
"expected": {
|
|
1044
|
+
"error": "<root>/case holds more than 50000 files and folders; refusing to read it",
|
|
1045
|
+
"hint": null
|
|
1046
|
+
},
|
|
1047
|
+
"id": "entries-over-the-limit",
|
|
1048
|
+
"tree": [
|
|
1049
|
+
{
|
|
1050
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
1051
|
+
"path": "case/p/bundle.json"
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
"files": 49998,
|
|
1055
|
+
"fill": "case/many"
|
|
1056
|
+
}
|
|
1057
|
+
]
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
"args": [
|
|
1061
|
+
"case"
|
|
1062
|
+
],
|
|
1063
|
+
"description": "A name that is not valid UTF-8 refuses the whole input. It is not escaped and not replaced by U+FFFD, because two different names would then read as one.",
|
|
1064
|
+
"expected": {
|
|
1065
|
+
"error": "case holds a name that is not valid UTF-8; rename it, then run case again",
|
|
1066
|
+
"hint": null
|
|
1067
|
+
},
|
|
1068
|
+
"id": "name-not-utf8",
|
|
1069
|
+
"tree": [
|
|
1070
|
+
{
|
|
1071
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
1072
|
+
"path": "case/p/bundle.json"
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"hex": "6e",
|
|
1076
|
+
"path_hex": "636173652f6e6f7465732dff2e747874"
|
|
1077
|
+
}
|
|
1078
|
+
]
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
"args": [
|
|
1082
|
+
"case"
|
|
1083
|
+
],
|
|
1084
|
+
"description": "The same under a pack's logs/, where it would otherwise be a record (an encoded surrogate, ED A0 80, is not UTF-8). The message names the folder that holds it.",
|
|
1085
|
+
"expected": {
|
|
1086
|
+
"error": "case/p/logs holds a name that is not valid UTF-8; rename it, then run case again",
|
|
1087
|
+
"hint": null
|
|
1088
|
+
},
|
|
1089
|
+
"id": "name-not-utf8-under-logs",
|
|
1090
|
+
"tree": [
|
|
1091
|
+
{
|
|
1092
|
+
"hex": "7b22737065635f76657273696f6e223a2273616e6e696e672e65766964656e63652f7631227d",
|
|
1093
|
+
"path": "case/p/bundle.json"
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
"hex": "72",
|
|
1097
|
+
"path_hex": "636173652f702f6c6f67732feda0802e6a736f6e"
|
|
1098
|
+
}
|
|
1099
|
+
]
|
|
1100
|
+
}
|
|
1101
|
+
]
|
|
1102
|
+
}
|