Repository navigation
fix(backend): validate inputs and handle serialization in database webhook health - #19333
brandonstensby-dotcom wants to merge 2 commits into
Conversation
|
Thanks @brandonstensby-dotcom — nice, well-scoped hardening pass. I reviewed both changed files against issue #19332; all five claims check out against the diff, and the hermetic test suite (mocked What I verified:
Three non-blocking notes:
No dependency, workflow, or CI changes; inputs are only used in key construction and serialization, so no new injection surface. Leaving the auto-disable ordering decision for human maintainer review before merge. This review was produced by AI on behalf of the Omi maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Thanks for the thorough review and notes @Git-on-my-level! Updated in commit \9b69983:
|
1cd2b92 to
770b265
Compare
…bhook health Failure-Class: FC-input-validation-resilience
…ize endpoint fallback Addressed review observations on docstring rationale and endpoint default
|
Thanks @brandonstensby-dotcom — the follow-up commit addresses both open notes from the earlier review, verified on the current head:
One item still open for a maintainer before merge, unchanged from before: in Also noting for the record: no backend CI checks ran on this PR (only a third-party AI reviewer), so the 10-test hermetic suite in This review was produced by AI on behalf of the Omi maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Hey @brandonstensby-dotcom 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Closes #19332
Summary
Hardens
backend/database/webhook_health.pyagainst serialization failures, unhandled exceptions, and in-memory cache poisoning:default=strtojson.dumpsinenqueue_dev_webhook_dlqso payloads containingdatetime,UUID, or other non-primitive types serialize gracefully instead of failing silently and dropping the event from the DLQ.(webhook_url or '')[:500]to preventTypeError: 'NoneType' object is not subscriptablewhenwebhook_urlisNone.google.api_core.exceptions.NotFoundgracefully indisable_app_in_firestore. Cache state is now updated only on successful Firestore update, preventing cache poisoning if Firestore write fails._evict_oldestagainst empty dictionary input (StopIterationrisk) and added safe type casting for mixed cache entries.record_app_webhook_failure,record_app_webhook_success,clear_app_webhook_health,is_app_webhook_disabled,get_app_webhook_health,record_dev_webhook_failure, andrecord_dev_webhook_success.Testing & Verification
backend/tests/unit/test_database_webhook_health_resilience.py(10 passing tests).backend/tests/unit/test_webhook_health_cache_cap.py(2 passing tests).--line-length 120 --skip-string-normalization) with 0 formatting deviations.Designated Payout Rails
0xbB9686b9684421A8e326AC0F8B3eCf88Df975120brandonworkforce@tutamail.com