concurrency: write the IO gates of slice G (eight files, a cancelled read per mechanism) #5
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
Write the gate of CONCURRENCY.md slice G, which is the only part of the slice still open: the machinery (blocking pool, IO thread and poller, cancellation of a wait) is built, but nothing yet proves the two "not before" rows of section 7 ("Cancelling a task that is waiting for the world") instead of assuming them.
Design point implemented
Acceptance criteria
tests/conformance/(with.expected,.exit, and a.workersfile if it needs more than one worker) starts eight file reads at once (one task per file, files written by the program itself) and prints the contents in a fixed order. It passes in the VM and natively on Linux, macOS and Windows, and the suite's zero-live-blocks leak gate (TORB_REPORT_LEAKS=1) passes for it.runtime/tests/(the test harness already fails any test whose live-block count differs before and after, so "counter at zero" is checked per test):runtime/stream.cpath);io_test.ccover socket receive, accept, datagram, child read; add or point to the one that asserts the registration is removed, if none does);A platform runs the mechanisms it has (Linux and the BSDs/macOS: poller + pool; Windows: IOCP + pool); each of the three is exercised on at least one platform of the CI matrix.
sh tools/gates.sh aandsh tools/gates.sh bare green;docs/change regeneratesskills/(torb docs skill docs skills).Seed impact
None expected: no syntax change, no new native, no driver flag, no std name looked up by string. Conformance programs and C runtime tests only. If a test exposes a defect in
runtime/stream.corruntime/io.c, fixing it is a separate commit and, if it changes behavior visible to programs, goes back to the owner.Size and commits
One PR, two Conventional Commits:
test(conformance): read eight files at onceandtest(runtime): cancel a read on each wait mechanism(docs status update folded into the second, or adocs:third only if the reviewer prefers; keep to two). Mostly test code.Suggested implementer
sonnet/medium (tests and docs). Escalate to opus/high only if a runtime defect shows up.
Dependencies
None known.
[loop:torbscript] intake: in scope (author orion, label loop). Completes CONCURRENCY.md slice G (machinery built, gate missing); design record is the specification, no collision with CONCEPT "Open Questions", no seed impact expected. Needs three platforms in CI (tier B). Release freeze for 0.1.0 (2026-10-06) holds new PRs, next: refine (queued, buffer >= 2 ready)
[loop:torbscript] claim refine by session:loop-torbscript-20261007 until 2026-10-07T20:53:50Z
[loop:torbscript] refine: body rewritten to the definition of ready (goal, testable criteria, design point CONCURRENCY.md slice G + section 7, no seed impact, one PR / two test commits, sonnet/medium). Everything is settled by the design record; no owner decision needed. Claim 600 released. Label ready set. next: implement
[loop:torbscript] claim implement by session:loop-torbscript-20261008 until 2026-10-08T04:11:50Z
[loop:torbscript] release implement: the previous implement worker was killed by a gateway recreate at about 22:32Z with uncommitted work left in its worktree (ROADMAP, CONCURRENCY and STREAMS docs, runtime/stream.c, runtime/tests/io_test.c, the eight-files conformance program). Resuming in the same worktree with a new worker, next: implement
[loop:torbscript] claim implement by session:loop-torbscript-20261008 until 2026-10-08T06:31:58Z
[loop:torbscript] implement: resumed the killed worker's work, finished and pushed it as three commits (conformance eight-file program, a runtime fix found by the pool test so a cancelled stream task stops when its call returns, the per-mechanism cancel tests plus the slice G status docs); forge CI green on
a2ce41fa(tier A, tier B, gates, pdisc). PR #162, worker usage ~300k tokens, next: review[loop:torbscript] PR #162 merged by argus (merge commit
a2ce41fa); CI on the merge commit was green (tier A, tier B linux-x64, gates, bootstrap, pdisc, commit messages). The eight-file gate and the per-mechanism cancel tests are on main, the slice G status note is updated. macOS (kqueue) and Windows (IOCP) paths run in the mirror workflow only. No after-merge steps. Issue closed by the PR; nothing further.