Skip to content

feat(selfhost): Redis-backed installation-token store + GitHub GET response cache - #1551

Merged
JSONbored merged 1 commit into
mainfrom
chore/reconcile-redis
Jun 26, 2026
Merged

feat(selfhost): Redis-backed installation-token store + GitHub GET response cache#1551
JSONbored merged 1 commit into
mainfrom
chore/reconcile-redis

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Reconciles the batch's Redis caches onto main. Two injectable seams in github/app.ts (null on the Worker → byte-identical): an InstallationTokenStore so a multi-replica self-host mints ~1 token/hour/installation across the fleet (warm tokens survive restarts), and a short-TTL GitHubResponseCache that dedups the ~24 safe GETs per review (never the token-mint/rate-limit endpoints). Both wired in server.ts only when REDIS_URL is set (GITHUB_CACHE_TTL_SECONDS, default 20s, 0 disables). Preserves the stale-token-grace path + its tests. Part of the batch reconciliation.

…sponse cache

Reconciles the batch's Redis caches onto main. Two injectable seams in github/app.ts (null on the
Worker → unchanged): an InstallationTokenStore so a multi-replica self-host mints ~1 token/hour/
installation across the FLEET (not per-replica) and warm tokens survive restarts, and a short-TTL
GitHubResponseCache that dedups the ~24 safe GETs per review (never the token-mint/rate-limit
endpoints). Both wired in server.ts only when REDIS_URL is set (GITHUB_CACHE_TTL_SECONDS, default
20s, 0 disables). Preserves the stale-token-grace path + its tests; adds fleet/cache coverage.
@JSONbored
JSONbored merged commit 8127dfe into main Jun 26, 2026
2 checks passed
@JSONbored
JSONbored deleted the chore/reconcile-redis branch June 26, 2026 21:48
@dosubot dosubot Bot added the size:XL label Jun 26, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.74468% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.38%. Comparing base (b5d575e) to head (9fcdbff).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/github/app.ts 94.59% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1551   +/-   ##
=======================================
  Coverage   95.37%   95.38%           
=======================================
  Files         199      201    +2     
  Lines       21546    21598   +52     
  Branches     7791     7807   +16     
=======================================
+ Hits        20550    20601   +51     
  Misses        416      416           
- Partials      580      581    +1     
Files with missing lines Coverage Δ
src/selfhost/redis-response-cache.ts 100.00% <100.00%> (ø)
src/selfhost/redis-token-cache.ts 100.00% <100.00%> (ø)
src/github/app.ts 97.26% <94.59%> (-0.11%) ⬇️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored self-assigned this Jun 26, 2026
andriypolanski pushed a commit to andriypolanski/gittensory that referenced this pull request Jun 27, 2026
…SONbored#1138)

THE dominant contributor-flood failure (robustness audit). Two disposition bugs killed/stranded good PRs:

1. FORK FALSE-CLOSE: ciState='unverified' (a fork whose Actions await maintainer approval, or unreadable
   check-runs) made reviewGood=false, so a CONTRIBUTOR with a passing gate was one-shot CLOSED citing 'CI
   could not be verified' — and re-closed every push. FIX: willClose now fires ONLY on a REAL adverse signal
   — a confirmed gate FAILURE, a red required CI (ciFailed), or a base CONFLICT. Unverified / not-yet-mergeable
   is HELD for review, never killed. (Owner/automation still never close; guarded paths still held.)

2. NEUTRAL SILENT-STUCK: a non-confirmed contributor PR with any advisory blocker gets conclusion='neutral',
   and the planner returned [] immediately — no label, no disposition — so the PR looked 'unreviewed forever'
   (the metagraphed JSONbored#1551/JSONbored#1554 class). FIX: only SKIPPED short-circuits; a NEUTRAL gate now FLOWS to the
   disposition so the PR is surfaced with a label + held (never silently undecided). Neutral is NOT auto-merged
   (that trust/policy decision is deferred, not bundled here).

Full suite green (3589). Updated agent-actions + queue tests that asserted the old (harmful) close/silent behavior.
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