Skip to content

fix(review-dispatch): accept variantless parent model at finalization - #898

Merged
jflowers merged 2 commits into
unbound-force:mainfrom
jflowers:quick/accept-variantless-parent-model
Nov 1, 2026
Merged

jflowers merged 2 commits into
unbound-force:mainfrom
jflowers:quick/accept-variantless-parent-model

Conversation

@jflowers

@jflowers jflowers commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Review-dispatch finalization now accepts variantless parent models. The validateRunModel finalizer check was relaxed at both the host path and the host-resolved-advisor path: successful runs now require only a non-null resolved_parent_model, matching the resolveHostModel writer contract and nullable persistence schema — models like enmaas/rits/zai-org/glm-5-3 (whose provider reports no variant) no longer fail finalization to INCONCLUSIVE. The missing-provenance rejection message is now "requires resolved parent model".

Includes finalize-error-boundaries regression tests (null-model still rejected; null-variant accepted for both run sources), an identical scaffold-mirror update, an OpenSpec change record (openspec/changes/accept-variantless-parent-model/ with proposal, design, tasks, and a spec delta establishing 'Finalization Model Validation' via ADDED plus a same-name MODIFIED 'Review Dispatch Artifact' supersession carrying the archive-ordering constraint), a CHANGELOG entry, and documentation-gate issues #891 (in-repo) and unbound-force/website#360, both labeled docs.

How to Test

Full gate: make check (lint, Go race tests, build, coverage gate, plugin suite). Targeted: cd .opencode && npx vitest run test/finalize-error-boundaries.test.ts (31 tests covering host/host-resolved-advisor null-model rejection and null-variant acceptance). Reproduce the original failure scenario: a provider like enmaas/rits/zai-org/glm-5-3 reporting no variant now finalizes successfully instead of INCONCLUSIVE.

How to Demo

Run any review dispatch (/uf.review-pr, /uf.review-council, or /uf.unleash Step 6) from a parent session whose model reports no variant — the council now finalizes normally (APPROVE / REQUEST CHANGES / etc.) instead of failing closed to INCONCLUSIVE with "requires resolved parent model and variant".

Key Files Changed

File Change
.opencode/plugins/review-dispatch/index.ts Relax validateRunModel host + host-resolved-advisor paths (+4/−4)
internal/scaffold/assets/opencode/plugins/review-dispatch/index.ts Scaffold mirror (+4/−4)
.opencode/test/finalize-error-boundaries.test.ts Regression tests (+66/−3)
openspec/changes/accept-variantless-parent-model/ proposal.md (210), design.md (266), tasks.md (80), specs/review-dispatch/spec.md (371)
CHANGELOG.md Unreleased/Fixed entry (17)
.uf/dewey/learnings/ 8 retrospective learning files

Known Issues

Advisory follow-ups from the review council (verdict: APPROVE WITH ADVISORIES, correlation e67980fb, 0 blocking findings):

Notes: the user's dispatch fix c95ea4a5 (submit-tool arg validation) is already in the upstream/main base; docs-gate applicability decision recorded in the workflow.

Test results: make check exit 0 — coverage gate 95.82% statements ≥ 94% floor, plugin suite 50 files 1664/1664 tests.

This PR was generated by /uf.finale (AI-assisted).

