feat: add post-deployment smoke test - #42
Merged
Merged
Conversation
- scripts/smoke_test.py: standalone script (httpx + stdlib only) that exercises kb_add → kb_search → kb_get → kb_get_batch → kb_delete in sequence against a live instance, with colored PASS/FAIL output and proper exit codes - Makefile: smoke, smoke-staging, smoke-prod targets - CONTRIBUTING.md: deployment verification step in release process and note in PR/testing section that smoke tests are for live deployments
The parameter `inner` is typed as `dict[str, Any]`, so the `not isinstance(inner, dict)` branch is always False and line 166 (`return inner`) is unreachable — flagged by Pyright/mypy warn_unreachable. Remove the dead guard; the function still handles all runtime cases correctly.
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
scripts/smoke_test.py: standalone post-deployment smoke test (stdlib + httpx only, no pytest) that exercises the critical KB write/read/delete path against a live instance and exits 0 on full pass, 1 on any failureMakefile: three new targets —smoke,smoke-staging,smoke-prod— with aLORE_URLoverride variableCONTRIBUTING.md: new Deployment Verification section, release process step 8 covering per-node smoke runs, note in PR checklist that smoke tests are for live deployments not CI, updated Makefile reference tableWhat the smoke test does
Five steps in sequence against a live instance:
GET /healthkb_addkb_searchkb_getkb_get_batchCleanup (
kb_delete) runs best-effort after every run — never causes a FAIL.Output uses ANSI green/red PASS/FAIL lines. Exits 0 on full pass, 1 on any failure.
Usage
Design notes
tests/e2e/client.py(LoreClient) exactly — same SSE-framing unwrap, same MCP TextContent envelope unwrap, same Loreok/databusiness envelope unwrap — so it uses the same wire protocol as the e2e suitehttpx(already inpyproject.tomlas a core dependency) and stdlibpython scripts/smoke_test.py--tokenarg supports Bearer auth for instances that require itTest plan
python scripts/smoke_test.py --url http://localhost:5555against a running instance: all steps PASS, exit 0make smoke LORE_URL=http://localhost:5555: runs correctly via makepython scripts/smoke_test.py --help: shows usage🤖 Generated with Claude Code