language: a panic that ends its task, not the process (WEB F9) #107
Loading…
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?
Goal
A panic inside a task ends that task, not the process, so a server survives one bad handler. This reverses the rule
"a panic inside a task ends the process" and changes CONCURRENCY.md section 8 ("Panics are unchanged") with it.
Design record
process and a supervisor restarts it". Option (b) is this issue; the record says it "deserves the numbers of a
running server before it is made".
torb testare the only recovered panics.Status: not ready (waiting)
rule that programs and documentation rely on. The loop does not decide it. The owner question is filed when (2) is
met, with the measured numbers.
std/webdoes not exist onmain(std/hashttp,network,task, noweb); #94 (core)is open. There is no running server to measure what a panicking handler leaks.
What exists already (analysis of
main, runtime)runtime/panic.c:torb_begin_recovery/torb_end_recovery, a per-worker recovery point (worker->recovery);a panic with a point set jumps to it, otherwise exits 101.
runtime/task.c: a task of a test is resumed under a recovery point (torb_resume_recovered, selected intorb_run_onebytask->test != 0);torb_task_panickedrecords the failure, cancels the test's tasks, callstorb_region_abandon(windowsregions) andtorb_complete(self, task, false), so the awaiter readsFail(Cancelled)and pool counts stay exact. What the frame held stays allocated (CONCURRENCY.md, "A test owns thetasks it starts" and "A recovered panic gives up what it held", #258).
instead of
test != 0) and the policy for a panic outside a test (today!attributedends the process).Acceptance criteria (once decided; testable)
Task.startoption or astd/webserver loop)that panics completes as ended; the process continues and a sibling task finishes normally. Conformance test
tests/conformance/task-panic-recovered.trb: stdout of the sibling, exit code 0.Cancelledor a newPanickedcase, decided with the rule), with thepanic message and site available to the handler/logging; a test per outcome.
tests/conformance/task-panic-worker.trbunchanged).(blocks leaked by one recovered panic).
Workers.count() > 1) and in a region (windows) as the test scope does(
runtime/tests/pool_test.ccase).compiler/src/vm/interpret.trb) run the same conformance fileswith the same output.
skills/regenerated.Seed impact
Probably no seed change if the supervised marker is a runtime/std API on existing natives; yes (two-commit
rule, seed refresh stays the owner's) if it needs a new native or syntax. Settled when the rule is decided.
Size
Two Conventional Commits in one PR: (1)
feat(runtime): recover a panic in a supervised task(runtime, native backend, tests), (2)
feat(vm): ...with the docs. Larger than "ready" only because of the owner decision, not the code.[loop:torbscript] intake: in scope (author orion, label loop), source WEB.md F9, not a duplicate. A language rule that changes CONCURRENCY.md section 8: needs owner sign-off before implementation (owner decision to be filed at refine). next: waiting (refine queued, ready buffer full) until 2026-10-10T04:00:00Z
[loop:torbscript] claim refine by session:loop-torbscript-20261027 until 2026-10-27T03:00Z
[loop:torbscript] refine: body rewritten with goal, acceptance criteria, size and seed impact; not
ready. D10 in WEB.md was decided (a) by the owner for v1 and reserves (b) = this issue until "the numbers of a running server" exist;std/web(#94) is not on main, so there is nothing to measure. The owner question (flip the panic rule) is filed once those numbers exist, not now. The native recovery mechanism already exists for tests (task.ctorb_resume_recovered/torb_task_panicked), so the code part is about two commits. next: waiting (owner-reserved D10 decision needs the measurements of a running std/web server, #94). Worker usage: about 60k tokens (sonnet).std/webcore (WEB slice 2) #94