mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-27 17:58:07 +00:00
The cross-session sidebar specs asserted a state that could expire before they looked at it, making them the flakiest tests in the suite — two reds on unrelated PRs within three minutes on 2026-07-26. Root cause, from the failing run's trace: the tests need a background process that is still RUNNING after the agent turn finishes, but the process was a fixed `sleep 5` racing two other clocks — the turn itself (two model round trips plus a real subagent delegation) and the 4s success linger before a finished task auto-dismisses. On a loaded runner the "dot should appear" poll took 7.5s to see the dot; by then `sleep 5` had already exited, `waitForFunction(finalText)` returned in 0.08s because the turn was long done, and the next line — a bare synchronous `.count()`, not a wait — sampled 0. The process lifetime is now test-controlled: `createBackgroundReleaseHandle()` mints a sentinel path, the scripted command blocks until that file appears, and the test releases it exactly when it wants the dot to clear. One clock instead of three, and the "turn done, process still running" state is stable rather than a window to catch. The wait is bounded (60s) so a forgotten release can't hang a worker, and `sleep 5` stays as the default for callers that pass no handle. No product code touched — E2E harness only. |
||
|---|---|---|
| .. | ||
| bootstrap-installer | ||
| desktop | ||
| shared | ||