Reduce token pressure in Daily Observability Report workflow#32238
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix daily observability report for AWF Firewall and MCP Gateway
Reduce token pressure in Daily Observability Report workflow
May 15, 2026
pelikhan
approved these changes
May 15, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces token pressure in the Daily Observability Report workflow by increasing the effective-token ceiling and narrowing the report prompt to sampled, prioritized workflow-run analysis.
Changes:
- Raises the workflow max effective-token limit from 25M to 40M.
- Replaces broad workflow enumeration with a single capped logs fetch plus limited targeted follow-up.
- Adds explicit run-analysis caps and prioritization guidance.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/daily-observability-report.md |
Updates workflow frontmatter and prompt instructions for bounded observability analysis. |
.github/workflows/daily-observability-report.lock.yml |
Carries the updated token limit and regenerated compiled workflow metadata/configuration. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
Comment on lines
+103
to
+112
| Analyze at most **20 runs total** across all fetched results. | ||
|
|
||
| Prioritize runs in this order: | ||
| 1. Failed or cancelled runs | ||
| 2. Runs with firewall enabled | ||
| 3. Runs with MCP servers configured | ||
| 4. Most recent successful runs needed to confirm healthy coverage | ||
|
|
||
| When multiple runs come from the same workflow, keep at most **2 runs per workflow** within the 20-run total cap unless a third run is needed to confirm a repeated critical gap. If you are near the 20-run cap, prefer breadth across workflows over extra runs from the same workflow. | ||
|
|
|
|
||
| ## Important Guidelines | ||
|
|
||
| ## Token Budget Guidelines |
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.
✨ Enhancement
What does this improve?
The Daily Observability Report workflow was exhausting its 25M effective-token budget while analyzing weekly AWF firewall and MCP gateway coverage. This change raises the workflow ET ceiling and, more importantly, narrows the prompt so the agent samples and prioritizes runs instead of expanding across the full workflow set.
Why is this valuable?
The workflow keeps its observability objective, but does so with bounded fan-out and clearer stopping conditions. That reduces the chance of repeating token-budget failures while preserving coverage of the highest-signal runs.
Implementation approach:
Budget control
max-effective-tokens: 40000000to the workflow frontmatterPrompt scope reduction
logscall instead of workflow-by-workflow expansionBounded follow-up
Explicit prioritization
Prompt clarity
Example of the new control points:
{ "workflow_name": "", "count": 30, "start_date": "-7d", "parse": true }