test+chore: Real-template middleware test and release commit convention - #30
Merged
Merged
Conversation
…vention Lands two related cleanups from the open backlog. * Add an integration test class that renders the real v3.x middleware Jinja2 template (committed under tests/fixtures/middleware_template/ so the suite stays offline). Each --hook-type and the no-flag case is rendered, parsed with ast, and checked for the fastmcp imports and Middleware subclass shape that the synthetic mock_mcp_project fixture doesn't exercise. Closes #3. * scripts/release.sh now constructs the release commit message from the version argument using the project's actual convention ("chore: Release fips-agents-cli vX.Y.Z" with optional " — <summary>") rather than accepting an arbitrary commit-message string. Documented in CLAUDE.md so future contributors keep "git log --grep" reliable. Closes #4. Assisted-by: Claude Code (Opus 4.7)
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
TestGenerateMiddlewareRealTemplate— renders the real v3.x middleware Jinja2 template (committed as a fixture, no network) for each--hook-typeand the no-flag case, parses output withast, and checks for the fastmcp imports /Middlewaresubclass shape the synthetic fixture doesn't cover. Closes Add integration test for --hook-type against real v3.x middleware template #3.scripts/release.shnow constructs the release commit message from<version>using the project's actual convention (chore: Release fips-agents-cli vX.Y.Z [— <summary>]) instead of accepting an arbitrary string. Convention documented in CLAUDE.md. Closes Document and enforce release commit message convention #4.Test plan
pytest tests/test_generate.py::TestGenerateMiddlewareRealTemplate -v— 4/4 passpytest(full suite) — 211/211 passblack src tests --checkcleanruff check src testscleanbash -n scripts/release.shsyntax ok; help text reflects new signature