Problem / Context
Cache dogfood (2026-06-24) found that /debug/github-cache is reachable by any authenticated user — there is no admin gate, role check, or explicit debug-mode flag beyond having a valid session.
This page exposes:
- Quick warm / Full warm controls (can trigger cache warming workloads)
- Last warm results and warm-lock state
- Per-repo cache inspector (owner/repo form showing cache class and freshness per target)
- Sync job counts/failures
Source: dogfood-output/cache-dogfood-report.md (Observations §2)
Related: #358 (warm controls currently skipped: disabled in local dev)
Reproduction
- Authenticate as any normal user (not admin)
- Navigate to
http://127.0.0.1:3000/debug/github-cache
- Page loads with full debug/warm controls — no access denied
Acceptance Criteria
Evidence
dogfood-output/screenshots/cache-debug-overview.png
dogfood-output/cache-dogfood-report.md (Observations)
Implementation Notes
Per AGENTS.md, the debug surface is intended for operators monitoring warm lock, sync jobs, and per-repo cache targets. It should not be a general authenticated-user feature.
Consider:
- Middleware/route guard checking admin membership or internal allowlist
- Dev-only exposure via explicit env (
DEBUG_GITHUB_CACHE_ENABLED=1) in addition to auth
- Separate from repo-scoped cache reads — this page can trigger writes (warm) and enumerate cache topology
Tasks
Problem / Context
Cache dogfood (2026-06-24) found that
/debug/github-cacheis reachable by any authenticated user — there is no admin gate, role check, or explicit debug-mode flag beyond having a valid session.This page exposes:
Source:
dogfood-output/cache-dogfood-report.md(Observations §2)Related: #358 (warm controls currently
skipped: disabledin local dev)Reproduction
http://127.0.0.1:3000/debug/github-cacheAcceptance Criteria
/debug/github-cacheis not reachable by arbitrary authenticated users in productionNODE_ENV=development+ explicit flag)AGENTS.mdor ops runbookEvidence
dogfood-output/screenshots/cache-debug-overview.pngdogfood-output/cache-dogfood-report.md(Observations)Implementation Notes
Per
AGENTS.md, the debug surface is intended for operators monitoring warm lock, sync jobs, and per-repo cache targets. It should not be a general authenticated-user feature.Consider:
DEBUG_GITHUB_CACHE_ENABLED=1) in addition to authTasks
/debug/github-cacheroute and warm API endpoints