Reduce test-coverage-reporter prompt surface and coverage payload size#4871
Conversation
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
There was a problem hiding this comment.
Pull request overview
This PR tightens the test-coverage-reporter agent workflow to reduce prompt/tool injection surface and shrink the precomputed coverage context it feeds to the agent, while adding a regression test to ensure these optimizations remain in place.
Changes:
- Disables GitHub MCP and bash tool injection in the source workflow (
tools.github: false,tools.bash: false) and ensures the compiled lock no longer contains GitHub MCP artifacts. - Reduces coverage payload size by (1) stripping the workspace prefix from
COVERAGE_JSONkeys and (2) filteringCOVERAGE_TABLErows to <80% statement coverage plus a small set of security-critical path substrings. - Adds a Jest workflow regression test to assert the source + lock continue to reflect the intended tool disabling and coverage filtering.
Show a summary per file
| File | Description |
|---|---|
| scripts/ci/test-coverage-reporter-workflow.test.ts | Adds a regression test asserting tool injection removal and coverage payload trimming are present in source + lock workflows. |
| .github/workflows/test-coverage-reporter.md | Disables GitHub/bash agent tools and trims precomputed coverage JSON/table context. |
| .github/workflows/test-coverage-reporter.lock.yml | Recompiled lock reflecting removal of GitHub MCP injection and inclusion of the new coverage filtering logic. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 0
🔍 Smoke Test: Copilot PAT Auth — ResultsPR: "Reduce test-coverage-reporter prompt surface and coverage payload size"
Overall: FAIL — file test unverifiable due to unresolved
|
🔬 Smoke Test Results
PR: Reduce test-coverage-reporter prompt surface and coverage payload size Overall: ❌ FAIL
|
Smoke Test: Copilot BYOK (Direct) Mode — ✅ PASSTest Results:
Recent PRs (for context):
Configuration: Direct BYOK mode (COPILOT_PROVIDER_API_KEY) → api-proxy sidecar → api.githubcopilot.com Authors/Assignees: All smoke tests passed. Running in direct BYOK inference path.
|
Titles
Results
OverallPASS
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Smoke Test: GitHub Actions Services Connectivity
Overall: FAIL —
|
|
|
test-coverage-reporterwas spending tokens on unused tool injection and oversized precomputed coverage inputs. This tightens the workflow around its actual job: consume step outputs and post a discussion viasafeoutputs.Remove unused agent tools
github: falsebash: falseTrim precomputed coverage context
COVERAGE_JSONentriesCOVERAGE_TABLEto actionable files only:docker-manager,host-iptables,squid-config,domain-patterns,cli)Lockfile + regression coverage
test-coverage-reporter.lock.ymlIllustrative change