Skip to content

Reduce token pressure in Daily Observability Report workflow#32238

Merged
pelikhan merged 4 commits into
mainfrom
copilot/aw-daily-observability-report-fix
May 15, 2026
Merged

Reduce token pressure in Daily Observability Report workflow#32238
pelikhan merged 4 commits into
mainfrom
copilot/aw-daily-observability-report-fix

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 15, 2026

✨ 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

    • add max-effective-tokens: 40000000 to the workflow frontmatter
    • carry the higher ET limit through the compiled lock file
  • Prompt scope reduction

    • remove the initial “list all workflows” step
    • start with one repository-wide logs call instead of workflow-by-workflow expansion
    • reduce the initial fetch size from 100 runs to 30
  • Bounded follow-up

    • allow targeted follow-up only when a required run category is missing
    • cap targeted fetches and make them additive to, not exempt from, the overall analysis limit
  • Explicit prioritization

    • cap analysis at 20 total runs
    • prioritize failed/cancelled runs, then firewall-enabled runs, then MCP-enabled runs, then recent healthy runs
    • prefer breadth across workflows over repeated sampling from the same workflow
  • Prompt clarity

    • document why the workflow uses a higher ET cap
    • clarify that the reduced fetch size is intended to provide a representative recent sample

Example of the new control points:

timeout-minutes: 45
max-effective-tokens: 40000000
{
  "workflow_name": "",
  "count": 30,
  "start_date": "-7d",
  "parse": true
}

Copilot AI and others added 3 commits May 15, 2026 01:14
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
Copilot AI requested a review from pelikhan May 15, 2026 01:21
@pelikhan pelikhan marked this pull request as ready for review May 15, 2026 01:22
Copilot AI review requested due to automatic review settings May 15, 2026 01:22
@pelikhan pelikhan merged commit 8302ffc into main May 15, 2026
@pelikhan pelikhan deleted the copilot/aw-daily-observability-report-fix branch May 15, 2026 01:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw] Daily Observability Report for AWF Firewall and MCP Gateway failed

3 participants