bug(consolidation): _DedupDecision structured output fails when action is omitted
Summary
During live consolidation recovery, the dedup structured-output path failed terminally because _DedupDecision required action: Literal["merge", "keep"], but the actual parsed payload could arrive without action.
Observed terminal error:
1 validation error for _DedupDecision
action
Field required
This turns a malformed or underfilled dedup model response into a full consolidation failure instead of taking a conservative fallback.
Why this is a bug
For dedup/merge decisions, the conservative failure mode should be keep, not "abort the whole consolidation op".
Right now a single underfilled structured response can crash the operation even when the safe behavior is obvious: do not merge.
Expected behavior
If dedup structured output is missing action, Hindsight should fall back conservatively to keep or otherwise treat the response as a non-fatal no-merge decision.
Actual behavior
Consolidation fails terminally with schema validation error for _DedupDecision.action.
Live evidence
From recovery notes in 2026-06-24-hindsight-retain-failed-batch-recovery/README.md:
- target consolidation op:
8610de21-c7da-49ba-bbdb-6a122dbd1f4e
- terminal error:
_DedupDecision ... action Field required
- live input could also show
{"facts": []} on this path
Quoted note:
_DedupDecision requires action: Literal["merge", "keep"]
live input sometimes arrived as {"facts": []}
terminal error: 1 validation error for _DedupDecision / action / Field required
Local recovery shape
Operational hotfix that unblocked recovery:
- file:
/app/api/hindsight_api/engine/consolidation/consolidator.py
- change:
action: Literal["merge", "keep"] = "keep"
That changed malformed dedup outputs from fatal to conservative no-merge behavior.
Version
Observed on live ghcr.io/vectorize-io/hindsight:latest-slim / 0.8.3-slim runtime.
bug(consolidation): _DedupDecision structured output fails when
actionis omittedSummary
During live consolidation recovery, the dedup structured-output path failed terminally because
_DedupDecisionrequiredaction: Literal["merge", "keep"], but the actual parsed payload could arrive withoutaction.Observed terminal error:
This turns a malformed or underfilled dedup model response into a full consolidation failure instead of taking a conservative fallback.
Why this is a bug
For dedup/merge decisions, the conservative failure mode should be
keep, not "abort the whole consolidation op".Right now a single underfilled structured response can crash the operation even when the safe behavior is obvious: do not merge.
Expected behavior
If dedup structured output is missing
action, Hindsight should fall back conservatively tokeepor otherwise treat the response as a non-fatal no-merge decision.Actual behavior
Consolidation fails terminally with schema validation error for
_DedupDecision.action.Live evidence
From recovery notes in
2026-06-24-hindsight-retain-failed-batch-recovery/README.md:8610de21-c7da-49ba-bbdb-6a122dbd1f4e_DedupDecision ... action Field required{"facts": []}on this pathQuoted note:
Local recovery shape
Operational hotfix that unblocked recovery:
/app/api/hindsight_api/engine/consolidation/consolidator.pyThat changed malformed dedup outputs from fatal to conservative no-merge behavior.
Version
Observed on live
ghcr.io/vectorize-io/hindsight:latest-slim/0.8.3-slimruntime.