Repository navigation
feat: one-call consolidate_dispatch finalization and kind-native run verdicts - #718
Conversation
…ew-council §5 (task 3.2)
…ess-feedback §2.3.8 (task 3.3)
Eliminate hand-transcribed finalization payloads, the incident class behind this change: consolidate_dispatch now finalizes internally from the persisted session when given provenance, and runs carry kind-native verdicts (triage: VALID/INVALID/NEEDS-CLARIFICATION, feedback: ACCEPT/AUTHOR-DECIDES) instead of generic APPROVE-family values. - Plugin: hoist workflow kind above run emission; emit kind-native run verdicts via workflowVerdictValue; fix feedback totality (REQUEST CHANGES -> AUTHOR-DECIDES); use lossless back-projection for the payload verdict - uf.triage-issue: rewrite S4.6 to the single-call pattern (authoritative finalizer output, bounded mechanical retry, fail-closed provenance); fix the gh api --slurp/--jq incompatibility in S1.1; add the bounded duplicate-search fallback in S1.4 - Tests: triage/feedback internal-finalize regressions, payload-without-provenance finalization, blocking-class coverage for both kinds - Contract tests: pin one-call language; reject stale manual finalization text and the incompatible gh slurp flag - CHANGELOG entry and spec design/tasks updates Fixes unbound-force#712 Assisted-by: glm-5-3 Generated with AI assistance (glm-5-3)
dc2eae2 to
988ccab
Compare
jflowers
left a comment
There was a problem hiding this comment.
Review Verdict: APPROVE WITH ADVISORIES
Council dispatch (5 planned, 3 successful — architect APPROVE, curator and testing APPROVE WITH ADVISORIES; adversary/guard failed with retryable infra errors and did not vote) reviewed 17 files (+1609/-177) against OpenSpec change dispatch-finalize-determinism and issue #712 (all 5 acceptance criteria covered).
Advisories (non-blocking)
MEDIUM — test-coverage (.opencode/plugins/review-dispatch/index.ts:3297): advisories computation reconditioned from raw verdict to projectedVerdict; for mixed-severity feedback dispatches this changes the observable payload, but no test asserts advisories — single-severity fixtures can't distinguish the conditionings, so a revert would pass the suite. Recommend a mixed-severity feedback case (HIGH + MEDIUM/LOW) asserting the advisory appears.
LOW — regression-protection (internal/scaffold/command_contract_test.go:290): FR-004 retry bound ("at most twice", default-deny) and FR-003 verdict_reason purity are not contract-pinned.
LOW — documentation-traceability (openspec/changes/dispatch-finalize-determinism/tasks.md:92): unbound-force/website#303 exists but is untraceable from the change record (#717 placeholder unfilled, tasks.md 4.6 lacks reference, missing docs label).
LOW — content-pipeline: the incident→determinism narrative is strong Principle VI blog material; no tracking issue exists.
CI: all 14 checks pass/neutral/skip. Pre-flight: PASS (ci-aware, CI-covered).
This review was generated by /uf.review-pr (AI-assisted).
| const projectedVerdict = projectNativeValue(workflowResult.value) | ||
|
|
||
| // Build advisories for advisory-level verdicts. | ||
| const advisories = projectedVerdict === "APPROVE WITH ADVISORIES" ? buildAdvisories(consolidatedFindings) : [] |
There was a problem hiding this comment.
MEDIUM — test-coverage (divisor-testing): No test pins the advisories field after this reconditioning. For feedback-kind dispatches with mixed severities, advisories changes from [] to populated (REQUEST CHANGES projects to AUTHOR-DECIDES, which back-projects to APPROVE WITH ADVISORIES). Single-severity fixtures (LOW-only, HIGH-only) produce identical results under both conditionings. Recommend one mixed-severity feedback test (one HIGH + one MEDIUM/LOW finding) asserting the advisory appears in advisories.
| } | ||
| } | ||
|
|
||
| func TestCommandContracts_RejectStaleManualFinalizationLanguage(t *testing.T) { |
There was a problem hiding this comment.
LOW — regression-protection (divisor-testing): The bounded mechanical-retry policy ("retry the identical consolidate_dispatch call", "at most twice", "default-deny") and FR-003's verdict_reason purity rule ("do not summarize action completion in verdict_reason") aren't pinned by contract clauses — future edits to these gate-protected limits would pass silently.
| gates untouched, no governance gate modified, artifacts | ||
| remain tool-authoritative (proposal Constitution Alignment | ||
| I-V) | ||
| - [x] 4.6 File a cross-repo documentation issue in |
There was a problem hiding this comment.
LOW — documentation-traceability (divisor-curator): Task 4.6 is checked without recording the cross-repo website issue. Consider recording unbound-force/website#303's URL here (or completing the "to be linked" line in #717) and adding the docs label to unbound-force/website#303 so label-filtered duplicate checks surface it.
Summary
The three review commands (
/uf.triage-issue,/uf.review-council,/uf.address-feedback) previously hand-assembled ~23 KB closedfinalization payloads and transcribed them into
finalize_review_dispatch— an error-prone step responsible forproduction-incident-class failures. This change makes
consolidate_dispatchfinalize internally from the persistedsession when given provenance (
branch,commit,workflow_id),and emit kind-native run verdicts (triage:
VALID/INVALID/NEEDS-CLARIFICATION, feedback: ACCEPT/AUTHOR-DECIDES)
instead of generic APPROVE-family values. The three commands now
perform exactly one
consolidate_dispatchcall per finalizationattempt, treat the finalizer's output as authoritative, and fail
closed (INCONCLUSIVE) on non-mechanical errors or exhausted
bounded retries (max 2).
Also fixes the
gh api --paginate --slurp+--jqflagincompatibility in
/uf.triage-issue§1.1 and adds a boundedone-retry duplicate-search fallback in §1.4.
Closes #712
How to Test
make plugin-test— 577 tests including new triage/feedbackinternal-finalize regressions
make check— full gate (lint,go test -race, build,coverage-gate, plugin suite); coverage 94.2% stmts / 85.54%
branches
go test ./internal/scaffold/ -run TestCommandContracts—contract clauses pin the one-call language and reject stale
manual-assembly text
cmpthe four.opencode/↔internal/scaffold/assets/opencode/pairs (byte-identical)/uf.triage-issue <N>on an open issue — §4.6issues exactly one
consolidate_dispatchcall with provenanceand reports the finalizer's authoritative output
How to Demo
/uf.triage-issue <N>on any open issue. In §4.6, observea single
consolidate_dispatchcall whose only argument isthe provenance
{branch, commit, workflow_id: "uf.triage-issue"}— no payload assembly — followed by theauthoritative
artifact_pathandreview_verdict./uf.review-councilon a branch: §5 finalizes everyiteration (including plan-failure and fail-closed early-stop
paths) through one call per iteration.
Key Files Changed
.opencode/plugins/review-dispatch/index.ts+ scaffold mirror— kind-native run-verdict emission, feedback totality fix,
lossless back-projection for the payload verdict
.opencode/commands/uf.triage-issue.md,uf.review-council.md,uf.address-feedback.md+ scaffold mirrors — one-callfinalization pattern
.opencode/test/consolidate-dispatch.test.ts—internal-finalize regression tests for both kinds +
payload-without-provenance
internal/scaffold/command_contract_test.go— contractclauses pinning the new command language
CHANGELOG.md,openspec/changes/dispatch-finalize-determinism/(proposal, design, specs, tasks),
.uf/dewey/learnings/Known Issues
Review council verdict: APPROVE WITH ADVISORIES (3 iterations;
final artifact
.uf/artifacts/dispatch/635a713e-ddcf-4bb8-9e62-2dca9f43158f.json).uf.review-pr.md§5b still mandates manualfinalize_review_dispatchassembly — deliberately out of thischange's FR-002 scope; follow-up OpenSpec change candidate.
pinned in contract clauses (only FR-007's bound is).
commands; pre-existing
workflowVerdictValuestring returntype; design decision 2 readability; two-regime boundary
comment in the negative test; Dewey learnings AGENTS.md
commit-scope wording gap; feedback tests don't assert the
advisoriesfield; internal-finalize test scaffoldingduplication.
Six spec-review advisories (design-judgment calls) also await a
human ruling; see the artifacts under
.uf/artifacts/dispatch/and the change directory.
This PR was generated by /uf.finale (AI-assisted).