fix(indexer): heal trader lifetime from swaps after #1277 widen (#1292) #1303

Merged
PlasticDigits merged 1 commit from issue/1292 into main 2026-09-21 06:04:20 +00:00

Summary

  • Follow-up to merged #1292 / #1277: one-shot migrate heal plus mismatch-gated poller heal before D5 refresh_all_volume_windows.
  • Rebuilds traders lifetime raw totals from swap_events (missing overflow-skip senders, register-then-overflow, reorg leftover ghosts) in one transaction with #553 USD stamp and leftover-USD NULL.
  • I10 integration tests for heal + gate; make verify-issue-1277 static checks extended.

Fixes #1277

Test plan

  • Static verify-issue-1277 docs/code gates (heal migration + poller hook)
  • make verify-issue-1277 full Postgres suite (blocked: no Docker/Postgres on implement VM)
  • make verify-issue-577

Criteria

  • R1–R7 (already on main via #1292): NUMERIC(38,0) widen, LEAST caps, bd_plain_string, aggregator
  • Design heal (V1277-4): migrate SQL + heal_trader_lifetime_from_swaps + poller before D5
  • I10 (partial): missing-sender heal, leftover ghost zero, registered zero does not trip gate

Gaps

  • Integration tests not executed in this VM (Docker daemon unavailable; Postgres not listening).
  • Full design doc / ADR 0008 from cac-design-issue-1277 not merged (ADR slot 0005 taken by protocol-fee).
## Summary - Follow-up to merged #1292 / #1277: one-shot migrate heal plus mismatch-gated poller heal before **D5** `refresh_all_volume_windows`. - Rebuilds `traders` lifetime raw totals from `swap_events` (missing overflow-skip senders, register-then-overflow, reorg leftover ghosts) in one transaction with #553 USD stamp and leftover-USD NULL. - I10 integration tests for heal + gate; `make verify-issue-1277` static checks extended. Fixes #1277 ## Test plan - [x] Static `verify-issue-1277` docs/code gates (heal migration + poller hook) - [ ] `make verify-issue-1277` full Postgres suite (blocked: no Docker/Postgres on implement VM) - [ ] `make verify-issue-577` ## Criteria - [x] **R1–R7** (already on main via #1292): NUMERIC(38,0) widen, LEAST caps, `bd_plain_string`, aggregator - [x] **Design heal (V1277-4)**: migrate SQL + `heal_trader_lifetime_from_swaps` + poller before D5 - [x] **I10** (partial): missing-sender heal, leftover ghost zero, registered zero does not trip gate ## Gaps - Integration tests not executed in this VM (Docker daemon unavailable; Postgres not listening). - Full design doc / ADR 0008 from `cac-design-issue-1277` not merged (ADR slot 0005 taken by protocol-fee).
fix(indexer): heal trader lifetime from swaps after #1277 widen
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
91310433c5
Mismatch-gated startup heal before D5 volume refresh rebuilds missing or
stale traders rows from swap_events, including reorg leftover ghosts.

Fixes #1277
Author
Owner

drain skip: no occupying job for rebase/fix-pr/CI-wait; remaining continue

drain skip: no occupying job for rebase/fix-pr/CI-wait; remaining continue
PlasticDigits deleted branch issue/1292 2026-09-21 06:04:20 +00:00
Author
Owner

Merged to origin/main (a7919548). Woodpecker PR + push succeeded.

Post-merge compile failure: sqlx 0.8 Executor is not implemented for &mut Transaction in apply_trader_lifetime_heal_tx. Hotfix #1304 (&mut **tx, same as hub_prices) is on main (729b097f).

After #1304: make verify-issue-1277 6/6 (docs, code, I10 rolling+heal, #577, #548, api_traders).

Coolify migrate 20260921130000_traders_lifetime_heal_from_swaps + ADR 0008 collision leftover: #1305.

Merged to `origin/main` (`a7919548`). Woodpecker PR + push succeeded. Post-merge compile failure: sqlx 0.8 `Executor` is not implemented for `&mut Transaction` in `apply_trader_lifetime_heal_tx`. Hotfix #1304 (`&mut **tx`, same as `hub_prices`) is on `main` (`729b097f`). After #1304: `make verify-issue-1277` 6/6 (docs, code, I10 rolling+heal, #577, #548, `api_traders`). Coolify migrate `20260921130000_traders_lifetime_heal_from_swaps` + ADR 0008 collision leftover: #1305.
Sign in to join this conversation.
No reviewers
code/maintainers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!1303
No description provided.