Skip to content

fix: keep the seed prices file in sync instead of committing it - #1163

Merged
Klakurka merged 2 commits into
masterfrom
fix/incremental-price-seed-file
Nov 26, 2026
Merged

Klakurka merged 2 commits into
masterfrom
fix/incremental-price-seed-file

Conversation

@Klakurka

Copy link
Copy Markdown
Member

prices.csv was committed even though it was git-ignored, and only got refreshed when someone deleted it and committed the regenerated copy. It was last updated on 2025-10-22 and was missing 2024-12-05 for both tickers. Since the runtime gap sync only looks back 30 days, a freshly seeded DB had no prices for those days.

The seed now treats the file as a local, git-ignored cache: for each ticker it checks for gaps and for days after the newest price up to today. It fetches only the tickers that are incomplete, merges the missing days and rewrites the file. A missing file still triggers a full download.

Also fix the broken import in scripts/updateAllPrices.ts (left over from the prisma -> prisma-local rename) and parse file dates as UTC so seeded timestamps match the ones the price sync job expects.

prices.csv was committed even though it was git-ignored, and only got
refreshed when someone deleted it and committed the regenerated copy.
It was last updated on 2025-10-22 and was missing 2024-12-05 for both
tickers. Since the runtime gap sync only looks back 30 days, a freshly
seeded DB had no prices for those days.

The seed now treats the file as a local, git-ignored cache: for each
ticker it checks for gaps and for days after the newest price up to
today. It fetches only the tickers that are incomplete, merges the
missing days and rewrites the file. A missing file still triggers a full
download.

Also fix the broken import in scripts/updateAllPrices.ts (left over from
the prisma -> prisma-local rename) and parse file dates as UTC so seeded
timestamps match the ones the price sync job expects.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Klakurka Klakurka self-assigned this Nov 26, 2026
@Klakurka Klakurka added bug Something isn't working enhancement (behind the scenes) Stuff that users won't see labels Nov 26, 2026
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3e4eaaf0-17ca-40d4-be04-0f3050cd0752
Commits

Reviewing files that changed from the base of the PR and between 013d307 and 1717442.

Files ignored due to path filters: 1

  • prisma-local/seeds/prices.csv is excluded by !**/*.csv
Files selected for processing: 3

  • prisma-local/seeds/prices.ts
  • scripts/updateAllPrices.ts
  • tests/unittests/seedPrices.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@Klakurka
Klakurka merged commit 3616b49 into master Nov 26, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement (behind the scenes) Stuff that users won't see

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant