Add shared caching and bearer authentication to the check view #809
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.59) × (1 − Review Confidence (0.58)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.59 · 182 lines diff across 2 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
Diff Size
diff_size
0.312
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.059
Real PR Conversation Timeline
1 comments
"Review active on #809"
general
weight: 0.35
codingjoe
Uptime monitors poll the health endpoint often, and every request runs the full set of checks. A short shared cache cuts that load and limits the damage an unauthenticated caller can do. Monitors still need fresh results, so authentication and caching stay separate features.
max_age(atimedelta, default0) sendsCache-Control: public, max-age=Non successfulGETandHEADresponses without anAuthorizationheader.0sendsno-store.auth_tokenenables bearer authentication and falls back toHEALTH_CHECK_AUTH_TOKEN. Authenticated responses are markedno-storeand run the checks.allow_anonymousadmits requests without anAuthorizationheader when a token is configured. A request with a wrong token receives HTTP 403 before any check runs.Vary: Authorizationis set when a token is configured, so shared caches key on it as described in RFC 9111 section 4.1.python manage.py check --deployreportshealth_check.E001whenHEALTH_CHECK_AUTH_TOKENis set but empty.health_checkcommand readsHEALTH_CHECK_AUTH_TOKENby default.--auth-tokenoverrides it.max_age.