Skip to content

fix(github): keep claimed summaries stale until cache commit - #757

Merged
nixuuu merged 1 commit into
devfrom
fix/github-linked-summary-freshness
Nov 14, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/github-linked-summary-freshness

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 14, 2026

Copy link
Copy Markdown
Member

Linked pull requests could report stale: false while still showing the remembered summary during a background refresh. A refresh claim inserts a cache row without a payload, with expires_at = now(). #752 made freshness depend only on that timestamp. A reader whose transaction timestamp precedes or equals the claim can therefore classify the empty row as fresh and return the old summary.

Require both a cache payload and an unexpired deadline in the same list query. The existing lease-fenced cache update already commits the new payload and deadline atomically; neither the refresh claim nor its attempt timestamp makes a link fresh. This affects the single-PR path as well as batches. The fixture and the original restart assertion remain unchanged.

The regression test holds an older READ COMMITTED reader while another connection commits the real refresh claim, checks that the remembered title remains stale, then commits a new cache summary and checks that the new title and fresh status appear together. It fails against the previous product code.

Validation:

  • Before: the unchanged restart test failed once in 50 runs with the reported old-title/fresh-status mismatch; the deterministic regression also failed.
  • After: all five last-known-summary tests passed 50 times (250 passes), including the original restart test.
  • All GitHub integration files: 178 passed, 2 opt-in live tests skipped, 0 failed across 37 files, using check:tmp (clean temp-directory result).
  • Passed: bun install, gen:check, typecheck, lint, format:check, and the web production build. Checks ran with nice and temporary files under /var/tmp.

Copy audit (docs/copy.md §8): no UI text changed; not applicable.

Fixes: #752

@nixuuu
nixuuu merged commit d2f6f25 into dev Nov 14, 2026
11 checks passed
@nixuuu
nixuuu deleted the fix/github-linked-summary-freshness branch November 14, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant