Skip to content

fix(infra): SF deploy 'Argument list too long' — pass definition via file:// (P0: live SFs stale)#371

Merged
cipher813 merged 1 commit into
mainfrom
fix/sf-deploy-arg-too-long
Jun 4, 2026
Merged

fix(infra): SF deploy 'Argument list too long' — pass definition via file:// (P0: live SFs stale)#371
cipher813 merged 1 commit into
mainfrom
fix/sf-deploy-arg-too-long

Conversation

@cipher813
Copy link
Copy Markdown
Owner

P0 — main is in a half-deployed state; merging this self-heals it

The Director SF state (data #370) pushed the Saturday ASL to ~131 KB. The deploy-infrastructure.yml auto-deploy on the #370 merge (sha 220094c) failed at update-state-machine with:

infrastructure/deploy-infrastructure.sh: line 104: /usr/local/bin/aws: Argument list too long
##[error]Process completed with exit code 126.

--definition "$(cat …)" passes the whole ASL inline; combined with the AWS session-token env on the runner it blew past the effective ARG_MAX. Because the script aborted there (before the weekday update + CFN), both live state machines are still stamped at the previous main HEAD (956e7c6) while origin/main is 220094c — the deploy-drift preflight contract (live stamp == origin/main HEAD) is broken, so the next weekday/Saturday pipeline run could halt on DeployDriftCheck, and the Director state isn't live yet.

Fix

--definition "file://$STAMPED" for both the Saturday + weekday updates. file:// reads from disk → bounded by the SF service limit (1 MB), not ARG_MAX. No other behavior change.

Merging this self-heals

On merge, deploy-infrastructure.yml re-runs the fixed script: it restamps both live SFs to the new main HEAD, applies the Director state, and updates the CFN git-sha tag — closing the drift window. Please merge before the next weekday pipeline run (Fri 6 AM PT / 13:00 UTC) so DeployDriftCheck doesn't halt trading.

(I did not hand-apply update-state-machine from this branch — per the merge-auto-deploy + drift-contract convention, the live SF must be stamped with a merged main SHA, not a branch SHA.)

🤖 Generated with Claude Code

…(deploy broke)

The Director SF state (2026-06-04) pushed the Saturday ASL to ~131 KB; the
deploy-infrastructure.yml auto-deploy aborted at update-state-machine with
"aws: Argument list too long" (exit 126) because the definition was passed
inline via --definition "$(cat ...)". That silently left BOTH live state
machines stamped behind origin/main HEAD → the deploy-drift preflight would
halt the next weekday/Saturday pipeline run.

Fix: --definition "file://$STAMPED" for both the Saturday + weekday updates.
file:// reads from disk, so the bound is the SF service limit (1 MB), not the
runner's ARG_MAX (env + args). No behavior change otherwise.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cipher813 cipher813 merged commit a985673 into main Jun 4, 2026
1 check passed
@cipher813 cipher813 deleted the fix/sf-deploy-arg-too-long branch June 4, 2026 23:25
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.

1 participant