Repository navigation
Description
Summary
/uf.review-pr still tells the parent agent to deduplicate findings itself
and hand-build a full finalize_review_dispatch payload. The
dispatch-finalize-determinism change (0593cae) moved
/uf.review-council, /uf.triage-issue, and /uf.address-feedback
to a single consolidate_dispatch call with provenance. It did not
move uf.review-pr.md.
Observed (dewey PR #138, session ses_e66b2decfffe6iTzZlb9ktkM5E)
Dispatch 0274aa47-53a2-4715-9dd0-4951382a6f9a: 5 runs succeeded,
4 were skipped, 15 findings. The parent rebuilt the ~50KB payload by hand
three times:
- Rejected:
payload.runs.N: Unrecognized key: "read_only". The agent
copied a plan-entry field into the run records. - Rejected:
consolidated finding has incorrect contributing run ids/
run finding is missing from consolidated findings. Following §5's
"deduplicate by normalized file plus root cause / cross-persona
grouping", the agent merged the architect finding (vault.go:627) and
the guard finding (vault.go:625) into one. The finalizer requires an
exact match between run findings and consolidated findings. - Accepted, only after passing the plugin's 15 consolidated findings
through unchanged.
This is the same failure class dispatch-finalize-determinism documented
(session ses_eca4843f9ffeKwVLQhSFCRh2Rl: read_only leaking into run
records during manual payload reconstruction).
Root cause
.opencode/commands/uf.review-pr.md
(mirror: internal/scaffold/assets/opencode/commands/uf.review-pr.md):
- §5 (~L495-505): the parent deduplicates and applies cross-persona
grouping and compound severity. This conflicts with the finalizer's
run-finding <-> consolidated-finding correspondence check. - §5a (~L507-554):
consolidate_dispatchwithout provenance, used only
to fetch data. - §5b (~L556-574): "Call
finalize_review_dispatchwith: ...
deduplicated findings, advisories, run counts, and reason". - No bounded retry policy for mechanical rejections.
Proposed fix
- Replace §5/§5a/§5b with exactly one
consolidate_dispatch({correlation_id, provenance: {branch, commit, workflow_id: "uf.review-pr"}})per finalization attempt. Take
branch/commitfrom the frozen PR input contexthead_ref/head_sha,
as/uf.address-feedbackdoes, because the finalizer checks the commit
againstinput_context.head_sha. - "Never assemble, restate, or recompute the payload; never call
finalize_review_dispatchdirectly." - Bounded retry, at most twice, and only for mechanical rejections. Never
change assessment data on a retry. - Keep cross-persona grouping and compound severity for presenting the
review comment only. They must not touch finalization data. - Read proposals and warnings from the same consolidate result.
- Update the scaffold mirror and add drift/content tests that assert the
new contract and the absence of the manual-finalize prose. Add a
CHANGELOG entry.
Also cover: stale dedup prose in uf.review-council.md §3
uf.review-council.md §3 (~L360) still carries "First deduplicate ...
cross-persona grouping" prose left over from the pre-migration wording.
Its §5 finalization is already consolidate-with-provenance, so the prose
is harmless to finalization but misleading — an agent following §3
literally could reintroduce the same rejection. The same change should
tidy §3 so dedup/grouping language is explicitly presentation-only.
Related
- audit speckit-testreview command for dispatch data-flow accuracy #756:
speckit.testreview.mdhas the same manual-finalize pattern
(§3.5/§3.7). Separate change; do not fix here. - review-dispatch: host-fallback runs are dispatchable but unfinalizable (host-source model provenance never resolved) #901: a separate cause (host-source model provenance never resolved in
plugin code). It is not fixed by this change.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
fix(review-pr): finalize dispatch via consolidate_dispatch with prove…
fix(review-pr): finalize dispatch via consolidate_dispatch with prove…