Area: Indexer / distributed reliability
Problem
src/indexer/leaderElection.ts coordinates ownership and lease renewal; wall-clock jumps can create false ownership or premature expiry.
Design decision required
Choose monotonic time/DB time and define renewal behavior after a clock anomaly.
Deliverable
Simulate forward/backward jumps, delayed renewal, and restart and assert no split-brain write permission.
Acceptance criteria
Out of scope
- Typo-only, documentation-only, unrelated refactors, and dependency churn.
- Closing, weakening, or skipping tests to make the change pass.
Verification
pnpm vitest run tests/indexer/leaderElection.test.ts
PR requirements
- Keep the PR focused, explain the before/after behavior, and reference this issue.
- Include the requested regression evidence and relevant CI results.
- Open the PR within 48 hours of assignment or leave a scope question on the issue.
- Contributor discussion: https://t.me/+u5qmu35nZ7I0OTU1
Area: Indexer / distributed reliability
Problem
src/indexer/leaderElection.tscoordinates ownership and lease renewal; wall-clock jumps can create false ownership or premature expiry.Design decision required
Choose monotonic time/DB time and define renewal behavior after a clock anomaly.
Deliverable
Simulate forward/backward jumps, delayed renewal, and restart and assert no split-brain write permission.
Acceptance criteria
Out of scope
Verification
PR requirements