docs: document message_store in /api/v1/health response [doc-updater] - #3148
Conversation
Adds the new `components.message_store` field (introduced in #3077 slice-6) to the health endpoint response example and explanation in deployment.md. The field surfaces whether the auto→memory message-store fallback fired at startup. Degraded state (`MESSAGE_STORE_AUTO_FALLBACK_TO_MEMORY`) indicates Redis was unreachable and the orchestrator fell back to the in-memory store, which carries mid-phase-restart message-loss risk.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Approve. Doc-only change accurately documenting the components.message_store field added in #3077 slice-6. I verified every claim against the implementation rather than the PR description alone.
Verification against code
- JSON example shape and field order (
docs/guides/deployment.md:390) — matchesorchestrator/routes/health.py:159-168exactly:state_store→state_store_summary→message_store→docker. The added"message_store": {"status": "ok"}line is placed in the correct position. {"status": "ok"}common case — matcheshealth.py:144.- Degraded shape
{"status": "degraded", "reason": "MESSAGE_STORE_AUTO_FALLBACK_TO_MEMORY"}— matcheshealth.py:138-142and the marker constantMEMORY_FALLBACK_MARKERatmessage_store.py:620. - Top-level
statusbecomes"degraded"on auto-fallback — matcheshealth.py:148(healthy = state_store_healthy and not message_store_degraded) and:160. - Auto-fallback trigger (
EGG_MESSAGE_STORE_BACKENDunset/"auto"+ Redis unreachable at startup) — matchesmessage_store.py:696,711,721-730, which flips_memory_fallback_degraded = Trueonly on theautoexception path (theredis-explicit path re-raises instead). - Explicit
EGG_MESSAGE_STORE_BACKEND=memorydoes NOT set degraded — matchesmessage_store.py:698-709: that branch returnsMessageStore()with a warning-level log and never touches the degraded flag. This is the most important distinction in the doc and it is correct. - #3076 mid-phase-restart message-loss risk — consistent with the in-line code commentary at
message_store.py:724-736.
The prose paragraph at :400 is placed directly after the state_store_summary description, mirroring the JSON field ordering, which keeps the section readable.
Non-blocking note
The "Normal response" JSON example omits process_start_time, last_unhealthy_at, and recent_transitions, which the real response includes (health.py:169-172). This is a pre-existing simplification — the example already trimmed those fields before this PR — so it is out of scope here, but worth tightening in a future pass if the example is meant to be exhaustive.
No security, correctness, or robustness concerns: this changes only Markdown, and the documented behavior faithfully reflects the shipped code.
— Authored by egg
|
egg review completed. View run logs 1 previous review(s) hidden. |
…nflicts in coordination-state.md and deployment.md - coordination-state.md: took main's richer 'all six slices shipped' wording and additive present-tense clarification paragraph (both sides agreed all slices shipped; main's phrasing is a superset of the PR's intent). - deployment.md: dropped main's #3148 message_store health-field docs. #3159 removed the in-memory message store backend, so health.py no longer emits components.message_store; the PR's a5144a9 commit correctly removed it. git's 3-way merge re-added it because the PR's net change was nil vs base.
Update
docs/guides/deployment.mdto reflect thecomponents.message_storefield added to the
/api/v1/healthresponse in #3077 slice-6."message_store": {"status": "ok"}to the normal-response JSON example"degraded"with reasonMESSAGE_STORE_AUTO_FALLBACK_TO_MEMORY(unintentional auto→memory fallback at startup)EGG_MESSAGE_STORE_BACKEND=memory(which is not flagged as degraded)Triggered by: #3144 (slice-6 of #3077)
Issue: none
Test Plan
/api/v1/healthresponse shape inorchestrator/routes/health.pyAuthored-by: egg