news-translate: fix invalid YAML description and make Pass 2 validator-first to cut effective-token usage#2825
Conversation
🏷️ Automatic Labeling SummaryThis PR has been automatically labeled based on the files changed and PR metadata. Applied Labels: size-xs Label Categories
For more information, see |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
news-translate batch default to avoid agent token-cap failures
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
… to cut effective-token usage Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
news-translate batch default to avoid agent token-cap failures
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
|
@copilot also make .github/workflows/compile-agentic-workflows.yml simpler, remove all work arounds not needed anymore and old related code and test. Make sure all original agentic workflows are correct instead of modify lock files. See gh-aw skills |
…ch comment + test Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Done. Removed the obsolete safe_outputs fetch-depth patch workaround: deleted the dead comment block in I kept the lock files untouched as generated artifacts and instead verified the source |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
Recent
news-translateruns failed withCAPIError: 429 Maximum effective tokens exceeded(~7.6M effective tokens atMAX_BRIEFS=2) — a cumulative token-cap abort, not a timeout. The dominant token sink was Pass 2 reading every translation back in full (~13 docs/source) into model context, duplicating the bash validator that already performs the same structural checks at near-zero model-token cost. A prior commit also broke compilation by writingCAPIError: 429(colon-space) into the unquoted YAMLdescription:scalar.Changes (
.github/workflows/news-translate.md→ recompiled.lock.yml)description:scalar and removed the colon-space token sogh aw compile news-translatesucceeds again.scripts/validate-executive-brief-translations.tsfor structural parity (headings, table rows, fences, Mermaid, dok_id/URL set equality, banned-English, RTL marker, source-sha); read back only validator-flagged files instead of all passing translations.max_briefsdefault kept at 1 with a note that operators can raise it once the new footprint is measured below the cap.The compiled
news-translate.lock.ymlis regenerated (gh-aw v0.77.1) and no longer contains the invalid token; safe_outputsfetch-depth: 0remains native (no patch step).Compile-workflow cleanup (
.github/workflows/compile-agentic-workflows.yml)news-*.mdcheckout: { fetch-depth: 0 }frontmatter since gh-aw v0.76.0+), and removed the now-redundant regression testtests/safeoutputs-fetch-depth.test.tsthat referenced the deletedpatch-safeoutputs-fetch-depth.mjsscript..mdworkflows are correct rather than editing lock files —gh aw compile(v0.77.1) compiles all 14 news workflows with 0 errors and produces no.lock.ymldrift;scripts/check-pat-fallback-coverage.mjsand the remainingcheck-pat-fallback-coverage.test.tspass. The legitimate enforcement steps (gh aw fix,--purgecompile, PAT-fallback coverage, prompt-module architecture caps, banned-string guards) are retained.