fix: rename progressPct to historicalSyncProgressPct in sync-progress API#90
Conversation
… API Makes the field name self-documenting — it clearly tracks historical block-fetch progress (not handler completion), consistent with the distinction between progressPct=100 and isComplete=false. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Documentation / CI review
Lines 56, 63, and 70 of
All three should be changed to OpenAPI/Swagger ( No other docs files affected. Overall: One actionable item before merge — update the three occurrences of |
|
Review: Rename progressPct → historicalSyncProgressPct The rename is complete across all four affected locations:
No remaining references to This PR is clean. |
…eld name Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| ``` | ||
|
|
||
| - `progressPct` is rounded to one decimal place (0–100). | ||
| - `historicalSyncProgressPct` is rounded to one decimal place (0–100). |
There was a problem hiding this comment.
historicalSyncProgressPct is not clear yet for me.
I would prefer something like historicalBlocksFetchedPct
There was a problem hiding this comment.
can't we add then a historicalBlocksProcessedPct as well?
There was a problem hiding this comment.
Good call — renamed to historicalBlocksFetchedPct. Names exactly what it measures: eth_getLogs block-fetch progress (ponder_historical_completed_blocks + ponder_historical_cached_blocks / ponder_historical_total_blocks), not handler execution.
There was a problem hiding this comment.
Looked into this — Ponder exposes ponder_indexing_completed_events (a running count of events handled) but no matching "total historical events" gauge, so there is no denominator to compute a percentage against. isComplete and isRealtime already cover the binary states; historicalBlocksFetchedPct is the useful proxy for sync depth. Happy to revisit if Ponder adds a total-events metric in a future version.
The new name is precise: it measures eth_getLogs block-fetch progress (ponder_historical_completed_blocks + cached / total), not handler execution. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…resspct-rename-historicalSyncProgressPct
Summary
progressPct→historicalSyncProgressPctin theGET /api/sync-progressresponse schema, endpoint implementation, route description, and test assertionsMotivation
The old name was ambiguous —
progressPct: 100whileisComplete: falselooked contradictory. The new name makes it self-documenting: it tracks historical block-fetch progress (eth_getLogs layer), not handler execution completion.Test plan
pnpm typecheckpasses (verified locally)pnpm testpasses — all 31 tests green (verified locally)🤖 Generated with Claude Code