Repository navigation
Description
Problem Description
During branch review execution (devops ai review branch --persona devsecops release/v0.2.23), two runtime issues were encountered:
- Pipeline Output Schema Validation Failures:
Failed to validate pipeline output schema: 1 validation error for ReviewResult
findings.1
Value error, observed_value and expected_value cannot be identical: '...'
and
Value error, Both observed_value and expected_value must be provided when asserting a concrete value
When the LLM output generates a finding where observed_value == expected_value (or produces an asymmetric polarity assertion where only one of the values is set), Finding._validate_polarity raises a ValueError. This causes ReviewResult.model_validate in MultiAgentPipeline to raise a ValidationError, logging Failed to validate pipeline output schema and discarding the entire file's review results.
Under the polarity invariant architecture, identical polarity assertions represent contradictory or hallucinated findings that must be gracefully marked as status="INVALIDATED" with by="deterministic:verdict_polarity" and reportable=False, rather than crashing Pydantic deserialization of the file review. Similarly, single-sided polarity assertions should be gracefully handled or invalidated without crashing the pipeline.
- SyntaxWarning for Invalid Escape Sequences:
<unknown>:1: SyntaxWarning: "\/" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\/"? A raw string is also an option.
In src/devops_cli/ai/review_schema.py:95 (_parse_stringified_collection), stringified collections from model output are evaluated via (ast.literal_eval, json.loads). Because JSON uses \/ as a valid escape for / (RFC 8259), running ast.literal_eval first on JSON strings produces a Python AST compiler SyntaxWarning.
Expected Behavior
- Model output findings with identical
observed_valueandexpected_valueshould deserialize intoFindinginstances withstatus="INVALIDATED",verified=False,reportable=False, andinvalidation_reason="Observed value is identical to expected value (no defect polarity)", preserving the review pipeline. - Single-sided polarity assertions should not crash deserialization.
_parse_stringified_collectionshould tryjson.loadsfirst, and suppress/catchSyntaxWarningwhen falling back toast.literal_eval.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(review): gracefully invalidate contradictory polarity findings an…
dan-petty commentedon Sep 27, 2026
Closed by #636, merged into
release/v0.2.23.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.