fix(gaze-test-generator): replace advisory compile check with concrete pre-write gate - #206
Open
jflowers wants to merge 1 commit into
Open
Conversation
yvonnedevlinrh
approved these changes
Aug 4, 2026
yvonnedevlinrh
left a comment
Contributor
There was a problem hiding this comment.
Clean behavioural change that tightens a soft advisory into a concrete enforceable gate. Both agent prompt copies are byte-identical. Complete OpenSpec artifacts demonstrate planning rigour. All CI checks pass. No security, accuracy, or constitution concerns.
…e pre-write gate - Replace "ALWAYS verify generated code compiles" advisory prose with a numbered 3-step protocol using MUST NOT halt language - Agent now runs `go build` before any Write or Edit tool call and halts if compilation fails (FR-001) - Update Output Format section to reference pre-write gate for individual file verification vs batch integrity check (FR-003) - Sync active runtime copy to match scaffold canonical copy - Add OpenSpec change artifacts (proposal, design, specs, tasks) Fixes: unbound-force#204
yvonnedevlinrh
force-pushed
the
opsx/fix-test-generator-compile-gate
branch
from
August 4, 2026 15:45
d3e8675 to
ac6d400
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
gaze-test-generatoragent's compile verification was advisoryprose only ("ALWAYS verify generated code compiles before reporting
success"). Under context compression or fast-path reasoning, this
check could be skipped, allowing the agent to write non-compiling
test files to disk.
This PR replaces the advisory text with a concrete 3-step pre-write
compile gate protocol using MUST NOT halt language. The agent now
runs
go build ./path/to/package/...before any Write or Edit toolcall and halts if compilation fails.
This is a port of the fix from unbound-force/unbound-force#404,
which was incorrectly applied in the unbound-force repo instead of
the gaze repo where the scaffold canonical copy lives.
Fixes: #204
How to Verify
Verify old advisory text is gone:
Should return no results.
Verify new protocol is present:
Should return the halt condition.
Verify both copies are identical:
Build and tests pass:
Key Files Changed
.opencode/agents/gaze-test-generator.md— active runtime copyinternal/scaffold/assets/agents/gaze-test-generator.md— scaffold canonical copyopenspec/changes/fix-test-generator-compile-gate/— OpenSpec change artifacts