docs: add pytest-queryguard to Developer Tools #23
All Vouch review confidence checks passed
Residual risk 0.12 = Change Risk (0.31) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.31 · 103 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.289
Diff Size
diff_size
0.278
Real PR Conversation Timeline
1 comments
"Review active on #23"
general
weight: 0.35
JacobCoffee
Adds pytest-queryguard under Developer Tools. It is a pytest plugin that
fails a test when the SQLAlchemy 2 code it runs lazy-loads a relationship
once per row (N+1) or repeats one statement in a loop, and lets a test set a
query budget. Litestar's
TestClientruns the app in another thread; theplugin counts those queries, and the documentation has a Litestar recipe
with an async session. It also works with the session from advanced-alchemy's
SQLAlchemyPlugin(checked with advanced-alchemy 1.12.0 and Litestar 2.25.0).I maintain it. MIT licensed, on PyPI, tested on Python 3.10 to 3.15.
I ran pre-commit and awesome-lint on this branch. They report nothing new;
the three failures they show (a 403 from a blog.litestar.dev link, prettier
on the apitally line, awesome-lint on "Basic Litestar App") are on main as
well.