chore: optimize test-coverage-improver workflow for ~50% token reduction#2238
chore: optimize test-coverage-improver workflow for ~50% token reduction#2238
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Optimizes the test-coverage-improver agentic workflow to reduce runtime tokens/turns by precomputing deterministic work (install/build/coverage) and restricting agent tooling/shell access.
Changes:
- Adds pre-steps intended to run
npm ci,npm run build, andnpm run test:coverage, then inject coverage artifacts into the prompt via step outputs. - Restricts GitHub toolsets to
[repos, pull_requests]and tightens the bash allowlist to specific paths/commands. - Regenerates the compiled
.lock.ymlworkflow and updates the actions lock entries.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/test-coverage-improver.md | Adds pre-steps + prompt sections intended to include precomputed coverage; tightens tool allowlists. |
| .github/workflows/test-coverage-improver.lock.yml | Regenerated compiled workflow to include the new steps/tool restrictions and prompt interpolation wiring. |
| .github/aw/actions-lock.json | Removes some pinned action entries (notably gh-aw-actions setup/setup-cli). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (5)
.github/workflows/test-coverage-improver.md:91
node -e ...prints to STDOUT but is not redirected into$GITHUB_OUTPUT, sosteps.low-coverage.outputs.LOW_COVERAGEwill be empty. Capture the Node script output (and the fallback message) and append it to$GITHUB_OUTPUTbetween the heredoc markers.
echo "LOW_COVERAGE<<EOF" >> $GITHUB_OUTPUT
node -e "
const d = JSON.parse(require('fs').readFileSync('coverage/coverage-summary.json', 'utf8'));
const low = Object.entries(d)
.filter(([k, v]) => k !== 'total' && v.statements.pct < 80)
.sort((a, b) => a[1].statements.pct - b[1].statements.pct);
if (low.length === 0) { console.log('All files are above 80% coverage.'); }
else { low.forEach(([k, v]) => console.log(k + ' — ' + v.statements.pct + '%')); }
" 2>/dev/null || echo "(coverage summary not available)"
.github/aw/actions-lock.json:62
- These action pin entries for
github/gh-aw-actions/setup(-cli)@v0.71.1were removed from the lock, but multiple workflows in this repo still referencegithub/gh-aw-actions/setup@.../setup-cli@...(e.g..github/workflows/agentics-maintenance.yml, various*.lock.yml). Keeping.github/aw/actions-lock.jsonaligned with actual workflow usages is important for reproducible upgrades/compiles; please either restore the removed entries or update the workflows to stop using those actions.
"docker/setup-buildx-action@v4.0.0": {
"repo": "docker/setup-buildx-action",
"version": "v4.0.0",
"sha": "4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd"
},
"github/gh-aw/actions/setup@v0.69.3": {
"repo": "github/gh-aw/actions/setup",
"version": "v0.69.3",
"sha": "6abd7107cebd8b300f4d64013201ad2d8e0a994f"
},
.github/workflows/test-coverage-improver.lock.yml:384
LOW_COVERAGEis being written using a heredoc marker, but the Node script output is not redirected into$GITHUB_OUTPUT, sosteps.low-coverage.outputs.LOW_COVERAGEwill be empty. Capture the script output (and fallback message) and append it to$GITHUB_OUTPUTbetween the markers.
- id: low-coverage
name: List files below 80% coverage
run: "echo \"LOW_COVERAGE<<EOF\" >> $GITHUB_OUTPUT\nnode -e \"\n const d = JSON.parse(require('fs').readFileSync('coverage/coverage-summary.json', 'utf8'));\n const low = Object.entries(d)\n .filter(([k, v]) => k !== 'total' && v.statements.pct < 80)\n .sort((a, b) => a[1].statements.pct - b[1].statements.pct);\n if (low.length === 0) { console.log('All files are above 80% coverage.'); }\n else { low.forEach(([k, v]) => console.log(k + ' — ' + v.statements.pct + '%')); }\n\" 2>/dev/null || echo \"(coverage summary not available)\"\necho \"EOF\" >> $GITHUB_OUTPUT"
.github/workflows/test-coverage-improver.lock.yml:381
COVERAGE_MDis intended as a step output, but thecat ... || echo ...output isn't appended to$GITHUB_OUTPUT, sosteps.coverage-md.outputs.COVERAGE_MDwill be empty. Append the command output to$GITHUB_OUTPUTbetween the heredoc markers.
name: Read COVERAGE_SUMMARY.md
run: |
echo "COVERAGE_MD<<EOF" >> $GITHUB_OUTPUT
cat COVERAGE_SUMMARY.md 2>/dev/null || echo "(COVERAGE_SUMMARY.md not found)"
echo "EOF" >> $GITHUB_OUTPUT
.github/workflows/test-coverage-improver.md:78
- Same issue as above: the
cat COVERAGE_SUMMARY.md ... || echo ...command doesn't append to$GITHUB_OUTPUT, sosteps.coverage-md.outputs.COVERAGE_MDwill be empty. Append the command output to$GITHUB_OUTPUTso it becomes part of the output value.
echo "COVERAGE_MD<<EOF" >> $GITHUB_OUTPUT
cat COVERAGE_SUMMARY.md 2>/dev/null || echo "(COVERAGE_SUMMARY.md not found)"
echo "EOF" >> $GITHUB_OUTPUT
- Files reviewed: 3/3 changed files
- Comments generated: 6
| # gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"3e3da1351f418290092cf2b0774fc26553dee5c79df96d0e704446f71892e390","compiler_version":"v0.68.3","strict":true,"agent_id":"copilot"} | ||
| # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"373c709c69115d41ff229c7e5df9f8788daa9553","version":"v9"},{"repo":"actions/setup-node","sha":"53b83947a5a98c8d113130e565377fae1a50d02f","version":"v6.3.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"github/gh-aw-actions/setup","sha":"v0.68.3","version":"v0.68.3"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.20","digest":"sha256:9161f2415a3306a344aca34dd671ee69f122317e0a512e66dc64c94b9c508682","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.25.20@sha256:9161f2415a3306a344aca34dd671ee69f122317e0a512e66dc64c94b9c508682"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20","digest":"sha256:6971639e381e82e45134bcd333181f456df3a52cd6f818a3e3d6de068ff91519","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.20@sha256:6971639e381e82e45134bcd333181f456df3a52cd6f818a3e3d6de068ff91519"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.20","digest":"sha256:5411d903f73ee597e6a084971c2adef3eb0bd405910df3ed7bf5e3d6bd58a236","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.25.20@sha256:5411d903f73ee597e6a084971c2adef3eb0bd405910df3ed7bf5e3d6bd58a236"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.2.19","digest":"sha256:44d4d8de7e6c37aaea484eba489940c52df6a0b54078ddcbc9327592d5b3c3dd","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.2.19@sha256:44d4d8de7e6c37aaea484eba489940c52df6a0b54078ddcbc9327592d5b3c3dd"},{"image":"ghcr.io/github/github-mcp-server:v0.32.0","digest":"sha256:2763823c63bcca718ce53850a1d7fcf2f501ec84028394f1b63ce7e9f4f9be28","pinned_image":"ghcr.io/github/github-mcp-server:v0.32.0@sha256:2763823c63bcca718ce53850a1d7fcf2f501ec84028394f1b63ce7e9f4f9be28"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} |
There was a problem hiding this comment.
In the generated manifest, github/gh-aw-actions/setup has sha: "v0.68.3", which is not a commit SHA and defeats the purpose of pinning (and may break any tooling expecting a 40-hex SHA). Regenerate the lock so the manifest pins github/gh-aw-actions/setup@v0.68.3 to its actual commit SHA (as other workflows do).
| GH_AW_EXPR_4E3B1F6D: ${{ steps.coverage-summary.outputs.COVERAGE_JSON }} | ||
| GH_AW_EXPR_998C0DF8: ${{ steps.low-coverage.outputs.LOW_COVERAGE }} | ||
| GH_AW_EXPR_BCB09072: ${{ steps.coverage-md.outputs.COVERAGE_MD }} |
There was a problem hiding this comment.
The activation job builds/interpolates the prompt using steps.coverage-* outputs, but those coverage steps are defined in the agent job (later in the workflow). As a result, these expressions will resolve to empty strings during activation and the prompt won't include the pre-computed coverage data. Move the coverage collection steps into the activation job before prompt rendering, or defer prompt interpolation/substitution until after the coverage steps have run.
| GH_AW_EXPR_4E3B1F6D: ${{ steps.coverage-summary.outputs.COVERAGE_JSON }} | |
| GH_AW_EXPR_998C0DF8: ${{ steps.low-coverage.outputs.LOW_COVERAGE }} | |
| GH_AW_EXPR_BCB09072: ${{ steps.coverage-md.outputs.COVERAGE_MD }} |
| echo "COVERAGE_JSON<<EOF" >> $GITHUB_OUTPUT | ||
| cat coverage/coverage-summary.json | ||
| echo "EOF" >> $GITHUB_OUTPUT | ||
| - id: coverage-md | ||
| name: Read COVERAGE_SUMMARY.md | ||
| run: | | ||
| echo "COVERAGE_MD<<EOF" >> $GITHUB_OUTPUT | ||
| cat COVERAGE_SUMMARY.md 2>/dev/null || echo "(COVERAGE_SUMMARY.md not found)" | ||
| echo "EOF" >> $GITHUB_OUTPUT |
There was a problem hiding this comment.
This workflow step intends to export COVERAGE_JSON, but cat coverage/coverage-summary.json writes to STDOUT instead of $GITHUB_OUTPUT, so the output will be empty. Append the file contents to $GITHUB_OUTPUT between the heredoc markers.
This issue also appears in the following locations of the same file:
- line 377
- line 382
| echo "COVERAGE_JSON<<EOF" >> $GITHUB_OUTPUT | |
| cat coverage/coverage-summary.json | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - id: coverage-md | |
| name: Read COVERAGE_SUMMARY.md | |
| run: | | |
| echo "COVERAGE_MD<<EOF" >> $GITHUB_OUTPUT | |
| cat COVERAGE_SUMMARY.md 2>/dev/null || echo "(COVERAGE_SUMMARY.md not found)" | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| { | |
| echo "COVERAGE_JSON<<EOF" | |
| cat coverage/coverage-summary.json | |
| echo "EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| - id: coverage-md | |
| name: Read COVERAGE_SUMMARY.md | |
| run: | | |
| { | |
| echo "COVERAGE_MD<<EOF" | |
| cat COVERAGE_SUMMARY.md 2>/dev/null || echo "(COVERAGE_SUMMARY.md not found)" | |
| echo "EOF" | |
| } >> "$GITHUB_OUTPUT" |
| {"add_comment":{"max":1,"target":"*"},"create_pull_request":{"draft":true,"max":1,"max_patch_size":1024,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_path_prefixes":[".github/",".agents/",".githooks/",".husky/"],"title_prefix":"[Test Coverage] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{}} | ||
| GH_AW_SAFE_OUTPUTS_CONFIG_6715fb4237626891_EOF | ||
| cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_b63d66120918967c_EOF' | ||
| {"add_comment":{"max":1,"target":"*"},"create_pull_request":{"draft":true,"max":1,"max_patch_size":1024,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS"],"protected_path_prefixes":[".github/",".agents/"],"title_prefix":"[Test Coverage] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{}} |
There was a problem hiding this comment.
The Safe Outputs protection set is significantly reduced here (e.g., .husky/ and CLAUDE.md are no longer protected), even though .husky/ and CLAUDE.md exist in this repo. That’s a security regression because it would allow an automated agent PR to modify commit hooks / agent instruction files. Re-add the previously protected path prefixes/files (at least .husky/ and CLAUDE.md) unless there’s a strong reason to relax them.
| {"add_comment":{"max":1,"target":"*"},"create_pull_request":{"draft":true,"max":1,"max_patch_size":1024,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS"],"protected_path_prefixes":[".github/",".agents/"],"title_prefix":"[Test Coverage] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{}} | |
| {"add_comment":{"max":1,"target":"*"},"create_pull_request":{"draft":true,"max":1,"max_patch_size":1024,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","CLAUDE.md"],"protected_path_prefixes":[".github/",".agents/",".husky/"],"title_prefix":"[Test Coverage] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{}} |
| ``` | ||
| ${{ steps.coverage-md.outputs.COVERAGE_MD }} | ||
| ``` | ||
|
|
||
| Good tests should: | ||
| - ✅ Test one specific behavior | ||
| - ✅ Have descriptive names | ||
| - ✅ Include edge cases | ||
| - ✅ Cover error handling | ||
| - ✅ Be deterministic (no flaky tests) | ||
| - ✅ Run quickly (mock external dependencies) | ||
| ### Coverage JSON (full) | ||
|
|
||
| ## Do Not | ||
| ```json | ||
| ${{ steps.coverage-summary.outputs.COVERAGE_JSON }} | ||
| ``` |
There was a problem hiding this comment.
The prompt embeds ${{ steps.coverage-*.outputs.* }} values. Those expressions only resolve if the referenced steps run in the same job before the prompt is rendered/interpolated. In the compiled workflow, the prompt is rendered in the activation job, so ensure the coverage steps execute in activation (or change when/where interpolation occurs), otherwise these sections will render empty.
| echo "COVERAGE_JSON<<EOF" >> $GITHUB_OUTPUT | ||
| cat coverage/coverage-summary.json | ||
| echo "EOF" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Read COVERAGE_SUMMARY.md | ||
| id: coverage-md | ||
| run: | | ||
| echo "COVERAGE_MD<<EOF" >> $GITHUB_OUTPUT | ||
| cat COVERAGE_SUMMARY.md 2>/dev/null || echo "(COVERAGE_SUMMARY.md not found)" | ||
| echo "EOF" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: List files below 80% coverage | ||
| id: low-coverage | ||
| run: | | ||
| echo "LOW_COVERAGE<<EOF" >> $GITHUB_OUTPUT | ||
| node -e " | ||
| const d = JSON.parse(require('fs').readFileSync('coverage/coverage-summary.json', 'utf8')); | ||
| const low = Object.entries(d) | ||
| .filter(([k, v]) => k !== 'total' && v.statements.pct < 80) | ||
| .sort((a, b) => a[1].statements.pct - b[1].statements.pct); | ||
| if (low.length === 0) { console.log('All files are above 80% coverage.'); } | ||
| else { low.forEach(([k, v]) => console.log(k + ' — ' + v.statements.pct + '%')); } | ||
| " 2>/dev/null || echo "(coverage summary not available)" | ||
| echo "EOF" >> $GITHUB_OUTPUT |
There was a problem hiding this comment.
The step is attempting to set a multi-line output, but cat coverage/coverage-summary.json writes to STDOUT rather than appending to $GITHUB_OUTPUT, so steps.coverage-summary.outputs.COVERAGE_JSON will be empty. Redirect/append the file contents into $GITHUB_OUTPUT between the heredoc markers.
This issue also appears in the following locations of the same file:
- line 76
- line 83
| echo "COVERAGE_JSON<<EOF" >> $GITHUB_OUTPUT | |
| cat coverage/coverage-summary.json | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Read COVERAGE_SUMMARY.md | |
| id: coverage-md | |
| run: | | |
| echo "COVERAGE_MD<<EOF" >> $GITHUB_OUTPUT | |
| cat COVERAGE_SUMMARY.md 2>/dev/null || echo "(COVERAGE_SUMMARY.md not found)" | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| - name: List files below 80% coverage | |
| id: low-coverage | |
| run: | | |
| echo "LOW_COVERAGE<<EOF" >> $GITHUB_OUTPUT | |
| node -e " | |
| const d = JSON.parse(require('fs').readFileSync('coverage/coverage-summary.json', 'utf8')); | |
| const low = Object.entries(d) | |
| .filter(([k, v]) => k !== 'total' && v.statements.pct < 80) | |
| .sort((a, b) => a[1].statements.pct - b[1].statements.pct); | |
| if (low.length === 0) { console.log('All files are above 80% coverage.'); } | |
| else { low.forEach(([k, v]) => console.log(k + ' — ' + v.statements.pct + '%')); } | |
| " 2>/dev/null || echo "(coverage summary not available)" | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| { | |
| echo "COVERAGE_JSON<<EOF" | |
| cat coverage/coverage-summary.json | |
| echo "EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Read COVERAGE_SUMMARY.md | |
| id: coverage-md | |
| run: | | |
| { | |
| echo "COVERAGE_MD<<EOF" | |
| cat COVERAGE_SUMMARY.md 2>/dev/null || echo "(COVERAGE_SUMMARY.md not found)" | |
| echo "EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| - name: List files below 80% coverage | |
| id: low-coverage | |
| run: | | |
| { | |
| echo "LOW_COVERAGE<<EOF" | |
| node -e " | |
| const d = JSON.parse(require('fs').readFileSync('coverage/coverage-summary.json', 'utf8')); | |
| const low = Object.entries(d) | |
| .filter(([k, v]) => k !== 'total' && v.statements.pct < 80) | |
| .sort((a, b) => a[1].statements.pct - b[1].statements.pct); | |
| if (low.length === 0) { console.log('All files are above 80% coverage.'); } | |
| else { low.forEach(([k, v]) => console.log(k + ' — ' + v.statements.pct + '%')); } | |
| " 2>/dev/null || echo "(coverage summary not available)" | |
| echo "EOF" | |
| } >> "$GITHUB_OUTPUT" |
This comment has been minimized.
This comment has been minimized.
|
@copilot address the review feedback on .md files and ignore feedback on .lock.yml files #2238 (review) |
…to GITHUB_OUTPUT Agent-Logs-Url: https://github.com/github/gh-aw-firewall/sessions/933aab55-648e-4382-a725-82fd63674887 Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Fixed in 38fec97. The three output steps now use Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Smoke Test Results ✅ GitHub MCP: Last 2 merged PRs retrieved
✅ Playwright: github.com page title verified Overall: PASS
|
This comment has been minimized.
This comment has been minimized.
🏗️ Build Test Suite Results
Overall: 0/8 ecosystems passed — ❌ FAIL Error: All
|
|
Merged PRs: Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
|
Smoke Test: Copilot BYOK (Offline) Mode
Running in BYOK offline mode ( Overall: PASS (core BYOK path verified; pre-step data unavailable due to unexpanded template vars)
|
Smoke Test Results
Overall: FAIL —
|
🔥 Smoke Test Results
Overall: PASS Latest PR: #2238 — chore: optimize test-coverage-improver workflow for ~50% token reduction by
|
test-coverage-improverwas spending ~46 LLM turns and ~2M tokens/run runningnpm ci+ build + coverage interactively, then exploring the filesystem broadly. This pre-computes all deterministic work and narrows tool access.Changes
Pre-compute build pipeline in
steps:—npm ci→npm run build→npm run test:coveragerun before the agent starts; coverage JSON,COVERAGE_SUMMARY.md, and files-below-80% list are injected directly into the prompt via step outputs, eliminating ~10–15 LLM turns of build churnRestrict GitHub toolsets —
[default](~22 tools) →[repos, pull_requests]; removes ~10 unused tool schemas from every request (~330K tokens/run)Tighten bash allowlist — replaced broad
cat:*/ls:*/npm run:*with path-scoped patterns (cat:src/*.ts,cat:tests/**,ls:src, etc.) to prevent unfocused filesystem explorationReorder prompt for prefix cache efficiency — stable sections (Repository Context, Guidelines, Test Quality Criteria, Do Not rules) moved before dynamic coverage data; pushes the stable ~4K-char prefix into Anthropic's cache on every run, targeting cache hit rate improvement from ~49% → ~65–70%+
Expected impact
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/actions/github-script/git/ref/tags/v9/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq .object.sha(http block)https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.68.3/usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.68.3 --jq .object.sha(http block)If you need me to access, download, or install something from one of these locations, you can either: