Description
GET /api/v1/repos/:owner/:repo/installation (added in #203 for the registration UI install gate) is subject to the global CustomCacheInterceptor 60s production cache. When the GitHub App is installed and the installation / installation_repositories webhook sets repos.installation_id, repeated GETs with the same URL can still return installed: false until the cache entry expires.
GET /api/v1/health and GET /api/v1/pulls/:owner/:repo/:number/files already opt out via @NoCache(); the install-status endpoint does not.
Steps to Reproduce
- Run the service with
NODE_ENV=production and Redis configured.
- Register a repo row without
installation_id (or use a repo not yet installed).
- Call
GET /api/v1/repos/{owner}/{repo}/installation and note installed: false.
- Install the Gittensor Mirror App on that repo so the webhook upserts
installation_id.
- Within 60 seconds, repeat the same GET with identical path/query.
- Observe the cached pre-install payload (
installed: false) is returned.
Expected Behavior
After the install webhook updates repos.installation_id, the install-status endpoint should reflect installed: true on the next read.
Actual Behavior
Cached GET responses can remain installed: false for up to 60 seconds after the webhook mutates the row.
Environment
- OS: Linux
- Runtime/Node version: Node 20
Additional Context
Description
GET /api/v1/repos/:owner/:repo/installation(added in #203 for the registration UI install gate) is subject to the globalCustomCacheInterceptor60s production cache. When the GitHub App is installed and theinstallation/installation_repositorieswebhook setsrepos.installation_id, repeated GETs with the same URL can still returninstalled: falseuntil the cache entry expires.GET /api/v1/healthandGET /api/v1/pulls/:owner/:repo/:number/filesalready opt out via@NoCache(); the install-status endpoint does not.Steps to Reproduce
NODE_ENV=productionand Redis configured.installation_id(or use a repo not yet installed).GET /api/v1/repos/{owner}/{repo}/installationand noteinstalled: false.installation_id.installed: false) is returned.Expected Behavior
After the install webhook updates
repos.installation_id, the install-status endpoint should reflectinstalled: trueon the next read.Actual Behavior
Cached GET responses can remain
installed: falsefor up to 60 seconds after the webhook mutates the row.Environment
Additional Context
packages/das/src/cache/custom-cache.interceptor.ts— caches all GET handlers unless@NoCache().packages/das/src/api/repos/repos.controller.ts—getInstallationStatushas no opt-out.registeredflips true.