Repository navigation
Description
Context
Two LOW-severity findings from the PR #582 review council (round 2) were deliberately deferred rather than folded into that PR. Both are small internal/gate cleanups and can land as one follow-up change
after #582 merges. Tracked here per the technical-debt-logging rule.
Item 1: Reconcile Options.Stderr with GATE-FR-011
gate.Options.Stderr (internal/gate/gate.go) is filled by defaults(), plumbed from gateParams.stderr, and asserted by TestDefaults_FillsZeroValues / TestDefaults_PreservesSetValues — but no code path reads or writes it; Cobra owns stderr routing. The zero-waste mandate and convention-pack CS-002 discourage
reserved-for-future surface.
Deferred because the obvious fix conflicts with GATE-FR-011 (openspec/changes/uf-gate/specs/gate-command.md), which mandates "a gateParams struct with io.Writer injection for both stdout
and stderr." Resolving cleanly requires choosing a direction:
- (a) Amend GATE-FR-011 to "stdout writer injection; stderr routing owned by Cobra," then drop
Options.StderrandgateParams.stderrand update the defaults tests; or - (b) Keep the field and give it a real consumer.
Option (a) is preferred unless a diagnostics consumer is imminent.
Item 2: Register a JSON Schema for GateReport
GateReport declares SchemaVersion "1.0.0" as a Constitution III stability contract, but the contract is enforced only by round-trip unmarshal plus field-by-field assertions (internal/gate/gate_test.go,
cmd/unbound-force/gate_test.go). No schema is registered in schemas/ (the registry covers feedback-triage, issue-triage, model-matrix, review-dispatch, and others) and no conformance test validates FormatJSON output.
Fix: author a JSON Schema for the gate report, register it under schemas/ following the existing conventions, and add a conformance test that validates FormatJSON output through the internal/schemas machinery. Note: the doctor command's JSON output has the same gap; consider covering it in the same change or filing
separately.
Acceptance Criteria
- GATE-FR-011 and the
Options.Stderrfield are reconciled (spec amended or field removed, tests updated) - GateReport JSON Schema registered in
schemas/with a FormatJSON conformance test -
go test -race -count=1 ./internal/gate/... ./cmd/unbound-force/...passes; CI green
References
- PR feat: add headless uf gate command for constitution enforcement #582 (findings: architect dead-code LOW; testing contract-validation LOW)
- Review artifact: .uf/artifacts/dispatch/ (PR feat: add headless uf gate command for constitution enforcement #582 round 2)
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
fix(gate): deduplicate resolution-failure prelude and document layout…