Skip to content

Extract autoloop scheduler into a standalone script to fix oversized run: expression#170

Merged
mrjf merged 2 commits into
mainfrom
copilot/fix-expression-value-exceeds-max-size
Apr 21, 2026
Merged

Extract autoloop scheduler into a standalone script to fix oversized run: expression#170
mrjf merged 2 commits into
mainfrom
copilot/fix-expression-value-exceeds-max-size

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 21, 2026

gh aw compile failed with:

autoloop.md:1:1: error: expression value for "run" (23.2 KB) exceeds maximum allowed size (20.5 KB) at line 487

The "Check which programs are due" step embedded a ~500-line Python heredoc in run: |, which inlined into autoloop.lock.yml as a single 23.2 KB run: string — above GitHub Actions' 20.5 KB per-expression limit.

Changes

  • Extract the Python body verbatim into .github/workflows/scripts/autoloop_scheduler.py (de-indented, shebang + docstring added; no logic changes).
  • Replace the heredoc in .github/workflows/autoloop.md with a one-liner; env: block is unchanged so the script reads the same variables:
    run: |
      python3 .github/workflows/scripts/autoloop_scheduler.py
  • Recompile autoloop.lock.yml via gh aw compile autoloop. Largest compiled run: expression drops from 23.2 KB → 3.5 KB.

The script resolves at runtime because the workflow's existing checkout: step makes it available at the Actions workspace root.

Not addressed

Code review flagged two pre-existing nits in the moved code (duplicate programs_dir/autoloop_dir, unused file_program_titles). Left alone — unrelated to the size fix and present in the original heredoc.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

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

  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq .object.sha .py (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.68.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.68.3 --jq .object.sha (http block)

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

The inline heredoc in autoloop.md compiled to a ~23.2 KB `run:` expression,
exceeding GitHub Actions' 20.5 KB per-expression limit. Move the scheduler
body to .github/workflows/scripts/autoloop_scheduler.py and invoke it from
the run step. Recompile the lock file with gh aw compile.

Agent-Logs-Url: https://github.com/githubnext/tsessebe/sessions/fbfa0828-7972-46b0-ab02-c8f37dfc544c

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix expression value exceeded maximum allowed size error Extract autoloop scheduler into a standalone script to fix oversized run: expression Apr 21, 2026
Copilot finished work on behalf of mrjf April 21, 2026 16:25
Copilot AI requested a review from mrjf April 21, 2026 16:25
@mrjf mrjf marked this pull request as ready for review April 21, 2026 16:56
@mrjf mrjf merged commit c2c7d49 into main Apr 21, 2026
17 checks passed
@mrjf mrjf deleted the copilot/fix-expression-value-exceeds-max-size branch April 21, 2026 17:15
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.

fix @copilot fix autoloop.md:1:1: error: expression value for "run" (23.2 KB) exceeds maximum allowed size (20.5 KB) at line 487

2 participants