fix(master): auto-retry on turn exhaustion + fix flaky tests - #22
Merged
Conversation
Merge develop into main for v0.1.0 release
- OB-F232: Master-level turn-escalation retry mirrors worker pattern (OB-903). On first turnsExhausted, auto-retries with ceil(maxTurns × 1.5) capped at 50, injecting partial output as continuation context. Only surfaces guidance to the user if the escalated retry also fails. - Fix flaky test suite: setup.ts cleanStaleTestWorkspaces() was deleting active temp dirs used by parallel test forks. Added 5-minute staleness threshold so only truly stale dirs are cleaned. - Update DEFAULT_MAX_TURNS_EXPLORATION from 15 → 25 for monorepo headroom, PHASE_TIMEOUT from 300s → 600s for large workspaces. Test assertions updated. - docs/audit/FINDINGS.md: added 5 new findings from real-world audit (OB-F231 through OB-F235), marked OB-F232 as fixed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
turnsExhausted, auto-retries withceil(maxTurns × 1.5)(capped at 50), injecting partial output as continuation context. Only surfaces guidance to the user if the escalated retry also fails. Mirrors the existing worker pattern (OB-903).setup.tscleanStaleTestWorkspaces()was deleting active temp dirs used by parallel test forks, causing 6-14 intermittent ENOENT/EINVAL failures per run. Added 5-minute staleness threshold.DEFAULT_MAX_TURNS_EXPLORATION15→25 (monorepo headroom),PHASE_TIMEOUT300s→600s (large workspaces). Test assertions updated.Test plan
npm run typecheck— passesnpm run lint— 0 errors (57 pre-existing warnings)npm run test— 240/240 files, 5518/5518 tests pass (verified on 3 consecutive runs, 0 flaky failures)🤖 Generated with Claude Code