Skip to content

test+chore: Real-template middleware test and release commit convention - #30

Merged
rdwj merged 1 commit into
mainfrom
fix/issues-3-4-release-convention-middleware-test
May 4, 2026
Merged

test+chore: Real-template middleware test and release commit convention#30
rdwj merged 1 commit into
mainfrom
fix/issues-3-4-release-convention-middleware-test

Conversation

@rdwj

@rdwj rdwj commented May 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds TestGenerateMiddlewareRealTemplate — renders the real v3.x middleware Jinja2 template (committed as a fixture, no network) for each --hook-type and the no-flag case, parses output with ast, and checks for the fastmcp imports / Middleware subclass shape the synthetic fixture doesn't cover. Closes Add integration test for --hook-type against real v3.x middleware template #3.
  • scripts/release.sh now 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 pass
  • pytest (full suite) — 211/211 pass
  • black src tests --check clean
  • ruff check src tests clean
  • bash -n scripts/release.sh syntax ok; help text reflects new signature

…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)
@rdwj
rdwj merged commit fe761ec into main May 4, 2026
5 checks passed
@rdwj
rdwj deleted the fix/issues-3-4-release-convention-middleware-test branch May 4, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document and enforce release commit message convention Add integration test for --hook-type against real v3.x middleware template

1 participant