Repository navigation
test: seam-verification — three contract test layers + DE-007 pack rule - #783
Conversation
6eadd9e to
f8ad44e
Compare
jflowers
left a comment
There was a problem hiding this comment.
Note: The council verdict is REQUEST CHANGES, but GitHub rejects
REQUEST_CHANGESon a PR authored by the same account, so this posts as a COMMENT. The verdict below stands as the council's decision.
Council Review Verdict: REQUEST CHANGES
Five Divisor reviewers assessed this change; four approve, one requests changes. All 18 CI checks pass. The change is architecturally sound — three seam-verification layers, a census-complete command-contract suite, and the DE-007 pack rule — but the golden layer leaves part of the exact defect class it exists to catch unpinned.
Blocking (HIGH): the 8 format_unleash_exit golden cases assert only the four skeleton sections shared by every variant and never the variant-specific documented output. The spec delta scenario ("every documented output field is asserted present") is unmet for 8 of 43 sites, and a regression that drops or mangles a variant payload passes all 8 cases. Fix: assert a variant-specific marker per case, or extend the tool==lib equivalence already proven for 2 variants to all 8.
Advisories (MEDIUM):
- metrics.md drift baseline "47 discovered, 47 pinned, 0 uncovered" counts all 4
dispatch_review_runssites as pinned, but only the triage input variant is executed anywhere; the code-mode and feedback-mode documented inputs are never exercised. - Two of the five registration-surface properties are vacuous (the SDK registration helper is an identity pass-through, so declared-vs-exposed parity compares an object with itself); CHANGELOG/metrics advertise a "zod parity between TS and JSON-schema declarations" comparison no assertion performs.
- Docs-gate issue #781 carries only the
documentationlabel, making it invisible to the canonical--label docsduplicate-check query; the dual-label fix (#778 precedent) is one command:gh issue edit 781 --add-label docs. - This change adds the 7th and 8th copies of the
withBuntest shim, crossing the CS-004 extraction threshold the repo's own heuristic defines.
| Persona | Verdict |
|---|---|
| divisor-adversary (claude-opus-4-6, heavy) | APPROVE |
| divisor-architect (glm-5-3) | APPROVE |
| divisor-curator (glm-5-3) | APPROVE WITH ADVISORIES |
| divisor-guard (glm-5-3) | APPROVE |
| divisor-testing (glm-5-3) | REQUEST CHANGES |
This review was generated by /uf.review-pr (AI-assisted).
Store the four learning proposals from the address-feedback Tier 2 assessment panels: golden-test equivalence as the strongest affordable pin, per-input-variant contract coverage, claim precision for suite evidence, and shim extraction at the duplication threshold. Addresses PR unbound-force#783 review feedback from @jflowers. Assisted-by: glm-5 Generated with AI assistance (glm-5)
The PR unbound-force#674 prose-to-tool migrations broke in live use (unbound-force#732, migration created. This change verifies them: - Layer 1 (registration surface): new .opencode/test/registration-surface.test.ts -- 20 tests dynamically enumerate all 47 tools across the four plugins, asserting presence, schema-non-empty-iff-declared, and zod/JSON-schema parity - Layer 3 (round-trips and command pins): all 8 writer params pinned in uf-finale.test.ts; dispatch-artifact resume round-trip confirmed in finalize-review-dispatch.test.ts; Go command-contract subtests expanded 10 to 32, census-complete for uf.unleash invocations - DE-007 [MUST] seam-verification rule in the determinism pack (1.1.0 to 1.2.0) with the authoring-time hook in determinism-first SKILL.md - OpenSpec artifacts, CHANGELOG entry (refs unbound-force#765), and 13 Dewey learnings from the workflow Assisted-by: glm-5 Generated with AI assistance (glm-5)
- golden-output-shape: pin all 8 format_unleash_exit variants by tool==lib equivalence with the renderer goldens, so the variant-specific documented output cannot drift (item 1) - dispatch-review-runs: add code-mode and feedback-mode golden contracts for the remaining documented input variants; all four dispatch_review_runs sites now execute under their documented inputs (item 3) - registration-surface: replace the vacuous (b)/(c) key-list comparisons with the load-bearing pre-unbound-force#732 parameters mis-key guard and execution of the z.object(args) validation conversion (item 4) - extract the duplicated withBun/BunRuntime shim to test/helpers/bun-runtime.ts, imported by both new suites (item 5, CS-004) Assisted-by: glm-5 Generated with AI assistance (glm-5)
- CHANGELOG/metrics: restate the Layer 1 property list to what registration-surface.test.ts verifies (presence with description and execute, the pre-unbound-force#732 parameters mis-key guard, z.object(args) execution) instead of the unperformed "zod parity between the TS and JSON-schema declarations" (item 4) - metrics: record where the four dispatch_review_runs sites are pinned and per which input variant; refresh the drift baseline note, task 5.4 matrix rows, aggregate counts, and final verification state to measured values -- 35 files / 985 tests, coverage 95.05% statements / 87.45% branches (item 3) Assisted-by: glm-5 Generated with AI assistance (glm-5)
Store the four learning proposals from the address-feedback Tier 2 assessment panels: golden-test equivalence as the strongest affordable pin, per-input-variant contract coverage, claim precision for suite evidence, and shim extraction at the duplication threshold. Addresses PR unbound-force#783 review feedback from @jflowers. Assisted-by: glm-5 Generated with AI assistance (glm-5)
a90ea61 to
6d9f2d3
Compare
Summary
Three test layers now verify the seams that prose→tool migrations
create, closing the defect class behind #732, #735, #707, and #737.
.opencode/test/registration-surface.test.ts(20 tests)dynamically enumerates all 47 tools across the four plugins,
asserting presence, the biconditional
schema-non-empty-iff-declared property, and zod parity between
TS and JSON-schema declarations.
.opencode/test/golden-output-shape.test.ts(41 tests over 43grep-derived sites) executes each documented tool call and
asserts the documented fields appear in the returned envelope;
the uf.triage-issue: command spec documents dispatch data flows the tools do not return #735 golden contract is pinned in
dispatch-review-runs.test.ts.round-trips pin all 8 writer parameters (including
review_verdictsandlearnings_stored); the dispatch-artifactresume parser round-trip is audited complete; Go-side
TestUnleashCommand_ToolRoutingContractsgrew from 10 to 32census-complete subtests pinning every tool uf.unleash invokes.
verification, CRITICAL severity, pack 1.1.0 → 1.2.0), the
matching authoring-time hook in the determinism-first skill, a
CHANGELOG entry, and the DE-004 defect-to-layer evidence matrix
in
metrics.md. Docs-gate issue docs: cover seam-verification test layers and DE-007 pack/skill additions #781 filed.Closes #765
How to Test
How to Demo
Run
make plugin-testand show the registration-surface,golden-output-shape, and round-trip suites passing. Mutation
demo: mis-key a tool's parameter declaration (the #732 defect
class) and watch Layer 1 fail immediately.
Key Files Changed
.opencode/test/golden-output-shape.test.ts(+1356) — Layer 2 suite.opencode/test/registration-surface.test.ts(+248) — Layer 1 suiteinternal/scaffold/scaffold_test.go(+392) — command-contract pins, 10 → 32 subtests.opencode/test/dispatch-review-runs.test.ts(+79) — uf.triage-issue: command spec documents dispatch data flows the tools do not return #735 golden contract.opencode/test/uf-finale.test.ts,finalize-review-dispatch.test.ts— Layer 3 round-trips.opencode/uf/packs/determinism.md,.opencode/skills/determinism-first/SKILL.md— DE-007 ruleopenspec/changes/seam-verification/— proposal, design, metrics, spec delta, tasks.uf/dewey/learnings/— 13 workflow learningsCHANGELOG.md— seam-verification entryKnown Issues
None blocking. Spec review: APPROVE WITH ADVISORIES (3
iterations). Code review: APPROVE WITH ADVISORIES (1 iteration,
5/5 reviewers).
This PR was generated by /uf.finale (AI-assisted).