Skip to content

review-dispatch: one dispatch session per conversation silently breaks uf.address-feedback per-item Tier 2 finalization #746

Open

Description

@jflowers

Summary

dispatch_agent_run keys the dispatch session to the parent MCP conversation: all calls in one conversation share a single correlation ID, and session-metadata.json is persisted only on the first call (isFirstCall && input.session_metadata !== undefined). /uf.address-feedback §2.3 mandates one dispatch + consolidate cycle per Tier 2 feedback item within a single conversation. The two contracts cannot both hold: item 1 can finalize; items 2+ have their session_metadata silently ignored (accepted by the input schema, never persisted), their runs co-mingle in item 1's session directory, and consolidate_dispatch fails deterministically ("run has no included plan entry" / verdict mismatch) — INCONCLUSIVE, fail-closed, tier2_unavailable=true, retained for manual handling.

Evidence

  • Code at head f0327a9 of feat(workflow): migrate deterministic uf.unleash procedures to plugin tools #745: .opencode/plugins/review-dispatch/index.ts:2714-2721 (correlation ID shared per parent session), :2723-2733 (session metadata persisted on first call only, best-effort, silently skipped afterwards)
  • Command contract: .opencode/commands/uf.address-feedback.md §2.3 ("Run this protocol independently for each current Tier 2 feedback item"), §2.3.4 ("Call dispatch_review_runs once per Tier 2 feedback item"), §2.3.8 ("Finalize every Tier 2 item ... with a single consolidate_dispatch call")
  • Observed on PR feat(workflow): migrate deterministic uf.unleash procedures to plugin tools #745 feedback sessions (2026-10-16/17): round 1 dispatched MEDIUMs only with the single-finalization constraint recorded in .uf/feedback/pr-745/state.json (session_architecture_constraint); round 3 skipped dispatch entirely (explicit user decision: redundancy + constraint); round 5 session re-confirmed the constraint at head f0327a9.

Impact

  • Fail-closed, not corrupting: items 2+ degrade to INCONCLUSIVE / tier2_unavailable and require manual handling, so no verdict integrity loss.
  • Effectively caps Tier 2 assessment at one item per conversation, forcing documented user workarounds in every multi-item address-feedback session and burning dispatch budget on runs that can never finalize.

Fix directions

  • Per-dispatch-cycle session isolation: derive the correlation ID from an explicit cycle discriminator in the tool contract (not conversation identity alone); consolidate_dispatch resolves the named cycle.
  • Alternative: allow session_metadata overwrite with explicit new-cycle semantics (first-call-per-cycle rather than first-call-ever), scoping run files per cycle.
  • Requires an OpenSpec change (tool contract), scaffold mirror sync, and tests covering multi-item dispatch + consolidation within one conversation.

Scope

Not fixable inside #745 (unleash-deterministic-tools scope). Filed during #745 round-5 feedback triage.

Refs: #745, #717 (docs: one-call consolidate_dispatch finalization), #735 (dispatch data-flow docs mismatch)

Activity

  1. self-assigned this
    on Oct 17, 2026
  2. added
    bug
    on Nov 2, 2026
  3. jflowers commented on Nov 2, 2026

    @jflowers
    ContributorAuthor

    Triage: VALID — bug (objective)

    The Divisor panel assessed this issue across four review personas (adversary, architect, curator, guard). All four classify it as a valid, objective bug and reach the same disposition.

    Verification

    Every material claim in the report checks out against the repository:

    • The command-contract quotes are verbatim in .opencode/commands/uf.address-feedback.md: §2.3 ("Run this protocol independently for each current Tier 2 feedback item"), §2.3.4 ("Call dispatch_review_runs once per Tier 2 feedback item"), and §2.3.8 ("Finalize every Tier 2 item ... with a single consolidate_dispatch call").
    • The pre-fix tool behavior — one correlation ID shared per parent conversation, session-metadata.json persisted on first call only — is corroborated by the remediation designs' own descriptions of the behavior they replaced and by review-dispatch: second dispatch in the same opencode session reuses the first dispatch's correlation ID and stale session metadata #760, which reports the same root cause.
    • The failure mode is deterministic and matches the report: items 2+ co-mingle runs into item 1's session directory and consolidate_dispatch fails closed ("run has no included plan entry"), degrading to INCONCLUSIVE / tier2_unavailable and forcing manual handling.
    • The impact framing is honest: fail-closed without verdict-integrity loss, but Tier 2 assessment caps at one item per conversation and burns dispatch budget on runs that can never finalize.

    Remediation status

    Both fix directions the issue proposes have landed at current HEAD:

    • dispatch_review_runs now mints a fresh correlation ID per invocation and re-points the session map (.opencode/plugins/review-dispatch/index.ts:5588-5603, design D1 of fix-review-dispatch-correlation-release, root cause review-dispatch: sessionCorrelationMap never releases the per-conversation correlation ID (root cause of #760 / #746) #794).
    • Session metadata now persists whenever supplied, with replace-with-latest semantics (index.ts:3467-3482, design D5 of fix-review-dispatch-recovery).
    • The consuming command moved in lockstep: §2.3.4 now captures each item's correlation_id and forwards it unconditionally to retrieval and finalization.

    The report was accurate when filed and remains a valid bug record; the defect itself is already remediated.

    Recommended next steps

    1. Close this issue as completed, referencing review-dispatch: sessionCorrelationMap never releases the per-conversation correlation ID (root cause of #760 / #746) #794 and the fix-review-dispatch-correlation-release / fix-review-dispatch-recovery changes, rather than queueing new fix work.
    2. Optionally run one multi-item /uf.address-feedback session against the fixed contract as a smoke check before closing.

    The panel's duplicate search surfaced no candidates (#717 and #735 are related but distinct documentation issues). No split is recommended — the report has a single root cause with one coherent shipped remediation.

    This triage was performed by the Divisor review panel.

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

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions