Skip to content

ci: finish adapter parity with the family baseline (1.2.0) - #24

Merged
rennf93 merged 9 commits into
masterfrom
ci/parity-cleanup
Sep 30, 2026
Merged

rennf93 merged 9 commits into
masterfrom
ci/parity-cleanup

Conversation

@rennf93

@rennf93 rennf93 commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Brings tornadoapi-guard fully onto the adapter baseline (guard-core/fastapi-guard conventions) and onto the 1.2.0 adapter train.

Modernization

  • pull_request instead of pull_request_target in ci.yml (PR code no longer runs with base-branch secrets context)
  • all actions aligned on v7 majors (was the only repo on v6)
  • release build via python -m build instead of the legacy setup.py sdist bdist_wheel
  • docs-deploy concurrency group in docs.yml

New workflows (previously missing vs the adapter set)

  • live-smoke.yml: builds the wheel from the checkout, stages it into the example app, docker compose up, curl assertions
  • upstream-drift.yml: daily suite run against a wheel built from guard-core@master
  • docksec.yml: Dockerfile scanning, verbatim from fastapi-guard's pins

New: examples/advanced_app
Production-shaped topology matching the other adapters' advanced examples: nginx edge (connection shedding + forwarded headers), Redis-backed guard state, /health + /ready orchestration endpoints (guard-excluded), route-scoped strict rate limit, admin-token-protected route, custom debug-block check. Locally verified end to end: compose up --wait, / 200, /health 200, /ready 200, ?debug=true 403, admin without token 400, with token 200, 6-request burst on /rate/strict -> 429s.

Coverage: --cov-fail-under=100 enforced (measured 100.0% locally).

Version: 1.0.0 -> 1.2.0 per the adapter train; CHANGELOG documents the delta. Tag/publish still awaits an explicit release go.

Note for the maintainer: repo secrets are missing TWINE_USERNAME and IPINFO_TOKEN (only TWINE_PASSWORD is set), so the twine-based release and the CI IPINFO fallback would need those set before the next publish.

Full pre-commit suite (ruff, mypy, vulture, bandit, radon, xenon, deptry) passes locally.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for opening your first pull request on tornadoapi-guard!

Quick checklist before review (most of these are enforced by CI, but worth a glance):

  • make lint — ruff format, ruff check, mypy, and vulture
  • make test (or make local-test) — full test suite passes with 100% coverage
  • make security — bandit, safety, and pip-audit all clean
  • make quality — radon and xenon complexity thresholds respected
  • No # noqa / # type: ignore shortcuts; pre-existing violations in touched files are fixed
  • Added an entry under ## Unreleased in CHANGELOG.md
  • If you touched a public API, updated the relevant page under docs/
  • If the change involves engine logic, the corresponding fix landed in guard-core first

See CONTRIBUTING.md for the full workflow and the Code of Conduct for the community standards we follow.

Welcome aboard — a maintainer will review shortly.

@github-actions github-actions Bot added the ci GitHub Actions and pre-commit label Sep 28, 2026
- modernize: pull_request instead of pull_request_target, actions on v7,
  python -m build for the release, docs-deploy concurrency
- add live-smoke, upstream-drift, and docksec workflows
- add examples/advanced_app (nginx edge, healthchecks, admin token)
- enforce the 100% coverage gate
- version 1.2.0: adapter train alignment, changelog documents the delta
@github-actions github-actions Bot added documentation Docs, README, CHANGELOG, governance files examples examples/ apps dependencies pyproject.toml or uv.lock labels Sep 28, 2026
@rennf93 rennf93 changed the title ci: parity cleanup with the engine baseline ci: finish adapter parity with the family baseline (1.2.0) Sep 28, 2026
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Comment thread examples/advanced_app/main.py Fixed
…validation

- behavior_scan_response_body=True so the return_monitor 404 demo is valid
- whitelist includes the Docker client networks (gateway IPs were flagged)
- redis healthcheck + service_healthy ordering for deterministic startup
Comment thread live_smoke_stack/main.py Fixed
- write_error uses a static reason-phrase lookup instead of reflecting
  request-derived text (py/reflective-xss)
- Dockerfile: --no-install-recommends, non-root user, HEALTHCHECK
- drop the accidentally committed generated live_smoke_stack/ and ignore it
@rennf93
rennf93 merged commit 8202ff8 into master Sep 30, 2026
21 checks passed
@rennf93
rennf93 deleted the ci/parity-cleanup branch October 7, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci GitHub Actions and pre-commit dependencies pyproject.toml or uv.lock documentation Docs, README, CHANGELOG, governance files examples examples/ apps

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants