Bug: First observation of an asset inflates daily delta (re-uploads/new IDs)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript, typescript
- Domain
- data
Research direction
Start in scripts/fetch-data.mjs around lines 346–357 and inspect the daily delta CASE expression, including similar uses elsewhere in the file. Verify that a missing prior snapshot contributes zero while later observations use the true difference. Done means newly appearing or re-uploaded assets no longer create one-day spikes and subsequent days report true diffs.
Written by the indexing model from the issue text.
Description
Summary
Daily summary treats missing prior snapshot as if today’s full download_count is the delta, which can spike totals when an asset is first seen (including re-uploads with a new asset_id).
Evidence
- CASE expression: scripts/fetch-data.mjs:346–357 (and similar) uses
WHEN old.download_count IS NULL THEN new.download_count
Proposed Fix
- Treat first observation as 0 delta:
CASE WHEN old.download_count IS NULL THEN 0 ELSE new.download_count - old.download_count END - Alternatively detect first_seen date per asset_id (MIN(date)) and force 0 when new.date == first_seen.
Acceptance Criteria
- Newly appearing assets no longer cause one-day spikes
- Subsequent days reflect true diffs
- Dominant language
- TypeScript
- Stars
- 4
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Comfy-Org/download-data
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
All issues in Comfy-Org/download-data
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100