Skip to content

docs: document message_store in /api/v1/health response [doc-updater] - #3148

Merged
jwbron merged 1 commit into
mainfrom
egg/doc-update-health-message-store
Jun 13, 2026
Merged

docs: document message_store in /api/v1/health response [doc-updater]#3148
jwbron merged 1 commit into
mainfrom
egg/doc-update-health-message-store

Conversation

@james-in-a-box

Copy link
Copy Markdown
Contributor

Update docs/guides/deployment.md to reflect the components.message_store
field added to the /api/v1/health response in #3077 slice-6.

  • Adds "message_store": {"status": "ok"} to the normal-response JSON example
  • Documents when it reads "degraded" with reason MESSAGE_STORE_AUTO_FALLBACK_TO_MEMORY (unintentional auto→memory fallback at startup)
  • Explains the distinction from explicit EGG_MESSAGE_STORE_BACKEND=memory (which is not flagged as degraded)
  • Notes the mid-phase-restart message-loss risk that the flag surfaces (#3076)

Triggered by: #3144 (slice-6 of #3077)

Issue: none

Test Plan

  • Automated: doc-only change, no code tests required
  • Manual: verify the JSON example matches the actual /api/v1/health response shape in orchestrator/routes/health.py

Authored-by: egg

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.
@james-in-a-box

This comment has been minimized.

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) — matches orchestrator/routes/health.py:159-168 exactly: state_storestate_store_summarymessage_storedocker. The added "message_store": {"status": "ok"} line is placed in the correct position.
  • {"status": "ok"} common case — matches health.py:144.
  • Degraded shape {"status": "degraded", "reason": "MESSAGE_STORE_AUTO_FALLBACK_TO_MEMORY"} — matches health.py:138-142 and the marker constant MEMORY_FALLBACK_MARKER at message_store.py:620.
  • Top-level status becomes "degraded" on auto-fallback — matches health.py:148 (healthy = state_store_healthy and not message_store_degraded) and :160.
  • Auto-fallback trigger (EGG_MESSAGE_STORE_BACKEND unset/"auto" + Redis unreachable at startup) — matches message_store.py:696,711,721-730, which flips _memory_fallback_degraded = True only on the auto exception path (the redis-explicit path re-raises instead).
  • Explicit EGG_MESSAGE_STORE_BACKEND=memory does NOT set degraded — matches message_store.py:698-709: that branch returns MessageStore() 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

@james-in-a-box

Copy link
Copy Markdown
Contributor Author

egg review completed. View run logs

1 previous review(s) hidden.

@jwbron
jwbron merged commit 348187f into main Jun 13, 2026
26 of 27 checks passed
james-in-a-box Bot pushed a commit that referenced this pull request Jun 13, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant