Always file forecast outcome issues; add forecast --timeout support and error templating#35492
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pelikhan
May 28, 2026 14:48
View session
Collaborator
|
@copilot the forecast command should support a --timeout minutes to gracefully stop after that duration. |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Implemented in |
Copilot
AI
changed the title
Always file forecast outcome issues; add 10m forecast timeout and error templating
Always file forecast outcome issues; add forecast --timeout support and error templating
May 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the maintenance forecast flow so forecast runs are bounded by a CLI timeout and outcome issues are generated for success and failure cases.
Changes:
- Adds
--timeoutsupport to the forecast CLI and uses it from the maintenance workflow. - Writes forecast error metadata and renders forecast issues from a new Markdown template.
- Updates workflow generator/tests, docs, and synced workflow metadata.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/maintenance_workflow_yaml.go |
Generates the updated forecast maintenance job. |
pkg/workflow/maintenance_workflow_test.go |
Updates assertions for forecast timeout/error issue behavior. |
pkg/cli/forecast.go |
Adds timeout context handling and exit-code normalization. |
pkg/cli/forecast_command.go |
Adds the --timeout CLI flag and config field. |
pkg/cli/forecast_test.go |
Adds timeout flag/validation tests. |
actions/setup/js/create_forecast_issue.cjs |
Creates success/error forecast issues using a template. |
actions/setup/js/create_forecast_issue.test.cjs |
Updates tests for unconditional/error issue behavior. |
actions/setup/md/forecast_issue.md |
Adds the forecast issue body template. |
docs/src/content/docs/reference/ephemerals.md |
Documents new forecast maintenance semantics. |
.github/workflows/agentics-maintenance.yml |
Applies generated forecast maintenance workflow changes. |
.github/workflows/pr-sous-chef.lock.yml |
Updates generated metadata hash. |
.github/workflows/contribution-check.lock.yml |
Updates generated metadata hash. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 12/12 changed files
- Comments generated: 3
Comment on lines
637
to
+641
| - name: Generate forecast issue | ||
| if: ${{ always() }} | ||
| uses: ` + getCachedActionPinFromResolver("actions/github-script", resolver) + ` | ||
| env: | ||
| FORECAST_STEP_OUTCOME: ${{ steps.generate_forecast_report.outcome }} |
Comment on lines
557
to
+561
| - name: Generate forecast issue | ||
| if: ${{ always() }} | ||
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | ||
| env: | ||
| FORECAST_STEP_OUTCOME: ${{ steps.generate_forecast_report.outcome }} |
Comment on lines
+160
to
+164
| if config.TimeoutMinutes > 0 { | ||
| timeoutCtx, cancel := context.WithTimeout(ctx, time.Duration(config.TimeoutMinutes)*time.Minute) | ||
| defer cancel() | ||
| ctx = timeoutCtx | ||
| } |
pelikhan
approved these changes
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The maintenance
forecastoperation now always produces an issue with the computed outcome, including timeout/failure cases. Forecast execution is bounded to 10 minutes, while cache warm-up/save behavior remains intact so precomputed data is retained.Forecast job control flow
id: generate_forecast_reportand now runs forecast with built-in timeout handling via--timeout 10.124) or non-zero exit, writes./.cache/gh-aw/forecast/error.jsonand fails the step.if: ${{ always() }}.Forecast CLI timeout support
--timeout <minutes>togh aw forecastfor graceful cancellation after the configured duration.124on deadline expiration so maintenance error handling remains consistent.Issue creation semantics
if: ${{ always() }}) and passedFORECAST_STEP_OUTCOMEinto the script.[aw] workflow forecast report[aw] workflow forecast report (error)Template-driven issue body
actions/setup/md/forecast_issue.mdcreate_forecast_issue.cjsto render from template viamessages_corehelpers, including:Generator/test/doc alignment
pkg/workflow/maintenance_workflow_yaml.go.pkg/workflow/maintenance_workflow_test.go.actions/setup/js/create_forecast_issue.test.cjs.docs/src/content/docs/reference/ephemerals.md.