Skip to content

fix(health): restore message field in public health view (SDK contract)#206

Merged
brownjuly2003-code merged 1 commit into
mainfrom
fix/health-view-sdk-message
Jul 19, 2026
Merged

fix(health): restore message field in public health view (SDK contract)#206
brownjuly2003-code merged 1 commit into
mainfrom
fix/health-view-sdk-message

Conversation

@brownjuly2003-code

Copy link
Copy Markdown
Owner

Follow-up to #205. The S-3 health sanitizer dropped message from each /v1/health component, but the SDK's HealthComponent model requires a string message, so client.health()HealthStatus.model_validate raised 7 missing-field errors. This surfaced only in the push-only E2E and Staging lanes (not PR CI), where test_ops_agent_journey failed identically on both.

The leak was the message content (f"Kafka unavailable: {exc}", broker/topic counts, backend identity), not the field itself. This blanks message to "" instead of dropping it — field shape preserved (SDK happy), sensitive content still gone.

Also adds a unit regression test (test_view_still_validates_against_sdk_health_model) that runs the sanitized view through the SDK HealthStatus model, so this class of break fails in unit tests rather than only in the post-merge lanes. (My earlier test wrongly asserted the message-less shape — corrected.)

Note: E2E/Staging are push-only and do not run on PRs; verified locally via the SDK-model unit test that reproduces the exact model_validate failure.

🤖 Generated with Claude Code

The S-3 sanitizer dropped `message` from each /v1/health component, but the SDK
`HealthComponent` model requires a string `message` — so `client.health()`'s
`HealthStatus.model_validate` raised 7 missing-field errors. This only surfaced
in the push-only E2E and Staging lanes (not PR CI): both failed
`test_ops_agent_journey` identically.

The leak was the message *content* (`f"Kafka unavailable: {exc}"`, counts,
backend identity), not the field. Blank the message to "" instead of dropping
it — shape preserved, content gone. The unit suite now validates the view
against the SDK `HealthStatus` model so this class of break fails here, not only
in the push-only lanes; my earlier test wrongly asserted the message-less shape.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

DORA Metrics

  • Window: last 30 days
  • Branch: main
  • Deployment frequency: 103 total / 24.03 per week
  • Lead time for changes: avg 0.62h / median 0.0h
  • Change failure rate: 74.76% (77/103)
  • MTTR: 20.13h across 5 incident(s)

@brownjuly2003-code
brownjuly2003-code merged commit 5a77658 into main Jul 19, 2026
26 checks passed
@brownjuly2003-code
brownjuly2003-code deleted the fix/health-view-sdk-message branch July 19, 2026 08:24
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.

2 participants