@fro.bot/systematic 3.25.1 → 3.26.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fro.bot/systematic",
3
- "version": "3.25.1",
3
+ "version": "3.26.0",
4
4
  "description": "Compound-engineering loops for OpenCode, Pi, and Claude Code",
5
5
  "type": "module",
6
6
  "homepage": "https://fro.bot/systematic",
@@ -133,6 +133,7 @@
133
133
  "brace-expansion": "^5.0.8",
134
134
  "conventional-changelog-writer": ">=9",
135
135
  "devalue": "^5.9.3",
136
+ "dompurify": "~3.4.17",
136
137
  "fast-uri": "~3.1.7",
137
138
  "markdown-it": "~14.3.3",
138
139
  "smol-toml": "~1.9.0",
@@ -520,8 +520,8 @@ A helper failure (`prepare` or `merge` exiting 1 or 2) is never permission to ha
520
520
 
521
521
  Dispatch validators for exactly the findings `merge`'s `validator_requests` names -- the P0/P1-or-`requires_verification` gating band is already computed; Stage 5b no longer identifies the gated set by hand.
522
522
 
523
- 1. For each entry in `validator_requests`, spawn one validator subagent in parallel using the validator template at `references/validator-template.md`. Look up that finding's full fields (title, why_it_matters, evidence, file, line, severity, autofix_class, owner, suggested_fix) from `merge`'s `merged_findings` by `finding_id`, and pass them along with the intent summary, file list, and full diff.
524
- 2. Collect `{outcome: 'true'|'false'|'failed'|'unavailable', reason?}` from each validator, keyed by `finding_id`. `outcome: 'true'` needs no reason; the other three outcomes each require one.
523
+ 1. For each entry in `validator_requests`, spawn one validator subagent in parallel with the others in its batch, using the validator template at `references/validator-template.md`. Dispatch in bounded batches, sized to what the harness handles reliably. Each batch runs in parallel and finishes before the next starts. Look up that finding's full fields (title, why_it_matters, evidence, file, line, severity, autofix_class, owner, suggested_fix) from `merge`'s `merged_findings` by `finding_id`, and pass them along with the intent summary, file list, and full diff.
524
+ 2. Collect `{outcome: 'true'|'false'|'failed'|'unavailable', reason?}` from each validator, keyed by `finding_id`. `outcome: 'true'` needs no reason; the other three outcomes each require one. Every request needs a result: a subagent that returns nothing, or an answer that is not one of these outcomes, is recorded as `unavailable` with a reason.
525
525
  3. Carry every result forward as `validator_lifecycle_results` into `finalize` (Stage 6). Do not reconcile filtered findings, update ledger dispositions, or recompute the "Filtered (not validated)" group by hand -- `finalize` derives all of it from these results plus `merge`'s output.
526
526
 
527
527
  **Outcome semantics** (enforced by `finalize`, not the model): `true` validates the finding -- it flows to Stage 6 unchanged. `false` filters the finding -- it drops out of the surviving/actioned set, receives disposition `filtered` with the validator's exact one-sentence reason, and appears in the "Filtered (not validated)" group. `failed` and `unavailable` leave the finding actionable and unvalidated (no `validated` annotation; it appears in the normal severity tables) but each records a lifecycle failure that marks the run `degraded` and blocks a clean verdict -- report the failed/unavailable validator in Coverage rather than silently treating it as validated.
@@ -23,10 +23,45 @@ exit 2 is a launch failure, not a payload problem. On exit 1 (the input
23
23
  was structurally rejected), the parent may correct its own JSON envelope
24
24
  exactly once -- fixing a genuine encoding mistake, never reshaping the
25
25
  envelope to force acceptance -- and retry; a second exit 1 stops the run
26
- visibly with degraded or abnormal status. Never fall back to writing a
26
+ visibly with degraded or abnormal status. An exit 1 whose message says the
27
+ input exceeds the aggregate byte cap is not an encoding mistake: do not retry
28
+ the same bytes, and do not shrink the payload to fit. Stop visibly and report
29
+ the cap the message names. Never fall back to writing a
27
30
  finding, a merged finding, a queue, a disposition count, or a report section
28
31
  by hand because a phase call failed.
29
32
 
