Skip to content

perf: optimize safe-outputs checkout and file-budget settings in all 14 news agentic workflows#2845

Merged
pethers merged 2 commits into
mainfrom
copilot/improve-checkout-settings-performance
May 31, 2026
Merged

perf: optimize safe-outputs checkout and file-budget settings in all 14 news agentic workflows#2845
pethers merged 2 commits into
mainfrom
copilot/improve-checkout-settings-performance

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 31, 2026

Safe-outputs checkout was cloning full git history (~14 min) unnecessarily, and the file-budget cap was set lower than needed. The prerequisite step already fetches GITHUB_SHA on demand for bundle-apply, making shallow clones sufficient.

Changes

  • Changed checkout: fetch-depth: 0fetch-depth: 1 in all 14 news-*.md workflow source files
  • Raised max-patch-files: 100max-patch-files: 200 in all 14 news-*.md workflow frontmatter (max-patch-size: 10240 unchanged)
  • Updated inline comments to document the new checkout rationale
  • Updated all matching body-text file budget guards in news-propositions.md, news-year-ahead.md, news-translate.md (HARD FILE LIMIT 100→200, staged threshold 90→180)
  • Updated shared prompt modules 07-commit-and-pr.md and 03-data-download.md with new 200-file limits and 180-file thresholds

Before/After

# Before
checkout:
  fetch-depth: 0       # ~14 min clone
safe-outputs:
  max-patch-files: 100

# After
checkout:
  fetch-depth: 1       # seconds
safe-outputs:
  max-patch-files: 200

Verified

  • compile-agentic-workflows.yml unchanged (no fetch-depth patching logic exists)
  • Confirmed working: actions/runs/26705323600

…ster safe-outputs

The prerequisite step already fetches GITHUB_SHA on demand for
bundle-apply, making full-history clones unnecessary. This reduces
safe-outputs checkout from ~14 min to seconds.

Verified working: actions/runs/26705323600/job/78707294558

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot AI requested a review from pethers May 31, 2026 08:09
@github-actions github-actions Bot added documentation Documentation updates workflow GitHub Actions workflows ci-cd CI/CD pipeline changes news News articles and content generation agentic-workflow Agentic workflow changes size-m Medium change (50-250 lines) labels May 31, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🏷️ Automatic Labeling Summary

This PR has been automatically labeled based on the files changed and PR metadata.

Applied Labels: documentation,workflow,ci-cd,size-m,news,agentic-workflow

Label Categories

  • 🗳️ Content: news, dashboard, visualization, intelligence
  • 💻 Technology: html-css, javascript, workflow, security
  • 📊 Data: cia-data, riksdag-data, data-pipeline, schema
  • 🌍 I18n: i18n, translation, rtl
  • 🔒 ISMS: isms, iso-27001, nist-csf, cis-controls
  • 🏗️ Infrastructure: ci-cd, deployment, performance, monitoring
  • 🔄 Quality: testing, accessibility, documentation, refactor
  • 🤖 AI: agent, skill, agentic-workflow

For more information, see .github/labeler.yml.

@github-actions
Copy link
Copy Markdown
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

@pethers
Copy link
Copy Markdown
Member

pethers commented May 31, 2026

@copilot also update all agentic workflows to use

max-patch-size: 10240
max-patch-files: 200

Update safe-outputs max-patch-files: 100 → 200 in all news-*.md workflow
frontmatter and update matching body-text guards and prompt modules:
- 14 news-*.md: max-patch-files: 100 → 200
- news-propositions.md, news-year-ahead.md: HARD FILE LIMIT (100 → 200),
  staged > 90 → > 180 thresholds
- news-translate.md: all 100-file cap references → 200
- .github/prompts/07-commit-and-pr.md: 100-file guard → 200-file guard,
  90-file threshold → 180, table column / 90 → / 180
- .github/prompts/03-data-download.md: hard-caps at 100 → 200 files

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 31, 2026

@copilot also update all agentic workflows to use

...

Done in commit perf: raise max-patch-files from 100 to 200. Updated all 14 news-*.md workflow frontmatter to max-patch-files: 200 (with max-patch-size: 10240 already correct). Also updated all matching body-text file budget guards and the shared prompt modules (07-commit-and-pr.md guard threshold 90→180, 03-data-download.md budget reference) for consistency.

Copilot AI changed the title perf: change checkout fetch-depth 0→1 in all 14 news agentic workflows perf: optimize safe-outputs checkout and file-budget settings in all 14 news agentic workflows May 31, 2026
@github-actions
Copy link
Copy Markdown
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

@pethers pethers marked this pull request as ready for review May 31, 2026 08:35
Copilot AI review requested due to automatic review settings May 31, 2026 08:35
@pethers pethers merged commit cdd5387 into main May 31, 2026
13 checks passed
@pethers pethers deleted the copilot/improve-checkout-settings-performance branch May 31, 2026 08:35
Copy link
Copy Markdown
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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 documentation Documentation updates news News articles and content generation size-m Medium change (50-250 lines) workflow GitHub Actions workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants