probatio 0.1.3 → 0.3.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.
Files changed (55) hide show
  1. package/README.md +93 -8
  2. package/dist/cli.js +136 -6
  3. package/dist/contract.js +2 -1
  4. package/dist/golden/record.js +395 -0
  5. package/dist/golden/recorder.mjs +78 -0
  6. package/dist/ledger/build.js +21 -0
  7. package/dist/ledger/check.js +133 -0
  8. package/dist/mcp.js +76 -27
  9. package/dist/mutate/child-lines.mjs +23 -18
  10. package/dist/mutate/fail-reporter.mjs +21 -0
  11. package/dist/mutate/find.js +3 -3
  12. package/dist/mutate/generate.js +5 -2
  13. package/dist/mutate/load-failure.mjs +40 -0
  14. package/dist/mutate/mocha-coverage.cjs +7 -1
  15. package/dist/mutate/node-batch-loader.mjs +15 -1
  16. package/dist/mutate/node-batch.mjs +40 -3
  17. package/dist/mutate/node-coverage.mjs +7 -32
  18. package/dist/mutate/operators.js +60 -1
  19. package/dist/mutate/patch.js +2 -1
  20. package/dist/mutate/precise-lines.mjs +147 -31
  21. package/dist/mutate/probatio-jacoco-run.java +2 -2
  22. package/dist/mutate/project-config.js +58 -0
  23. package/dist/mutate/run.js +100 -19
  24. package/dist/mutate/sealed.js +54 -0
  25. package/dist/mutate/suite-decision.js +2 -1
  26. package/dist/mutate/suites.js +87 -155
  27. package/dist/mutate/tally.js +54 -26
  28. package/dist/mutate/text-operators.js +92 -2
  29. package/dist/swarm/check-kill.js +14 -7
  30. package/dist/verify/change.js +1 -1
  31. package/package.json +8 -4
  32. package/schemas/check-kill.schema.json +93 -0
  33. package/schemas/findings.add.schema.json +53 -0
  34. package/schemas/gap.fix.schema.json +53 -0
  35. package/schemas/gap.revert.schema.json +53 -0
  36. package/schemas/golden.check.schema.json +89 -0
  37. package/schemas/golden.compare.schema.json +151 -0
  38. package/schemas/golden.record.schema.json +126 -0
  39. package/schemas/guard.check.schema.json +53 -0
  40. package/schemas/ledger.build.schema.json +132 -0
  41. package/schemas/ledger.check.schema.json +143 -0
  42. package/schemas/matrix.report.schema.json +129 -0
  43. package/schemas/mcp.schema.json +53 -0
  44. package/schemas/mutate.generate.schema.json +127 -0
  45. package/schemas/mutate.help.schema.json +53 -0
  46. package/schemas/mutate.run.schema.json +272 -0
  47. package/schemas/mutate.sealed.schema.json +53 -0
  48. package/schemas/mutate.tally.schema.json +137 -0
  49. package/schemas/queue.claim.schema.json +53 -0
  50. package/schemas/queue.reap.schema.json +71 -0
  51. package/schemas/queue.seed.schema.json +71 -0
  52. package/schemas/schema.schema.json +74 -0
  53. package/schemas/seal.schema.json +69 -0
  54. package/schemas/status.schema.json +103 -0
  55. package/schemas/verify-change.schema.json +222 -0
