Repository navigation
fix(review-dispatch): derive verdict from persona votes (issue #764) - #779
Conversation
jflowers
left a comment
There was a problem hiding this comment.
Council Review: REQUEST CHANGES
Note: The council verdict is REQUEST CHANGES. GitHub does not allow requesting changes on one's own PR, so this review posts as a COMMENT.
4/4 reviewer runs succeeded (adversary: APPROVE WITH ADVISORIES, architect: APPROVE, curator: REQUEST CHANGES, guard: APPROVE; envoy/herald/scribe/sre/testing skipped by dispatch policy). All 17 CI checks pass on 84b0626.
The code fix is sound: deriving workflow_result.value and verdict from calculatedWorkflowValue — the same vote-based function the finalizer validates with — makes emitter/validator disagreement structurally impossible, and the four regression tests pin the previously unfinalizable panel shapes. Adversary, architect, and guard raise no blocking code findings.
Two HIGH documentation-accuracy findings block the merge. Both concern spec artifacts whose defects the change's own shipped learnings declare and prescribe fixes for, without the artifact text being amended:
- [HIGH] proposal.md:109 — Constitution Alignment assesses only Principles I-IV of the six active v1.4.0 principles; the Compliance Review gate requires all-principle assessment. Principle VI (Deterministic Execution) is this change's strongest alignment citation.
- [HIGH] spec.md:77 (FR-011) — the "equals on every input" / "outputs unchanged" invariance claim is false on #751-contaminated panels; rescope to the clean input class and name #751 as the tracked exception before the delta archives into a governing MUST.
Also recorded:
- [MEDIUM] tasks.md:74 — task 4.1 attributes scaffold drift tests to
make plugin-test; they are Go tests undermake test/make check. - [LOW] .opencode/plugins/review-dispatch/index.ts — the D3 fixed-point invariant (
advisories: []safety) is maintained by convention rather than type-checkable; documented in design.md and the call-site comment.
This review was generated by /uf.review-pr (AI-assisted).
| validation defect, not verdict derivation), #746/#760 (dispatch | ||
| session collision), #763 (`diff_path` documentation). | ||
|
|
||
| ## Constitution Alignment |
There was a problem hiding this comment.
[HIGH] documentation-completeness: The Constitution Alignment section assesses only Principles I-IV; the org constitution is v1.4.0 with six active principles, and its Compliance Review rule requires the planning-phase Constitution Check gate to verify alignment with ALL active principles (proposal.md:109; tasks.md task 4.3 likewise verifies only I-IV).
Principles V (Security by Default) and VI (Deterministic Execution) receive no assessment. The change's own shipped learnings declare this defect — constitution-20261020T001445-jay-flowers.md states proposals assessing only I-IV fail the Compliance Review gate's all-principles requirement, and openspec-20261020T113857-jay-flowers.md records this proposal as the observed instance — yet the artifact ships unamended alongside them.
Assessing Principle VI also captures the change's strongest alignment citation: sharing one derivation function between emitter and validator is Deterministic Execution verbatim. Peer post-amendment changes (e.g., fix-triage-issue-dispatch-docs) assess all six principles.
— divisor-curator
|
|
||
| ### Requirement: Council Output Preservation | ||
|
|
||
| FR-011: The change to verdict derivation MUST NOT alter |
There was a problem hiding this comment.
[HIGH] documentation-accuracy: FR-011 states the council/test-review invariance as universal — "the vote-based value equals the severity-ladder value on every input" and "emitted payloads MUST remain identical to the previous severity-derived behavior" (spec.md:77-81). The claim is false on #751-contaminated panels: deduplicateFindings has no status filter, so a failed run's findings enter the old severity ladder but not the vote count. Those panels also previously failed closed with no artifact, so "identical to the previous behavior" has no referent there.
The change's own learning (review-dispatch-20261020T001450-jay-flowers.md) prescribes the correction: state the invariance over the clean input class and name #751 as the tracked exception. design.md and the council regression-test comment already scope it to successful runs' findings; only the FR-011 requirement text carries the false universal. Once this delta archives into openspec/specs/, it becomes a permanently false governing MUST. The same claim propagates into the CHANGELOG entry and issue #778's body.
— divisor-curator
| findings; consolidation MUST finalize with verdict | ||
| INCONCLUSIVE instead of a value-mismatch rejection | ||
|
|
||
| ## 4. Verification |
There was a problem hiding this comment.
[MEDIUM] documentation-accuracy: Task 4.1 attributes scaffold drift tests to make plugin-test (tasks.md:74). The drift tests are Go tests (internal/scaffold/scaffold_test.go — TestEmbeddedAssets_MatchSource / TestCanonicalSources_AreEmbedded) run by make test / make check; the vitest make plugin-test suite contains no drift tests, per the change's own scaffold-parity-20261020T113858-jay-flowers.md learning.
The verification substance is unaffected — task 4.2 ran make check — but tasks.md is the artifact future changes copy for drift-test verification wording. Amend the task text to name the correct suite.
— divisor-curator
…d-force#764) consolidate_dispatch derived workflow_result.value and verdict from a severity ladder over consolidated findings while finalize_review_dispatch validated them with the vote-based calculatedWorkflowValue. On split panels (feedback: a successful zero-findings ACCEPT run plus findings-bearing runs; triage: split-majority persona votes) both rules fire, so finalization was deterministically rejected and retry budgets burned to INCONCLUSIVE with no artifact (observed on PR unbound-force#761). - Derive payload workflow_result.value and verdict in consolidate_dispatch from calculatedWorkflowValue; keep computeVerdict for verdict_reason and advisory content only - Sync the scaffold mirror asset byte-identical (parity tests) - Pin regression tests for feedback split-panel, triage split-majority, and zero-successful-runs internal finalization - Add openspec change artifacts and CHANGELOG entry Assisted-by: glm-5 Generated with AI assistance (glm-5)
84b0626 to
2be29b0
Compare
Summary
Fixed the deterministic verdict-derivation disagreement between
consolidate_dispatchandfinalize_review_dispatch(issue #764):the emitter now derives
workflow_result.valueandverdictfromcalculatedWorkflowValue— the same vote-based, per-run derivationthe finalizer validates with — instead of the severity ladder over
consolidated findings. One derivation shared by emission and
validation makes disagreement structurally impossible.
Previously, feedback split panels (a zero-findings ACCEPT run plus
findings-bearing runs), triage split-majority panels, and
zero-success panels were rejected with identical value-mismatch
errors on every retry — burning the mechanical-retry budget and
failing closed INCONCLUSIVE with no persisted artifact (observed on
PR #761). They now finalize on the first attempt per the documented
strictest-rule semantics.
verdict_reasonand advisories remainseverity-derived; council and test-review outputs are unchanged
(both derivations agree there).
Implementation:
WorkflowValueInputstructural input type andSeverityLadderVerdicttype tightening in the plugin, byte-identicalscaffold mirror, four regression tests, CHANGELOG entry,
documentation issues filed (#778 in-repo, unbound-force/website#316
cross-repo), and the OpenSpec delta adding FR-009..FR-012 to the
dispatch-finalizationcapability.Closes #764
How to Test
Run
make plugin-test— the full vitest suite must pass (892/892tests), including the four new regression tests in
.opencode/test/consolidate-dispatch.test.ts:finalization and an unmodified payload"
and an unmodified payload"
severity-derived behavior"
a value-mismatch rejection"
Run
make checkfor CI parity — go vet, golangci-lint, Go testswith race detector (including the
internal/scaffolddrift teststhat verify the plugin and its scaffold mirror are byte-identical),
go build, coverage-gate, and the plugin suite. Each new test
verifies the TC-001 property: it failed against the pre-fix plugin
with exactly the issue #764 rejection (
workflow_result.value is AUTHOR-DECIDES; expected ACCEPT) and passes against the fixedplugin.
How to Demo
.opencode/test/consolidate-dispatch.test.ts— the fournew regression tests encode the previously unfinalizable panel
shapes as on-disk session fixtures.
make plugin-test(or target the file with vitest) — thesplit-panel cases finalize ACCEPT/APPROVE through the
internal-finalize path on the first attempt.
.opencode/plugins/review-dispatch/index.tstomainandre-run: the same tests fail with
workflow_result.value is AUTHOR-DECIDES; expected ACCEPT— the exact PR fix(commands): document actual review-dispatch data flows (#735) #761 rejection.Key Files Changed
.opencode/plugins/review-dispatch/index.ts(68 lines) —consolidate_dispatchpayload construction: verdict fromcalculatedWorkflowValue,WorkflowValueInputtype,SeverityLadderVerdicttightening.opencode/test/consolidate-dispatch.test.ts(+466) — feedbacksplit, triage split-majority, council non-regression, zero-success
regression tests
internal/scaffold/assets/opencode/plugins/review-dispatch/index.ts(68 lines) — byte-identical scaffold mirror (drift tests enforce)
CHANGELOG.md— Fixed entryopenspec/changes/fix-dispatch-verdict-derivation/— proposal,design, spec delta (FR-009..FR-012), tasks
.uf/dewey/learnings/(11 files) — retrospective learnings fromthe change workflow
Known Issues
Review gates returned APPROVE WITH ADVISORIES (spec review iteration
2; code review 3/4 reviewers — architect timed out, retryable).
Advisories recorded and consented, not blocking:
Principles I-IV; constitution v1.4.0 has six. Principles V
(Security by Default) and VI (Deterministic Execution) go
unassessed — omitting VI forfeits the change's strongest alignment
evidence. Substance aligns; the gate artifact is incomplete.
universal ("both derivations agree on every input"). The claim is
false on review-dispatch: failed child run with accepted submissions bricks consolidate_dispatch finalization #751-contaminated panels (failed runs' findings enter the
severity ladder but not the vote count); design.md and the
regression test scope it correctly, and review-dispatch: failed child run with accepted submissions bricks consolidate_dispatch finalization #751 is tracked separately.
calculatedWorkflowValueis called with a fixedadvisories: []; the fixed-point invariant is documented only ina code comment, with no compile-time guard against a future
advisory-dependent voting branch.
make plugin-test; they are Go tests run bymake test/make check. Task-record accuracy only; verification substanceunaffected.
[P]marker on task 2.1,FR-012 pinning the severity-derived
verdict_reasonquirk, a74-char line in tasks.md) were consented and remain in the spec
artifacts.
This PR was generated by /uf.finale (AI-assisted).