Skip to content

Commit 085e057

Browse files
CopilotMossaka
andauthored
Fix daily firewall report caching stale aggregated data (#10492)
* Initial plan * Initial plan for fixing daily firewall report caching issue Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> * Fix daily firewall report caching to always fetch fresh data Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com> Co-authored-by: Jiaxiao Zhou <duibao55328@gmail.com>
1 parent 6633b6f commit 085e057

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

.github/workflows/daily-firewall-report.lock.yml

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/daily-firewall-report.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,12 @@ Simply call the MCP tools directly as described in the steps below. If you want
173173
2. If a report exists from the last 24 hours:
174174
- Read the cached run IDs that were analyzed
175175
- Determine if any new workflow runs have occurred since then
176-
- If no new runs, update the existing report with current timestamp and exit early
176+
- If no new runs, skip to Step 5 (Generate Report) using the same cached run IDs, but **always re-fetch fresh data from the audit tool** for accurate counts
177177
3. Store the following in repo memory for the next run:
178178
- Last analysis timestamp
179179
- List of run IDs analyzed
180-
- Aggregated blocked domains data
181180

182-
This prevents unnecessary re-analysis of the same data and significantly reduces token usage.
181+
**IMPORTANT**: Never cache or reuse aggregated statistics (blocked counts, allowed counts, domain lists). Always compute these fresh from the audit tool to ensure accurate reporting. Only cache run IDs to avoid re-discovering the same workflow runs.
183182

184183
### Step 1: Collect Recent Firewall-Enabled Workflow Runs
185184

0 commit comments

Comments
 (0)