Skip to content

fix(ambient-context): reduce first-request token overhead in smoke-copilot and test-quality-sentinel - #39280

Merged
pelikhan merged 2 commits into
mainfrom
copilot/daily-ambient-context-optimizer-again
Jun 14, 2026
Merged

fix(ambient-context): reduce first-request token overhead in smoke-copilot and test-quality-sentinel#39280
pelikhan merged 2 commits into
mainfrom
copilot/daily-ambient-context-optimizer-again

Conversation

Copilot AI commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

The Daily Ambient Context Optimizer flagged two workflows with significant redundant prompt content: smoke-copilot had a 1,179-char section duplicating the framework-injected <mcp-clis> block, and test-quality-sentinel embedded a ~13,770-char static report template inline on every first request.

smoke-copilot.md

  • Delete ## Tool Access Overview — verbatim restatement of the framework-injected <mcp-clis> block; agents already receive this from the framework

test-quality-sentinel.md

  • *Extract Step 7 comment template to ## skill: \tqs-report-template`** — moves the entire ```` ```markdown ``` ```` report format block (placeholders, tables,

    Detailssections) out of the first-request context into a lazily-loaded inline skill; Step 7 now just says *"Use thetqs-report-template` skill for the exact comment format"

  • Compress skill blocks 2 & 3 — the 928-char verbatim flagged-test example and 782-char "Understanding Test Classifications" <details> block are replaced with a compact one-line format spec + brief example, and a single summary sentence in the Verdict line respectively

  • Flatten heading structure 43 → 23 — converts 14 H3 sub-headings (Quality Questions 1–3, Red Flags, Scoring Components, Score Formula, Thresholds, Failure Condition, Report Formatting, Analysis Scope, Calibration, Token Budget) to bold inline prose; merges ## Current Context + ## Mission into the intro paragraph; folds ## Important: Always Call a Safe Output into Step 8

…l workflows

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Optimize daily ambient context across workflows Jun 14, 2026
Copilot AI requested a review from pelikhan June 14, 2026 20:49
@pelikhan
pelikhan marked this pull request as ready for review June 14, 2026 20:50
Copilot AI review requested due to automatic review settings June 14, 2026 20:50
@pelikhan
pelikhan merged commit 1184815 into main Jun 14, 2026
@pelikhan
pelikhan deleted the copilot/daily-ambient-context-optimizer-again branch June 14, 2026 20:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 first-request prompt/token overhead for two agentic workflows by removing redundant, framework-provided tool-access text and by moving a large static report template into a lazily-referenced inline skill.

Changes:

  • Removed the redundant “Tool Access Overview” section from smoke-copilot.md.
  • Refactored test-quality-sentinel.md to compress headings/content and extract the Step 7 comment template into an inline tqs-report-template skill.
  • Regenerated the corresponding .lock.yml files to reflect updated workflow bodies.
Show a summary per file
File Description
.github/workflows/test-quality-sentinel.md Compresses workflow instructions and introduces tqs-report-template inline skill; updates Step 7/8 guidance.
.github/workflows/test-quality-sentinel.lock.yml Updates generated metadata hashes for the modified workflow body.
.github/workflows/smoke-copilot.md Removes duplicated tool-access explanation to reduce prompt size.
.github/workflows/smoke-copilot.lock.yml Updates generated metadata hashes for the modified workflow body.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 4/4 changed files
  • Comments generated: 3
Comment on lines 264 to +265
1. More than 30% of new tests are classified as **implementation tests** (low-value):

```
low_value_ratio = (implementation_tests / total_new_tests)
fail_check = low_value_ratio > 0.30
```
`low_value_ratio = (implementation_tests / total_new_tests) > 0.30`
After posting the comment, submit a pull request review based on the verdict. **You MUST always call at least one safe output tool.** If no tests were found or no action is needed, call `noop`:

```json
{"noop": {"message": "No action needed: [brief explanation of what was analyzed and why no action was required]"}}
Comment on lines +279 to +280
After posting the comment, submit a pull request review based on the verdict. **You MUST always call at least one safe output tool.** If no tests were found or no action is needed, call `noop`:

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

Labels

None yet

3 participants