Skip to content

quality: runner batches exceed the argv budget on macOS #9267

Closed

Description

@TrapsterDK

//quality/runner:quality_runner_test fails on macos_arm64. It passes on linux_x86_64 in the same run. Evidence run 42371326353 (https://github.com/devhusdk/rules_dx/actions/runs/42371326353):

---- real::real_tools::batch_launcher_splits_at_launcher_budget stdout ----
panicked at quality/runner/src/real_tools.rs:1754:5:
spawn carries 6017 argv bytes
---- real::real_tools::ruff_large_selection_runs_batched stdout ----
panicked at quality/runner/src/real_tools.rs:1754:5:
spawn carries 24061 argv bytes
test result: FAILED. 488 passed; 2 failed

This was hidden until #9255 because quality_runner_lib did not compile in the sandbox before then (the cmakelint tier was missing from compile_data).

Where: assert_within_budget in quality/runner/src/real_tools.rs:1750 checks the argv that reaches the spawn. The batches are planned by plan_batches / plan_invocation_batches in quality/adapter/src/commands.rs:3127-3207. The spawned argv is 17 bytes over LAUNCHER_BATCH_BUDGET (6000) and 61 bytes over ARGV_BATCH_BUDGET (24000). That means the argv that is spawned on macOS is longer than the one the planner measured. One likely cause is a path in the argv that is canonicalized after planning (macOS /var -> /private/var scratch paths).

Fix: make the planner measure the same argv that gets spawned, so the head and file paths are resolved before the planner costs them. Do not raise the test budget.

Done when: quality_runner_test passes on macos_arm64 evidence.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hzpb4qWNZKpDCrwUz7

Activity

  1. TrapsterDK commented on Nov 7, 2026

    @TrapsterDK
    CollaboratorAuthor

    Evidence run 42374076442 (macos_arm64) passed; PR #9290 ready.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_01Xut2hzpb4qWNZKpDCrwUz7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions