Repository navigation
fix(scheduler): finish the run without a window app on the computer - #1789
Conversation
A background shell whose process shows a window on the computer's display no longer holds the run at the completion boundary. Every other background shell holds it as before. Fixes #1785
|
@infer /model ollama_cloud/glm-5.3 can you review this PR? is it ready for merge? use /ponytail:ponytail /ponytail:ponytail-review /go /go-concurrency /clean-architecture /domain-driven-design |
|
Model: Todos
Pull Request✅ Infer Result: SuccessThe linux/other file pairing matches the package's established convention (implicit What this change does: a background shell whose process shows a window on the computer's display no longer holds the run at its completion boundary, so the run finishes while the person keeps the app open. Every other background shell - a build, a server, a long script - holds the run exactly as before. The scheduler asks the display through a new Is it ready for merge? The code is. I found no must-fix issue. The gates left are the ones the PR body already names: the three pending CI checks (postgres, test, e2e) and the manual end-to-end check on a live computer. What I verified on this runner:
Findings - nothing must fix, nothing should fix. Nice to have:
Verdict: Ship - after the manual end-to-end check on a live computer that the PR body already calls for, plus the three pending CI checks. Nothing in the code blocks merge. Not checked: the live GNOME behavior. This runner has no display and both web tools were blocked this run, so I could not independently confirm that the shell's Model: Tokens: 2,567,232 in · 45,681 out · 2,612,913 total (35 requests) Tool calls: 50 total · 100% success rate TracesStatsTriggered by edenreich · Infer Action · OSS |
|
🎉 This PR is included in version 0.253.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
On a computer, a window app the agent launched with a detached
Bashcall kept the run open after the final answer, until the app exited ora2a.task.agent_mode_max_wait_secondspassed. A background shell whose process shows a window on the computer's display no longer holds the run. Every other background shell - a build, a server, a long script - holds it exactly as before.Fixes #1785
Changes
internal/scheduler/domain- aWindowAppsport (does this process show a window, itself or through one it started) and an optionalJobSessionYielderjob extension, next toJobIdleReporter.internal/scheduler/jobs- the shell job yields the session while its process shows a window.Supervisor.HasPendingcopies the running session-holding jobs out and asks them outside its lock, because the answer is a D-Bus call.internal/computer/infrastructure/accessibility- the GNOME Wayland implementation, on the shellEvalpath the window listing already uses. Other platforms answer false.internal/platform/process-StartedBy, the walk up a process's parent chain.internal/container- wiresWindowAppsin only whencomputer_use.enabledis set.docs/computer-use.md, and a line in the scheduler README.The check is live. A shell whose window has not appeared yet keeps holding the run and is asked again each second, and one whose window closed while the process runs on holds the run again. An error asking the shell counts as no window, so the previous behaviour is the fallback.
Testing
task precommit:runandtask testpass, with new tests for the supervisor, the shell job and the parent-chain walk.ghcr.io/inference-gateway/computer:0.252.0pod and answered as expected.GNOME Wayland only - on other desktops a window app still holds the run.