Repository navigation
fix(python): update bare-verify tests for the default gate set - #499
Merged
Merged
Conversation
#475 made a bare verify run the template gate as well as the codegen gate. Two tests still described the old behaviour: one asserted a single stderr line, the other ran a config project with no prompt templates. They now match docs/features/cli.md and the Unreleased CHANGELOG entry; the code was right.
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.
What Changed
test_cli_config_verify.py:test_verify_codegen_bare_defaults_to_codegennow copies the canonicalprompts/directory into the temp project. Bareverifyalso runs the template gate against the defaultprompts/root, and the fitness model'stemplate.promptrefs resolve there. Before this change the test exited 1.test_cli_verify_requirements.py: the "no requirement, no generators selected" test now expects two stderr lines instead of one. The first is the default-gate-set note, which now readsrunning --codegen --templates (default).. The second is the template gate's skip note, because no--promptsroot is named. Before this change the single-value unpack raisedValueError.verifygate set that71e9cd7c6introduced. Those two tests were the failing Python gate onmain.Validation
Risk Assessment
✅ Low: Test-only edits that match
_cmd_verify's current behavior, which runs the template gate (prompts/ root) and prints the skip note. No source behavior changes.Testing
The change only edits test files, since the CLI code was already right. I ran the two target tests at the target commit and both pass. With the old test files from the base commit they fail, so the red CI is reproduced and the fix is confirmed. I then ran the full Python suite, split into the non-integration part and the Docker-backed integration part as
ci-local.shdoes: 3812 passed, plus 420 passed and 11 skipped. The TypeScript baseline had already passed. No product code changed, and the worktree is clean.metaobjects verifyover a model with no requirements and no generators exits 0 and prints exactly the two expected stderr lines (default gate-set note, then template-gate skip note)metaobjects verifyon a config project with prompts present exits 0 aftergen(codegen + template gate)Evidence: Before fix: base-commit tests fail (2 failed)
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
metaobjects verifyover a model with no requirements and no generators exits 0 and prints exactly the two expected stderr lines (default gate-set note, then template-gate skip note)metaobjects verifyon a config project with prompts present exits 0 aftergen(codegen + template gate)scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchainsuv run --frozen pytest tests/codegen/test_cli_verify_requirements.py tests/codegen/test_cli_config_verify.py -qat target commit (36 passed)Same command with the two test files checked out from base fb2db7822 (2 failed, 34 passed), then restored to HEADuv run --extra integration pytest tests/ --ignore=tests/integration -q -n 8(3812 passed)uv run --extra integration pytest tests/integration -q -n 8with docker up (420 passed, 11 skipped)Baselinescripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchains(ran before this phase, passed)⏭️ **Document** - skipped
Step was skipped.
✅ **Push** - passed
✅ No issues found.