Skip to content

review-dispatch: consolidate_dispatch verdict derivation contradicts finalizer strictest-rule validation — feedback split panels can never finalize #764

Closed

Description

@jflowers

Summary

consolidate_dispatch derives a feedback dispatch's workflow_result.value and top-level verdict from consolidated finding severities (computeVerdict), while finalize_review_dispatch's semantic validation recomputes the expected verdict from per-run workflow verdicts using the strictest rule (calculatedWorkflowValue). In feedback mode these two derivations are structurally contradictory for any split panel — at least one successful run with zero findings (votes ACCEPT) plus at least one run with findings — so finalization is rejected every time, deterministically, and the caller must fail closed INCONCLUSIVE after the mechanical-retry budget exhausts.

Evidence

Observed twice in one run of /uf.address-feedback on PR #761 (session ses_eaa447110ffekZFgHcee30mmef, 2026-10-19, Tier 2 per-item protocol, branch opsx/fix-triage-issue-dispatch-docs, head 1800eaa):

  • Item 1 (comment 4318057510): dispatch 4/4 success — guard ACCEPT (zero findings), adversary/architect/curator AUTHOR-DECIDES (6 consolidated findings, MEDIUM/LOW). Finalization rejected 3× (initial + 2 identical mechanical retries) with defects:
    • verdict is APPROVE WITH ADVISORIES; expected APPROVE
    • workflow_result.value is AUTHOR-DECIDES; expected ACCEPT
    • No persisted artifact, calculated_assessment null → operation INCONCLUSIVE, fail closed.
  • Item 2 (comment 4318057541): dispatch 4/4 success — adversary ACCEPT (run e492392e, zero findings), architect/curator/guard AUTHOR-DECIDES (runs 26642d6a/40dd1767/9cb3f6ba; 5 findings: 3 HIGH, 2 MEDIUM). Identical rejection 3× → fail closed.

Note that even HIGH findings reproduce the same error strings, because the feedback projection maps both APPROVE WITH ADVISORIES and REQUEST CHANGES to AUTHOR-DECIDES.

Root cause

Payload construction in consolidate_dispatch (.opencode/plugins/review-dispatch/index.ts):

  • index.ts:3246 — verdict = computeVerdict(consolidatedFindings): severity ladder over ALL consolidated findings (any HIGH/CRITICAL → REQUEST CHANGES; any MEDIUM/LOW → APPROVE WITH ADVISORIES; none → APPROVE).
  • index.ts:3286-3289 — workflow_result.value = workflowVerdictValue("feedback", verdict); the feedback mapping (index.ts:3124-3137) sends APPROVE WITH ADVISORIES and REQUEST CHANGES to AUTHOR-DECIDES, APPROVE to ACCEPT.
  • index.ts:3315,3318 — payload verdict (generic projection) and workflow_result carry that severity-derived value.

Per-run verdicts recorded at index.ts:3270 via runVerdict (index.ts:3071-3081) + the same feedback mapping: a successful run votes ACCEPT iff it submits zero findings; any findings → AUTHOR-DECIDES.

Finalizer validation (index.ts:2286-2292): expectedWorkflowValue = calculatedWorkflowValue(payload) — for feedback (index.ts:1965-1966, per-persona collapse at index.ts:1944-1945), any successful persona voting ACCEPT forces ACCEPT, and the top-level verdict must be its projection (APPROVE).

Structural contradiction: the payload says AUTHOR-DECIDES whenever ANY finding exists; the finalizer expects ACCEPT whenever ANY successful run submitted zero findings. Both conditions holding simultaneously is a normal assessment shape (one reviewer fully agrees — no findings — while others document findings and defer to the author). The inputs are persisted and the derivation deterministic, so §2.3.8's identical-retry budget can never succeed.

The command spec (uf.address-feedback.md §2.3.5, line 404) documents the strictest rule the finalizer enforces, so the caller cannot construct a passing call — the contradiction is entirely inside the plugin.

Scope analysis

  • Council mode is immune: the per-run severity ladder matches computeVerdict's ladder, and index.ts:1971 (advisories.length > 0) reconciles mixed panels.
  • Triage mode likely affected (analysis, not yet observed): payload value is severity-derived (any HIGH → INVALID, any MEDIUM/LOW → NEEDS-CLARIFICATION, none → VALID) while the finalizer expects triageMajority of persona votes (a persona votes VALID iff zero findings). A majority-zero-findings panel with one findings-bearing persona would mismatch the same way. Worth verifying during the fix.

Impact

Every /uf.address-feedback Tier 2 item with a split panel cannot persist its dispatch artifact — finalization is mandated per item, so the whole per-item protocol fail-closes INCONCLUSIVE despite fully successful (4/4) dispatches. Two items hit this in a single real run.

Suggested fix directions

  • Derive payload.workflow_result.value / verdict in consolidate_dispatch from calculatedWorkflowValue (the same vote-based function the finalizer uses), keeping computeVerdict for verdict_reason/advisory content; or
  • Reconcile the finalizer to accept the severity-derived value.
  • Add regression tests: a feedback split panel (one zero-findings run + one findings-bearing run) must finalize; a triage split-majority panel should be verified either way.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugllm_assisted

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions