Skip to content

fix(scaffold): swap divisor-gaze-testing into triage advisor list - #312

Merged
jflowers merged 3 commits into
unbound-force:mainfrom
jflowers:opsx/gaze-init-triage-advisor
Nov 2, 2026
Merged

jflowers merged 3 commits into
unbound-force:mainfrom
jflowers:opsx/gaze-init-triage-advisor

Conversation

@jflowers

@jflowers jflowers commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Swaps divisor-gaze-testing into the triage advisor list so that all four review modes (code, spec, triage, feedback) list it in place of the generic divisor-testing. This applies both to the gaze repo's own .uf/review-matrix.yaml and to what gaze init writes into consumer repos.

Why

The dispatch planner still includes a discovered divisor agent when it matches the change's scope but isn't advisor-listed for that mode. It runs as a host-fallback run. uf's review-dispatch finalizer rejects the provenance those runs record (unbound-force/unbound-force#901, still open; uf PR #898 only relaxed the variant requirement). In a bulk triage of 12 gaze issues, all 9 panels that included a host-fallback divisor-gaze-testing failed Phase 4.6 finalization. The 3 panels without one finalized cleanly.

Changes

  • .uf/review-matrix.yaml: in advisor.triage, divisor-testing is replaced by divisor-gaze-testing.
  • internal/scaffold/ufconfig.go: syncReviewMatrix now swaps the code, spec, triage, and feedback lists. If a consumer matrix is missing advisor.triage, or it isn't a sequence, the whole matrix file is skipped with the existing warning, so there's never a partial registration. The generic divisor-testing capabilities entry is kept.
  • internal/scaffold/ufconfig_test.go:
    • assertMatrixSwapped now checks the four-mode end-state, which also covers the idempotent no-op case.
    • New cases cover a matrix with no advisor.triage and one where advisor.triage isn't a sequence. Both expect byte-identical output and the warning.
  • Docs: docs/guides/opencode-integration.md, docs/reference/cli/init.md, and an AGENTS.md Recent Changes entry.
  • OpenSpec change: openspec/changes/gaze-init-triage-advisor/. It supersedes the triage-preservation clauses (design D1) of openspec/changes/divisor-gaze-testing/.

Trade-off

Until #901 is fixed, the generic divisor-testing runs as a host-fallback run in triage, just as it already does in code, spec, and feedback.

Verification

  • go build ./...: pass
  • go test -race -count=1 -short -timeout 15m ./...: pass
  • e2e TestRunSelfCheck: pass
  • golangci-lint run: 0 issues
  • .github/scripts/test-validate-module-major.sh: pass
  • .github/scripts/test-validate-workflow-floor.sh: pass
  • Gaze gates: CRAPload 24 against a limit of 38, GazeCRAPload 6 against a limit of 6

Review council

The native verdict is APPROVE WITH ADVISORIES from 7 of 7 reviewers; all 4 advisories are LOW. One of them (a GoDoc reflow) is fixed.

Finalization came back INCONCLUSIVE because of the same #901 defect: the host-fallback divisor-testing run 82b49dc0-e7e1-4d94-a6b7-3cb582ad1e69 in dispatch 817969a8-85e0-475b-b630-69a672f747dd.

Website docs issue: unbound-force/website#366

@jflowers jflowers left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Council review — APPROVE WITH ADVISORIES

Reviewed 6df143d against e7f23b5 (29 files, 557 lines). All six checks pass. The syncReviewMatrix loop extension to triage is correct, and the two new cases pin the all-or-nothing skip at byte level.

Three MEDIUM advisories, none blocking:

  1. Both MODIFIED delta specs omit the template-mandated Previously: note — most load-bearing here because the deltas chain against the still-active predecessor change.
  2. The change record attributes the .uf/review-matrix.yaml triage swap to this PR; that file is byte-identical between base and head. End state correct, audit trail not.
  3. The two derived fixtures inline the same strings.Replace needle with no shared constant or drift guard.

Two LOW notes: tasks.md 5.3 is pre-checked while this council was still evaluating, and the AGENTS.md entry over-attributes the repo-matrix edit.

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

@@ -0,0 +1,35 @@
## MODIFIED Requirements

### Requirement: Gaze repository .uf registration

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Both MODIFIED requirements open without a Previously: note. openspec/schemas/unbound-force/templates/spec.md:16 prescribes one (MP-013 MUST), and it carries the most weight here: this delta chains against the still-active divisor-gaze-testing change's ADDED requirements, so the note is the only in-delta record of the replaced contract.

Add under line 3:

Previously: the matrix advisor lists swapped divisor-testing for divisor-gaze-testing in the code, spec, and feedback modes only; the triage advisor list, the generic divisor-testing capabilities entry, and the uf.review-council.md persona table had to remain unchanged (divisor-gaze-testing design D1).

@@ -0,0 +1,45 @@
## MODIFIED Requirements

### Requirement: Idempotent .uf registration merge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Same gap as the sibling delta: no Previously: under ## MODIFIED Requirements, and this requirement replaces the three-mode, no-skip-clause merge contract. Add under line 3:

Previously: the merge removed divisor-testing from and added divisor-gaze-testing to the code, spec, and feedback advisor lists only, with no skip clause for a missing or non-sequence advisor list.

With the note in place the delta records the contract it replaces independently of the proposal's supersession list, which matters if the two changes are archived out of order.


## What Changes

1. **Gaze repository config** — `.uf/review-matrix.yaml`

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

