fix(desktop): recover root boundary from assistant-ui lookup races - #64310
fix(desktop): recover root boundary from assistant-ui lookup races#64310frizikk wants to merge 3 commits into
Conversation
|
Thanks for restoring this narrowly. Current The prior bounded recovery was added in Automated hermes-sweeper review. |
|
The recovery regex The parametrized test The inner The root boundary should use the same pattern. A production crash from a session that hit context compression (496-message session, active list shrank to 12, stale subscriber read index 89) confirms the |
4836c40 to
b4324c5
Compare
|
Thanks — you're right. I verified the installed I've updated the PR to:
A mutation check that restores the old legacy-only matcher now fails the two current-name assertions, and the corrected focused suites pass 11/11. I also rebased the PR onto current |
b4324c5 to
6800a13
Compare
SummaryThree PRs address the stale assistant-ui lookup race or its root-boundary fallout: #41787 introduced next-tick root recovery, #52704 bounded that recovery, and #64310 restores and updates it after its removal from main. The contributor evidence identifies #44562 as another occurrence of the lookup-index race, rather than a malformed tool-result failure. Related pull requests
Duplicates#41787 and #52704 implement substantially the same root-boundary mitigation, with #52704 superseding #41787 by bounding retries; #64310 restores and updates the #52704 approach after its removal from main. Suggested consolidationKeep #64310 open with a salvage path, consistent with the maintainer-bot keep_open verdict: retain its bounded root-only recovery, current-and-legacy lookup matcher, StrictMode handling, and focused regression tests. Keep #41787 closed as superseded by #52704, retain merged #52704 as the reference implementation, and consolidate #44562 under canonical race issue #45403 while #64308 tracks the removal regression. Complex graphflowchart LR
classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
classDef best stroke-width:3px,stroke:#b45309
classDef target stroke-width:3px,stroke:#4338ca
I41693(["issue #41693 (closed)"])
I44562(["issue #44562 (open)"])
I64308(["issue #64308 (open)"])
subgraph Dup41787 ["PRs duplicating each other"]
P41787["PR #41787 (closed)"]
P52704["PR #52704 (merged)"]
P64310["PR #64310 (open)"]
end
P64310 -->|fixes| I41693
P64310 -->|fixes| I44562
P64310 -->|best fix| I64308
class I41693 closed
class I44562 open
class I64308 open
class P41787 closed
class P52704 merged
class P64310 open
class P52704 best
class P52704 best
class P64310 best
class P64310 target
click I41693 "https://github.com/NousResearch/hermes-agent/issues/41693"
click I44562 "https://github.com/NousResearch/hermes-agent/issues/44562"
click I64308 "https://github.com/NousResearch/hermes-agent/issues/64308"
click P41787 "https://github.com/NousResearch/hermes-agent/pull/41787"
click P52704 "https://github.com/NousResearch/hermes-agent/pull/52704"
click P64310 "https://github.com/NousResearch/hermes-agent/pull/64310"
Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed (state tag in the node label). Cross-PR triage: Reviewed 3 pull requests and 3 issues in this complex. Each diff was read against this issue; Assessment working set: 28 kB of PR diffs, 26 kB of issue/PR text, 16 kB of discussion (14 comments), 14 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch. |
6800a13 to
f2d8887
Compare
|
Superseded by #81232. Consolidated with #72867 into one PR: both fix the same Your root-boundary recovery and the |
What does this PR do?
Restores a narrow, bounded recovery path for the Desktop root error boundary when the known transient assistant-ui lookup race escapes the existing message-local boundary.
The root boundary recognizes the same current-and-legacy error family as
MessageRenderBoundary:Eligible root failures retry on the next timer turn so React can reconcile against the current store snapshot. Recovery remains intentionally limited to three automatic attempts in a five-second window; persistent failures remain visible and manually retryable.
This refresh also fixes a React development
StrictModelifecycle bug found while exercising the real root composition: the synthetic unmount cleared the timer scheduled bycomponentDidCatch, but the replayed mount did not restore it. The boundary now retains recovery ownership separately from the timer handle and reschedules only that owned attempt on remount. Real unmount still cancels the timer.Rebased exactly onto
origin/main05f5df6bdb7cfcec57aadc9ac93d7a08c684cd5d. Local immutable candidate:6800a1399434e06e733f18068177df974e52a3b7.Related Issue
Fixes #64308. Related to the broader assistant-ui race tracked by #45403.
Type of Change
Changes Made
apps/desktop/src/components/error-boundary.tsxStrictModesynthetic unmount without weakening real-unmount cleanup;RootErrorBoundarycomposition so only the real root owner can auto-recover.apps/desktop/src/main.tsxRootErrorBoundaryin the real Desktop root underStrictMode.apps/desktop/src/components/error-boundary.test.tsxStrictMode, and production-style composition withoutStrictMode.apps/desktop/src/components/assistant-ui/message-render-boundary.test.tsxuseClientLookup,tapClientLookup, andtapClientResourcewithout introducing a shared speculative classifier framework.How to Test
Commands run locally:
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests pass — N/A for this Desktop-only TypeScript change; focused Vitest, typecheck, ESLint, Prettier, and production build passedDocumentation & Housekeeping
cli-config.yaml.exampleN/A — no configuration changedCONTRIBUTING.md/AGENTS.mdN/A — no architecture or contributor workflow changedFor New Skills
N/A — this PR does not add a skill.
Screenshots / Logs
6800a1399434e06e733f18068177df974e52a3b7: passed;assert-dist-builtconfirmed renderer assets and the build stamp recorded6800a1399434.advancedChunks, one generated-CSS optimizer warning, the existing Tabler large-barrel warning, and an ineffective dynamic-import warning foropen-session.ts.npm cireported 28 audit findings in the resolved dependency graph; no dependency or lockfile changes are included in this PR.