Skip to content

Comments

Add per-type news workflows, fix TS errors, compile all lock files#426

Merged
pethers merged 9 commits intomainfrom
copilot/improve-agentic-workflows
Feb 22, 2026
Merged

Add per-type news workflows, fix TS errors, compile all lock files#426
pethers merged 9 commits intomainfrom
copilot/improve-agentic-workflows

Conversation

Copy link
Contributor

Copilot AI commented Feb 22, 2026

Agentic news workflows were failing due to safe_outputs patch size limits (multi-article generation exceeded ~1MB maxBuffer), missing article types, and TS compilation errors. New workflow .md files were not compiled via gh aw compile, so no .lock.yml files existed.

Architecture: per-type workflow split

Replaced single news-article-generator.md (removed schedule, kept workflow_dispatch) with 7 focused workflows — one article type per run across 14 languages. Staggered cron schedules avoid concurrent runs:

Workflow Schedule Type
news-committee-reports 04:00 UTC Mon–Fri committee-reports
news-propositions 05:00 UTC Mon–Fri propositions
news-motions 06:00 UTC Mon–Fri motions
news-week-ahead 07:00 UTC Fri week-ahead
news-month-ahead 08:00 UTC 1st month-ahead
news-weekly-review 09:00 UTC Sat weekly-review
news-monthly-review 10:00 UTC 28th monthly-review

New article types

Added 3 missing types: month-ahead, weekly-review, monthly-review in scripts/news-types/ with corresponding test files.

TypeScript fixes

  • Added documents property to ArticleContentData interface (used by review types for search_dokument data)
  • Wired new types into generate-news-enhanced.ts dispatch logic
  • Fixed writeArticle return type compatibility (Promise<void | boolean>)

Compiled lock files

Fixed schedule frontmatter syntax (cron:- cron: array format) and ran gh aw compile — all 10 workflows compile cleanly. All 7 new .lock.yml files committed.

Tests

  • 36 new tests for month-ahead, weekly-review, monthly-review modules
  • 14 workflow architecture tests (schedule staggering, type completeness)
  • New generate-news-enhanced dispatch coverage
  • All 1269 tests pass

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix errors and improve agentic workflows Split article generation into per-type workflows, add month-ahead/weekly-review/monthly-review types Feb 22, 2026
Copilot AI requested a review from pethers February 22, 2026 02:31
@github-actions github-actions bot added documentation Documentation updates workflow GitHub Actions workflows ci-cd CI/CD pipeline changes testing Test coverage refactor Code refactoring news News articles and content generation agentic-workflow Agentic workflow changes size-xl Extra large change (> 1000 lines) labels Feb 22, 2026
@github-actions
Copy link
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Copilot AI changed the title Split article generation into per-type workflows, add month-ahead/weekly-review/monthly-review types Fix TS compilation errors, wire new article types into dispatcher, add tests Feb 22, 2026
Copilot stopped work on behalf of pethers due to an error February 22, 2026 03:27
Copilot AI changed the title Fix TS compilation errors, wire new article types into dispatcher, add tests Split news generation into per-type agentic workflows with staggered schedules Feb 22, 2026
@pethers pethers requested a review from Copilot February 22, 2026 03:38
@github-actions github-actions bot added the deployment Deployment configuration label Feb 22, 2026
@github-actions
Copy link
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request addresses CI failures in news generation workflows by decomposing the monolithic multi-type generator into 7 focused per-type workflows. The architecture change prevents safe_outputs patch size limit failures (~1MB maxBuffer) that occurred when generating all article types in a single run across 14 languages.

