voyage/tests/validators
Kjell Tore Guttormsen 1be961aab1
fix(gate): part 2 verifier findings — non-object findings, carried backed copy, rule_keys, marks, approval prose, brief_path, engine put-back once
1. plan-review-dedup skips only a null or undefined finding; any other
   entry that is not an object (a string, a number, an array) goes on as
   before E, a finding with no valid severity that the plan gate counts as
   a blocker (it was dropped, so a string blocker recorded PASS).
2. plan-gate --record: a previous finding that rule A carried as counted and
   whose id is backed this round leaves the counted set, the counts, the
   verdict and the stop rule's summary (it was counted and listed in
   known_outside at once: BLOCK, not-fewer, and --accept-open refused).
3. A known_outside entry keeps rule_keys; extractVerdict accepts it (a list
   of strings), and the bare gate re-checks with the same keys the recorder
   used, so a merged finding whose security key is only in rule_keys is a
   WARN, not a STOP.
4. plan-critic, scope-guardian and /trekplan Phase 9's round-2 sentences say
   the Critic Verdict also lists known_outside and each is marked by id in
   previous. Code already accepts such a mark (dedup passes it; countRound
   ignores ids it does not carry; --record removes the entry on true);
   pinned in diff mode and full count.
5. The approval prose names ## Threat Model where it named only ## Intent +
   ## Goal: skills/annotating/SKILL.md (description, step 4, guard list),
   docs/command-modes.md, Handover 1's intent_approved_hash row, README
   (approval, Approve row, intent approval gate) and CLAUDE.md's /trekbrief
   row.
6. threat-model.mjs gains usableInRepo (a brief path relative to the repo
   top level) and repoRelativeBrief; --record stores brief_path relative to
   the top level, never absolute, and both gates read it from there, so the
   gate run from a subdirectory reads the same brief. reviewThreatModel
   uses usableInRepo. Handover 4 and the gate header say so.
7. review-finalize's outside pass puts an entry back only when no finding
   carries its row yet (engine-compare rowOf): an engine finding listed in
   known_outside while its payload is saved went back twice.
8. A test runs scripts/release-check.mjs on a review whose known_outside
   entry the brief does not back: exit 2 (control: backed passes the review
   check).

Existing tests changed: plan-gate-threat-model's entry-keys assertion now
expects rule_keys (item 3), and its planted non-security entry drops the
security key from rule_keys too, since the gate reads rule_keys (item 3).

Part 2 fix round of the E plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 10:50:20 +01:00
..
architecture-discovery.test.mjs feat(voyage)!: bulk content rewrite ultra -> voyage/trek prose [skip-docs] 2026-05-05 15:08:20 +02:00
brief-ceremony.test.mjs chore(cleanup): R-b R3 — profiles, phase signals and the effort dialog removed, one fixed path per command 2026-11-07 21:12:57 +01:00
brief-gate-coverage.test.mjs feat(brief): optional threat model in the brief (decision 164, 218) 2026-11-08 08:47:51 +01:00
brief-review-stamp-order.test.mjs fix(trekbrief): the review stamp covers only text the reviewer saw 2026-10-12 20:03:26 +02:00
brief-review-stamp.test.mjs fix(plan): every exploration agent runs; the brief is reviewed again only when it changed 2026-10-08 07:01:44 +02:00
brief-threat-model.test.mjs feat(brief): optional threat model in the brief (decision 164, 218) 2026-11-08 08:47:51 +01:00
brief-validator.test.mjs refactor(cleanup): simplify pass on R-b 2026-11-07 21:26:25 +01:00
intent-approval.test.mjs refactor(cleanup): simplify pass on R-b 2026-11-07 21:26:25 +01:00
plan-gate-diff-mode.test.mjs feat(gate): stop rule in the plan gate (decision 217, 220) 2026-11-08 07:04:48 +01:00
plan-gate-open-major.test.mjs feat(gate): stop rule in the plan gate (decision 217, 220) 2026-11-08 07:04:48 +01:00
plan-gate-stop-rule.test.mjs fix(gate): part 1 verifier findings — stop-rule wording, guard tests, unreadable round 2026-11-08 07:39:00 +01:00
plan-gate-threat-model.test.mjs fix(gate): part 2 verifier findings — non-object findings, carried backed copy, rule_keys, marks, approval prose, brief_path, engine put-back once 2026-11-08 10:50:20 +01:00
plan-gate.test.mjs feat(gate): stop rule in the plan gate (decision 217, 220) 2026-11-08 07:04:48 +01:00
plan-validator-parse-once.test.mjs refactor(plan): the plan validator parses each step once 2026-10-13 14:47:33 +02:00
plan-validator-v18.test.mjs fix(validate): a check that can never run is caught when the brief or plan is written 2026-10-08 06:42:33 +02:00
plan-validator.test.mjs test(r8): move the live tests out of the round files 2026-11-07 10:19:49 +01:00
plan-version-1-9.test.mjs fix(plan): a 1.9 wrapped line keeps its paths only after a comma or in an empty entry 2026-10-14 10:29:35 +02:00
progress-validator.test.mjs fix(validators): the progress validator knows stopped and blocked 2026-10-05 17:32:54 +02:00
query-privacy-gate.test.mjs fix(validators): hard-block the token formats the run-length patterns missed 2026-08-12 22:03:43 +02:00
research-validator.test.mjs feat(voyage)!: rename type discriminators across validators + fixtures [skip-docs] 2026-05-05 14:40:25 +02:00
review-validator.test.mjs fix(review): close the gate's fail-open paths an independent review found 2026-10-06 20:03:16 +02:00
runnable-checks.test.mjs chore(cleanup): R-b R3 — profiles, phase signals and the effort dialog removed, one fixed path per command 2026-11-07 21:12:57 +01:00
session-state-validator.test.mjs feat(voyage)!: bulk content rewrite ultra -> voyage/trek prose [skip-docs] 2026-05-05 15:08:20 +02:00