Skip to content

feat: raise safe_outputs default timeout to 45m and add safe-outputs.timeout-minutes frontmatter - #38361

Merged
dsyme merged 6 commits into
mainfrom
copilot/fix-safe-outputs-job-timeout
Jun 10, 2026
Merged

feat: raise safe_outputs default timeout to 45m and add safe-outputs.timeout-minutes frontmatter#38361
dsyme merged 6 commits into
mainfrom
copilot/fix-safe-outputs-job-timeout

Conversation

CopilotAI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

The safe_outputs job had a hardcoded 15-minute timeout that couldn't be overridden, causing workflows with many sequential safe output operations (e.g. push_to_pull_request_branch against large monorepos) to be killed mid-run.

Changes

  • Default raised 15→45 min — new default in buildSafeOutputsJobFromParts
  • New safe-outputs.timeout-minutes field — lets workflows override the default:
    safe-outputs:
    timeout-minutes: 120push-to-pull-request-branch: {}
  • Schema — added timeout-minutes to main_workflow_schema.json (validation + editor autocomplete)
  • Docs — added entry to frontmatter-full.md
  • Tests — updated existing timeout assertions; added TestBuildConsolidatedSafeOutputsJobTimeoutMinutes (unit) and TestCompileSafeOutputsTimeoutMinutesFromFrontmatter (end-to-end)

…ault 45min
- Change default safe_outputs job timeout from 15 to 45 minutes
- Add `safe-outputs.timeout-minutes` frontmatter option to override the default
- Add `TimeoutMinutes int` field to `SafeOutputsConfig` struct
- Parse `timeout-minutes` from safe-outputs frontmatter map (handles uint64, int, int64, float64)
- Add `timeout-minutes` property to the main_workflow_schema.json for validation and autocomplete
- Update docs/reference/frontmatter-full.md with the new field
- Update all tests expecting timeout-minutes: 15 to expect 45
- Add TestBuildConsolidatedSafeOutputsJobTimeoutMinutes unit test
- Add TestCompileSafeOutputsTimeoutMinutesFromFrontmatter end-to-end test
Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com>
CopilotAI changed the title [WIP] Fix hardcoded timeout for safe_outputs jobfeat: raise safe_outputs default timeout to 45m and add safe-outputs.timeout-minutes frontmatterJun 10, 2026
CopilotAI requested a review from dsymeJune 10, 2026 13:36
@dsyme
dsyme marked this pull request as ready for review June 10, 2026 13:38
CopilotAI review requested due to automatic review settings June 10, 2026 13:38

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Raises the consolidated safe_outputs job timeout default and introduces a safe-outputs.timeout-minutes frontmatter field so long-running workflows can override the timeout without patching compiler code.

Changes:

  • Increased consolidated safe_outputs job default timeout from 15 → 45 minutes.
  • Added safe-outputs.timeout-minutes parsing and plumbing into job generation.
  • Updated schema/docs and adjusted/added tests to cover the new default + override behavior.
Show a summary per file
FileDescription
pkg/workflow/safe_outputs_config.goParses safe-outputs.timeout-minutes from frontmatter into SafeOutputsConfig.
pkg/workflow/compiler_types.goAdds TimeoutMinutes to SafeOutputsConfig.
pkg/workflow/compiler_safe_outputs_job.goApplies configured timeout to the consolidated safe_outputs job (default 45).
pkg/workflow/safe_output_refactor_test.goUpdates assertions to expect the new default timeout in YAML output.
pkg/workflow/compiler_safe_outputs_job_test.goUpdates existing timeout assertions; adds unit + e2e coverage for timeout override.
pkg/workflow/compiler_jobs_test.goUpdates consolidated job timeout expectations to 45 minutes.
pkg/workflow/compile_outputs_label_test.goUpdates compiled lock assertions to expect timeout-minutes: 45.
pkg/workflow/compile_outputs_issue_test.goUpdates compiled lock assertions to expect timeout-minutes: 45.
pkg/workflow/compile_outputs_comment_test.goUpdates compiled lock assertions to expect timeout-minutes: 45.
pkg/parser/schemas/main_workflow_schema.jsonAdds safe-outputs.timeout-minutes to schema (integer, min 1).
docs/src/content/docs/reference/frontmatter-full.mdDocuments the new safe-outputs.timeout-minutes field.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 11/11 changed files
  • Comments generated: 4

Comment threadpkg/workflow/safe_outputs_config.go
Comment threadpkg/workflow/safe_outputs_config.go
Comment threadpkg/parser/schemas/main_workflow_schema.json
Comment threaddocs/src/content/docs/reference/frontmatter-full.md Outdated
dsymeand others added 3 commits June 10, 2026 14:53
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

@copilot review all comments and address unresolved review feedback. Please fix the timeout-minutes validation/type-list issues and then summarize any remaining blockers.

Generated by 👨‍🍳 PR Sous Chef · 108 AIC · ⌖ 1 AIC · ⊞ 17.3K ·

@dsyme
dsyme merged commit 803077c into mainJun 10, 2026
36 checks passed
@dsyme
dsyme deleted the copilot/fix-safe-outputs-job-timeout branch June 10, 2026 14:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

safe_outputs job timeout (15m) is hardcoded and not configurable via frontmatter

3 participants

@dsyme