validateRunModel rejected successful host and host-resolved advisor
runs unless both resolved_parent_model and resolved_parent_variant
were non-null, while resolveHostModel legitimately resolves
variant-less parent models when the provider reports none (e.g.
enmaas/rits/zai-org/glm-5-3) and the persistence schema sanctions
a null variant. The stale check fail-closed otherwise healthy
dispatches into INCONCLUSIVE verdicts (observed on dewey PR unbound-force#135).

Require only a non-null resolved_parent_model on the host and
host-resolved advisor paths; keep the explicit/advisor-with-model
no-provenance rule, plan-vs-run comparison, and model mismatch
logic unchanged. Add regression coverage for variantless
acceptance and null-model rejection in both paths, mirror the
plugin in scaffold assets, and record the OpenSpec delta and
CHANGELOG entry.

Refs unbound-force#891
Council review iterations 2-3 required the spec record to be
mechanically archivable and the documentation gate complete
before merge:

- Reshape 'Finalization Model Validation' from MODIFIED to
  ADDED with full scenario continuity (predecessor scenario
  names carried, variantless scenarios added) so archive
  cannot orphan the requirement or drop scenarios
- Add design.md recording D1-D3 decisions, the archive
  ordering constraint (must archive after
  review-council-multi-model-fanout), and risks
- Cite both documentation-gate tracks in CHANGELOG,
  proposal, and tasks: in-repo unbound-force#891 and
  unbound-force/website#360
- Store 4 retrospective Dewey learnings (openspec FR-id
  allocation, supersession predecessor enumeration, ADDED
  description budget, phantom-compression guard)

Refs unbound-force#891
Assisted-by: glm-5
Generated with AI assistance (glm-5)
@jflowers
jflowers requested a review from a team as a code owner November 1, 2026 18:51
@jflowers jflowers self-assigned this Nov 1, 2026

@jflowers jflowers left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Council Verdict: APPROVE WITH ADVISORIES

4/4 reviewer runs succeeded — divisor-adversary (heavy), divisor-architect, divisor-curator, divisor-guard (standard), correlation d246ded9-1f9d-4cf2-bfce-b5d08a72f2ee (artifact: .uf/artifacts/dispatch/d246ded9-1f9d-4cf2-bfce-b5d08a72f2ee.json). Every persona returns APPROVE WITH ADVISORIES; zero blocking findings. The verdict maps to COMMENT.

What this PR does well: the validateRunModel relaxation is minimal (+4/−4) and matches the resolveHostModel() writer contract and the nullable persistence schema; null-model rejection is retained and regression-tested for both host and host-resolved-advisor sources; the scaffold mirror is byte-identical; CI is fully green on head e5f2d9ec (Build and Test, Plugin Tests, Council Review Pipeline Tests, linters, CRAP, security scans). This review's own dispatch ran on the variantless model enmaas/rits/zai-org/glm-5-3 and finalized cleanly — end-to-end confirmation of the fix. The prior council's docs-gate advisory is resolved: #891 and unbound-force/website#360 both verified open.

Security: No issues. resolved_parent_model stays required non-null and cross-checked against reported_model; only the redundant variant half of the both-non-null check is relaxed. No new privilege or input paths.

Findings (3 MEDIUM + 4 LOW per-run, consolidating to 2 MEDIUM + 2 LOW distinct advisories — all in the OpenSpec artifact record, none in shipped code):

Severity Finding Location Found by
MEDIUM ADDED requirement lacks FR id line (MP-013) + MP-014 allocation header specs/review-dispatch/spec.md:22 architect, guard
MEDIUM Governance-normalization deferral untracked (zero-waste) proposal.md:47 guard, curator
LOW Duplicate null-model rejection scenarios specs/review-dispatch/spec.md:67,77 architect, guard
LOW Acceptance tests rely on fixture implicit null default .opencode/test/finalize-error-boundaries.test.ts:161 adversary

The FR-id allocation is cheapest to fix before archive — after archive the canonical spec carries a permanently id-less requirement and repair costs an entire additional OpenSpec change.

This review was generated by /uf.review-pr (AI-assisted).


## ADDED Requirements

### Requirement: Finalization Model Validation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM · spec-governance] — divisor-architect, divisor-guard

The ADDED 'Finalization Model Validation' requirement opens its body without an FR id line, violating meta-prompt MP-013 ("body opens with an id line stating its FR identifier") and MP-002 (every functional requirement carries a unique, stable FR-NNN identifier). Repo-wide, every other requirement in every review-dispatch delta carries an id line — 24 id lines across six delta files, the live series reaching RD-FR-036 — which makes this the only id-less established requirement in the capability. The delta is internally inconsistent: its own MODIFIED 'Review Dispatch Artifact' opens with **ID: RD-FR-008** (line 118), and the delta lacks the MP-014 allocation header (precedent: model-matrix-delegation/specs/unleash/spec.md lines 5-18).

design.md's non-goal declines allocation by citing MP-002's no-renumbering rule, but that rule governs existing identifiers, not new allocations for newly established requirements — the distinction this PR's own learning (openspec-20261101T174938) records while the artifact ships unrepaired.

At archive, the canonical spec gains a permanently id-less requirement and the RD-FR traceability chain (next allocation: RD-FR-037) breaks; repair then requires an entire additional OpenSpec change. Fixing before archive: allocate RD-FR-037, open the body with **ID: RD-FR-037** This requirement MUST be satisfied., add the allocation header, update design.md's non-goal, and re-run openspec validate accept-variantless-parent-model --strict (the id line coexists with the 500-character ADDED description budget per the RD-FR-028/RD-FR-032 precedent).

archive-ordering constraint. This change is the fix-loop
response.

Workflow-record note: this OpenSpec artifact set rides the

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM · governance-tracking] — divisor-guard, divisor-curator

