Skip to content

[deep-report] Fix day-keyed cache lookups in Copilot Opt and Copilot Agent PR Analysis #53535

Description

@github-actions

Description

Daily Cache Strategy Analyzer (discussion #53466) found that Copilot Opt and Copilot Agent PR Analysis restore cache-memory correctly (run_id-scoped key + restore-prefix fallback) but then gate reuse on exact-date filenames (copilot-sessions-${TODAY}.json, copilot-prs-${TODAY}.json, session-logs-${TODAY}/). Since Copilot Opt runs weekly and Copilot Agent PR Analysis runs daily, restored prior-run content almost never matches today's exact date, so both workflows behave like same-day rerun caches instead of real cross-run caches — re-fetching data every scheduled run. This is the identical root-cause pattern (day-keyed cache lookup vs. multi-day run cadence) just fixed for deep-report's own data fetch in PR #53486/#53460.

Expected Impact

Cuts redundant re-fetching of Copilot session/PR data on every scheduled run, reducing token usage and step time, and fixes Copilot Agent PR Analysis's Fetch Copilot PR data step which failed in run 32054193614 (partial/inconsistent cache refresh on a miss day).

Suggested Fix

Replace exact-date cache lookups with a stable "latest" filename or a newest-file-after-restore selection, decoupling cache filenames from the current date (mirrors the fix pattern already applied in #53460/PR #53486).

Suggested Agent

General-purpose / whoever owns .github/workflows/copilot-opt.md and .github/workflows/copilot-agent-pr-analysis.md (or equivalent shared cache-memory helper).

Estimated Effort

Quick (< 1 hour) — same fix pattern as the just-merged PR #53486.

Data Source

DeepReport analysis, 2026-08-18 cycle, discussion #53466 (Daily Cache Strategy Analyzer).

Generated by 🔬 Deep Report · agent · 184.1 AIC · ⌖ 10.5 AIC · ⊞ 11.9K ·

  • expires on Aug 19, 2026, 4:37 PM UTC-08:00

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions