fix(plan): preserve strategy_decisions_json in error_details during execute and report actual actor mode #10945

Merged
hamza.khyari merged 3 commits from bugfix/executor-error-details-overwrite into master 2026-04-30 15:13:29 +00:00

3 Commits

Author SHA1 Message Date
HAL9001 86e1cdf6ae fix(plan): apply merge pattern to _run_execute_with_runtime and improve docstring
CI / benchmark-publish (pull_request) Has been skipped
CI / helm (pull_request) Successful in 34s
CI / push-validation (pull_request) Successful in 33s
CI / lint (pull_request) Successful in 1m7s
CI / quality (pull_request) Successful in 1m8s
CI / build (pull_request) Successful in 48s
CI / typecheck (pull_request) Successful in 1m21s
CI / security (pull_request) Successful in 1m44s
CI / integration_tests (pull_request) Successful in 3m36s
CI / e2e_tests (pull_request) Successful in 4m31s
CI / unit_tests (pull_request) Successful in 4m46s
CI / docker (pull_request) Successful in 1m52s
CI / coverage (pull_request) Successful in 11m9s
CI / status-check (pull_request) Successful in 7s
- Apply error_details merge pattern to _run_execute_with_runtime for
  consistency with _run_execute_with_actor (preserves strategy_decisions_json
  in runtime mode too)
- Expand _run_execute_with_actor docstring to clarify retry is controlled
  by ErrorRecoveryService.max_retries

Addresses remaining review findings from PR #10945.
2026-04-30 14:56:33 +00:00
hamza.khyari a740d9c15a fix: address PR review findings - narrow exception scope and fix test mocks
Address CoreRasurae's review comments:

1. Narrow exception scope in _build_decisions (line 846) to catch only
   json.JSONDecodeError and ValidationError instead of bare Exception.
   This prevents swallowing unintended errors like memory issues.

2. Update feature file section header and scenario titles from
   _run_execute_with_stub to _run_execute_with_actor for consistency.

3. Add spec to MagicMock in failing execute scenario (line 138) to
   match the pattern used in succeeding scenario (line 119).

Note: Master feature entry point - Behave auto-discovers all .feature
files, no explicit entry point needed. Tests run successfully.

ISSUES CLOSED: #10874
2026-04-30 14:56:33 +00:00
HAL9001 9e3d7c6622 fix(plan): preserve strategy_decisions_json in error_details during execute and report actual actor mode
Merge error_details instead of replacing them in _run_execute_with_actor
(formerly _run_execute_with_stub), preserving strategy_decisions_json
stored by run_strategize.  On execute retry, _build_decisions now finds
the full decision hierarchy instead of falling back to definition_of_done
parsing.

- Merge error_details on both success and failure paths
- Report type(self._execute_actor).__name__ instead of hardcoded 'stub'
- Rename _run_execute_with_stub to _run_execute_with_actor
- Add 4 Behave scenarios verifying preservation and mode reporting

ISSUES CLOSED: #10874
2026-04-30 14:56:33 +00:00