Repository navigation
test(pending-input): end an omp turn through herdr's omp integration once it reported the session - #3646
test(pending-input): end an omp turn through herdr's omp integration once it reported the session#3646devswha wants to merge 1 commit into
Conversation
…once it reported the session ## Why "delivers queued /model as /switch to omp" in `server/pending-input.contract.test.ts` fails on a busy runner since #3624 (CI jobs 130322790784 and 130321428889): "queued command was not recorded" after 8.8 s, and its own 15 s frame wait, still running, then fails the next test ("pending frame timeout" / "pending event timeout" in "delivers to the same hookless process ..." or "holds a queued message when a hookless agent process is replaced ..."). The product is right; the fixture's report is refused. Since #3624 the setup reports an omp pane's session as herdr's omp integration (`source: "herdr:omp"`), so the queue does not wait for a starting omp. The test then ends the turn with `source: "manual"`. herdr (0.9.3, the CI runner image) takes a manual state for that pane only for about half a second after the integration's report; later ones are dropped without an error or a status event. Measured in the runner image, the manual idle took effect at 0, 50, 200, 300 and 500 ms after the report and was dropped at 700, 900, 1000 and 3000 ms, while a report from `herdr:omp` with a newer `seq` took effect at every delay. On a loaded runner the attach and the queue request between the two took longer than that: no `pane-status` frame came, so the queue never saw the turn end. ## What - `setup`'s `state` reports an omp pane's state from `herdr:omp`, with the integration's next `seq` and session path, once `ompReports` ran, as the Pi case already does from `herdr:pi`. Before that report (the starting-omp cases) it stays `manual`. - Test only. No assertion dropped or weakened. No timeout, sleep or retry added. ## Proof In `herdr-ci-runner:local`, CPUs 64-127, `bun run check run -- env HERDR_TEST_MODE=integration bun test --timeout 15000 ./server/pending-input.contract.test.ts`: - With a scratch-only 1.5 s pause before `state`'s report (not committed), `-t "to omp"`: before 5 of 5 runs fail both omp cases with CI's errors, after 5 of 5 pass. - Whole file, unchanged timing, on a quiet host (load 25-45): before 6 of 6 runs pass, after 6 of 6 (125 tests each). The window needs the load CI runs under, which the pause above stands in for. - `bun run check fast`: unit 15877 pass, 0 fail, 53 skip; every step ok.
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
|
Closing: #3644 (64bc36c) fixed the same flake by starting the stand-ins that are not about omp's start with --no-extensions, so no herdr:omp session is reported for them and herdr keeps taking their manual state reports. On main no test reports a state after ompReports() any more (the two omp-start tests call it last), so ending omp turns through herdr:omp would be unused code. The measurement here stays valid as the cause: herdr 0.9.3 drops a manual pane.report_agent about 0.5 s after a herdr:omp session report. |
Change
Test-only fix for the intermittent failure of
server/pending-input.contract.test.ts"connection-owned pending input > delivers queued /model as /switch to omp" since #3624 ("queued command was not recorded" after about 8.8 s). Its still-running 15 s frame wait then fails whichever test runs next, as "pending frame timeout" / "pending event timeout" in the #540 control tests. It turned unrelated PRs red: CI jobs 130322790784 (#3517), 130321428889 (#3639) and 130346162672 (#3645).Cause (measured in the self-hosted CI runner image)
Since #3624,
setup()reports an omp pane's session as herdr's omp integration (source: "herdr:omp"). The test then ends the turn withpane.report_agentfromsource: "manual". herdr 0.9.3 takes amanualstate for that pane only for about half a second after the integration's report; later ones are dropped with no error and no status event:manualidle sent N ms after the session reportworkingherdr:ompwith a newerseq, any delayOn a loaded runner, the attach and the queue request take longer than that window, so no
pane-statusframe comes and the queue never sees the turn end. The CI frame dumps show nopane-statusaftersubmit-result. #3624's product change is not involved: in these cases the stand-in omp has already reported its session, so nothing waits on it.Fix
Once
ompReports()has run,setup'sstate()reports an omp pane's state fromherdr:omp, with the integration's nextseqand the same session path. This is what a real omp does, and what the Pi case already does withherdr:pi. The starting-omp cases report beforeompReports()and staymanual. No assertion is weakened, and no sleep, timeout or retry is added.Validation
herdr-ci-runner:local(CPUs 64-127, the merge gate's integration command), with a scratch-only 1.5 s pause beforestate()'s report,-t "to omp":mainfailed 5 of 5 runs with CI's errors, this branch passed 5 of 5.bun run check fast: pass (unit 15877 pass, 0 fail).check full, browser suites. No changelog fragment: test-only.