33
+ ## Rejection output
34
+
35
+ An exit 1 from `prepare`, `merge` or `finalize` prints one of four shapes on
36
+ stderr:
37
+
38
+ - **Schema rejection.** `<phase> rejected the aggregate envelope: <reason>`,
39
+ then up to eight `path code` lines, then `… and N more` when more issues
40
+ were found.
41
+ - **Rejection of the content.** One line,
42
+ `<phase> rejected the aggregate envelope: <reason> at <path>`. Malformed JSON
43
+ is this shape too, with the reason `malformed JSON` and the path `$`.
44
+ - **Byte cap.** One bare line, `<phase> input exceeds the aggregate byte cap
45
+ (16842752 bytes)`. It names the cap and carries no reason or path.
46
+ - **Invalid UTF-8.** One bare line, `<phase> input is not valid UTF-8`.
47
+
48
+ `path` points into the envelope and `code` is a schema issue code. No payload
49
+ value, key name or issue message is printed, so the lines are safe to quote
50
+ in Coverage and are enough to locate the field to correct.
51
+
52
+ The artifact validators (`artifact` here, `validate-review-artifact` in the
53
+ CLI) print `Review artifact failed schema validation: N issue(s)` with the full
54
+ issue count, a `Schema:` line, and the same bounded `path code` lines, then
55
+ `… and N more` when more were found. An issue the schema authors wrote a
56
+ message for (a `custom` issue) carries that one authored message after its
57
+ code, as `path custom: <message>`; no other issue prints a message.
58
+
59
+ Validators installed before the run-level limits were raised reject artifacts
60
+ with more than 32 findings or other run-level entries. Schema version 1 is
61
+ unchanged, so an older artifact still validates. If an older external
62
+ validator rejects a large artifact on a count, that is a version mismatch to
63
+ report, not a malformed artifact: update the validator.
64
+
30
65
  ## screen
31
66
 
32
67
  Structurally admits one persona's raw return and binds it to the dispatched
@@ -7,7 +7,7 @@
7
7
  "type": "object",
