Repository navigation
fix(mercury): fail closed on missing durable reconciliation consumer - #202
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (3)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ReviewThe fail-closed approach is right. Keeping the seven legacy receivers untouched, and not letting a KV marker count as proof of dispatch, closes the silent-loss path. I didn't run tests or typecheck. Issues
Tests
Nits
Security
Overall this is a reasonable containment patch. I'd address items 1, 3 and 6 before merge. The rest can follow. |
Review: fail-closed Mercury org webhookOverall the change does what it says. It is a small fail-closed guard, it never acknowledges on KV alone, and it keeps the legacy receivers untouched. I'd merge it after the points below. I only read the diff; I didn't run the tests or typecheck. What's good
Suggestions
No security blockers found. |
Review of #202: fail-closed Mercury org webhookThe fail-closed design is sound, and the PR description is honest that this is containment only. It returns 503 in production until the private RPC exists. I found no blocking issues. What looks good
Suggestions (non-blocking)
Security: I found nothing new. No payload is persisted or logged, and the org ID comes from the verified result. Please confirm the handler compares the verifier's returned I didn't run the tests or typecheck. This review is from the diff only. Approving in spirit, with suggestion 1 worth deciding on before merge. |
Review: fail-closed Mercury guardOverall this is a sound, narrowly scoped containment. It fails closed, doesn't touch the legacy receivers, never logs payloads, and the tests cover the failure matrix well. I ran nothing locally; this is from reading the diff. Worth addressing
Minor
Security and performance
I'd approve once item 1 is confirmed. |
ReviewThe fail-closed approach is sound and the PR description is honest about its limits. The tests cover the failure matrix well: missing method, a throwing broker, each malformed receipt field, KV read and write failures, and a legacy marker. I didn't run the tests or typecheck. Behaviour and risks
Minor
TestsThe coverage is good. Two additions would help: a test that the broker is called with No security concerns found: the signature is verified before any parsing, no payload content is logged, and there are no financial writes. Approve once the deployment gate is confirmed. Items 2 and 5 are worth considering before or soon after merge. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Confirmed production defect
Merged PR #201 is deployed and acknowledges organization-scoped Mercury events as 202 after writing an expiring FINANCE_KV marker, but no deployed consumer is known to drain
webhook:mercury:org:*or drive the canonical chittyconnect-finance reconciliation adapter. This permits silent loss of bank activity.Bounded containment
Deployment gate
Do not migrate/register CHIT, MNW, or the other Mercury webhooks until the canonical chittyconnect-finance consumer, private broker method and ChittySecrets org-scoped custody are actually live and verified. Merging this fail-closed guard does NOT create the consumer or repair a webhook. Changes to prod financial data require separate operator gate.
Finance Operating Defaults: no new schema/store/ledger/checkpoint/tracker, no raw secrets, no financial writes. Run tests + typecheck + CodeQL and inspect diff before merge.