Changes:

  • Split news generation into 7 dedicated scheduled workflows (committee-reports, propositions, motions, week-ahead, month-ahead, weekly-review, monthly-review), each generating one article type across 14 languages with staggered cron schedules
  • Added 3 new article type modules (month-ahead, weekly-review, monthly-review) with full test coverage (36 new tests)
  • Extended type system with new ArticleType variants and documents property in ArticleContentData interface for review-type articles

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
.github/workflows/news-committee-reports.md New dedicated workflow for committee-reports (04:00 UTC Mon-Fri)
.github/workflows/news-propositions.md New dedicated workflow for propositions (05:00 UTC Mon-Fri)
.github/workflows/news-motions.md New dedicated workflow for motions (06:00 UTC Mon-Fri)
.github/workflows/news-week-ahead.md New dedicated workflow for week-ahead (07:00 UTC Fri)
.github/workflows/news-month-ahead.md New dedicated workflow for month-ahead (08:00 UTC 1st of month)
.github/workflows/news-weekly-review.md New dedicated workflow for weekly-review (09:00 UTC Sat)
.github/workflows/news-monthly-review.md New dedicated workflow for monthly-review (10:00 UTC 28th)
.github/workflows/news-article-generator.md Updated to workflow_dispatch only (no schedule), now manual-only multi-type generator
scripts/news-types/month-ahead.ts New module for month-ahead articles (30-day calendar outlook)
scripts/news-types/weekly-review.ts New module for weekly-review articles (7-day retrospective)
scripts/news-types/monthly-review.ts New module for monthly-review articles (30-day retrospective)
scripts/types/article.ts Extended ArticleType union with month-ahead, weekly-review, monthly-review
scripts/data-transformers.ts Added documents property to ArticleContentData for review articles
scripts/generate-news-enhanced.ts Added dispatcher cases for 3 new article types, updated VALID_ARTICLE_TYPES array
tests/workflow-architecture.test.ts New test suite (14 tests) validating workflow architecture, schedule staggering, type completeness
tests/news-types/month-ahead.test.ts Test suite for month-ahead module (13 test groups)
tests/news-types/weekly-review.test.ts Test suite for weekly-review module (8 test groups)
tests/news-types/monthly-review.test.ts Test suite for monthly-review module (8 test groups)
tests/generate-news-enhanced-part1.test.ts Updated to verify new article types in VALID_ARTICLE_TYPES
tests/data-transformers.test.ts Added tests for documents property handling in review articles

Comment on lines +38 to +42
- "*.se"
- "*.com"
- "*.org"
- "*.io"
- default
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The network.allowed block is overly broad due to wildcard entries like "*.se", "*.com", "*.org", "*.io", plus default, which effectively lets the Copilot agent connect to almost any external host. If the MCP server or other data sources are compromised or abused for prompt injection, they can direct the agent to exfiltrate repository data or tokens to an attacker-controlled domain under these TLDs. Tighten network.allowed to only the specific domains required for this workflow (e.g., the MCP service, GitHub, and official Riksdag/Government endpoints) and remove generic wildcard patterns and unnecessary hosts.

Suggested change
- "*.se"
- "*.com"
- "*.org"
- "*.io"
- default
- www.riksdagen.se
- www.regeringen.se

Copilot uses AI. Check for mistakes.
Comment on lines +38 to +42
- "*.se"
- "*.com"
- "*.org"
- "*.io"
- default
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The network.allowed configuration uses very broad wildcards like "*.se", "*.com", "*.org", "*.io", and default, allowing the Copilot agent to initiate outbound connections to a wide range of external hosts. In case of a compromised MCP endpoint or successful prompt injection, this enables exfiltration of repository data or credentials to arbitrary attacker-controlled domains within those TLDs. Restrict network.allowed to just the small set of domains actually needed by this workflow (MCP, GitHub, and the official data sources) and drop the wildcard patterns.

Suggested change
- "*.se"
- "*.com"
- "*.org"
- "*.io"
- default
- www.riksdagen.se
- www.regeringen.se

Copilot uses AI. Check for mistakes.
Comment on lines +38 to +42
- "*.se"
- "*.com"
- "*.org"
- "*.io"
- default
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The network.allowed section includes wildcard hosts such as "*.se", "*.com", "*.org", "*.io", plus default, making outbound network access from the Copilot agent far broader than necessary. If an upstream data source (like the MCP server) is compromised or used for prompt injection, it could instruct the agent to send repository data or tokens to any attacker-controlled domain matching these patterns. Limit network.allowed to the specific required endpoints for propositions generation (MCP, GitHub, and Riksdag/Government APIs) and remove the generic wildcard entries.

