feat(integrations): finish a github star history backfill over later syncs

Open
#788 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, nextjs, react, typescript
Domain
api, backend, testing

Research direction

Start with src/lib/adapters/github/repositories.ts and trace the sync cursor and the STAR_HISTORY_BUDGET_MS limit, then inspect the cursor schema and metric validation. Read the GitHub provider docs and existing adapter tests before changing behavior. Add coverage for repositories left pending across syncs and validation limited to accounts with pending history; done when all histories eventually load within each sync's budget and the past totals are stated afterward.

Written by the indexing model from the issue text.

Description

area: integrations enhancement impact: low priority: P3 size: M

Context

Found by the Fable pre-production review on 2026-12-02 (main at cedc1914; every line reference below re-checked on main at cde5aa3b). Source: product triage report, new issue 6.

An account's first GitHub sync reads star history in place of forks, one page per repository, within a 20 second budget (STAR_HISTORY_BUDGET_MS, src/lib/adapters/github/repositories.ts:66, used at :568-597). Past star totals are stated only when every repository's history was read in that budget (docs/providers/github.md:257); the budget fits about 4 busy repositories with read time unmeasured (github.md:239).

Impact: low. An installation with more starred repositories than the budget reaches gets no past star totals and waits 7 to 30 days for "stars gained" and the year card to fill from live readings.

Plan

  1. Keep repositories whose history was not reached as pending in the sync cursor.
  2. Read pending histories on later syncs, within the same budget, oldest pending first.
  3. State the past totals once every repository's history is read.
  4. Allow those past points in validation only for an account with pending history.

Acceptance criteria

  • Repositories not reached stay pending and are read on later syncs.
  • Past totals are stated once all are read (fixture test with more repositories than one budget reaches).
  • Validation accepts those points only for an account with pending history.
  • Playwright e2e: none needed, no screen changes.

Files and areas

src/lib/adapters/github/repositories.ts, the cursor schema, src/lib/adapters/metrics.ts validation if needed, docs/providers/github.md, tests.

Non-goals: the fork and activity budgets, the sync deadline (#{n4}).

Verification

npm run typecheck, npm run lint, npx vitest run src/lib/adapters/github.


Branch: <issue-number>-github-star-history-resume

Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown

Dominant language
TypeScript
Stars
13
Forks
2
Avg merge
5h 20m
Merged PRs (30d)
287

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eddiejaoude/StackDash

All issues in eddiejaoude/StackDash

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.