Skip to content

fix(noema-review): fail closed with typed blocker on invalid changed-line / malformed JSON model output #1637

Description

@seonghobae

Affected exact evidence

  • leaf repository: ContextualWisdomLab/LineageWeave
  • PR: #897
  • exact leaf head: 7180068eedf40689e267e85478a9ad46981bcb82
  • central reusable workflow source: ContextualWisdomLab/.github@0774e29acd7d4688fa2224f1c6fe6c56a03bbbb6
  • workflow run: 33547273531
  • failing job: 99987788190 (noema-review)

First failing boundary

The review sidecar and repository-scoped reviewer token are successfully provisioned and the target head remains exact-current. The model phase then fails during verdict-envelope validation/repair:

  1. initial model output references reviewed line 1, which is not an exact changed-side line;
  2. repair output is malformed JSON (Expecting ',' delimiter ... char 5224);
  3. the job exits 1. Raw model output is intentionally not written to public logs because a model can echo or hallucinate credential-shaped material.

This is a central review-control/model-output validation failure, not a LineageWeave source finding. Leaf product source must not be changed to satisfy it.

RED acceptance

Add deterministic central tests covering at least:

  • a structurally valid verdict that cites a line outside the exact changed-side line set;
  • repair output that is truncated/malformed JSON;
  • combined invalid-line + malformed-repair output;
  • preservation of exact repository / PR / expected_head_sha binding throughout both phases.

The test must demonstrate that invalid model evidence cannot become a synthetic source finding or a passing review.

Smallest acceptable behavior

For invalid source-line evidence, attempt only bounded schema/line repair. If repair remains invalid or unparsable, emit a typed model/infrastructure ABSTAIN / UNAVAILABLE (or existing equivalent) decision envelope that is distinct from semantic source findings. Preserve fail-closed merge readiness: the required check must not become green merely because semantic review was unavailable unless the central governance contract explicitly defines and separately satisfies a safe unavailable-review path.

Do not log raw model output. Do not broaden reviewer credentials. Do not weaken exact-head / live-source checks.

GREEN acceptance

  • valid model verdict JSON parses and every line-bound finding maps to an actual changed-side line;
  • invalid-line or malformed-repair output is represented as typed review-unavailable/model-output evidence rather than an invented source-code defect;
  • current exact-head binding is rechecked before publication;
  • central tests cover malformed/truncated output without logging the raw payload;
  • a fresh LineageWeave fix(security): fail closed on unavailable dependency review #897 exact-head Noema run after the central fix no longer fails for this model-envelope failure class.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: highHigh-priority or P1 work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions