#614

github: share day counts and merged-PR timing across panes

Openwiiiimmopened 13d ago

A second github pane reuses the day counts and the merged-PR timing another pane already fetched.

Context / problem

Day counts are fetched in chunks of 20 days, and the merged-PR timing walk takes up to 10 pages of PRs and 120 review pages. Both are cached only inside one pane today. Part of stealth-factory/opscope#630; follows the board issue.

Scope

In:

  • Day counts per account as one shared map of day to counts. Only the trailing two days are refetched, as today, and the pane that fetches merges into the stored map.
  • Merged-PR timing per account and window, valid while the merged count it was computed for still matches, instead of expiring on a timer.
  • r clearing the day cache still works, under the 30 s floor.

Out:

  • The oldest-PR lookup.

Acceptance

  • A second pane opening a 90-day window makes no day-count requests if the first already has them.
  • Timing is fetched once per change in the merged count, across all panes.
Agent notes
  • day_cache with FRESH_DAYS = 2; fetch_land_timing :935; REVIEW_PAGE_BUDGET = 120.
  • Keys: gh.days/1:{host}:{fp}:{account}, gh.timing/1:{host}:{fp}:{account}:{days}.

Activity

1
linear-code[bot]13d ago