Skip to content

fix: a benchmark bundle over one argv entry builds its spawn request (15.0.1) - #309

Open
dam-code-protector[bot] wants to merge 1 commit into
mainfrom
fix/benchmark-isolate-env-argv
Open

dam-code-protector[bot] wants to merge 1 commit into
mainfrom
fix/benchmark-isolate-env-argv

Conversation

@dam-code-protector

Copy link
Copy Markdown
Contributor

Scope

scripts/benchmark-isolate.sh start builds the spawn request of each benchmark task. It gave the base64 bundle of the task to jq as --argjson env. The kernel limits one argv entry to 128 KiB (MAX_ARG_STRLEN). A fixture with a larger bundle made jq stop with Argument list too long. The run then aborted after the earlier tasks were spawned, and it recorded nothing.

Change

  • start writes the env array to <state-dir>/<task>.env and jq reads it with --slurpfile. The file is removed when the request file is built.
  • The request body already goes to curl as a file, thus no other transport changes.
  • scripts/tests/test_benchmark_isolate.sh has a new case, start_bundle_over_one_argv_entry. It builds a request from a bundle larger than 128 KiB and checks that the bundle arrives intact.
  • VERSION 15.0.1 and its CHANGELOG.md entry. No upgrade step.

Where to look

scripts/benchmark-isolate.sh, the task loop of start. The bundle cap (CG_BENCH_BUNDLE_MAX, 512 KiB of base64) does not change.

Checks

  • bash -n scripts/benchmark-isolate.sh: passed.
  • bash scripts/tests/run.sh scripts/tests/test_benchmark_isolate.sh: ALL TESTS PASSED. The new case fails on main without the script change.
  • test_benchmark_helpers.sh and test_verify_onboarding.sh fail in the authoring sandbox with the same 35 FAIL lines on unchanged main. This change does not cause them. CI is the full-suite result.

Rollout

No cost change. A deployed instance gets the fix when it updates to this version.

🤖 Generated with Claude Code

…(15.0.1)

benchmark-isolate.sh start passed the base64 bundle of a task to jq as
--argjson env. One argv entry is capped at 128 KiB (MAX_ARG_STRLEN), so a
fixture whose bundle is larger made jq fail with 'Argument list too long'
and the run aborted after the earlier tasks were already spawned.

The env array is now written to a file in the state directory and read
with --slurpfile. A stub test builds a request from a bundle larger than
the cap.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@dam-code-protector dam-code-protector Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Code Guardian - Code guardian repo — ⚠️ Code Review @ 738e63d

PR #309: fix: a benchmark bundle over one argv entry builds its spawn request (15.0.1)

Author: dam-code-protector[bot] | Branch: fix/benchmark-isolate-env-argv → main | Changes: +22 −6 (4 files)

Summary

start now writes each task's env array to a file, and jq reads it with --slurpfile. A new test builds a request from a 200 KB bundle and checks that the bundle arrives intact.
Limits: 3 skill(s) did not run: issue-fit, typescript-engineering, react-ui-engineering.

Findings

  • ✅ Looks good: the file-based env changes no request field and keeps the chunk checksum.

Documentation Check (doc-drift)

✅ No findings.

Agent Engineering

✅ No findings.

Verdict

COMMENT — the fix is correct, and the new test fails on main without it. GitHub refuses an approval on this bot's own pull request.


Review by Code Guardian - Code guardian repo · automated code guardian · cb/rits/deepseek-ai/DeepSeek-V4.1-Flash-1017 on pi

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