Skip to content

Commit 9fc23b7

Browse files
lpcoxCopilot
andauthored
perf: reduce smoke-copilot token usage with pre-steps and tool trimming (#1613)
* perf: reduce smoke-copilot token usage with pre-steps and tool trimming - Remove unused tools: agentic-workflows, cache-memory, edit, playwright, web-fetch (56 tools → ~10, saving ~30K tokens/request from schema overhead) - Remove unused network groups: node, playwright - Restrict github toolsets to [repos, pull_requests] - Add pre-agent step to deterministically pre-compute: - Last 2 merged PRs via gh CLI - GitHub.com connectivity check via curl - File write/read test - Simplify agent prompt to verify pre-computed results and format output - Replace Playwright browser test with curl connectivity check in pre-step - Fix safe-outputs YAML indentation (was over-indented) - Remove sandbox.mcp.container (not allowed in strict mode) Expected token reduction: ~60-70% per run by eliminating tool probing turn, reducing tool schema overhead, and moving deterministic work out of the LLM context. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: use RUNNER_TEMP fallback for safe outputs path in post-step The gh-aw v0.65+ compiler no longer sets GH_AW_SAFE_OUTPUTS as a job-level env var (it uses step outputs instead). The post-step validation was falling back to /opt/gh-aw/safeoutputs/outputs.jsonl which doesn't exist. Use ${RUNNER_TEMP}/gh-aw/safeoutputs/outputs.jsonl as the fallback instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: inject checkout before npm ci in detection job The post-processor's checkout injection logic was fooled by the conditional 'Checkout repository for patch context' step in the detection job. Since it has an 'if:' guard, it may be skipped, leaving npm ci without a package-lock.json. Fix the regex to skip conditional checkouts (those with an 'if:' on the next line) so an unconditional checkout is properly injected. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c990c6b commit 9fc23b7

File tree

3 files changed

+585
-558
lines changed

3 files changed

+585
-558
lines changed

0 commit comments

Comments
 (0)