Skip to content
This repository was archived by the owner on Jun 10, 2026. It is now read-only.

feat: add --selftest flag to start_proxy.py - #13

Merged
KiranChilledOut merged 1 commit into
KiranChilledOut:mainfrom
opencolin:add-selftest-flag
Apr 30, 2026
Merged

feat: add --selftest flag to start_proxy.py#13
KiranChilledOut merged 1 commit into
KiranChilledOut:mainfrom
opencolin:add-selftest-flag

Conversation

@opencolin

Copy link
Copy Markdown

Boots the proxy in-process via Starlette's TestClient (no uvicorn, no
port binding), invokes /test-connection, prints the JSON result, and
exits 0 on success or 1 on failure. Intended for CI and install
scripts (install.sh inlines the equivalent boot+probe+kill logic today
and could be simplified to just call this).

We deliberately do not enter TestClient as a context manager, so
FastAPI lifespan handlers (which would open the observability sqlite
database and start a background recorder task) don't fire. /test-
connection itself records nothing, so this is sufficient for a clean
smoke test with no side effects.

Boots the proxy in-process via Starlette's TestClient (no uvicorn, no
port binding), invokes /test-connection, prints the JSON result, and
exits 0 on success or 1 on failure. Intended for CI and install
scripts (install.sh inlines the equivalent boot+probe+kill logic today
and could be simplified to just call this).

We deliberately do not enter TestClient as a context manager, so
FastAPI lifespan handlers (which would open the observability sqlite
database and start a background recorder task) don't fire. /test-
connection itself records nothing, so this is sufficient for a clean
smoke test with no side effects.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@KiranChilledOut
KiranChilledOut merged commit 77043ca into KiranChilledOut:main Apr 30, 2026
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants