Agents Builders

Cap full-suite-check parallel workers

Archived
cap-full-suite-check-parallel-workers
UNRESOLVED QA FEEDBACK

ABANDON RECOMMENDED — premise is inverted. Local tests already run SINGLE-PROCESS by design (test/test_helper.rb:11-17) precisely to avoid the pg fork-safety segfault + orphan-worker-leak this task cited. This task's change SETS PARALLEL_WORKERS to a high number, which FORCES the parallel fork the app deliberately avoids and reintroduces the crash — reproduced 3x tonight (solo cert, 12 workers, immediate pg SIGSEGV at pg/connection.rb:944, before any test ran). Earlier certs tonight passed only because they ran serial. bin/agent-worktree already pins PARALLEL_WORKERS=1 locally. There is nothing to cap locally. The original 'SIGSEGV exit 144' was almost certainly a run that had PARALLEL_WORKERS set or CI mode, not CPU over-subscription. Recommend archiving this task and its branch feat/cap-full-suite-check-parallel-workers. The valuable work is testing-phase-timestamps; pivoting there now.

Created

Jul 08, 06:33

Started

Jul 08, 06:42

DevOps handoff

Type

Chore

Shape

backend

Worktree Slug

cap-full-suite-check-parallel-workers

Repositories

mcritchie-studio

Release Slug

Branch

feat/cap-full-suite-check-parallel-workers

Pull Request

Local URL

QA URL

Production URL

stability ci concurrency

Acceptance Criteria

  • full-suite-check caps its parallel test workers
  • Cap scales down as peer certs run
  • Concurrent local certs stop crashing (SIGSEGV)
  • Unit test the worker-cap calc across cores

Expected Test Plan

  • [unit] worker-cap calc across cores and peer count
  • [integration] full-suite-check runs with the cap applied

Checks Run

  • [unit] bin/rails test test/lib/cert_concurrency_test.rb — worker_cap across cores and peer counts
  • [integration] bin/rails test test/lib/cert_concurrency_test.rb — parallel_workers + active_peer_certs across the ps boundary

Agent Context

Stops the bleeding from tonight's parallel-cert crash (SIGSEGV, exit 144): concurrent bin/full-suite-check runs across worktrees over-subscribe CPU and crash the Rails parallel test workers. Cap workers in full-suite-check: PARALLEL_WORKERS = max(1, (cores - 2) / active_peer_certs) where active_peer_certs counts currently-running peer full-suite-check processes; OR a Redis cert-concurrency token that bounds simultaneous certs. About 10 lines. Orthogonal to the testing-phase observability task (that one MEASURES; this one PREVENTS the crash) - keep separate and do this FIRST. Coordination: touches bin/full-suite-check, the same file the observability task edits to emit cert start/finish TaskEvents - sequence this before that or reconcile the diff.

Stage Timeline

Who handled each stage, the time it took (measured), and the model / tokens / cost reported (best-effort) — plus who's on it right now. means the agent didn't report that metric.

Sizing Avi · PO SMALL Dev SMALL Actual
  1. Created Designed
    C Chikorita
    Chikorita
    Model
    Duration
    Tokens
    Cost
    Completed Jul 08, 06:33 · about 6 hours ago
    api
  2. Designed Building
    C Chikorita
    Chikorita
    Model
    claude-opus-4-8
    Duration
    9 minutes
    Tokens
    11,620,136
    Cost
    ~$7.29
    Started Jul 08, 06:33
    Completed Jul 08, 06:42 · about 6 hours ago
    cli
  3. Building Blocked
    Model
    claude-opus-4-8
    Duration
    39 minutes
    Tokens
    85,694,677
    Cost
    ~$55.12
    Started Jul 08, 06:42
    Completed Jul 08, 07:21 · about 5 hours ago
    cli
  4. Blocked Archived
    4
    4c4fb1ab-70e1-4c6b-8e58-e691e1e9cd5c
    Model
    claude-opus-4-8
    Duration
    about 5 hours
    Tokens
    137,776,778
    Cost
    ~$104.76
    Started Jul 08, 07:21
    Completed Jul 08, 12:09 · 15 minutes ago
    cli

Conversation

QA review feedback, agent handoffs, and follow-up notes for this task.

QA Feedback about 5 hours ago

ABANDON RECOMMENDED — premise is inverted. Local tests already run SINGLE-PROCESS by design (test/test_helper.rb:11-17) precisely to avoid the pg fork-safety segfault + orphan-worker-leak this task cited. This task's change SETS PARALLEL_WORKERS to a high number, which FORCES the parallel fork the app deliberately avoids and reintroduces the crash — reproduced 3x tonight (solo cert, 12 workers, immediate pg SIGSEGV at pg/connection.rb:944, before any test ran). Earlier certs tonight passed only because they ran serial. bin/agent-worktree already pins PARALLEL_WORKERS=1 locally. There is nothing to cap locally. The original 'SIGSEGV exit 144' was almost certainly a run that had PARALLEL_WORKERS set or CI mode, not CPU over-subscription. Recommend archiving this task and its branch feat/cap-full-suite-check-parallel-workers. The valuable work is testing-phase-timestamps; pivoting there now.

Comment about 4 hours ago

RECOMMEND ARCHIVE (abandon) — premise inverted during Task B build. The local test suite is single-process BY DESIGN: test_helper sets worker_count=1 unless CI or PARALLEL_WORKERS is present. The pg fork-safety SIGSEGV this task aimed to "cap" is actually CAUSED by forcing PARALLEL_WORKERS>1 locally — so a guardrail that caps workers is unnecessary, and the crash it targets cannot occur under the default single-process path. Verified: Task B's projection suite + full CI-faithful cert run serially with no crash. No code guardrail needed. Suggest archiving unless we later add an opt-in parallel local mode, in which case a cap belongs there.

Sealed-bid sizing

Edit →

Alex (PM)

Avi (PO)

SMALL

Dev

SMALL

Actual