Repository navigation
Batch test-quarantine data collection to reduce token usage - #67085
Merged
wtgodbe merged 3 commits intoJun 8, 2026
Merged
Conversation
The daily test-quarantine workflow keeps tripping the 25M effective-tokens rail. The dominant cost is the number of inference turns: each turn re-sends the whole conversation, and the agent was fetching test results build-by-build across many turns and surfacing raw resultsbyBuild/timeline JSON into context. Mandate a single batched python3 script per source (Sources A and B) that lists builds, fetches and aggregates test results, writes raw data to a file under /tmp/gh-aw/agent/, and prints only a compact per-test failure summary. Gate Source C (Helix crash investigation) behind the aggregated A+B counts so only work items that already failed 2+ times are investigated, each in a single batched script rather than interactive per-build drill-downs. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the test-quarantine workflow prompt to reduce effective token usage by enforcing batched, single-turn data collection and avoiding surfacing large raw Azure DevOps/Helix payloads in agent context.
Changes:
- Adds a mandatory, single-batched-
python3data-collection method intended to minimize multi-turn build-by-build loops and raw JSON in context. - Updates Source A/B instructions to explicitly require script-side pagination, aggregation, writing raw outputs to
/tmp/gh-aw/agent/, and printing only compact summaries. - Gates Source C (Helix crash investigation) behind aggregated Source A+B results and directs investigation via single batched scripts with constrained output.
Comment on lines
+199
to
+203
| 1. Lists the relevant builds, following any `continuationToken` pagination **inside the script**. | ||
| 2. Loops over those builds and fetches their test results **inside the script**. | ||
| 3. Aggregates per-test-name failure counts in memory. | ||
| 4. Writes the full raw/aggregated data to a file under `/tmp/gh-aw/agent/` (e.g., `source_a.json`). | ||
| 5. Prints **only** a compact summary to your context — the per-test-name table of failures (test name + failure count + source), nothing else. |
Member
Author
There was a problem hiding this comment.
Good catch — fixed in 85b64d6. Generalized steps 3–5 so step 5 explicitly covers both output styles (per-test failure table for Sources A/B; extracted [FAIL] blocks for Source C) while still enforcing the write-raw-to-file / print-only-compact rule.
Source C prints extracted [FAIL] blocks rather than a per-test failure table, so generalize steps 3-5 of the data-collection method to cover both output styles while keeping the write-raw-to-file / print-only-compact rule. Co-authored-by: Copilot <[email protected]>
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.
The daily
test-quarantineworkflow keeps tripping the 25M effective-tokens limit. The dominant cost is the number of inference turns — each turn re-sends the whole conversation, and the agent was fetching test results build-by-build across many turns while surfacing rawresultsbyBuild/timeline JSON into context.This is a prompt-only change to
.github/workflows/test-quarantine.md(runtime-imported, so no lockfile recompile needed):python3script per source that paginates builds, fetches and aggregates test results in-script, writes raw data to a file under/tmp/gh-aw/agent/, and prints only a compact per-test failure summary.