A run cannot be abandoned #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reported from the running system.
RunStatus.ABANDONED, theosf.run.abandonedevent and itsreducer all exist, but nothing can emit the event: there is no route, no scheduler method and no
control in the UI. A run the operator has given up on stays
runningforever — holding a workspaceslot and an opencode server, counting against the run cap, and showing as live work everywhere.
Runs in this project's history have ended that way and the only cure was
kill. Most recentlysoundcheck #30 (run #5) had to be stopped by shutting osfd down, and restarting osfd would have
resumed it.
What it should do
POST /api/runs/{run_id}/abandonwith{reason, id}:osf.run.abandonedcarrying the operator's reason;id, like every other mutating route;what an append-only log exists to prevent.
abandoned).Acceptance
tests/unit/test_abandon.py(4 tests, currently failing) is the specification; do not weaken it.Plus: a running agent step's session is actually stopped, the run leaves the scheduler's active
set, and the UI control works end to end.
Dogfood #2 and #3's brief, filed as an issue. Source:
docs/issues/05-a-run-cannot-be-abandoned.md.Verified end to end and closing. The behaviour shipped in
465c9ad(feat: abandon a run), and this pass added the missing browser test (8e0a6e7). Nothing else needed to change, so there was no OpenSpec change for it.Checked against the acceptance list
POST /api/runs/{id}/abandon {reason, id}osf.run.abandonedwith the reason and the steps it is stopping;id;tests/unit/test_abandon.py: 4/4 pass, unweakened.ABANDON_SETTLE_S, then cancels every step that isn't terminal and expires its gates (test_liveness.py::test_abandoning_a_run_stops_its_running_step_and_ends_the_rest). The supervisor reaps the server of a run that is no longer live (test_runtime.py::test_reaping_stops_the_server_of_a_run_that_is_over_and_frees_the_slot).e2e/abandon.spec.ts: Escape sends nothing; confirm sends the reason once with an id; a 409 keeps the dialog open with the server's message; an ended run has no Abandon.Real osfd, end to end (scratch state dir, a run whose
explorestep was running with a liveopencode serveon :8900)abandoned;explorewas stopped and the 22 unstarted steps arecancelled;opencode stopped, slot released, and port 8900 was free;reason: "verifying Forgejo #9 from the page"andstopping: ["explore"].already_ended, and the abandoned run archived normally.The full Playwright suite passes: 37 passed, 3 skipped for live osfd.