Suggested change
- "*.se"
- "*.com"
- "*.org"
- "*.io"
- default
- www.riksdagen.se
- www.regeringen.se

Copilot uses AI. Check for mistakes.
Comment on lines +38 to +42
- "*.se"
- "*.com"
- "*.org"
- "*.io"
- default
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow's network.allowed list uses broad wildcards like "*.se", "*.com", "*.org", "*.io" together with default, which allows the Copilot agent to connect to almost any host under those TLDs. A compromised MCP response or crafted prompt injection could leverage this to have the agent exfiltrate repository contents or tokens to attacker-controlled domains. Reduce the network.allowed hosts to only the explicit domains actually needed for motions coverage and remove the wildcard patterns to minimize exfiltration risk.

Suggested change
- "*.se"
- "*.com"
- "*.org"
- "*.io"
- default
- www.riksdagen.se
- www.regeringen.se

Copilot uses AI. Check for mistakes.
Comment on lines +38 to +42
- "*.se"
- "*.com"
- "*.org"
- "*.io"
- default
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The network.allowed configuration here is very permissive, with wildcard entries "*.se", "*.com", "*.org", "*.io" plus default, effectively giving the Copilot agent open egress to many external domains. If the MCP or another data source is compromised or provides malicious prompts, it could direct the agent to send sensitive repository data or tokens to attacker-controlled hosts under those TLDs. Constrain network.allowed to just the explicit domains required for monthly review generation and remove the wildcard and unused hosts.

Suggested change
- "*.se"
- "*.com"
- "*.org"
- "*.io"
- default
- www.riksdagen.se
- www.regeringen.se

Copilot uses AI. Check for mistakes.
Comment on lines +38 to +42
- "*.se"
- "*.com"
- "*.org"
- "*.io"
- default
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The network.allowed section for this workflow includes wildcard host patterns like "*.se", "*.com", "*.org", "*.io" and default, which is much broader than necessary for month-ahead article generation. This wide egress enables an attacker (via MCP compromise or prompt injection) to have the Copilot agent exfiltrate repository data or tokens to arbitrary domains within those TLDs. Narrow network.allowed down to only the specific endpoints you need (MCP, GitHub, and official data APIs) and eliminate wildcard entries.

Suggested change
- "*.se"
- "*.com"
- "*.org"
- "*.io"
- default
- www.riksdagen.se
- www.regeringen.se

Copilot uses AI. Check for mistakes.
Comment on lines +38 to +42
- "*.se"
- "*.com"
- "*.org"
- "*.io"
- default
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The network.allowed configuration uses generic wildcard hosts ("*.se", "*.com", "*.org", "*.io") plus default, which effectively gives the Copilot agent broad outbound network access. If an attacker controls or influences an upstream source (e.g., via MCP compromise or prompt injection), they could instruct the agent to send repository data or tokens to attacker-controlled domains that match these wildcards. Restrict network.allowed to a minimal, explicit set of required domains for committee-report generation and remove the wildcard patterns to reduce exfiltration risk.

Suggested change
- "*.se"
- "*.com"
- "*.org"
- "*.io"
- default
- www.riksdagen.se
- www.regeringen.se

Copilot uses AI. Check for mistakes.
@pethers pethers marked this pull request as ready for review February 22, 2026 03:51
Copilot AI changed the title Split news generation into per-type agentic workflows with staggered schedules Add per-type news workflows, fix TS errors, compile all lock files Feb 22, 2026
@pethers pethers requested a review from Copilot February 22, 2026 04:04
@github-actions
Copy link
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 32 changed files in this pull request and generated no new comments.

@pethers pethers merged commit 48d31b6 into main Feb 22, 2026
20 checks passed
@pethers pethers deleted the copilot/improve-agentic-workflows branch February 22, 2026 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentic-workflow Agentic workflow changes ci-cd CI/CD pipeline changes deployment Deployment configuration documentation Documentation updates news News articles and content generation refactor Code refactoring size-xl Extra large change (> 1000 lines) testing Test coverage workflow GitHub Actions workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants