Skip to content

fix(fusion): strictly validate judge and synthesis outputs #292

Description

@bearmug

Audit baseline: aa595438650cfbaa6db310792929c6219cc003b2 (origin/main at audit start).

Problem

parseJudgeAnalysis() accepts {} by defaulting required fields and confidence, despite the prompt requiring a complete schema. The runner can also report successful empty synthesis under a synthetic adapter instead of taking a degraded path.

Related to context/judging #176 and reliability #181, but structural semantic validation remains missing.

Acceptance criteria

  • Require every mandatory judge array and explicit valid confidence; reject missing/wrong types.
  • Malformed judge output follows the documented judge_failed degraded path.
  • Empty/placeholder synthesis returns a clearly marked panel-only fallback or error, never healthy ok with no substantive text.
  • Add tests for {}, missing fields, wrong types, empty fields, and empty synthesis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions