Skip to content

Add FastAPI service + Dockerfile, CI container smoke test (v0.5.0) - #2

Open
ashishdhillon wants to merge 1 commit into
mainfrom
feat/fastapi-docker
Open

ashishdhillon wants to merge 1 commit into
mainfrom
feat/fastapi-docker

Conversation

@ashishdhillon

Copy link
Copy Markdown
Owner
  • guardkit/api.py: FastAPI app (/health, /v1/check, /v1/redact), optional X-API-Key (constant-time compare), 100k-char limit, no matched values echoed. Extra: guardkit[api].
  • Dockerfile (python:3.12-slim, non-root, healthcheck, example policy) + .dockerignore.
  • CI: new extras job runs the optional-dependency tests (api, mcp) and a docker job builds the image and smoke-tests it.
  • 4 new API tests (31 total pass).

Verified: clean-venv install of .[api] and a live uvicorn run (health 200, no key 401, check 200). Latency measured on that run (2-core sandbox, localhost): ~3.2 ms p50 / 4.4 ms p95 short prompt; 7.0 / 8.9 ms for ~4.5k chars.
Not verified: the Docker image itself — the sandbox has no Docker daemon. The new docker CI job is the first real build; check it is green before merging.

After merge: publish a GitHub Release tagged v0.5.0.


Generated by Claude Code

POST /v1/check, /v1/redact, GET /health; optional X-API-Key; 100k-char limit; non-root image.
Optional extra guardkit[api]. CI gains an 'extras' job (dev+api+mcp tests) and a 'docker' job.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FK2aywToQzZSDMzqXdmFRo

This branch has not been deployed

No deployments
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.

2 participants