Step 5 av v4.1-execute (Wave 2, Session 2). Profile-validator etter brief-validator-mønsteret eksakt: validateProfileContent (pure), validateProfile (file-reader), CLI shim med --json flag. Eksporter PROFILE_REQUIRED_FIELDS (frozen), PROFILE_REQUIRED_PHASES (frozen). Validerer: - Required frontmatter fields (name, phase_models, parallel_agents_min/max, external_research_enabled, brief_reviewer_iter_cap) - phase_models = list-of-dicts med phase + model - 6 required phases (brief, research, plan, execute, review, continue) - parallel_agents_max ≥ parallel_agents_min - Allowed model values: ['sonnet', 'opus']; haiku tillatt KUN ved VOYAGE_ALLOW_HAIKU=1 (per global CLAUDE.md modellvalg-prinsipp) Issue codes: PROFILE_MISSING_FIELD, PROFILE_INVALID_MODEL, PROFILE_INVALID_ENUM, PROFILE_READ_ERROR, PROFILE_NOT_FOUND. Field-path-reporting i error-location: phase_models[N].model for SC #2. Tester (10 nye, baseline 377 → 387): - SC #1 x3 (innebygde profiler grønne) - SC #2 (PROFILE_INVALID_MODEL med location phase_models[2].model) - SC #3 (PROFILE_INVALID_ENUM for external_research_enabled: "yes" string) - VOYAGE_ALLOW_HAIKU env-var deny/allow - PROFILE_MISSING_FIELD når name fraværende - PROFILE_NOT_FOUND for ikke-eksisterende fil - 2 export drift-pins Fixturer: profile-invalid-model.yaml (gpt-4 i phase_models[2]), profile-invalid-enum.yaml (external_research_enabled som string "yes"). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
5b4a86dca9
commit
be9ad6ec07
4 changed files with 376 additions and 0 deletions
21
plugins/voyage/tests/fixtures/profile-invalid-enum.yaml
vendored
Normal file
21
plugins/voyage/tests/fixtures/profile-invalid-enum.yaml
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
profile_version: "1.0"
|
||||
name: invalid-enum
|
||||
phase_models:
|
||||
- phase: brief
|
||||
model: sonnet
|
||||
- phase: research
|
||||
model: sonnet
|
||||
- phase: plan
|
||||
model: opus
|
||||
- phase: execute
|
||||
model: sonnet
|
||||
- phase: review
|
||||
model: opus
|
||||
- phase: continue
|
||||
model: sonnet
|
||||
parallel_agents_min: 4
|
||||
parallel_agents_max: 6
|
||||
external_research_enabled: "yes"
|
||||
brief_reviewer_iter_cap: 2
|
||||
---
|
||||
Loading…
Add table
Add a link
Reference in a new issue