From 8c97cb03c571694b8a889e06e36b91f6fbb4d0d5 Mon Sep 17 00:00:00 2001 From: peptiderepo Date: Tue, 9 Jun 2026 06:11:38 +0000 Subject: [PATCH] ci: fix cto-review ARG_MAX (#110) + restore deploy pipeline - cto-review.yml: pass the PR diff to the review step via a file (/tmp/cto-review-diff.txt) instead of a step output/env var. A ~400KB diff in the process env exceeds the runner ARG_MAX and failed the 'Call 4 models' step with 'Argument list too long' (#110). - deploy.yml: remove invalid 'continue-on-error: true' from the smoke job (a reusable-workflow 'uses:' call). Actions does not support this property on 'uses:' jobs; it produced a 0-job workflow failure that has been failing every deploy. Matches the fix already in prcore/theme. Closes #110. Agent-Session: cto fix-cto-review-and-deploy --- .github/workflows/cto-review.yml | 17 ++++++++++------- .github/workflows/deploy.yml | 1 - 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cto-review.yml b/.github/workflows/cto-review.yml index 5882204..30c45be 100644 --- a/.github/workflows/cto-review.yml +++ b/.github/workflows/cto-review.yml @@ -123,17 +123,18 @@ jobs: git fetch origin ${{ github.event.pull_request.base.ref }} --depth=50 BASE_SHA="${{ github.event.pull_request.base.sha }}" HEAD_SHA="${{ github.event.pull_request.head.sha }}" - DIFF=$(git diff --no-color "$BASE_SHA" "$HEAD_SHA" | head -c 400000) + # Write the diff to a file, not a step output / env var. Passing a + # ~400KB diff through the process env (execve argv+envp) exceeds the + # runner ARG_MAX and fails the next step with "Argument list too long" + # (issue #110). File transport also sidesteps the ~1MB step-output cap. + git diff --no-color "$BASE_SHA" "$HEAD_SHA" | head -c 400000 > /tmp/cto-review-diff.txt FILES=$(git diff --name-only "$BASE_SHA" "$HEAD_SHA") - SIZE=$(echo -n "$DIFF" | wc -c) + SIZE=$(wc -c < /tmp/cto-review-diff.txt) { echo "size=$SIZE" echo "files<> "$GITHUB_OUTPUT" - name: Load repo conventions @@ -161,7 +162,7 @@ jobs: PR_AUTHOR: ${{ github.event.pull_request.user.login }} PR_NUMBER: ${{ github.event.pull_request.number }} REPO_NAME: ${{ github.event.repository.name }} - DIFF: ${{ steps.diff.outputs.diff }} + DIFF_PATH: /tmp/cto-review-diff.txt DIFF_SIZE: ${{ steps.diff.outputs.size }} CHANGED_FILES: ${{ steps.diff.outputs.files }} CONVENTIONS: ${{ steps.conventions.outputs.content }} @@ -229,7 +230,9 @@ jobs: user_blocks.append(f"**Changed files:**\n```\n{os.environ['CHANGED_FILES']}\n```\n") if os.environ.get("CONVENTIONS", "").strip(): user_blocks.append(f"# Repo CONVENTIONS.md\n{os.environ['CONVENTIONS']}\n") - user_blocks.append(f"# Diff\n```diff\n{os.environ['DIFF']}\n```\n") + with open(os.environ["DIFF_PATH"], encoding="utf-8", errors="replace") as _df: + _diff_text = _df.read() + user_blocks.append(f"# Diff\n```diff\n{_diff_text}\n```\n") user_message = "\n\n".join(user_blocks) tools = [{ diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 54495f3..0407d84 100755 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -64,7 +64,6 @@ jobs: smoke: name: Smoke tests (staging) needs: deploy-staging - continue-on-error: true uses: peptiderepo/peptide-e2e/.github/workflows/smoke.yml@main secrets: STAGING_WP_ADMIN_USER: ${{ secrets.STAGING_WP_ADMIN_USER }}