[optimization:token-optimizer] Optimize .github/workflows/eslint-rules-librarian.md in githubnext/gh-cao

Abierto
#20,016 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
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
35/100
Tipo de issue
Refactorización
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
bash, github-actions, javascript
Área
ci-cd

Línea de trabajo

Open .github/workflows/eslint-rules-librarian.md and add the experiments: block as specified, keeping bash and repo-memory. Run gh aw compile --schedule-seed githubnext/gh-cao and npm run compile to validate. Done means the variant omitting tools.github shows >=3% lower median AIC over 10+ runs with no new errors and valid rules-db.mjs build.

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

Descripción

optimization optimization:token-optimizer

The ESLint Factory / Librarian workflow (.github/workflows/eslint-rules-librarian.md) is the highest-cost eligible workflow without an open Optimization issue: 45 completed runs in the 7 full UTC days ending 2026-10-31T00:00Z, 45 successes, 0 errors, 847 total AI Credit (AIC), median 18.6 AIC per successful run, on claude-sonnet-5.5. In every audited run it only used bash and noop, yet it still declares the remote GitHub MCP repos toolset, so the proposed change is an A/B test that drops that toolset to shrink per-turn tool context.

Action: Assign this issue to Copilot to implement the recommendation, and accept only when the validation below passes.

Recommendation
  • Workflow: .github/workflows/eslint-rules-librarian.md. Category: tool-surface reduction (unused GitHub MCP toolset), validated with an experiment.
  • Baseline: cost grain = AIC per successful run of this workflow; window = 2026-10-24 to 2026-10-31 UTC; n=45; median 18.6 (range 16.7 to 22.5); cache-read about 11.4M and cache-write about 4.3M tokens in total (about 253k and 96k per run).
  • Change: add an experiments: block with metric: "aic" comparing the current tools.github (mode: remote, toolsets: [repos]) against a variant that omits tools.github. Keep bash and repo-memory. Do not change permissions, safe-outputs, network, or shared/control.md imports. If the shared control import re-adds GitHub tools, record that in the PR and leave the variant unchanged rather than weakening the control.
  • Conservative expected reduction: proposed, not realized. 3 to 6 percent of per-run AIC, about 0.5 to 1.1 AIC per run, or about 25 to 50 AIC per week at the current cadence. The estimate is deliberately low because token class attribution by tool schema is not available.
  • Safeguards: the workflow currently has a 100% success rate with 0 errors, so any increase in failures or errors blocks adoption. Each run must still append valid rule-normalization transactions or a documented "already normalized" noop, the rules-db.mjs build step must succeed, and the library must stay consistent. No max-ai-credits increase is proposed.
  • Validation: run gh aw compile --schedule-seed githubnext/gh-cao and npm run compile. Compare the two variants over the same 7-day UTC window, using successful-run AIC, median and total.
  • Acceptance: the variant's median AIC is at least 3% lower than the control's, with at least 10 completed runs per variant, no extra failures, cancellations, or errors, and the same share of runs producing valid transactions or a justified noop. Otherwise revert.
Evidence
  • Of the 12 most recent successful runs, none called any GitHub MCP tool. Each used only bash (4 to 10 calls) and noop.
  • The success rate is 100% (45 of 45) with 0 errors and a stable per-run cost of 16.7 to 22.5 AIC, so the baseline is steady enough to detect a small effect.
  • There is no open Optimization issue for this workflow. Higher-cost workflows were excluded because they already have open issues, or because they have large share of non-success runs (uk-ai-advisory, cao-evolution, dependabot), which would make a savings estimate unreliable.
Supporting evidence
  • Sample runs: 41116023109 (18.2 AIC), 41107895285 (19.7 AIC), 41041587387 (21.4 AIC).
  • Successful-run token totals over the window: input 1,343,835; output 70,000; cache-read 11,377,788; cache-write 4,333,296; reasoning 0 (not reported). Totals are not synthesized from the token classes.
  • Model: claude-sonnet-5.5. Operational-grader observations: none available, so no accepted-outcome claim is made. Outcome quality is proxied by valid transaction output and rebuild success, kept separate from repository operational value.
  • Tool calls per audited run: bash 4 to 10, noop 3, MCP GitHub 0 (12 runs audited, above the 5-run minimum).
  • Not recommended: inline agents (prompt has fewer than 3 independent major sections), a smaller model (quality evidence insufficient), and a max-ai-credits increase (the current 300 budget is about 15 times the median).
  • Limitations: Activity cache only. The agentic-workflows logs/audit tools were not used (they require a user role). Per-turn counts were not available in the cache.
  • Control envelope: correlation_id 41165930067-1374; central_repo githubnext/gh-cao; control_plane_run_url https://github.com/githubnext/gh-cao/actions/runs/41165930067; batch_label not set. Mode: review; target githubnext/gh-cao.
Agent prompt

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: 41165930067-1374

Generated by Optimization / Token Optimizer · copilot · auto · ~40 AIC · ⌖ ~1 AIC · ⊞ 7.2K · ◷

  • expires on Nov 14, 2026, 3:59 AM UTC
Lenguaje dominante
JavaScript
Estrellas
14
Forks
5
Merge medio
4 h 16 min
PR fusionados (30 d)
688

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.