Skip to content

Deliver mocked activity and child failures with bounded retries - #209

Merged
rmcdaniel merged 6 commits into
mainfrom
fix/179-mock-failures-retries
Oct 23, 2026
Merged

rmcdaniel merged 6 commits into
mainfrom
fix/179-mock-failures-retries

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

WorkflowEnvironment currently lets activity mock exceptions escape before authored workflow handlers can catch them and cannot mock child-body failures or scheduled retries. Record terminal history through the existing replayer, add synchronous child callables, apply explicit attempt budgets without sleeping, and expose per-call counts across continuation runs. A configurable cap raises a harness error before a larger policy is falsely reported exhausted.

Addresses #179. Activity failures preserve the real Worker's outer NonRetryableError type/cause and flag. Child failures use the existing workflow failure mapper and class/message history; no invented child failure field or production replay/retry change. Both short and qualified retry-exclusion names work. Omitted policies remain one attempt. Missing fixtures, unsupported async mocks and cap exhaustion fail clearly. Recipes cover failure handling, retry exhaustion and compensation, with real-Server limits.

Tests-first e03d03d: all 31 controls fail on unchanged source. Functional 77f4f6e full local Python 3.12: 3,254 pass / two skips / 105 integration deselections / one existing fork warning, 169.32 seconds. Strengthened component qualification passes 94 controls. Current target 23a54e3319b9c0ad3ba2d382009a6b2d0f4694c6, including merged #173 source 31410db82, passes 136 combined harness and bundle controls in 2.09 seconds. The prior 5861ce4c target passed 253 combined controls in 5.50 seconds. Ruff and mypy on 37 source files pass. Fresh normal CI is 39943002596. The actionable test-only Sonar report was corrected without changing its assertion; previous target readback is zero. Fresh consolidated head 23a54e33 full local qualification passes 3,376 / two skips / 105 integration deselections / one existing fork warning in 127.69 seconds. Final-head Sonar reports zero OPEN/CONFIRMED issues and zero unreviewed hotspots; CodeQL has no open alerts. Hosted integration is the remaining normal gate.

Source documentation explicitly marks these APIs unreleased. Publication and normally installed acceptance remain after the existing #197 Trusted Publisher setup. No tag/version, Server/native/frozen or Cloud adoption is included.

@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel merged commit e1a6883 into main Oct 23, 2026
18 checks passed
@rmcdaniel
rmcdaniel deleted the fix/179-mock-failures-retries branch October 23, 2026 11:12
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