feat(voyage)!: rename type discriminators across validators + fixtures [skip-docs]
- brief-validator: BRIEF_TYPE_VALUES ['ultrabrief','ultrareview'] -> ['trekbrief','trekreview'] + dependent branches - research-validator: 'ultraresearch-brief' -> 'trekresearch-brief' - review-validator: 'ultrareview' -> 'trekreview' - 3 templates frontmatter type: - 4 synthetic fixtures: ultraplan-synthetic/ultrareview-synthetic -> trek* (frontmatter only; bodies untouched, Jaccard floor preserved) - 2 trekreview fixtures: type: trekreview - 6 validator-test fixtures + asserts - agents/review-coordinator.md frontmatter example Atomic: validator + fixtures committed together — partial state would cause vacuous test passes or hard validator rejection. Part of voyage-rebrand session 2 (W3.3 / Step 5). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
f924d329b5
commit
0508edff15
16 changed files with 28 additions and 28 deletions
|
|
@ -3,7 +3,7 @@ import { strict as assert } from 'node:assert';
|
|||
import { validateBriefContent } from '../../lib/validators/brief-validator.mjs';
|
||||
|
||||
const GOOD_BRIEF = `---
|
||||
type: ultrabrief
|
||||
type: trekbrief
|
||||
brief_version: "2.0"
|
||||
created: 2026-04-30
|
||||
task: "Add JWT auth to API"
|
||||
|
|
@ -37,7 +37,7 @@ test('validateBrief — happy path', () => {
|
|||
});
|
||||
|
||||
test('validateBrief — wrong type rejected', () => {
|
||||
const t = GOOD_BRIEF.replace('type: ultrabrief', 'type: notabrief');
|
||||
const t = GOOD_BRIEF.replace('type: trekbrief', 'type: notabrief');
|
||||
const r = validateBriefContent(t);
|
||||
assert.equal(r.valid, false);
|
||||
assert.ok(r.errors.find(e => e.code === 'BRIEF_WRONG_TYPE'));
|
||||
|
|
@ -94,7 +94,7 @@ test('validateBrief — missing frontmatter is hard error', () => {
|
|||
});
|
||||
|
||||
const REVIEW_AS_BRIEF = `---
|
||||
type: ultrareview
|
||||
type: trekreview
|
||||
task: "Review delivered ultrareview-local v1.0"
|
||||
slug: ultrareview-local
|
||||
project_dir: .claude/projects/2026-05-01-ultrareview-local/
|
||||
|
|
@ -144,11 +144,11 @@ test('validateBrief — ultrareview with findings as scalar (not array) rejected
|
|||
});
|
||||
|
||||
test('validateBrief — wrong-type error message includes accepted set', () => {
|
||||
const t = REVIEW_AS_BRIEF.replace('type: ultrareview', 'type: somethingelse');
|
||||
const t = REVIEW_AS_BRIEF.replace('type: trekreview', 'type: somethingelse');
|
||||
const r = validateBriefContent(t);
|
||||
assert.equal(r.valid, false);
|
||||
const wrongType = r.errors.find(e => e.code === 'BRIEF_WRONG_TYPE');
|
||||
assert.ok(wrongType);
|
||||
assert.ok(/ultrabrief/.test(wrongType.message));
|
||||
assert.ok(/ultrareview/.test(wrongType.message));
|
||||
assert.ok(/trekbrief/.test(wrongType.message));
|
||||
assert.ok(/trekreview/.test(wrongType.message));
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue