Skip to content

feat(#452): spec phase retry with backoff and parallel vs chain docs - #455

Merged
admarble merged 3 commits into
mainfrom
feature/452-improve-multi-issue-reliability-default-to-paralle
Mar 26, 2026
Merged

admarble merged 3 commits into
mainfrom
feature/452-improve-multi-issue-reliability-default-to-paralle

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • Add spec-specific retry logic (1 retry with 5s backoff) in executePhaseWithRetry() to reduce spec phase failure rate from ~8.6%
  • Document parallel vs chain mode decision framework with success rate data and trade-off analysis
  • Confirm parallel worktrees are already the default (sequential: false) — no settings change needed

AC Coverage

AC Description Status Evidence
AC-1 Evaluate parallel vs chain default ✅ Implemented Documented in docs/features/parallel-execution.md with data-driven comparison
AC-2 Confirm parallel is default, document ✅ Implemented settings.ts:269 confirms sequential: false; integration test validates
AC-3 Add retry logic for spec phase ✅ Implemented phase-executor.ts Phase 3 with injectable delay
AC-4 Spec failure rate < 5% 🔄 Post-deploy Metric to measure after ~50 runs with retry enabled
AC-5 Document chain vs parallel trade-offs ✅ Implemented Decision framework in parallel-execution.md + warning in run-command.md
AC-6 Named constants ✅ Implemented SPEC_RETRY_BACKOFF_MS, SPEC_EXTRA_RETRIES exported
AC-7 Unit tests ✅ Implemented 10 unit tests in spec-retry.test.ts
AC-8 Log retry attempts ✅ Implemented Console log with phase name and backoff duration

Test plan

  • npm run build passes
  • npm run lint passes (0 errors, 0 warnings)
  • 17 new tests pass (10 unit + 7 integration)
  • 184 existing affected tests still pass
  • Monitor spec failure rate after ~50 runs (AC-4)

Closes #452

🤖 Generated with Claude Code

- Add Phase 3 spec-specific retry in executePhaseWithRetry() with 5s
  backoff after cold-start and MCP fallback retries are exhausted
- Export named constants SPEC_RETRY_BACKOFF_MS and SPEC_EXTRA_RETRIES
- Log retry attempts with phase name and backoff duration
- Add injectable delayFn parameter for testability (follows existing
  executePhaseFn DI pattern)
- Add decision framework docs: success rate comparison, trade-off
  matrix, and when-to-use guidance for parallel vs chain mode
- Add performance warning for chain mode in run-command reference
- 17 new unit tests + 10 integration tests covering retry behavior,
  named constants, logging, error preservation, and concurrency

Closes #452
Covers the untested path where spec fails 3 times with duration < 60s
(cold-start threshold), exhausts cold-start retries, then recovers
via Phase 3 spec-specific retry.
@admarble
admarble merged commit 24bdfbe into main Mar 26, 2026
5 checks passed
@admarble
admarble deleted the feature/452-improve-multi-issue-reliability-default-to-paralle branch March 26, 2026 05:37
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.

Improve multi-issue reliability: default to parallel worktrees and add spec retry logic

1 participant