The workflow-record note defers the tier-deviation normalization (quick-tier branch carrying OpenSpec artifacts, diverging from MP-007's tier-to-branch mapping) to "a separate future governance change, out of scope for this fix loop", but nothing tracks that promised follow-up. The proposal and CHANGELOG cite only documentation issues (#891, unbound-force/website#360), and repo-wide issue searches across all states ("tier escalation", "council-mandated", "mid-flight", "quick tier opsx") return only unrelated issues (#468, #728, #802, #803; closed #635/#758/#764).

The prior council listed a governance-normalization issue as an advisory follow-up; with no tracker, the deferred work has no verifiable existence and risks evaporating after merge — a zero-waste concern (AGENTS.md Zero-waste rule). Filing the tracking issue and referencing it from the proposal closes the gap while keeping the deferral itself intact.

)
})

it("accepts a successful host run whose parent model has no variant", async () => {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LOW · test-resilience] — divisor-adversary

The variantless-acceptance tests (line 161 and the host-resolved-advisor twin at line 200) never assign resolved_parent_variant; they rely on the sample fixture's implicit null default (schemas/review-dispatch/samples/sample-review-dispatch.json line 49, preserved through structuredClone in payload()). The tests exercise the null-variant path today, but the coverage couples to fixture state outside the test body: a later fixture edit that introduces a non-null variant keeps these tests green while removing coverage of exactly the null-variant relaxation this change ships.

Assigning data.runs[0]!.resolved_parent_variant = null in the test bodies produces an identical payload state and makes the coverage explicit; an inline comment naming the fixture reliance works too.

- **THEN** validation fails with a message containing
"requires resolved parent model"

#### Scenario: Host-resolved advisor without resolved parent model fails

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LOW · spec-redundancy] — divisor-architect, divisor-guard

The ADDED requirement carries the null-model rejection scenario twice with equivalent bodies: 'Host-resolved advisor without resolved parent fails' (line 67) and 'Host-resolved advisor without resolved parent model fails' (line 77) — both GIVEN advisor + null requested_model + null resolved_parent_model, THEN fails with "requires resolved parent model". The dual-lineage naming rationale has no mechanical force: archive's scenario-continuity check compares MODIFIED blocks against the canonical spec, ADDED entries face no such check, and the fallback lineage's names can never reach the canonical spec (that delta's FMV MODIFIED is an unarchivable orphan). The union lands both names in the canonical spec at archive as redundant scenarios.

Keeping one scenario name (either) and recording the lineage history in design.md prose — which already carries it — removes the duplication without losing the record.

@jflowers
jflowers merged commit 46d81b2 into unbound-force:main Nov 1, 2026
17 checks passed
jflowers added a commit that referenced this pull request Nov 15, 2026
Issue #1010 reported finalize_review_dispatch rejecting successful
host-inherited advisor runs when the resolved parent model carried
no variant. The fix already landed on main via PR #898 (commit
e974e9e); this branch verified the repro against main with 171/171
targeted regression tests green and quick pre-flight PASS, so the
issue closes by verification. Record the CHANGELOG closure entry.

Fixes: #1010

Assisted-by: glm-5
Generated with AI assistance (glm-5)
@jflowers
jflowers deleted the quick/accept-variantless-parent-model branch November 15, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant