Fix news workflow agent timeouts: prohibit manual article generation#1288
Fix news workflow agent timeouts: prohibit manual article generation#1288
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 |
…ime budgets
- Add "Article Generation Safety" section to interpellations, propositions,
motions, and committee-reports workflow prompts prohibiting python3/heredoc
manual HTML generation that causes agent timeouts
- Fix misleading time budgets ("all 14 languages" → "core languages EN, SV")
- Add fallback instruction: use safeoutputs___noop if script fails
- Add 3 new tests enforcing script-based generation safety rules
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
There was a problem hiding this comment.
Pull request overview
This PR updates the gh-aw news workflow prompts to prevent agent timeouts by disallowing manual article construction and enforcing the existing TypeScript-based generation pipeline, with accompanying architecture tests to keep the constraint in place.
Changes:
- Add an “Article Generation Safety” section to four dedicated news workflows, prohibiting python/manual HTML/heredoc generation and directing agents to
npx tsx scripts/generate-news-enhanced.ts. - Update workflow time budgets to focus on core language generation (EN/SV) and then dispatch
news-translate. - Add a Vitest suite enforcing the new “script-based generation” safety constraints across the four workflows.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/workflow-architecture.test.ts | Adds tests to enforce python/manual-HTML prohibitions and require generate-news-enhanced.ts usage for script-based workflows. |
| .github/workflows/news-interpellations.md | Updates time budget and adds “Article Generation Safety” guidance directing generation via generate-news-enhanced.ts. |
| .github/workflows/news-propositions.md | Updates time budget and adds “Article Generation Safety” guidance directing generation via generate-news-enhanced.ts. |
| .github/workflows/news-motions.md | Updates time budget and adds “Article Generation Safety” guidance directing generation via generate-news-enhanced.ts. |
| .github/workflows/news-committee-reports.md | Updates time budget and adds “Article Generation Safety” guidance directing generation via generate-news-enhanced.ts. |
| The repository provides a complete article generation pipeline. You MUST use it: | ||
| ```bash | ||
| source scripts/mcp-setup.sh && npx tsx scripts/generate-news-enhanced.ts --types=interpellations --languages="en,sv" --skip-existing |
|
|
||
| The repository provides a complete article generation pipeline. You MUST use it: | ||
| ```bash | ||
| source scripts/mcp-setup.sh && npx tsx scripts/generate-news-enhanced.ts --types=propositions --languages="en,sv" --skip-existing |
.github/workflows/news-motions.md
Outdated
|
|
||
| The repository provides a complete article generation pipeline. You MUST use it: | ||
| ```bash | ||
| source scripts/mcp-setup.sh && npx tsx scripts/generate-news-enhanced.ts --types=motions --languages="en,sv" --skip-existing |
| The repository provides a complete article generation pipeline. You MUST use it: | ||
| ```bash | ||
| source scripts/mcp-setup.sh && npx tsx scripts/generate-news-enhanced.ts --types=committee-reports --languages="en,sv" --skip-existing |
|
@copilot apply changes based on the comments in this thread |
Replace hardcoded --languages="en,sv" with --languages="$LANG_ARG" in the safety section of all 4 news workflow prompts, referencing the Generation Steps section where LANG_ARG is derived from the dispatch languages input. Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Updated in 379343e — replaced hardcoded |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
build-en-article.py) instead of usingnpx tsx scripts/generate-news-enhanced.tssafeoutputs___noopinstead of manually building HTMLtests/workflow-architecture.test.tsenforcing script-based generation safety$LANG_ARGin safety section examples instead of hardcoded"en,sv"Original prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.