.uf/review-matrix.yaml is byte-identical between e7f23b5 and 6df143d and does not appear in this PR's diff; the triage swap already held on main before the branch. The end state is correct — what is missing is the record of the split.

Append a note so the change record matches the diff, e.g.:

The repository matrix already carries this end state on main (landed as the 2026-11-01 bulk-triage mitigation); this change pins it via the end-state test and extends the gaze init merge to triage.

Comment thread internal/scaffold/ufconfig_test.go Outdated
// ufMatrixFixtureNoTriage is ufMatrixFixture with its advisor.triage
// block removed. Staged once so the case input and its byte-identity
// expectation cannot drift apart.
var ufMatrixFixtureNoTriage = strings.Replace(ufMatrixFixture,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Both derived fixtures inline the same ~100-character strings.Replace needle. strings.Replace returns the input unchanged when the needle stops matching, so a future edit to ufMatrixFixture would surface as a success-path diagnostic in the two skip cases rather than as fixture drift.

Extract the needle to one constant and assert each derived fixture differs from ufMatrixFixture:

if ufMatrixFixtureNoTriage == ufMatrixFixture {
	t.Fatal("ufMatrixFixtureNoTriage equals base fixture: update the Replace needle")
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in 5147cba.

ufTriageBlockNeedle now holds the block once, and both fixtures derive through matrixFixtureWithTriage, which fails the test when strings.Replace is a no-op:

ufconfig_test.go:113: ufMatrixFixture no longer contains ufTriageBlockNeedle "  TRIAGE-DRIFT:..."; update the needle

Verified by temporarily corrupting the needle — the guard fires at derivation time, before any case runs, so drift can no longer masquerade as a success-path diagnostic. Full go test -race -count=1 -short ./... passes (22 packages) and golangci-lint run reports 0 issues.

Comment thread AGENTS.md

## Recent Changes

- gaze-init-triage-advisor: Swapped `divisor-gaze-testing` into the `triage` advisor list, completing the divisor-gaze-testing advisor swap across all four review modes. The gaze repo's `.uf/review-matrix.yaml` `advisor.triage` now lists `divisor-gaze-testing` in place of the generic `divisor-testing`, and `syncReviewMatrix` (`internal/scaffold/ufconfig.go`) swaps the `code`, `spec`, `triage`, and `feedback` lists so `gaze init` consumers get the same end-state; a consumer matrix missing or carrying a non-sequence `advisor.triage` skips the whole matrix file with the existing warning (no partial registration). The generic `divisor-testing` capabilities entry is preserved. Rationale: the dispatch planner includes scope-matching discovered divisor agents that are not advisor-listed for a mode as host-fallback runs, and uf's review-dispatch finalizer rejects host-fallback run provenance (unbound-force/unbound-force#901, open; uf PR #898 only relaxed the variant requirement) — 9 of 12 triage panels that included a host-fallback `divisor-gaze-testing` failed Phase 4.6 finalization. Accepted trade-off: the generic `divisor-testing` becomes host-fallback in triage (as it already was in code/spec/feedback) until #901 is fixed. Tests: `assertMatrixSwapped` in `internal/scaffold/ufconfig_test.go` now asserts the four-mode end-state (covering the idempotent no-op case) and new "matrix without advisor.triage" and "non-sequence advisor.triage" cases assert byte-identical output plus the warning. Docs: `docs/guides/opencode-integration.md`, `docs/reference/cli/init.md`. Website docs issue: unbound-force/website#366. Supersedes the triage-preservation clauses (design D1) of `openspec/changes/divisor-gaze-testing/`. OpenSpec change: `openspec/changes/gaze-init-triage-advisor/`.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This entry attributes the repo-side .uf/review-matrix.yaml triage swap to the change, but that file is absent from the PR diff and identical at base and head. Attribute only what the diff carries (the syncReviewMatrix mode extension, tests, docs) and name the pre-existing matrix state in a parenthetical.

Discovered divisor agents that are not advisor-listed for a mode are
dispatched as host-fallback runs, and uf's review-dispatch finalizer
rejects host-fallback run provenance (unbound-force/unbound-force#901).
9 of 12 triage panels that included a host-fallback divisor-gaze-testing
failed Phase 4.6 finalization.

- .uf/review-matrix.yaml: advisor.triage lists divisor-gaze-testing in
  place of divisor-testing
- syncReviewMatrix now swaps the code, spec, triage, and feedback lists;
  a matrix missing advisor.triage is skipped with the existing warning
- tests assert the four-mode end-state plus missing/non-sequence triage
- docs and AGENTS.md updated (website issue unbound-force/website#366)

OpenSpec change: openspec/changes/gaze-init-triage-advisor/
@jflowers
jflowers force-pushed the opsx/gaze-init-triage-advisor branch from 6df143d to 2fc3fe1 Compare November 2, 2026 19:33
Extract the advisor.triage block to ufTriageBlockNeedle and derive both
skip-case fixtures through matrixFixtureWithTriage, which fails when the
replacement is a no-op. strings.Replace silently returns the input when
the needle stops matching, so a base-fixture edit would otherwise surface
as a misleading success-path diagnostic in the two skip cases instead of
fixture drift.
@jflowers
jflowers merged commit 5167f68 into unbound-force:main Nov 2, 2026
6 checks passed
@jflowers
jflowers deleted the opsx/gaze-init-triage-advisor branch November 15, 2026 21:35
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