@@ -0,0 +1,71 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/IronAdamant/Probatio/blob/main/schemas/queue.reap.schema.json",
4
+ "title": "probatio queue.reap",
5
+ "description": "Moves expired claims back to the queue. Every command prints one JSON object. schemaVersion changes when a field is renamed, removed, or changes meaning. A new field does not change it.",
6
+ "type": "object",
7
+ "required": [
8
+ "schemaVersion",
9
+ "ok",
10
+ "command",
11
+ "summary",
12
+ "next",
13
+ "nextCall"
14
+ ],
15
+ "properties": {
16
+ "schemaVersion": {
17
+ "const": 2
18
+ },
19
+ "ok": {
20
+ "type": "boolean"
21
+ },
22
+ "command": {
23
+ "const": "queue.reap"
24
+ },
25
+ "summary": {
26
+ "type": "string"
27
+ },
28
+ "next": {
29
+ "type": "string"
30
+ },
31
+ "nextCall": {
32
+ "oneOf": [
33
+ {
34
+ "type": "null"
35
+ },
36
+ {
37
+ "type": "object",
38
+ "properties": {
39
+ "argv": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string"
43
+ }
44
+ }
45
+ },
46
+ "required": [
47
+ "argv"
48
+ ]
49
+ }
50
+ ]
51
+ },
52
+ "returned": {
53
+ "type": "array",
54
+ "items": {
55
+ "type": "string"
56
+ }
57
+ }
58
+ },
59
+ "if": {
60
+ "properties": {
61
+ "ok": {
62
+ "const": true
63
+ }
64
+ }
65
+ },
66
+ "then": {
67
+ "required": [
68
+ "returned"
69
+ ]
70
+ }
71
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/IronAdamant/Probatio/blob/main/schemas/queue.seed.schema.json",
4
+ "title": "probatio queue.seed",
5
+ "description": "Writes one queue item per gap. Every command prints one JSON object. schemaVersion changes when a field is renamed, removed, or changes meaning. A new field does not change it.",
6
+ "type": "object",
7
+ "required": [
8
+ "schemaVersion",
9
+ "ok",
10
+ "command",
11
+ "summary",
12
+ "next",
13
+ "nextCall"
14
+ ],
15
+ "properties": {
16
+ "schemaVersion": {
17
+ "const": 2
18
+ },
19
+ "ok": {
20
+ "type": "boolean"
21
+ },
22
+ "command": {
23
+ "const": "queue.seed"
24
+ },
25
+ "summary": {
26
+ "type": "string"
27
+ },
28
+ "next": {
29
+ "type": "string"
30
+ },
31
+ "nextCall": {
32
+ "oneOf": [
33
+ {
34
+ "type": "null"
35
+ },
36
+ {
37
+ "type": "object",
38
+ "properties": {
39
+ "argv": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string"
43
+ }
44
+ }
45
+ },
46
+ "required": [
47
+ "argv"
48
+ ]
49
+ }
50
+ ]
51
+ },
52
+ "seeded": {
53
+ "type": "array",
54
+ "items": {
55
+ "type": "string"
56
+ }
57
+ }
58
+ },
59
+ "if": {
60
+ "properties": {
61
+ "ok": {
62
+ "const": true
63
+ }
64
+ }
65
+ },
66
+ "then": {
67
+ "required": [
68
+ "seeded"
69
+ ]
70
+ }
71
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/IronAdamant/Probatio/blob/main/schemas/schema.schema.json",
4
+ "title": "probatio schema",
5
+ "description": "Prints the JSON Schema for one command, or lists the commands that have one. Every command prints one JSON object. schemaVersion changes when a field is renamed, removed, or changes meaning. A new field does not change it.",
6
+ "type": "object",
7
+ "required": [
8
+ "schemaVersion",
9
+ "ok",
10
+ "command",
11
+ "summary",
12
+ "next",
13
+ "nextCall"
14
+ ],
15
+ "properties": {
16
+ "schemaVersion": {
17
+ "const": 2
18
+ },
19
+ "ok": {
20
+ "type": "boolean"
21
+ },
22
+ "command": {
23
+ "const": "schema"
24
+ },
25
+ "summary": {
26
+ "type": "string"
27
+ },
28
+ "next": {
29
+ "type": "string"
30
+ },
31
+ "nextCall": {
32
+ "oneOf": [
33
+ {
34
+ "type": "null"
35
+ },
36
+ {
37
+ "type": "object",
38
+ "properties": {
39
+ "argv": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string"
43
+ }
44
+ }
45
+ },
46
+ "required": [
47
+ "argv"
48
+ ]
49
+ }
50
+ ]
51
+ },
52
+ "schema": {
53
+ "type": "object"
54
+ },
55
+ "commands": {
56
+ "type": "array",
57
+ "items": {
58
+ "type": "string"
59
+ }
60
+ }
61
+ },
62
+ "if": {
63
+ "properties": {
64
+ "ok": {
65
+ "const": true
66
+ }
67
+ }
68
+ },
69
+ "then": {
70
+ "required": [
71
+ "commands"
72
+ ]
73
+ }
74
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/IronAdamant/Probatio/blob/main/schemas/seal.schema.json",
4
+ "title": "probatio seal",
5
+ "description": "Writes the sealed slice that gap-fixing agents do not see. Every command prints one JSON object. schemaVersion changes when a field is renamed, removed, or changes meaning. A new field does not change it.",
6
+ "type": "object",
7
+ "required": [
8
+ "schemaVersion",
9
+ "ok",
10
+ "command",
11
+ "summary",
12
+ "next",
13
+ "nextCall"
14
+ ],
15
+ "properties": {
16
+ "schemaVersion": {
17
+ "const": 2
18
+ },
19
+ "ok": {
20
+ "type": "boolean"
21
+ },
22
+ "command": {
23
+ "const": "seal"
24
+ },
25
+ "summary": {
26
+ "type": "string"
27
+ },
28
+ "next": {
29
+ "type": "string"
30
+ },
31
+ "nextCall": {
32
+ "oneOf": [
33
+ {
34
+ "type": "null"
35
+ },
36
+ {
37
+ "type": "object",
38
+ "properties": {
39
+ "argv": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string"
43
+ }
44
+ }
45
+ },
46
+ "required": [
47
+ "argv"
48
+ ]
49
+ }
50
+ ]
51
+ },
52
+ "sealedCount": {
53
+ "type": "integer",
54
+ "minimum": 0
55
+ }
56
+ },
57
+ "if": {
58
+ "properties": {
59
+ "ok": {
60
+ "const": true
61
+ }
62
+ }
63
+ },
64
+ "then": {
65
+ "required": [
66
+ "sealedCount"
67
+ ]
68
+ }
69
+ }
@@ -0,0 +1,103 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/IronAdamant/Probatio/blob/main/schemas/status.schema.json",
4
+ "title": "probatio status",
5
+ "description": "The state PROBATIO.md is written from. Every command prints one JSON object. schemaVersion changes when a field is renamed, removed, or changes meaning. A new field does not change it.",
6
+ "type": "object",
7
+ "required": [
8
+ "schemaVersion",
9
+ "ok",
10
+ "command",
11
+ "summary",
12
+ "next",
13
+ "nextCall"
14
+ ],
15
+ "properties": {
16
+ "schemaVersion": {
17
+ "const": 2
18
+ },
19
+ "ok": {
20
+ "type": "boolean"
21
+ },
22
+ "command": {
23
+ "const": "status"
24
+ },
25
+ "summary": {
26
+ "type": "string"
27
+ },
28
+ "next": {
29
+ "type": "string"
30
+ },
31
+ "nextCall": {
32
+ "oneOf": [
33
+ {
34
+ "type": "null"
35
+ },
36
+ {
37
+ "type": "object",
38
+ "properties": {
39
+ "argv": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string"
43
+ }
44
+ }
45
+ },
46
+ "required": [
47
+ "argv"
48
+ ]
49
+ }
50
+ ]
51
+ },
52
+ "gaps": {
53
+ "type": "array"
54
+ },
55
+ "decisions": {
56
+ "type": "array"
57
+ },
58
+ "findings": {
59
+ "type": "array"
60
+ },
61
+ "protectedGuards": {
62
+ "type": "array",
63
+ "items": {
64
+ "type": "string"
65
+ }
66
+ },
67
+ "recentFixes": {
68
+ "type": "array"
69
+ },
70
+ "regressions": {
71
+ "type": "array"
72
+ },
73
+ "agent": {
74
+ "type": "string"
75
+ },
76
+ "rest": {
77
+ "type": "integer",
78
+ "minimum": 0
79
+ },
80
+ "sealedCount": {
81
+ "type": "integer",
82
+ "minimum": 0
83
+ }
84
+ },
85
+ "if": {
86
+ "properties": {
87
+ "ok": {
88
+ "const": true
89
+ }
90
+ }
91
+ },
92
+ "then": {
93
+ "required": [
94
+ "gaps",
95
+ "decisions",
96
+ "findings",
97
+ "protectedGuards",
98
+ "recentFixes",
99
+ "regressions",
100
+ "rest"
101
+ ]
102
+ }
103
+ }
@@ -0,0 +1,222 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/IronAdamant/Probatio/blob/main/schemas/verify-change.schema.json",
4
+ "title": "probatio verify-change",
5
+ "description": "Mutates the changed lines and reports caught, missed, and not run. Every command prints one JSON object. schemaVersion changes when a field is renamed, removed, or changes meaning. A new field does not change it.",
6
+ "type": "object",
7
+ "required": [
8
+ "schemaVersion",
9
+ "ok",
10
+ "command",
11
+ "summary",
12
+ "next",
13
+ "nextCall"
14
+ ],
15
+ "properties": {
16
+ "schemaVersion": {
17
+ "const": 2
18
+ },
19
+ "ok": {
20
+ "type": "boolean"
21
+ },
22
+ "command": {
23
+ "const": "verify-change"
24
+ },
25
+ "summary": {
26
+ "type": "string"
27
+ },
28
+ "next": {
29
+ "type": "string"
30
+ },
31
+ "nextCall": {
32
+ "oneOf": [
33
+ {
34
+ "type": "null"
35
+ },
36
+ {
37
+ "type": "object",
38
+ "properties": {
39
+ "argv": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "string"
43
+ }
44
+ }
45
+ },
46
+ "required": [
47
+ "argv"
48
+ ]
49
+ }
50
+ ]
51
+ },
52
+ "affected": {
53
+ "type": "array",
54
+ "items": {
55
+ "type": "string"
56
+ }
57
+ },
58
+ "ran": {
59
+ "type": "array",
60
+ "items": {
61
+ "type": "string"
62
+ }
63
+ },
64
+ "notRan": {
65
+ "type": "array",
66
+ "items": {
67
+ "type": "string"
68
+ }
69
+ },
70
+ "executed": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "string"
74
+ }
75
+ },
76
+ "caught": {
77
+ "type": "array",
78
+ "items": {
79
+ "type": "object",
80
+ "properties": {
81
+ "id": {
82
+ "type": "string"
83
+ },
84
+ "file": {
85
+ "type": "string"
86
+ },
87
+ "line": {
88
+ "type": "integer",
89
+ "minimum": 0
90
+ },
91
+ "op": {
92
+ "type": "string"
93
+ }
94
+ },
95
+ "required": [
96
+ "id",
97
+ "file",
98
+ "line"
99
+ ]
100
+ }
101
+ },
102
+ "missed": {
103
+ "type": "array",
104
+ "items": {
105
+ "type": "object",
106
+ "properties": {
107
+ "id": {
108
+ "type": "string"
109
+ },
110
+ "file": {
111
+ "type": "string"
112
+ },
113
+ "line": {
114
+ "type": "integer",
115
+ "minimum": 0
116
+ },
117
+ "op": {
118
+ "type": "string"
119
+ }
120
+ },
121
+ "required": [
122
+ "id",
123
+ "file",
124
+ "line"
125
+ ]
126
+ }
127
+ },
128
+ "other": {
129
+ "type": "array",
130
+ "items": {
131
+ "type": "object",
132
+ "properties": {
133
+ "id": {
134
+ "type": "string"
135
+ },
136
+ "outcome": {
137
+ "type": "string"
138
+ },
139
+ "file": {
140
+ "type": "string"
141
+ },
142
+ "line": {
143
+ "type": "integer",
144
+ "minimum": 0
145
+ }
146
+ },
147
+ "required": [
148
+ "id",
149
+ "outcome"
150
+ ]
151
+ }
152
+ },
153
+ "notRun": {
154
+ "type": "array",
155
+ "items": {
156
+ "type": "object",
157
+ "properties": {
158
+ "id": {
159
+ "type": "string"
160
+ },
161
+ "file": {
162
+ "type": "string"
163
+ },
164
+ "line": {
165
+ "type": "integer",
166
+ "minimum": 0
167
+ },
168
+ "op": {
169
+ "type": "string"
170
+ }
171
+ },
172
+ "required": [
173
+ "id",
174
+ "file",
175
+ "line"
176
+ ]
177
+ }
178
+ },
179
+ "goldenContract": {
180
+ "type": "array"
181
+ },
182
+ "rest": {
183
+ "type": "integer",
184
+ "minimum": 0
185
+ },
186
+ "suiteCommand": {
187
+ "type": "string"
188
+ },
189
+ "confirmed": {
190
+ "type": "boolean"
191
+ },
192
+ "operators": {
193
+ "enum": [
194
+ "core",
195
+ "wide"
196
+ ]
197
+ },
198
+ "full": {
199
+ "type": "string"
200
+ }
201
+ },
202
+ "if": {
203
+ "properties": {
204
+ "ok": {
205
+ "const": true
206
+ }
207
+ }
208
+ },
209
+ "then": {
210
+ "required": [
211
+ "affected",
212
+ "ran",
213
+ "caught",
214
+ "missed",
215
+ "other",
216
+ "notRun",
217
+ "goldenContract",
218
+ "rest",
219
+ "operators"
220
+ ]
221
+ }
222
+ }