Skip to content

fix(qa): #1040 — Angry-DM scorer 'hang' was a too-short timeout (lens is SLOW, ~400s) - #1080

Merged
100yenadmin merged 1 commit into
mainfrom
fix/1040-angrydm-scorer-timeout
Jun 21, 2026
Merged

fix(qa): #1040 — Angry-DM scorer 'hang' was a too-short timeout (lens is SLOW, ~400s)#1080
100yenadmin merged 1 commit into
mainfrom
fix/1040-angrydm-scorer-timeout

Conversation

@100yenadmin

@100yenadmin 100yenadmin commented Jun 21, 2026

Copy link
Copy Markdown
Member

Root cause (confirmed, not guessed)

A detached single claude -p probe (csmed-1 angrydm, no concurrency, 580s timeout) completed: EXIT=0, duration_ms=401324 (~402s), num_turns=1 (single-turn generation — no tool loop), valid 7.7 KB scorecard.

So the "#1040 combat-scorer hang" is the Angry-DM 5e-fidelity lens being SLOW, not stuck: rubric_angry_dm.md is ~32 KB (~3× tolkien, ~8× the mechanical rubric), and grading a combat-dense transcript against every 5e rule legitimately takes ~400s. The default 300s score.sh timeout killed it mid-generation → empty stdout that looked like a hang.

Concurrency made it worse, not caused it: run_duo.sh scored all 3 lenses with &, so the heavy angrydm shared API throughput with the 2 light lenses and ran even slower → exceeded 300s every combat run (the opus RRI lost its mech lens exactly this way: angrydm overall= blank while tolkien=4.0 scored). Social transcripts score in <300s, which is why only combat-dense runs "hung."

This corrects my earlier concurrency hypothesis — the clean (no-concurrency) probe still "hung" at a 240s timeout, which refuted concurrency-as-cause and pointed straight at slow-vs-timeout.

Fix (both halves)

  • score.sh: default WORLDOS_SCORE_TIMEOUT 300 → 600 (covers ~400s + headroom). Fast lenses finish in ~60–150s, so the looser bound only matters for the heavy lens or a genuinely stuck call. Also updated the error-message default + the rationale comment.
  • run_duo.sh: score the 2 light lenses (mechanical, tolkien) in parallel, wait, then score Angry-DM alone → full API throughput, lands near the ~400s baseline.

Validation

  • bash -n both + score.sh guard-only mode (offline) OK.
  • The 402s probe proves the lens completes given the timeout. An end-to-end score.sh re-score of csmed-1 angrydm with the new 600s default is running to confirm the wrapper path.

Impact

Unblocks clean mechanical measurement on combat-heavy runs (was n/a on the opus RRI duo). No engine/product change; QA-infra only.

Summary by CodeRabbit

  • Chores
    • Improved scoring system reliability by optimizing concurrent lens execution and increasing timeout thresholds to prevent evaluation failures.
    • Enhanced diagnostic reporting to accurately reflect actual timeout durations in scoring logs.

… just SLOW

ROOT CAUSE (confirmed by a detached single-call probe): the Angry-DM 5e-fidelity lens
(rubric_angry_dm.md ~32 KB, ~3x tolkien) LEGITIMATELY takes ~400s to grade a COMBAT-DENSE
transcript — a single-turn generation, MEASURED 402s on csmed-1 (num_turns=1, valid 7.7 KB
scorecard, EXIT=0). The default 300s score.sh timeout KILLED it mid-generation -> empty stdout
that LOOKED like a hang. The 'combat-scorer hang' (#1040) was the timeout, not a stuck stream.
Concurrency made it worse, not caused it: run_duo.sh scored all 3 lenses with '&', so the heavy
angrydm shared API throughput with the 2 light lenses and ran even slower -> blew past 300s every
time on combat runs (the RRI just lost its mech lens this way). Social transcripts score fine
(<300s of analysis), which is why only combat-dense runs 'hung'.

FIX (both halves):
- score.sh: default WORLDOS_SCORE_TIMEOUT 300 -> 600 (covers the ~400s + headroom; the fast lenses
  finish in ~60-150s so the looser bound only matters for the heavy lens / a genuine stuck call).
- run_duo.sh: score the 2 LIGHT lenses (mechanical, tolkien) in parallel, WAIT, THEN score Angry-DM
  ALONE -> full API throughput, lands near the ~400s baseline, comfortably under 600s.

Validated: syntax + guard-only mode OK; the 402s probe proves the lens completes given the timeout.
This unblocks clean MECH measurement on combat-heavy runs (was n/a on the opus RRI duo).
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 875661dc-e31b-41d8-9718-c2585ddcd936

📥 Commits

Reviewing files that changed from the base of the PR and between 427b366 and 865eb02.

📒 Files selected for processing (2)
  • qa/run_duo.sh
  • qa/score.sh

📝 Walkthrough

Walkthrough

The scoring phase in qa/run_duo.sh is changed so the mechanical and Tolkien lenses run concurrently and are awaited before the Angry-DM lens runs alone. In qa/score.sh, the claude -p timeout default is raised from 300s to 600s, and the empty-stdout retry diagnostic is updated to reference the new default.

Changes

Angry-DM Lens Isolation and Timeout Fix

Layer / File(s) Summary
Lens execution sequencing
qa/run_duo.sh
Mechanical and Tolkien score scripts are backgrounded together and awaited; Angry-DM score script then runs alone, replacing the prior single concurrent launch of all three lenses. Comments are updated to explain the sequencing rationale.
Scorer timeout and empty-output diagnostic
qa/score.sh
Default claude -p timeout raised from 300s to 600s via ${WORLDOS_SCORE_TIMEOUT:-600}; inline comments document expected lens runtimes; the empty-stdout retry message now reports the updated default duration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

Possibly related PRs

  • electricsheephq/WorldOS#537: Modifies the same empty-stdout/failed-attempt handling in qa/score.sh's retry loop that this PR also updates.
  • electricsheephq/WorldOS#1026: Touches the same claude -p scoring invocation in qa/score.sh, adding env -u environment unsetting that this PR's changes build upon.

Poem

🐇 Three lenses to score, but one needs its space,
Angry-DM gets room, a quieter place.
The two lighter lenses run side by side,
Then Angry-DM follows with confident stride.
Six hundred seconds — enough time at last,
No more empty output, no timeout too fast! 🎯

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures the root cause and fix: the Angry-DM scorer timeout was too short (300s) for a legitimately slow lens (~400s), matching the PR's primary focus.
Description check ✅ Passed The description thoroughly documents the root cause (confirmed 402s probe), the concurrency issue, the fix (600s timeout + sequential scoring), and validation steps, but does not include the CLA checklist or licensing validation section from the template.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands and usage tips.

@100yenadmin
100yenadmin merged commit 95019ef into main Jun 21, 2026
20 checks passed
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