Menixis Claude Fable 5 commited on
Commit
21d12df
·
1 Parent(s): fda2212

feat: ?health=1 query-param health check (app + data source OK), pre-gate; liveness stays on built-in /_stcore/health

Browse files

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NQMBLPhJZUBCX7io3uwEnR

Files changed (1) hide show
  1. streamlit_app.py +11 -0
streamlit_app.py CHANGED
@@ -43,6 +43,17 @@ st.set_page_config(
43
  )
44
 
45
 
 
 
 
 
 
 
 
 
 
 
 
46
  # =============================================================================
47
  # Warm Peach CSS Theme (light cream canvas + burnt-orange accents)
48
  # =============================================================================
 
43
  )
44
 
45
 
46
+ # =============================================================================
47
+ # Health (?health=1): app booted + data source reachable. Plain text, pre-gate
48
+ # (a health probe is unauthenticated by design; reveals only byte count + time).
49
+ # Liveness alone is the built-in /_stcore/health endpoint.
50
+ # =============================================================================
51
+ if st.query_params.get("health") == "1":
52
+ _ok, _detail = data_source.check_data()
53
+ st.text(("OK " if _ok else "FAIL ") + _detail)
54
+ st.stop()
55
+
56
+
57
  # =============================================================================
58
  # Warm Peach CSS Theme (light cream canvas + burnt-orange accents)
59
  # =============================================================================