Skip to content

Conversation

@dsyme
Copy link
Contributor

@dsyme dsyme commented Aug 15, 2025

See https://github.com/githubnext/gh-aw-internal/pull/764/

This PR completely removes the max-runs feature from gh-aw workflows as requested, while preserving the existing stop-time functionality for cost control.

Changes Made

Core Implementation:

  • Removed MaxRuns field from WorkflowData struct
  • Removed max-runs parsing from workflow frontmatter processing
  • Updated generateSafetyChecks() function to only handle stop-time checks
  • Updated JSON schema to reject max-runs field with proper validation

Documentation Updates:

  • Updated docs/frontmatter.md to remove max-runs section
  • Updated docs/workflow-structure.md examples
  • Updated instruction templates in pkg/cli/templates/
  • Updated .github/instructions/ files

Workflow Updates:

  • Removed max-runs: 1 from .github/workflows/daily-qa.md
  • Updated schema tests to remove max-runs test cases

Validation

The implementation has been thoroughly tested:

# max-runs is now properly rejected
$ ./gh-aw compile workflow-with-max-runs.md
✗ error: additional properties 'max-runs' not allowed

# stop-time continues to work correctly  
$ ./gh-aw compile workflow-with-stop-time.md
✓ workflow-with-stop-time.md

Generated workflows now only include stop-time safety checks that validate the deadline and disable the workflow if the time limit is reached:

- name: Safety checks
  run: |
    # Check stop-time limit
    STOP_TIME="2025-12-31 23:59:59"
    # ... validation logic for stop-time only

All existing tests pass and all 23 workflow files in the repository recompile successfully without the max-runs functionality.

Fixes #684.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.contoso.com
    • Triggering command: /tmp/go-build668954542/b260/cli.test -test.testlogfile=/tmp/go-build668954542/b260/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)
    • Triggering command: /tmp/go-build2792383895/b260/cli.test -test.testlogfile=/tmp/go-build2792383895/b260/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)
    • Triggering command: /tmp/go-build2075455822/b260/cli.test -test.testlogfile=/tmp/go-build2075455822/b260/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@dsyme dsyme merged commit 96ce226 into main Aug 15, 2025
6 checks passed
@dsyme dsyme deleted the copilot/fix-684 branch August 15, 2025 13:05
pelikhan added a commit that referenced this pull request Sep 5, 2025
* Add configurable error handling for empty changesets and patch errors in both push-to-branch and create-pull-request safe outputs (#61)

* Initial plan

* Implement mt changeset noop handling for push-to-branch

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Add if-no-changes configuration option to push-to-branch safe output

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Add if-no-changes configuration option to create-pull-request safe output

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Fix tests and recompile workflows with if-no-changes configuration

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Handle error path for patch file errors with if-no-changes policy in push-to-branch

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com>

* Fix agent output validator to support missing-tool and create-security-report output types (#64)

* Initial plan

* Add support for missing-tool and create-security-report output types in validator

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com>

* Add graceful handling for disabled issues repositories in create-issue safe output (#65)

* Initial plan

* Add special handling for disabled issues repository in create-issue safe output

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* Add graceful handling for disabled issues repositories in create-issue safe output

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: Peli de Halleux <pelikhan@users.noreply.github.com>

* Enhance formatting workflow by adding separate step for JavaScript code formatting and improve error handling for SARIF content type validation

* Refactor SARIF type validation for improved readability in workflow files

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Sign up for free to 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.

4 participants