8
8
  "properties": {
9
9
  "decisions": {
10
- "maxItems": 32,
10
+ "maxItems": 2048,
11
11
  "type": "array",
12
12
  "items": {
13
13
  "oneOf": [
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "input_finding_ids": {
28
28
  "minItems": 2,
29
- "maxItems": 32,
29
+ "maxItems": 2048,
30
30
  "type": "array",
31
31
  "items": {
32
32
  "type": "string",
@@ -363,7 +363,7 @@
363
363
  "pattern": "\\S"
364
364
  },
365
365
  "results": {
366
- "maxItems": 32,
366
+ "maxItems": 2048,
367
367
  "type": "array",
368
368
  "items": {
369
369
  "type": "object",
@@ -212,7 +212,7 @@
212
212
  }
213
213
  },
214
214
  "findings": {
215
- "maxItems": 32,
215
+ "maxItems": 2048,
216
216
  "type": "array",
217
217
  "items": {
218
218
  "type": "object",
@@ -350,7 +350,7 @@
350
350
  },
351
351
  "input_finding_ids": {
352
352
  "minItems": 1,
353
- "maxItems": 32,
353
+ "maxItems": 2048,
354
354
  "type": "array",
355
355
  "items": {
356
356
  "type": "string",
@@ -412,7 +412,7 @@
412
412
  }
413
413
  },
414
414
  "declined_merges": {
415
- "maxItems": 32,
415
+ "maxItems": 2048,
416
416
  "type": "array",
417
417
  "items": {
418
418
  "type": "object",
@@ -434,7 +434,7 @@
434
434
  },
435
435
  "input_finding_ids": {
436
436
  "minItems": 2,
437
- "maxItems": 32,
437
+ "maxItems": 2048,
438
438
  "type": "array",
439
439
  "items": {
440
440
  "type": "string",
@@ -517,7 +517,7 @@
517
517
  "additionalProperties": false
518
518
  },
519
519
  "applied_fixes": {
520
- "maxItems": 32,
520
+ "maxItems": 2048,
521
521
  "type": "array",
522
522
  "items": {
523
523
  "type": "string",
@@ -527,7 +527,7 @@
527
527
  }
528
528
  },
529
529
  "residual_actionable_work": {
530
- "maxItems": 32,
530
+ "maxItems": 2048,
531
531
  "type": "array",
532
532
  "items": {
533
533
  "type": "string",
@@ -537,7 +537,7 @@
537
537
  }
538
538
  },
539
539
  "advisory_outputs": {
540
- "maxItems": 32,
540
+ "maxItems": 2048,
541
541
  "type": "array",
542
542
  "items": {
543
543
  "type": "string",
@@ -557,10 +557,10 @@
557
557
  "validators": {
558
558
  "type": "integer",
559
559
  "minimum": 0,
560
- "maximum": 64
560
+ "maximum": 2048
561
561
  },
562
562
  "residual_risks": {
563
- "maxItems": 64,
563
+ "maxItems": 4096,
564
564
  "type": "array",
565
565
  "items": {
566
566
  "type": "string",
@@ -570,7 +570,7 @@
570
570
  }
571
571
  },
572
572
  "testing_gaps": {
573
- "maxItems": 64,
573
+ "maxItems": 4096,
574
574
  "type": "array",
575
575
  "items": {
576
576
  "type": "string",
@@ -590,7 +590,7 @@
590
590
  }
591
591
  },
592
592
  "validator_failures": {
593
- "maxItems": 64,
593
+ "maxItems": 2048,
594
594
  "type": "array",
595
595
  "items": {
596
596
  "type": "string",
@@ -600,7 +600,7 @@
600
600
  }
601
601
  },
602
602
  "intent_uncertainty": {
603
- "maxItems": 64,
603
+ "maxItems": 67584,
604
604
  "type": "array",
605
605
  "items": {
606
606
  "type": "string",
@@ -17,16 +17,17 @@ Your sole job is to answer three questions about one specific finding and return
17
17
  Return ONLY valid JSON matching this schema. No prose, no markdown, no explanation outside the JSON object.
18
18
 
19
19
  {
20
- "validated": <boolean>,
21
- "reason": "<one sentence explaining why the finding is validated or not>"
20
+ "outcome": "true" | "false" | "failed" | "unavailable",
21
+ "reason": "<one sentence; omit when outcome is true>"
22
22
  }
23
23
 
24
24
  Rules:
25
25
  - You are a leaf validator inside an already-running review workflow. Do not invoke systematic skills or agents. Perform your analysis directly and return the JSON verdict only.
26
26
  - You are operationally read-only. You may use non-mutating inspection tools (file reads, glob, grep, git log, git diff, git show, git blame, gh pr view) to examine the code. Do not edit project files, change branches, commit, push, create PRs, or otherwise mutate the checkout or repository state.
27
- - Answer the three validation questions below. Set `validated: true` only when all three answers are YES. Set `validated: false` when any answer is NO.
28
- - The `reason` field must be one sentence. State the specific code evidence that drove your verdict (file name, function name, or line reference when relevant). Do not repeat the finding title verbatim.
29
- - Be conservative: when evidence is ambiguous, prefer `validated: true` (keep the finding in the actioned set). A false negative that lets a real bug through is worse than a false positive that the human reviewer can dismiss.
27
+ - Answer the three validation questions below. Set `outcome: "true"` only when all three answers are YES. Set `outcome: "false"` when any answer is NO.
28
+ - A `false` verdict needs a `reason` of one sentence. State the specific code evidence that drove your verdict (file name, function name, or line reference when relevant). Do not repeat the finding title verbatim. A `true` verdict carries no reason.
29
+ - Return `failed` with a reason when your analysis could not be completed, and `unavailable` with a reason when the code or tools you need could not be reached. Never guess a verdict to avoid either.
30
+ - Be conservative: when evidence is ambiguous, prefer `outcome: "true"` (keep the finding in the actioned set). A false negative that lets a real bug through is worse than a false positive that the human reviewer can dismiss.
30
31
  - Do not validate based on general coding principles alone. Ground your verdict in the actual code as written in this diff and the surrounding context.
31
32
  </output-contract>
32
33
 
@@ -42,8 +43,8 @@ Answer each question YES or NO based on the code evidence you find.
42
43
  3. **Is the issue already handled elsewhere?**
43
44
  Check whether the problem is already mitigated by a guard, middleware, framework behavior, type constraint, or other mechanism not visible at the cited line. A finding is not valid if the issue is fully handled at a higher or lower layer that the reviewer missed.
44
45
 
45
- Set `validated: true` only when: the issue is real (Q1 YES), introduced by this diff or newly relevant (Q2 YES), and not already handled elsewhere (Q3 YES).
46
- Set `validated: false` when any question is NO, and state which question failed and why in `reason`.
46
+ Set `outcome: "true"` only when: the issue is real (Q1 YES), introduced by this diff or newly relevant (Q2 YES), and not already handled elsewhere (Q3 YES).
47
+ Set `outcome: "false"` when any question is NO, and state which question failed and why in `reason`.
47
48
  </validation-questions>
48
49
 
49
50
  <finding>
@@ -89,8 +90,8 @@ Diff:
89
90
 
90
91
  ## Dispatch Notes
91
92
 
92
- - Dispatch one validator subagent per gated finding **in parallel** to keep latency bounded.
93
+ - Dispatch one validator subagent per gated finding. Run them in bounded batches, sized to what the harness handles reliably: the validators of a batch run in parallel, and a batch finishes before the next starts.
93
94
  - Pass the full diff and file list so the validator can inspect surrounding context, not just the cited line.
94
- - The validator returns `{validated, reason}`. Attach both fields to the finding before Stage 6.
95
- - **Never drop a finding based on the validator verdict.** A finding with `validated: false` moves to the "Filtered (not validated)" presentation group in Stage 6. It is never removed from the report.
96
- - If a validator subagent fails or times out, treat the finding as `validated: true` (conservative fallback — keep it in the actioned set) and note the validator failure in the Coverage section.
95
+ - The validator returns `{outcome, reason?}`. Record it as that finding's lifecycle result, keyed by `finding_id`, and carry it into `finalize` as `validator_lifecycle_results`.
96
+ - **Never drop a finding based on the validator verdict.** A finding with `outcome: "false"` moves to the "Filtered (not validated)" presentation group in Stage 6. It is never removed from the report.
97
+ - If a validator subagent fails, times out, or returns nothing, record `failed` or `unavailable` with a reason. The finding stays actionable and unvalidated, and `finalize` records a lifecycle failure that marks the run degraded. Report that validator in the Coverage section. Do not treat the finding as validated.