flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[Backend] Remove dead and duplicate code: indexer.service.ts, phantom body-limit routes, stale replay caveat

Open blurbeast opened this issue 2 weeks ago • 4 comments

Overview & Background

Three pieces of dead weight in the backend: (1) backend/src/services/indexer.service.ts is an older fork of indexerService.ts, imported nowhere (only named in vitest coverage excludes) — two near-identical indexer services invite edits to the wrong file. (2) app.ts:95-102 grants 1mb bodies to /v1/streams/batch, /v1/streams/import, /v1/payroll/import — none of these routes exist anywhere in src/. (3) indexerService.ts:125-130 still warns "replay is NOT fully idempotent ... See issue #808" although the fix landed (soroban-event-worker.ts:1042-1056 checks duplicates before mutating).


Technical Specification & Architecture

  1. Delete indexer.service.ts.
  2. Remove the unused bulk-path body limits (or implement the routes deliberately).
  3. Update the replay comment to match current dedup behavior.

Target Files

  • backend/src/services/indexer.service.ts
  • backend/src/app.ts
  • backend/src/services/indexerService.ts

Acceptance Criteria

  • [ ] No duplicate service modules remain.
  • [ ] Body-limit allowlist references only real routes.
  • [ ] Comments match actual replay safety semantics.

blurbeast avatar Nov 18 '26 19:11 blurbeast

@Aboyeji-Isaac has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

Hi maintainer, I would like to work on this issue. I understand the goal is a cash-flow calendar that visualizes expected incoming and outgoing stream activity over a selectable period, correctly accounting for pauses, end dates, and uncertainty so projections are never presented as guaranteed settlement. Based on my experience building financial timeline components in React/TypeScript with careful date and timezone handling, this is how I'll resolve this issue: I will build the calendar to expand each stream's schedule across the selected range while respecting pauses and end dates, reconcile per-day summaries against existing stream detail calculations, test timezone boundaries and failure cases, label projected amounts as estimates, update the relevant documentation, and open a PR referencing Closes #263 with test results, without touching wallet authorization, chain validation, accounting invariants, or secret handling.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Aboyeji-Isaac to this issue.

Aboyeji-Isaac avatar Nov 20 '26 15:11 Aboyeji-Isaac

@anitahhhh has applied to work on this issue as part of the Stellar Wave Program's 11th wave.

this is easy

ℹ️ Repo Maintainers: To accept this application, review their application or assign @anitahhhh to this issue.

anitahhhh avatar Nov 21 '26 07:11 anitahhhh

Congratulations, @anitahhhh! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on November 25, 2026.

🧑‍💻 @anitahhhh: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

🌊 Happy Wave 🌊

drips-wave[bot] avatar Nov 21 '26 07:11 drips-wave[bot]

This issue has been completed by @anitahhhh as part of the Stellar Wave Program's 11th Wave 🥳

😎 @anitahhhh: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

drips-wave[bot] avatar Nov 24 '26 09:11 drips-wave[bot]