[optimization:token-optimizer] Optimize cao-evolution-compiler-security in githubnext/gh-cao
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- github-actions, javascript
調査の方向性
Start with .github/workflows/cao-evolution-compiler-security.md and inspect its deterministic step, agent prompt, and existing validation commands. Run gh aw compile --schedule-seed githubnext/gh-cao and npm run compile after changes. Done means the same-target-SHA decisions match, failure and cancellation rates meet the stated safeguards, and a 7-day comparison shows at least a 10% median AIC reduction without quality regression.
索引モデルが issue の本文から書いたものです。
説明
.github/workflows/cao-evolution-compiler-security.md in githubnext/gh-cao is the best optimization candidate. It has the highest 7-day AI Credit total among the eligible workflows (225.1 AIC over 7 successful runs; median 29.9 AIC per successful run). Its agent step mostly reads one deterministic compiler report and then usually calls noop, so the proposed change is to move report triage into the deterministic step and shrink the agent's tool surface and context. All savings below are proposed, not realized.
Action: Assign this issue to Copilot, implement the recommendation, and accept only when the validation below passes.
Recommendation
-
Workflow / category:
.github/workflows/cao-evolution-compiler-security.md; deterministic pre-processing plus tool-surface reduction. -
Baseline: AIC per successful run (
aicTotal, Activity DB). Window: 2026-10-15 to 2026-10-22 UTC. 8 completed runs, 7 successful, 1 failure (12.5%), 0 cancellations. Successful runs ranged 28.8–38.0 AIC. -
Proposed change:
- Extend the existing deterministic step to write a compact
findings.json(per-tool counts, deduplicated finding rows, image/pin ownership hints) and a boundedreport-excerpt.txt. The agent reads these instead of the fullreport.txt. - Replace
bash: ["*"]with the smallest allowed list, such as read-onlycat,jqandhead. - Drop the
agentic-workflowstool only if the 5-run audit below shows it is unused in successful runs. - Move the invariant mission/classification rules into a shorter prompt. Keep the issue-body format unchanged.
- Extend the existing deterministic step to write a compact
-
Conservative expected reduction: 10–20% (about 3–6 AIC per run, roughly 20–40 AIC/week at current volume). Treat as an estimate until measured.
-
Safeguards: No change to permissions,
safe-outputs,max: 1, dedupe, the target-owned vs upstream-owned classification, or CAO authority. Do not remove any tool used in a successful run. Do not raisemax-ai-credits. -
Validation:
gh aw compile --schedule-seed githubnext/gh-cao, then the focused compile/typecheck tests (npm run compile).- Add an
experiments:comparison withmetric: "aic": control (current) vscompact-evidence. - Use the same grain (AIC per successful run) and a 7-day window for both variants.
- Require failure rate no worse than control, 0 new cancellations, and identical issue/noop decisions on the same target SHA.
- Accept only if the median AIC drops by ≥10% with no quality regression.
Evidence
[!NOTE]
Cost is dominated by cache reads (407k–843k tokens/run) and cache writes (~110–127k), with only 41.7k input and 2.9k–7.2k output tokens. Context size, not generation, drives the cost.
- Even runs with 3 MCP calls cost 28.8–29.9 AIC; runs with 13–33 MCP calls cost 34.6–38.0 AIC. Fewer tool round-trips correlate with lower cost.
- The agent step re-reads a large report and a ~180-line prompt for work that is largely deterministic classification.
- The operational grader had no observations (
null) in this window, so accepted-outcome quality cannot be measured from the Activity DB and must be checked by comparing issue/noop decisions.
<b>Supporting evidence</b>
Per-run data (AIC / input / output / cache-read / cache-write / duration s / MCP calls):
| Run | Result | AIC | In | Out | CacheR | CacheW | Dur | MCP |
|---|---|---|---|---|---|---|---|---|
| 39690430618 | success | 28.79 | 41712 | 2945 | 546367 | 109416 | 1283 | 3 |
| 39696957682 | success | 28.89 | 41714 | 2912 | 541020 | 109908 | 1576 | 3 |
| 39709282478 | success | 34.64 | 41712 | 6200 | 572522 | 121055 | 1418 | 13 |
| 39714568326 | success | 36.19 | 41716 | 6084 | 592133 | 126855 | 1226 | 33 |
| 39720075472 | failure | 0 | n/a | n/a | n/a | n/a | n/a | 35 |
| 39725549276 | success | 38.02 | 41716 | 7166 | 842684 | 119767 | 1481 | 28 |
| 39731353322 | success | 29.88 | 41702 | 3400 | 554156 | 111465 | 1560 | 3 |
| 39800741302 | success | 29.08 | 41704 | 4765 | 407336 | 110522 | 1502 | 18 |
Candidate ranking (successful runs, 7 days): compiler-security 225 AIC (median 29.9); catalog-advisor 187 (median 21.9); efficiency 127 (median 21.1). Reasoning tokens were not reported.
Limitations: per-run tool-usage audit was not performed (agentic-workflows audit access is unavailable to this worker), so tool removal is gated on the Copilot-run 5-run audit. The list of existing open Optimization issues was filtered by the integrity policy, so duplicate-issue search was incomplete; safe-output title de-duplication applies. No inline-agent recommendation (prompt lacks 3 independent major sections).
Run links: https://github.com/githubnext/gh-cao/actions/runs/39690430618, https://github.com/githubnext/gh-cao/actions/runs/39725549276, https://github.com/githubnext/gh-cao/actions/runs/39800741302
Control context: correlation_id 39867562141-1178, central_repo githubnext/gh-cao, control_plane_run_url https://github.com/githubnext/gh-cao/actions/runs/39867562141, batch_label none.
<b>Agent prompt</b>
Implement the named optimization in the selected workflow only. Preserve its behavior, permissions, safe outputs, and security boundaries. Run gh aw compile for the changed workflow and its focused tests. Report measured validation results and do not claim realized savings until a complete comparison window exists.
cao: githubnext/gh-cao, correlation: 39867562141-1178
Generated by Optimization / Token Optimizer · copilot · auto · 30 AIC · ⌖ 0.846 AIC · ⊞ 17.7K · ◷
- expires on Nov 5, 2026, 10:57 PM UTC
- 主要言語
- JavaScript
- スター
- 8
- フォーク
- 5
- 平均マージ
- 2時間 28分
- マージ済み PR(30日)
- 849
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
githubnext/gh-cao のほかの issue
-
repo-assist repo-assist:issue-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
githubnext/gh-cao#19883 ·
メンテナーはふだん 1 日以内に返信
-
repo-assist repo-assist:issue-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
githubnext/gh-cao#19642 ·
メンテナーはふだん 1 日以内に返信
-
agentic-workflows self-care self-care:reactive-ui-expert
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
githubnext/gh-cao#19591 ·
メンテナーはふだん 1 日以内に返信
-
software-development-practices software-development-practices:nist-ssdf
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
githubnext/gh-cao#19534 ·
メンテナーはふだん 1 日以内に返信
-
cao-evolution cao-evolution:compiler-security
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
githubnext/gh-cao#19373 ·
メンテナーはふだん 1 日以内に返信
githubnext/gh-cao の issue をすべて見る
似ている issue
-
[Feature Request] [Web] Expose kvCacheQuantizationBits in the onnxruntime-web WebGPU EP optionsオープンep:WebGPU platform:web quantization
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
microsoft/onnxruntime#33752 ·
メンテナーはふだん 2 日以内に返信
-
icon request
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
tabler/tabler-icons#1693 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 72/100
alvarotrigo/fullPage.js#4755 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
jlab-sensing/ENTS-backend#854 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
andromarces/agent-loops#1242 ·
メンテナーはふだん 1 日以内に返信