Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[optimization:token-optimizer] Optimize cao-evolution-compiler-security in githubnext/gh-cao

Abierto
#19,595 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
github-actions, javascript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

optimization optimization:token-optimizer

.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:

    1. Extend the existing deterministic step to write a compact findings.json (per-tool counts, deduplicated finding rows, image/pin ownership hints) and a bounded report-excerpt.txt. The agent reads these instead of the full report.txt.
    2. Replace bash: ["*"] with the smallest allowed list, such as read-only cat, jq and head.
    3. Drop the agentic-workflows tool only if the 5-run audit below shows it is unused in successful runs.
    4. Move the invariant mission/classification rules into a shorter prompt. Keep the issue-body format unchanged.
  • 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 raise max-ai-credits.

  • Validation:

    • gh aw compile --schedule-seed githubnext/gh-cao, then the focused compile/typecheck tests (npm run compile).
    • Add an experiments: comparison with metric: "aic": control (current) vs compact-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
Lenguaje dominante
JavaScript
Estrellas
8
Forks
5
Merge medio
2 h 16 min
PR fusionados (30 d)
857

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de githubnext/gh-cao

Todos los issues de githubnext/gh-cao

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.