fix(runtime-fallback): reland BLOCKER-4 delegated empty-history fallback (#4059)#4136
Merged
Conversation
There was a problem hiding this comment.
No issues found across 5 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: The PR appears well-tested and narrowly scoped, but the custom criterion requires 100% certainty of no regressions, which is impossible to guarantee from code review alone, especially for a reland of previously reverted functionality.
Re-trigger cubic
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
c33964b to
971be27
Compare
Owner
Author
|
Branch rebased on dev to resolve CHANGELOG conflict. Requesting Cubic re-review of new HEAD 971be27. |
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
Relands BLOCKER-4 (delegated child-session empty-history fallback) reverted in #4044.
When a delegated child session fails on its first
promptAsynccall before history persists, runtime-fallback consumes the captured bootstrap retry parts (system + tools preserved) and clears the bootstrap entry to prevent double-consumption.Why this reland sticks (vs PR #3825)
PR #3825's regression test was non-deterministic against post-#4032 schema changes and rotated logger state shared across tests. This version keeps the fix narrow:
logger.test.tsis rewritten to per-test isolated module imports, removing the rotation cross-talk that was one of the contributors to PR fix(delegate-task): harden child-session first-prompt fallback recovery #3825's failing rootbun test(a major reason for Revert "Merge pull request #3825 from tw-yshuang/fix/delegated-child-session-early-failure-fallback" #4044).Changes
src/hooks/runtime-fallback/last-user-retry-parts.ts: when persisted history is empty and a bootstrap exists, return itsretryPartsandclearDelegatedChildSessionBootstrap(sessionID)to prevent reuse on subsequent retries.src/hooks/runtime-fallback/index.test.ts: add assertion that bootstrap is cleared after consumption.src/shared/logger.test.ts: per-test cache-busting dynamic import of./loggerso rotation state cannot leak across tests in the shared root suite.CHANGELOG.md: add v4.2.1 entry.docs/reference/known-issues.md: mark BLOCKER-4 RESOLVED in v4.2.1.Testing
bun test src/hooks/runtime-fallback/index.test.ts --timeout 30000✅ (63 pass / 0 fail)bun test src/shared/logger.test.ts --timeout 30000✅ (7 pass / 0 fail)bun test --timeout 30000✅ (7072 pass / 1 skip / 0 fail / 7073 across 729 files)bun run typecheck✅ (clean)bun run build✅ (clean)Related Issues
.omo/plans/p0-4059-blocker4-reland.mdSummary by cubic
Fixes BLOCKER-4 by making delegated child-session fallback work when the first prompt fails before history persists. On retry, we consume the captured bootstrap once, preserve system + tools, and clear the bootstrap immediately to prevent reuse.
src/shared/logger.test.tsvia per-test dynamic imports to stop rotation state leaks.CHANGELOG.mdand marked BLOCKER-4 resolved in v4.2.1 docs.Written for commit 971be27. Summary will update on new commits. Review in cubic