feat(selfhost): Redis-backed installation-token store + GitHub GET response cache - #1551
Merged
Conversation
…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.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
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
🚀 New features to boost your workflow:
|
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 inserver.tsonly whenREDIS_URLis set (GITHUB_CACHE_TTL_SECONDS, default 20s, 0 disables). Preserves the stale-token-grace path + its tests. Part of the batch reconciliation.