Skip to content

pipeline: galaxyscope sizes its pool from GG_JOB_CORES; pin parallel scans in rosetta_audit / contract_pr_check; OMP_NUM_THREADS in ground-truth CI #4902

Closed

Description

@squid-protocol

Problem. galaxyscope sizes its extraction pool at max(1, cpu_count-1) (gitgalaxy/galaxyscope.py ~2366), overridden only by GALAXYSCOPE_MAX_WORKERS (~2371). It ignores GG_JOB_CORES (exported by tests/tools/box/heavy-run.sh, #4882). Every tool that runs scans in parallel must remember to pin it; four do (unicode_gauntlet, cultural_gauntlet, import_graph_accuracy, conftest under xdist), others don't:

  • tests/tools/rosetta_audit.py ~210/221: ThreadPool(jobs<=4) of verifiers, _run_verifier (~84) passes os.environ unpinned: 4 x 11 = 44 workers on 12 cores (CI 4 x 3).
  • tests/tools/contract_pr_check.py ~123: 4 legs at once incl. rosetta + crucible: ~55 processes worst case.
  • tests/tools/bugfix_kit.py ~1179 cmd_bless: one crucible_check per leg in parallel, _crucible_env (~1024) unpinned: 2 x 11.
  • .github/workflows/mainframe-ground-truth.yml ~103: pytest -n auto without OMP_NUM_THREADS: 1 (smoke-test.yml and full-suite-gate.yml set it).

Fix.

  1. galaxyscope: when GALAXYSCOPE_MAX_WORKERS is unset and GG_JOB_CORES is set, size the pool from GG_JOB_CORES (min 1); explicit GALAXYSCOPE_MAX_WORKERS still wins. Unit test the sizing.
  2. rosetta_audit + contract_pr_check: pin GALAXYSCOPE_MAX_WORKERS=1 per parallel verifier/leg (setdefault), as Pin GALAXYSCOPE_MAX_WORKERS=1 in parallel scan tools (Fixes #4896) #4899 did.
  3. mainframe-ground-truth.yml: add OMP_NUM_THREADS: 1 to the pytest step env.
  4. bugfix_kit bless: do NOT change it in this PR unless you show golden output is byte-identical with 1 worker vs the default on one leg (crucible_check under golden-lock.sh); otherwise write the check in the PR and leave it.

Acceptance. Scan output identical with the pool sized from GG_JOB_CORES vs default (one corpus); rosetta_audit verdicts identical before/after; before/after wall time + peak load (tests/tools/box/box_status.py) for rosetta_audit (or one language of it); gates clean.

Evidence: pipeline audit 2026-10-11 (four read-only scouts; full reports in the orchestrator handoffs, pipeline-audit-2026-10-11/A-D). Precedent: #4899 (unicode gauntlet nested pools: 182 s -> 39 s, peak load 82.5 -> 10.5, byte-identical output), #4882 (heavy-run.sh GG_JOB_CORES), #4862/#4865 (macOS hang; pytest --timeout).

🤖 Generated with Claude Code

Activity

  1. added
    ci-cd
    enhancement
    priority: high
    on Oct 11, 2026
  2. added
    scope:infra
    on Oct 16, 2026
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

    ci-cdenhancementpriority: highscope:infra

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions