Skip to content

feat: report deposit poller liveness and bound the venue call - #111

Merged
outerlook merged 1 commit into
developfrom
feat/deposit-poller-liveness-signal
Aug 4, 2026
Merged

feat: report deposit poller liveness and bound the venue call#111
outerlook merged 1 commit into
developfrom
feat/deposit-poller-liveness-signal

Conversation

@outerlook

@outerlook outerlook commented Aug 4, 2026

Copy link
Copy Markdown
Member

Stacked on #110.

Problem

The deposit poller emitted a counter when it archived a row and a counter when it hit an error, and nothing otherwise. A poller sitting on a genuinely quiet venue and a poller that had stopped polling altogether produced identical telemetry, so "is deposit capture still alive?" could not be answered from the poller's own signals — it required correlating unrelated surfaces.

There was also one truly invisible death mode: fetchDeposits was unwrapped. A request that never settled would strand the poll loop forever with no log, no metric, and no reschedule.

Change

Per-poll heartbeat. Every poll now records cex_deposit_poller_polls_total, labelled by exchange and by outcome (ok, error, unsupported). It is recorded on every exit path, including an unexpected throw — the outcome starts as an error and is only narrowed once a poll actually completes, so a failure can never be reported as a healthy poll. The outcome label is what separates alive and quiet from alive but failing; a bare counter would conflate them.

Bounded venue call. fetchDeposits is now wrapped in a 30s timeout, deliberately below the 60s poll interval. A timeout surfaces through the existing error path — error counter, warning log — and the next poll is scheduled normally. It is never absorbed into a silent success. The bound is a constant rather than an environment variable, matching the rest of the poller's configuration, which is intentionally env-free.

Tests

Three added, none weakened or removed: heartbeat on a successful poll, heartbeat on an account whose venue does not support fetchDeposits, and a never-settling fetchDeposits recorded as outcome=error with the error counter, followed by a normal poll that archives.

Full suite: 606 passing, 0 failing. tsc and biome clean.

Release status

This is producer-side: merged is not released, and released is not deployed. The heartbeat only becomes visible in production telemetry after the cex-broker release chain runs — release PR and version tag, then the fiet-tee pin, then the fiet-maker submodule and root lockfile, then the SGX image build, then deploy.


Stack created with GitHub Stacks CLIGive Feedback 💬

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 18 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cfd8ad54-3691-46fc-b680-b02f28a45af4

📥 Commits

Reviewing files that changed from the base of the PR and between f8a09e3 and 44f12e2.

📒 Files selected for processing (2)
  • src/helpers/deposit-archive-poller.ts
  • test/deposit-archive-poller.test.ts

Comment @coderabbitai help to get the list of available commands.

Base automatically changed from fix/deposit-exchange-timestamp to develop August 4, 2026 18:13
The deposit poller only emitted counters when it archived a row or hit an
error, so a poller sitting on a quiet venue and one that had stopped polling
altogether produced identical telemetry. Answering "is deposit capture still
running" required correlating unrelated signals.

Every poll now records cex_deposit_poller_polls_total, labelled by exchange
and by outcome (ok, error, unsupported). It is recorded on every exit path,
including an unexpected throw: the outcome starts as an error and is only
narrowed once a poll actually completes, so a failure can never be reported as
a healthy poll.

The venue call is also bounded by a timeout (30s, below the 60s poll
interval). fetchDeposits was previously unwrapped, so a request that never
settled would strand the poll loop permanently with no log, no metric and no
reschedule — the one failure mode that left no trace. A timeout now surfaces
through the existing error path and the next poll is scheduled normally; it is
never absorbed as a successful poll. The bound is a constant rather than an
environment variable, matching the rest of the poller configuration.
@outerlook
outerlook force-pushed the feat/deposit-poller-liveness-signal branch from 3cc55d4 to 44f12e2 Compare August 4, 2026 18:13
@outerlook
outerlook merged commit d616e38 into develop Aug 4, 2026
4 of 5 checks passed
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