From d868f381bbd61fa6889fb6af01b9a6bb346870a9 Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Fri, 6 Nov 2026 23:26:06 -0600 Subject: [PATCH 01/20] node(sched): DRA-396 policy 1: fair fitting with reservation, admission tickets, leases; slots examined counted per read --- CONTRIBUTORS.md | 1 + seed/node/README.md | 102 +++++++- seed/node/auth-gate.om | 297 +++++++++++++++++++-- seed/node/journal-gate.om | 297 +++++++++++++++++++-- seed/node/journal.om | 9 +- seed/node/sched-gate.om | 288 ++++++++++++++++++-- seed/node/sched.om | 288 ++++++++++++++++++-- seed/node/schedpol-gate.om | 519 +++++++++++++++++++++++++++++++++++-- seed/node/schedpol-test.om | 231 ++++++++++++++++- 9 files changed, 1916 insertions(+), 116 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index f7fcf089a..7235d56cb 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -14,6 +14,7 @@ The current development method is [Human-Directed Agentic Engineering (HDAE)](RE | Claude Opus 5.5 (via omp) | DRA-289 for `seed/node`: `journal.om`, a checksummed append-only journal of every authority transition (OPEN, ADMIT, START, DONE, RELEASE, REVOKE, PAUSE, CANCEL), each checked by the recovery tables, written and fdatasync'd before anything acts on it or publishes it; a failed write or sync stops all later appends. `flock` fencing that forked workers also hold, fence numbers per creator incarnation, torn-tail cutting, refusal of corrupt records, other format versions and other objectives. Restart recovery settles operations left in flight (idempotent class 3 by its key, class 1 UNKNOWN and never rerun), releases or readmits each job, and restores authority generation and pause. `auth.om` journals through it and accepts class 3. `journal-gate.om` crashes real creators at every boundary, SIGKILLs them mid-tool and checks the result with its own reader; ten negative controls. Native AArch64 host evidence only; not QUALIFIED on the Spark gate. | | Claude Opus 5.5 (via omp) | DRA-290 for `seed/node`: `code.om`, the coding workflow driving the own Omega model (round40 checkpoint, served by aien-train `ollm serve` `/v1/completions`, aien-train #76) through the Node's scheduler, authority and journal: one inference at a time, typed read/check/replace jobs and a review check, each a cancellable child process group, the round40 repair policy enforced by the creator before every grant, explicit failure reasons and no fallback provider. `infer.om`, a bounded loopback-only completion client returning a versioned record; `tool.om`, the read/check/replace tools inside one root with omagent's path rule (moved to `seed/agent/path.om`), durable replace and sandboxed tests; `gram.om`, the repair grammar. `code-test.om` (54 checks, 15 mutants), `tests/tool-replay.py` (all 108 recorded round40 runs) and live own-model runs with cancellation and crash restart. `seed/agent/agent.om` now kills the tool's whole process group; `seed/authority/action.om` renames a local so the node composes as OM-2. Native AArch64 host evidence only; not QUALIFIED on the Spark gate. | | Claude Opus 5.5 (via omp, sched lane) | P-DRA-14 DRA-395 for `seed/node`: reconciled scheduler ownership (the spark-harness `Core::pump` at aien-sovereign-core-mv `dffdbd19` is reference-only and not deployed) and reproduced its head-of-line block in Rust and natively. `sched.om` gains four-kind resource requests packed in one word, capacity admission that refuses impossible requests and capacities below use, atomic take and release (also while a result waits for review room), and policy 0 (FIFO with the pump's head-of-line stop rule) behind one `sched_dispatch`. `schedpol-test.om` checks the capacity invariant after every creator step; its blocked-head phases print a checked witness and fail (exit 11) until fair fitting lands (DRA-396). Seven negative controls; independent review by openai-codex/gpt-6-astra. Native AArch64 host evidence only. | +| Claude Opus 5.5 (via omp, sched lane) | P-DRA-14 DRA-396 for `seed/node`: policy 1 in `sched.om`, now the default: fair fitting over a bounded window from a persistent cursor, oldest admitted first, a bypass budget that reserves the oldest bypassed job and holds back the capacity it still lacks, admission tickets so a full table cannot exclude a caller that keeps asking (`sched_room`, also asked by `jn_admit`), and leases reported once by `sched_overdue`. Slots examined are counted per read and checked against the window at every step. `schedpol-test.om` adds starvation, ticket, lease, reserved-cancel and window phases, with `fifo` and `noreserve` controls (exits 11 and 61) and eight new mutants. Native AArch64 host evidence only. | | Grok 4.7 (via Cursor Agent) | Merged main `fd3751b31` (#1020, carrying #1045 and #1050) into #1052. The only conflict was the generated root `.crumb` (child `last_commit` stamps, the `tests` digest, and the root digest). Recompiled with the crumb.lock tool (`d0f0b95d`); `crumb verify .` current. The #525/#962 pins were left as committed: `src/checker2/c2_check.c`, `src/compiler/osc_ir.c` and `src/compiler/osc_ir.h` still hash to the SHA-256s in `ACCEPTED`. | | Claude Opus 5.5 (via omp) | #1020 (actions/cache-4.3.0 ->6.1.0): merged main `d3d1b1bc` and recompiled the root crumb with the crumb.lock tool (`d0f0b95d`). The root crumb's source tree covers `.github/workflows/`, so the bump alone left it stale and `AIEN Checks` failed at `crumb verify .` (`1 of 188 crumbs stale`). | | Claude Opus 5.5 (via omp) | #1018 (actions/upload-artifact-4 ->7): merged main `d3d1b1bc` and recompiled the root crumb with the crumb.lock tool (`d0f0b95d`). The root crumb's source tree covers `.github/workflows/`, so the bump alone left it stale and `AIEN Checks` failed at `crumb verify .` (`1 of 188 crumbs stale`). | diff --git a/seed/node/README.md b/seed/node/README.md index 2ea2cddf3..6eeaeac66 100644 --- a/seed/node/README.md +++ b/seed/node/README.md @@ -373,16 +373,20 @@ authority, journal and the workflow stay with their DRA-286..290 owners. There is one scheduler: these are policies of `sched_dispatch`, not a second dispatcher. -Status (DRA-395): IMPLEMENTED: resource requests, capacity admission and -policy 0, FIFO head-of-line, which reproduces the stop rule of the reference -pump. The regression below fails on purpose until DRA-396 adds fair fitting. +Status: IMPLEMENTED: resource requests, capacity admission and policy 0, FIFO +head-of-line, which reproduces the stop rule of the reference pump (DRA-395); +policy 1, fair fitting with reservation, admission tickets and leases, the +default (DRA-396). The head-of-line regression fails under policy 0 and +passes under policy 1. ```sh cat seed/node/transport.om seed/node/pool.om seed/node/super.om seed/node/sched.om seed/node/schedpol-test.om > build/node/schedpol-composed.om cmp build/node/schedpol-composed.om seed/node/schedpol-gate.om seed/out/omc < seed/node/schedpol-gate.om > build/node/schedpol-gate chmod +x build/node/schedpol-gate -timeout 120 build/node/schedpol-gate # DRA-395: exit 11, the blocked head +timeout 300 build/node/schedpol-gate # policy 1: exit 0 +timeout 300 build/node/schedpol-gate fifo # policy 0: exit 11, the blocked head +timeout 300 build/node/schedpol-gate noreserve # no reservation: exit 61, starvation ``` ### Reference pump and ownership @@ -449,8 +453,8 @@ exclusion is therefore evidenced for Rust only. | --- | --- | | `sched_admitr id deps flags req` | `sched_admit` with a resource request; -8 when a kind exceeds its capacity (counted, never queued). | | `sched_cap caps` | Set every capacity; -8 and no change when a kind would fall below its use or below one admitted job's need. | -| `sched_policy p win db by` | Policy (0 only, for now), candidate window 1..64 slots, dispatch budget 1..64 per event, bypass budget 1..65535; -7 out of range. | -| `sched_stat i` | Counters 0..15, capacity 16..19, use 20..23, policy words 24..29. | +| `sched_policy p win db by ttl` | Policy 0 or 1, candidate window 1..64 slots, dispatch budget 1..64 per event, bypass budget 1..65535, ticket lifetime 1..1000000 dispatch events; -7 out of range. | +| `sched_stat i` | Counters 0..15 (10 tickets issued, 11 tickets lapsed, 12 leases overdue), capacity 16..19, use 20..23, policy words 24..31 (policy, window, budget, bypass budget, cursor, reserved slot + 1, tickets held, ticket lifetime). | Admission order (`sjarr`) and ready order (`sjrdy`) are logical counters, so selection never reads the clock. @@ -466,7 +470,7 @@ that every running job whose worker has not reported done holds its need. | C | requests over CPU, memory or inference capacity refused (-8) and counted; lowering a capacity below an admitted need, or below the use of two running jobs that each fit it alone, refused with nothing changed | 30..41, 130..134 | | D | 12 jobs with mixed needs on 3 workers, capacity 4 CPU, 1024 MiB, 1 inference: each runs once, all resources free at the end | 42..48 | | V | review limit 1: both 1-CPU jobs finish, one result waits for review room, yet both CPUs are free and a 2-CPU job runs | 120..126 | -| F | ready order: a job made ready by a later publication is served after one ready earlier | 50..57 | +| F | order between a job admitted first but made ready later by a publication (x) and one ready earlier (y): policy 0 serves y (ready order), policy 1 serves x (admission age) | 50..57 | | A | blocked head: a (3 CPU) runs, b (2 CPU) cannot fit, c (1 CPU) fits | 11 with the witness line | | B | a second head-of-line case after the pump's queue-of-two scenario: a runs, b and d (2 CPU) wait, e (1 CPU) fits | 21 with the witness line | @@ -476,7 +480,7 @@ and unfinished and holds its need, that the head is ready and does not fit, that the job behind it is ready and fits, that a live worker is idle and that dispatch stopped at the head; then it prints the witness and the phase returns 11 (21). Both phases always run; the first failure is the exit. -At DRA-395 the gate passes C, D, V and F and exits 11: +Under policy 0 (`fifo`) the gate passes C, D, V and F and exits 11: ``` schedpol hol witness head=20050 fits_behind=30050 free_cpu=1 idle_worker=1 hol_stops=40 @@ -494,7 +498,87 @@ command, output) is kept in `evidence/node-schedpol/rust-reference.*.json`. | `sp_give j` deleted from `sched_collect` (resources never returned) | 133 | | `sp_give j` moved after the review-room check in `sched_collect` (release waits for review) | 122 | | `if gt sp_need req k a` to `if false` in `sp_fits` (capacity ignored) | 44 | -| `sp_ready j` in `sched_publish` to `put sjst j 2` (ready order not stamped) | 54 | +| `sp_ready j` in `sched_publish` to `put sjst j 2` (ready order not stamped; a policy-0 property, run with `fifo`) | 54 | + +### Policy 1: fair fitting with reservation (DRA-396) + +Policy 1 is the default; policy 0 stays as the FIFO baseline for the +DRA-399 comparison. Both are arms of one `sched_dispatch`. + +Each pick reads at most `win` slots (default 64), starting at a cursor that +persists across dispatch events and moves on by `win` after each event, so +every slot is examined within ceil(64/`win`) events. Among the examined ready +jobs the pick takes the one admitted first (`sjarr`: unique, so no ties) that +fits. At most `db` jobs are assigned per event. Waiting age is the admission +order, kept when a rerunnable job goes back to ready after its worker died. +Under policy 1 phase F serves the job admitted first. + +A ready job admitted before the youngest job assigned in an event was +bypassed once. With no reservation, the oldest ready job at the bypass +budget `by` (default 4) is reserved. The reserved job is offered first; +while it does not fit, every other pick may use, of each kind, only the free +capacity beyond what the reserved job needs. Of each kind, +min(free, reserved need) therefore never falls, and the reserved job runs as +soon as running work has released enough. Assignment or cancellation of the +reserved job ends the reservation. + +Liveness rests on these assumptions: every running job ends (completes, or +its lease is enforced by the authority); at least one worker stays live; +dispatch runs after releases (every `sched_step` collects, then dispatches); +no request exceeds capacity (refused at admission, -8). Under them a reserved +job runs once the jobs running at its reservation have finished, and each +ready job is examined within ceil(64/`win`) events. There is one +reservation at a time, and it goes to the oldest job at the bypass budget. +A job at the budget therefore waits only for the reservations of jobs +admitted before it, a finite set; later arrivals never take the reservation +first. Workers are not a resource kind: the reserved job is offered first at +every pick, so it takes the first idle worker once it fits. + +Admission tickets. `sched_room id` refuses at the admission limit and gives +the refused caller a ticket; once below the limit, ticket holders enter in +ticket order before anyone new. `sched_admitr` and `jn_admit` (before it +journals ADMIT) ask it. A ticket not asked about for `ttl` dispatch events +(default 1000) lapses, so a caller that went away cannot hold the line; at +most 64 tickets are held, and a caller refused with the line full holds none. + +Leases. `sched_lease j ns` gives a job a lease counted from its assignment; +`sched_overdue` reports a running job past its lease whose worker has not +reported done, once. The authority then cancels or kills it, and the release +follows from the worker's report or the reap. The lease is a clock reading +used for reporting only; selection reads logical counters. + +| Function | Contract | +| --- | --- | +| `sched_room id` | May id be admitted now; a refused caller gets or keeps a ticket. | +| `sched_lease j ns` | Lease for a waiting, ready or running job, from its next assignment; 0 removes it; -3 otherwise. | +| `sched_overdue` | Slot of a running, unfinished job past its lease, reported once; 64 when none. | + +`schedpol-gate` takes one optional argument: `fifo` runs every phase under +policy 0, `noreserve` sets the bypass budget to 65535 (no reservation in +practice). Each step also checks the scan bound: the slots examined since the +last step are at most events × `db` × `win` (64 per pick under policy 0), +exit 9. + +| Phase | Scenario | Exit when it fails | +| --- | --- | --- | +| S | three workers, 4 CPU; 1-CPU jobs start staggered and each one finishing is replaced, so the CPUs are never all free at once; big (4 CPU) arrives: it is reserved and runs | 61 never ran (the `noreserve` control), 62..66 | +| Q | admission limit 2: X then Y refused hold tickets; with room for one, Y is refused and X admitted; Y enters later; a ticket not asked about lapses | 70..80 | +| L | 200 ms lease on a 3 s job not safe to rerun: reported once, after the lease; worker killed, job UNKNOWN, CPU free. A rerunnable job killed the same way keeps its admission age and completes | 81..89, 140..145 | +| R | the reserved job is cancelled: freed with no effect, reservation cleared | 90..97 | +| W | window 4, budget 2, 12 ready jobs in slots 0..11: every pick reads at most 4 slots and all 12 run | 9, 101..103 | + +Phases S to W run after A and B, so under `fifo` the gate stops at 11. + +| Change to `sched.om` | Expected exit | +| --- | --- | +| cursor never moves (`put scpol 4 …` deleted from `sp_after`) | 101 | +| tickets ignored (`n = get scpol 6` to `n = ulong 0` in `sched_room`) | 75 | +| no hold-back for the reserved job (`rq = get sjneed rj` to `rq = ulong 0`) | 61 | +| never reserve (`put scpol 5 add o 1` deleted) | 61 | +| lease never reported (`if ge now d` to `if false`) | 82 | +| cancel keeps the reservation | 94 | +| window ignored (`for i ulong win` to `for i ulong 64` in `sp_fair`) | 9 | +| tickets never lapse | 80 | ## Proposals, authority and cancellation (DRA-288) diff --git a/seed/node/auth-gate.om b/seed/node/auth-gate.om index b950adf40..5f4eb0e7d 100644 --- a/seed/node/auth-gate.om +++ b/seed/node/auth-gate.om @@ -949,8 +949,28 @@ note never in part. Every job also needs one idle live worker. note sjarr: admission order (waiting age; kept across reruns). sjrdy: order note in which the job last became ready. sjbyp: times it was bypassed. note Decisions read only these logical counters, never the clock. +note +note Policy 1, fair fitting (DRA-396): each pick examines at most win slots +note from a persistent cursor (which moves on by win per dispatch event, so +note every slot is examined within ceil(64/win) events) and takes the oldest +note admitted ready job that fits. A ready job older than a job assigned in +note the same event was bypassed; once the oldest such job reaches the +note bypass budget it is reserved: it is offered first, and no other job may +note use, of any kind, the capacity it still lacks (others may use only +note free capacity beyond its need). Neither the free capacity it can reach +note nor its age ever shrinks, so it runs once running work releases enough +note (liveness assumes: every running job ends, by completion or by its +note lease, at least one worker stays live, and dispatch runs after +note releases). Requests over capacity are refused at admission. +note Admission tickets: a caller refused at the admission limit holds a +note ticket; when room returns, ticket holders enter in ticket order before +note anyone new, so a full table cannot exclude a caller that keeps asking. +note A ticket not asked about for ttl dispatch events lapses. +note Leases: a running job with a lease is reported once by sched_overdue +note after its lease passes; the authority then cancels or kills it, which +note releases its resources. const SJCAP ulong 64 -const SPVER ulong 1 +const SPVER ulong 2 global scmap long 2 global sclim ulong 2 global sjst ulong 64 @@ -965,20 +985,25 @@ global sjheld ulong 64 global sjarr ulong 64 global sjrdy ulong 64 global sjbyp ulong 64 +global sjlse ulong 64 +global sjdue ulong 64 +global sttk ulong 64 +global stts ulong 64 global scbusy ulong 64 global scseq ulong 64 global swcur ulong 2 global scpause ulong 1 global scap ulong 4 global suse ulong 4 -note Policy words: 0 policy (0 FIFO head-of-line), 1 candidate window in -note slots, 2 dispatch budget per event, 3 bypass budget, 4 cursor, -note 5 reserved job slot + 1 (0 none). +note Policy words: 0 policy (0 FIFO head-of-line, 1 fair fitting), 1 +note candidate window in slots, 2 dispatch budget per event, 3 bypass +note budget, 4 cursor, 5 reserved job slot + 1 (0 none), 6 tickets held, +note 7 ticket lifetime in dispatch events. global scpol ulong 8 note Counters (sched_stat): 0 admissions, 1 ready stamps, 2 dispatch events, note 3 slots examined, 4 jobs assigned, 5 bypasses, 6 reservations made, note 7 impossible requests refused, 8 head-of-line stops, 9 reserved jobs -note assigned. +note assigned, 10 tickets issued, 11 tickets lapsed, 12 leases overdue. global scst ulong 16 fn sc_cell w ulong off ulong to ulong @@ -1018,6 +1043,8 @@ put sclim 1 rl for j ulong 64 put sjst j 0 put sjheld j 0 +put sjlse j 0 +put sjdue j 0 put scbusy j 0 put scseq j 0 end @@ -1028,12 +1055,14 @@ end for i ulong 16 put scst i 0 end -put scpol 0 0 +put scpol 0 1 put scpol 1 64 put scpol 2 64 put scpol 3 4 put scpol 4 0 put scpol 5 0 +put scpol 6 0 +put scpol 7 1000 put scpause 0 0 ret 0 end @@ -1105,7 +1134,7 @@ put scst 1 add get scst 1 1 end note Creator: counter i of scst, capacity (i 16..19) or use (i 20..23) of a -note kind, or policy word (i 24..29). +note kind, or policy word (i 24..31). fn sched_stat i ulong to ulong if lt i 16 ret get scst i @@ -1116,7 +1145,7 @@ end if lt i 24 ret get suse sub i 20 end -if lt i 30 +if lt i 32 ret get scpol sub i 24 end ret 0 @@ -1148,11 +1177,12 @@ end ret 0 end -note Creator: policy p (0 FIFO head-of-line), candidate window win slots -note (1..64), dispatch budget db jobs per event (1..64), bypass budget by -note (1..65535). The cursor and any reservation are kept. 0 or -7. -fn sched_policy p ulong win ulong db ulong by ulong to long -if gt p 0 +note Creator: policy p (0 FIFO head-of-line, 1 fair fitting), candidate +note window win slots (1..64), dispatch budget db jobs per event (1..64), +note bypass budget by (1..65535), ticket lifetime ttl dispatch events +note (1..1000000). The cursor and any reservation are kept. 0 or -7. +fn sched_policy p ulong win ulong db ulong by ulong ttl ulong to long +if gt p 1 ret neg long 7 end if or eq win 0 gt win 64 @@ -1164,10 +1194,14 @@ end if or eq by 0 gt by 65535 ret neg long 7 end +if or eq ttl 0 gt ttl 1000000 +ret neg long 7 +end put scpol 0 p put scpol 1 win put scpol 2 db put scpol 3 by +put scpol 7 ttl ret 0 end @@ -1192,22 +1226,99 @@ end ret n end +note Position of id's admission ticket, or 64. +fn sp_tkpos id ulong to ulong +for t ulong get scpol 6 bound 64 +if eq get sttk t id +ret t +end +end +ret 64 +end + +note Compact the tickets in order, dropping ticket d (64: none) and every +note ticket not asked about for the ticket lifetime. +fn sp_tkpack d ulong to void +k = ulong 0 +for t ulong get scpol 6 bound 64 +if ne t d +if lt add get stts t get scpol 7 get scst 2 +put scst 11 add get scst 11 1 +else +put sttk k get sttk t +put stts k get stts t +k = add k 1 +end +end +end +put scpol 6 k +end + +note Refresh ticket t, or give id a ticket at the end when it has none and +note the line has room (a caller refused with the line full holds none). +fn sp_tkhold id ulong t ulong to void +if lt t 64 +put stts t get scst 2 +ret +end +n = get scpol 6 +if lt n 64 +put sttk n id +put stts n get scst 2 +put scpol 6 add n 1 +put scst 10 add get scst 10 1 +end +end + +note Creator: may id be admitted now? Not at the admission limit; below it, +note ticket holders come first in ticket order, then anyone new. A refused +note caller gets or keeps a ticket. Asking again changes nothing else, so a +note caller may ask before sched_admitr (as jn_admit does). +fn sched_room id ulong to bool +sp_tkpack 64 +t = sp_tkpos id +if ge sched_count 1 3 get sclim 0 +sp_tkhold id t +ret false +end +n = get scpol 6 +if eq n 0 +ret true +end +room = sub get sclim 0 sched_count 1 3 +if lt t 64 +if lt t room +ret true +end +else +if gt room n +ret true +end +end +sp_tkhold id t +ret false +end + note Creator: admit job id needing req (packed resources). deps 0 makes it note ready at once; otherwise it waits for a publication whose topics meet note deps. flags bit 0: safe to rerun after its worker dies. Returns the job note slot; -8 when req exceeds the configured capacity of a kind (it could -note never run); -2 when admitted work (waiting, ready, running) is at its -note limit: refused, not queued. +note never run); -2 when sched_room refuses: at the admission limit, or +note ticket holders ahead; the caller keeps a ticket and asks again. fn sched_admitr id ulong deps ulong flags ulong req ulong to long if not sp_feas req put scst 7 add get scst 7 1 ret neg long 8 end -if ge sched_count 1 3 get sclim 0 +if not sched_room id ret neg long 2 end for j ulong 64 if eq get sjst j 0 +t = sp_tkpos id +if lt t 64 +sp_tkpack t +end put sjid j id put sjdep j deps put sjfl j flags @@ -1217,6 +1328,8 @@ put sjw j 0 put sjneed j req put sjheld j 0 put sjbyp j 0 +put sjlse j 0 +put sjdue j 0 put sjarr j get scst 0 put scst 0 add get scst 0 1 if eq deps 0 @@ -1230,6 +1343,50 @@ end ret neg long 2 end +note Creator: job j (waiting, ready or running) gets a lease of ns from its +note next assignment, or from now when it runs; 0 removes it. 0, or -3. +fn sched_lease j ulong ns ulong to long +if ge j 64 +ret neg long 3 +end +s = get sjst j +if or lt s 1 gt s 3 +ret neg long 3 +end +put sjlse j ns +if eq s 3 +put sjdue j 0 +if gt ns 0 +put sjdue j add ulong monons ns +end +end +ret 0 +end + +note Creator: a running job past its lease whose worker has not reported +note done, reported once (its deadline is cleared): its slot, or 64. The +note authority cancels or kills it; the release follows from the worker's +note report or reap. +fn sched_overdue to ulong +now = ulong monons +for j ulong 64 +if eq get sjst j 3 +d = get sjdue j +if gt d 0 +if ge now d +w = get sjw j +if ne sc_cell w 64 get scseq w +put sjdue j 0 +put scst 12 add get scst 12 1 +ret j +end +end +end +end +end +ret 64 +end + note Creator: sched_admitr with no resource need beyond one worker. fn sched_admit id ulong deps ulong flags ulong to long ret sched_admitr id deps flags 0 @@ -1270,6 +1427,10 @@ put sjst j 3 put sjw j w put sjatt j add get sjatt j 1 put sjbyp j 0 +put sjdue j 0 +if gt get sjlse j 0 +put sjdue j add ulong monons get sjlse j +end sp_take j if eq get scpol 5 add j 1 put scpol 5 0 @@ -1293,6 +1454,7 @@ note not fit holds back every later job. Returns the slot or 64. fn sp_fifo to ulong h = ulong 64 for j ulong 64 +put scst 3 add get scst 3 1 if eq get sjst j 2 if eq h 64 h = j @@ -1303,7 +1465,6 @@ end end end end -put scst 3 add get scst 3 64 if eq h 64 ret 64 end @@ -1314,6 +1475,83 @@ put scst 8 add get scst 8 1 ret 64 end +note Policy 1, fair fitting: the reserved job first when it fits; else the +note oldest admitted ready job, among win slots from the cursor, that fits +note without the capacity the reserved job still lacks. Returns the slot or +note 64. Work per pick is bounded by win. +fn sp_fair to ulong +rq = ulong 0 +r = get scpol 5 +if gt r 0 +rj = sub r 1 +if eq get sjst rj 2 +if sp_fits get sjneed rj 0 +ret rj +end +rq = get sjneed rj +else +put scpol 5 0 +end +end +win = get scpol 1 +cur = get scpol 4 +b = ulong 64 +for i ulong win bound 64 +put scst 3 add get scst 3 1 +j = rem add cur i 64 +if eq get sjst j 2 +if sp_fits get sjneed j rq +if eq b 64 +b = j +else +if lt get sjarr j get sjarr b +b = j +end +end +end +end +end +ret b +end + +note After a fair dispatch event in which ya - 1 was the youngest admission +note assigned (ya 0: none): every ready job admitted before it was bypassed +note once; with no reservation, the oldest job at the bypass budget is +note reserved. The cursor moves on by the window. +fn sp_after ya ulong to void +if gt ya 0 +for j ulong 64 +if eq get sjst j 2 +if lt add get sjarr j 1 ya +put sjbyp j add get sjbyp j 1 +put scst 5 add get scst 5 1 +end +end +end +end +if eq get scpol 5 0 +o = ulong 64 +for j ulong 64 +if eq get sjst j 2 +if ge get sjbyp j get scpol 3 +if eq o 64 +o = j +else +if lt get sjarr j get sjarr o +o = j +end +end +end +end +end +if lt o 64 +put scpol 5 add o 1 +put scst 6 add get scst 6 1 +end +end +put scpol 4 rem add get scpol 4 get scpol 1 64 +end + note Creator: assign ready jobs to idle live workers under the policy, at note most the dispatch budget per call. Returns the number assigned. fn sched_dispatch c long to ulong @@ -1322,19 +1560,32 @@ ret 0 end n = mapget c 48 8 k = ulong 0 +ya = ulong 0 +fair = eq get scpol 0 1 put scst 2 add get scst 2 1 for i ulong get scpol 2 bound 64 w = sp_idle n if ge w 64 break end +j = ulong 64 +if fair +j = sp_fair +else j = sp_fifo +end if ge j 64 break end +if gt add get sjarr j 1 ya +ya = add get sjarr j 1 +end sp_start c j w k = add k 1 end +if fair +sp_after ya +end ret k end @@ -1492,6 +1743,9 @@ end s = get sjst j if or eq s 1 eq s 2 put sjst j 0 +if eq get scpol 5 add j 1 +put scpol 5 0 +end ret 1 end if eq s 3 @@ -2454,11 +2708,12 @@ end ret 0 end -note Admit job id durably: ADMIT is appended before sched_admit. -2 at the -note admission limit, -4 an id already in the journal, -5 the journal -note refused, else sched_admit's slot. +note Admit job id durably: ADMIT is appended before sched_admit. -2 when +note sched_room refuses (admission limit, or ticket holders ahead), -4 an +note id already in the journal, -5 the journal refused, else sched_admit's +note slot. fn jn_admit id ulong deps ulong flags ulong to long -if ge sched_count 1 3 get sclim 0 +if not sched_room id ret neg long 2 end if ge jn_jfind id 0 diff --git a/seed/node/journal-gate.om b/seed/node/journal-gate.om index 25cad1073..538a6b7fc 100644 --- a/seed/node/journal-gate.om +++ b/seed/node/journal-gate.om @@ -949,8 +949,28 @@ note never in part. Every job also needs one idle live worker. note sjarr: admission order (waiting age; kept across reruns). sjrdy: order note in which the job last became ready. sjbyp: times it was bypassed. note Decisions read only these logical counters, never the clock. +note +note Policy 1, fair fitting (DRA-396): each pick examines at most win slots +note from a persistent cursor (which moves on by win per dispatch event, so +note every slot is examined within ceil(64/win) events) and takes the oldest +note admitted ready job that fits. A ready job older than a job assigned in +note the same event was bypassed; once the oldest such job reaches the +note bypass budget it is reserved: it is offered first, and no other job may +note use, of any kind, the capacity it still lacks (others may use only +note free capacity beyond its need). Neither the free capacity it can reach +note nor its age ever shrinks, so it runs once running work releases enough +note (liveness assumes: every running job ends, by completion or by its +note lease, at least one worker stays live, and dispatch runs after +note releases). Requests over capacity are refused at admission. +note Admission tickets: a caller refused at the admission limit holds a +note ticket; when room returns, ticket holders enter in ticket order before +note anyone new, so a full table cannot exclude a caller that keeps asking. +note A ticket not asked about for ttl dispatch events lapses. +note Leases: a running job with a lease is reported once by sched_overdue +note after its lease passes; the authority then cancels or kills it, which +note releases its resources. const SJCAP ulong 64 -const SPVER ulong 1 +const SPVER ulong 2 global scmap long 2 global sclim ulong 2 global sjst ulong 64 @@ -965,20 +985,25 @@ global sjheld ulong 64 global sjarr ulong 64 global sjrdy ulong 64 global sjbyp ulong 64 +global sjlse ulong 64 +global sjdue ulong 64 +global sttk ulong 64 +global stts ulong 64 global scbusy ulong 64 global scseq ulong 64 global swcur ulong 2 global scpause ulong 1 global scap ulong 4 global suse ulong 4 -note Policy words: 0 policy (0 FIFO head-of-line), 1 candidate window in -note slots, 2 dispatch budget per event, 3 bypass budget, 4 cursor, -note 5 reserved job slot + 1 (0 none). +note Policy words: 0 policy (0 FIFO head-of-line, 1 fair fitting), 1 +note candidate window in slots, 2 dispatch budget per event, 3 bypass +note budget, 4 cursor, 5 reserved job slot + 1 (0 none), 6 tickets held, +note 7 ticket lifetime in dispatch events. global scpol ulong 8 note Counters (sched_stat): 0 admissions, 1 ready stamps, 2 dispatch events, note 3 slots examined, 4 jobs assigned, 5 bypasses, 6 reservations made, note 7 impossible requests refused, 8 head-of-line stops, 9 reserved jobs -note assigned. +note assigned, 10 tickets issued, 11 tickets lapsed, 12 leases overdue. global scst ulong 16 fn sc_cell w ulong off ulong to ulong @@ -1018,6 +1043,8 @@ put sclim 1 rl for j ulong 64 put sjst j 0 put sjheld j 0 +put sjlse j 0 +put sjdue j 0 put scbusy j 0 put scseq j 0 end @@ -1028,12 +1055,14 @@ end for i ulong 16 put scst i 0 end -put scpol 0 0 +put scpol 0 1 put scpol 1 64 put scpol 2 64 put scpol 3 4 put scpol 4 0 put scpol 5 0 +put scpol 6 0 +put scpol 7 1000 put scpause 0 0 ret 0 end @@ -1105,7 +1134,7 @@ put scst 1 add get scst 1 1 end note Creator: counter i of scst, capacity (i 16..19) or use (i 20..23) of a -note kind, or policy word (i 24..29). +note kind, or policy word (i 24..31). fn sched_stat i ulong to ulong if lt i 16 ret get scst i @@ -1116,7 +1145,7 @@ end if lt i 24 ret get suse sub i 20 end -if lt i 30 +if lt i 32 ret get scpol sub i 24 end ret 0 @@ -1148,11 +1177,12 @@ end ret 0 end -note Creator: policy p (0 FIFO head-of-line), candidate window win slots -note (1..64), dispatch budget db jobs per event (1..64), bypass budget by -note (1..65535). The cursor and any reservation are kept. 0 or -7. -fn sched_policy p ulong win ulong db ulong by ulong to long -if gt p 0 +note Creator: policy p (0 FIFO head-of-line, 1 fair fitting), candidate +note window win slots (1..64), dispatch budget db jobs per event (1..64), +note bypass budget by (1..65535), ticket lifetime ttl dispatch events +note (1..1000000). The cursor and any reservation are kept. 0 or -7. +fn sched_policy p ulong win ulong db ulong by ulong ttl ulong to long +if gt p 1 ret neg long 7 end if or eq win 0 gt win 64 @@ -1164,10 +1194,14 @@ end if or eq by 0 gt by 65535 ret neg long 7 end +if or eq ttl 0 gt ttl 1000000 +ret neg long 7 +end put scpol 0 p put scpol 1 win put scpol 2 db put scpol 3 by +put scpol 7 ttl ret 0 end @@ -1192,22 +1226,99 @@ end ret n end +note Position of id's admission ticket, or 64. +fn sp_tkpos id ulong to ulong +for t ulong get scpol 6 bound 64 +if eq get sttk t id +ret t +end +end +ret 64 +end + +note Compact the tickets in order, dropping ticket d (64: none) and every +note ticket not asked about for the ticket lifetime. +fn sp_tkpack d ulong to void +k = ulong 0 +for t ulong get scpol 6 bound 64 +if ne t d +if lt add get stts t get scpol 7 get scst 2 +put scst 11 add get scst 11 1 +else +put sttk k get sttk t +put stts k get stts t +k = add k 1 +end +end +end +put scpol 6 k +end + +note Refresh ticket t, or give id a ticket at the end when it has none and +note the line has room (a caller refused with the line full holds none). +fn sp_tkhold id ulong t ulong to void +if lt t 64 +put stts t get scst 2 +ret +end +n = get scpol 6 +if lt n 64 +put sttk n id +put stts n get scst 2 +put scpol 6 add n 1 +put scst 10 add get scst 10 1 +end +end + +note Creator: may id be admitted now? Not at the admission limit; below it, +note ticket holders come first in ticket order, then anyone new. A refused +note caller gets or keeps a ticket. Asking again changes nothing else, so a +note caller may ask before sched_admitr (as jn_admit does). +fn sched_room id ulong to bool +sp_tkpack 64 +t = sp_tkpos id +if ge sched_count 1 3 get sclim 0 +sp_tkhold id t +ret false +end +n = get scpol 6 +if eq n 0 +ret true +end +room = sub get sclim 0 sched_count 1 3 +if lt t 64 +if lt t room +ret true +end +else +if gt room n +ret true +end +end +sp_tkhold id t +ret false +end + note Creator: admit job id needing req (packed resources). deps 0 makes it note ready at once; otherwise it waits for a publication whose topics meet note deps. flags bit 0: safe to rerun after its worker dies. Returns the job note slot; -8 when req exceeds the configured capacity of a kind (it could -note never run); -2 when admitted work (waiting, ready, running) is at its -note limit: refused, not queued. +note never run); -2 when sched_room refuses: at the admission limit, or +note ticket holders ahead; the caller keeps a ticket and asks again. fn sched_admitr id ulong deps ulong flags ulong req ulong to long if not sp_feas req put scst 7 add get scst 7 1 ret neg long 8 end -if ge sched_count 1 3 get sclim 0 +if not sched_room id ret neg long 2 end for j ulong 64 if eq get sjst j 0 +t = sp_tkpos id +if lt t 64 +sp_tkpack t +end put sjid j id put sjdep j deps put sjfl j flags @@ -1217,6 +1328,8 @@ put sjw j 0 put sjneed j req put sjheld j 0 put sjbyp j 0 +put sjlse j 0 +put sjdue j 0 put sjarr j get scst 0 put scst 0 add get scst 0 1 if eq deps 0 @@ -1230,6 +1343,50 @@ end ret neg long 2 end +note Creator: job j (waiting, ready or running) gets a lease of ns from its +note next assignment, or from now when it runs; 0 removes it. 0, or -3. +fn sched_lease j ulong ns ulong to long +if ge j 64 +ret neg long 3 +end +s = get sjst j +if or lt s 1 gt s 3 +ret neg long 3 +end +put sjlse j ns +if eq s 3 +put sjdue j 0 +if gt ns 0 +put sjdue j add ulong monons ns +end +end +ret 0 +end + +note Creator: a running job past its lease whose worker has not reported +note done, reported once (its deadline is cleared): its slot, or 64. The +note authority cancels or kills it; the release follows from the worker's +note report or reap. +fn sched_overdue to ulong +now = ulong monons +for j ulong 64 +if eq get sjst j 3 +d = get sjdue j +if gt d 0 +if ge now d +w = get sjw j +if ne sc_cell w 64 get scseq w +put sjdue j 0 +put scst 12 add get scst 12 1 +ret j +end +end +end +end +end +ret 64 +end + note Creator: sched_admitr with no resource need beyond one worker. fn sched_admit id ulong deps ulong flags ulong to long ret sched_admitr id deps flags 0 @@ -1270,6 +1427,10 @@ put sjst j 3 put sjw j w put sjatt j add get sjatt j 1 put sjbyp j 0 +put sjdue j 0 +if gt get sjlse j 0 +put sjdue j add ulong monons get sjlse j +end sp_take j if eq get scpol 5 add j 1 put scpol 5 0 @@ -1293,6 +1454,7 @@ note not fit holds back every later job. Returns the slot or 64. fn sp_fifo to ulong h = ulong 64 for j ulong 64 +put scst 3 add get scst 3 1 if eq get sjst j 2 if eq h 64 h = j @@ -1303,7 +1465,6 @@ end end end end -put scst 3 add get scst 3 64 if eq h 64 ret 64 end @@ -1314,6 +1475,83 @@ put scst 8 add get scst 8 1 ret 64 end +note Policy 1, fair fitting: the reserved job first when it fits; else the +note oldest admitted ready job, among win slots from the cursor, that fits +note without the capacity the reserved job still lacks. Returns the slot or +note 64. Work per pick is bounded by win. +fn sp_fair to ulong +rq = ulong 0 +r = get scpol 5 +if gt r 0 +rj = sub r 1 +if eq get sjst rj 2 +if sp_fits get sjneed rj 0 +ret rj +end +rq = get sjneed rj +else +put scpol 5 0 +end +end +win = get scpol 1 +cur = get scpol 4 +b = ulong 64 +for i ulong win bound 64 +put scst 3 add get scst 3 1 +j = rem add cur i 64 +if eq get sjst j 2 +if sp_fits get sjneed j rq +if eq b 64 +b = j +else +if lt get sjarr j get sjarr b +b = j +end +end +end +end +end +ret b +end + +note After a fair dispatch event in which ya - 1 was the youngest admission +note assigned (ya 0: none): every ready job admitted before it was bypassed +note once; with no reservation, the oldest job at the bypass budget is +note reserved. The cursor moves on by the window. +fn sp_after ya ulong to void +if gt ya 0 +for j ulong 64 +if eq get sjst j 2 +if lt add get sjarr j 1 ya +put sjbyp j add get sjbyp j 1 +put scst 5 add get scst 5 1 +end +end +end +end +if eq get scpol 5 0 +o = ulong 64 +for j ulong 64 +if eq get sjst j 2 +if ge get sjbyp j get scpol 3 +if eq o 64 +o = j +else +if lt get sjarr j get sjarr o +o = j +end +end +end +end +end +if lt o 64 +put scpol 5 add o 1 +put scst 6 add get scst 6 1 +end +end +put scpol 4 rem add get scpol 4 get scpol 1 64 +end + note Creator: assign ready jobs to idle live workers under the policy, at note most the dispatch budget per call. Returns the number assigned. fn sched_dispatch c long to ulong @@ -1322,19 +1560,32 @@ ret 0 end n = mapget c 48 8 k = ulong 0 +ya = ulong 0 +fair = eq get scpol 0 1 put scst 2 add get scst 2 1 for i ulong get scpol 2 bound 64 w = sp_idle n if ge w 64 break end +j = ulong 64 +if fair +j = sp_fair +else j = sp_fifo +end if ge j 64 break end +if gt add get sjarr j 1 ya +ya = add get sjarr j 1 +end sp_start c j w k = add k 1 end +if fair +sp_after ya +end ret k end @@ -1492,6 +1743,9 @@ end s = get sjst j if or eq s 1 eq s 2 put sjst j 0 +if eq get scpol 5 add j 1 +put scpol 5 0 +end ret 1 end if eq s 3 @@ -2454,11 +2708,12 @@ end ret 0 end -note Admit job id durably: ADMIT is appended before sched_admit. -2 at the -note admission limit, -4 an id already in the journal, -5 the journal -note refused, else sched_admit's slot. +note Admit job id durably: ADMIT is appended before sched_admit. -2 when +note sched_room refuses (admission limit, or ticket holders ahead), -4 an +note id already in the journal, -5 the journal refused, else sched_admit's +note slot. fn jn_admit id ulong deps ulong flags ulong to long -if ge sched_count 1 3 get sclim 0 +if not sched_room id ret neg long 2 end if ge jn_jfind id 0 diff --git a/seed/node/journal.om b/seed/node/journal.om index df3369b4b..fec3efe22 100644 --- a/seed/node/journal.om +++ b/seed/node/journal.om @@ -684,11 +684,12 @@ end ret 0 end -note Admit job id durably: ADMIT is appended before sched_admit. -2 at the -note admission limit, -4 an id already in the journal, -5 the journal -note refused, else sched_admit's slot. +note Admit job id durably: ADMIT is appended before sched_admit. -2 when +note sched_room refuses (admission limit, or ticket holders ahead), -4 an +note id already in the journal, -5 the journal refused, else sched_admit's +note slot. fn jn_admit id ulong deps ulong flags ulong to long -if ge sched_count 1 3 get sclim 0 +if not sched_room id ret neg long 2 end if ge jn_jfind id 0 diff --git a/seed/node/sched-gate.om b/seed/node/sched-gate.om index 4039ce563..0bfafba9f 100644 --- a/seed/node/sched-gate.om +++ b/seed/node/sched-gate.om @@ -949,8 +949,28 @@ note never in part. Every job also needs one idle live worker. note sjarr: admission order (waiting age; kept across reruns). sjrdy: order note in which the job last became ready. sjbyp: times it was bypassed. note Decisions read only these logical counters, never the clock. +note +note Policy 1, fair fitting (DRA-396): each pick examines at most win slots +note from a persistent cursor (which moves on by win per dispatch event, so +note every slot is examined within ceil(64/win) events) and takes the oldest +note admitted ready job that fits. A ready job older than a job assigned in +note the same event was bypassed; once the oldest such job reaches the +note bypass budget it is reserved: it is offered first, and no other job may +note use, of any kind, the capacity it still lacks (others may use only +note free capacity beyond its need). Neither the free capacity it can reach +note nor its age ever shrinks, so it runs once running work releases enough +note (liveness assumes: every running job ends, by completion or by its +note lease, at least one worker stays live, and dispatch runs after +note releases). Requests over capacity are refused at admission. +note Admission tickets: a caller refused at the admission limit holds a +note ticket; when room returns, ticket holders enter in ticket order before +note anyone new, so a full table cannot exclude a caller that keeps asking. +note A ticket not asked about for ttl dispatch events lapses. +note Leases: a running job with a lease is reported once by sched_overdue +note after its lease passes; the authority then cancels or kills it, which +note releases its resources. const SJCAP ulong 64 -const SPVER ulong 1 +const SPVER ulong 2 global scmap long 2 global sclim ulong 2 global sjst ulong 64 @@ -965,20 +985,25 @@ global sjheld ulong 64 global sjarr ulong 64 global sjrdy ulong 64 global sjbyp ulong 64 +global sjlse ulong 64 +global sjdue ulong 64 +global sttk ulong 64 +global stts ulong 64 global scbusy ulong 64 global scseq ulong 64 global swcur ulong 2 global scpause ulong 1 global scap ulong 4 global suse ulong 4 -note Policy words: 0 policy (0 FIFO head-of-line), 1 candidate window in -note slots, 2 dispatch budget per event, 3 bypass budget, 4 cursor, -note 5 reserved job slot + 1 (0 none). +note Policy words: 0 policy (0 FIFO head-of-line, 1 fair fitting), 1 +note candidate window in slots, 2 dispatch budget per event, 3 bypass +note budget, 4 cursor, 5 reserved job slot + 1 (0 none), 6 tickets held, +note 7 ticket lifetime in dispatch events. global scpol ulong 8 note Counters (sched_stat): 0 admissions, 1 ready stamps, 2 dispatch events, note 3 slots examined, 4 jobs assigned, 5 bypasses, 6 reservations made, note 7 impossible requests refused, 8 head-of-line stops, 9 reserved jobs -note assigned. +note assigned, 10 tickets issued, 11 tickets lapsed, 12 leases overdue. global scst ulong 16 fn sc_cell w ulong off ulong to ulong @@ -1018,6 +1043,8 @@ put sclim 1 rl for j ulong 64 put sjst j 0 put sjheld j 0 +put sjlse j 0 +put sjdue j 0 put scbusy j 0 put scseq j 0 end @@ -1028,12 +1055,14 @@ end for i ulong 16 put scst i 0 end -put scpol 0 0 +put scpol 0 1 put scpol 1 64 put scpol 2 64 put scpol 3 4 put scpol 4 0 put scpol 5 0 +put scpol 6 0 +put scpol 7 1000 put scpause 0 0 ret 0 end @@ -1105,7 +1134,7 @@ put scst 1 add get scst 1 1 end note Creator: counter i of scst, capacity (i 16..19) or use (i 20..23) of a -note kind, or policy word (i 24..29). +note kind, or policy word (i 24..31). fn sched_stat i ulong to ulong if lt i 16 ret get scst i @@ -1116,7 +1145,7 @@ end if lt i 24 ret get suse sub i 20 end -if lt i 30 +if lt i 32 ret get scpol sub i 24 end ret 0 @@ -1148,11 +1177,12 @@ end ret 0 end -note Creator: policy p (0 FIFO head-of-line), candidate window win slots -note (1..64), dispatch budget db jobs per event (1..64), bypass budget by -note (1..65535). The cursor and any reservation are kept. 0 or -7. -fn sched_policy p ulong win ulong db ulong by ulong to long -if gt p 0 +note Creator: policy p (0 FIFO head-of-line, 1 fair fitting), candidate +note window win slots (1..64), dispatch budget db jobs per event (1..64), +note bypass budget by (1..65535), ticket lifetime ttl dispatch events +note (1..1000000). The cursor and any reservation are kept. 0 or -7. +fn sched_policy p ulong win ulong db ulong by ulong ttl ulong to long +if gt p 1 ret neg long 7 end if or eq win 0 gt win 64 @@ -1164,10 +1194,14 @@ end if or eq by 0 gt by 65535 ret neg long 7 end +if or eq ttl 0 gt ttl 1000000 +ret neg long 7 +end put scpol 0 p put scpol 1 win put scpol 2 db put scpol 3 by +put scpol 7 ttl ret 0 end @@ -1192,22 +1226,99 @@ end ret n end +note Position of id's admission ticket, or 64. +fn sp_tkpos id ulong to ulong +for t ulong get scpol 6 bound 64 +if eq get sttk t id +ret t +end +end +ret 64 +end + +note Compact the tickets in order, dropping ticket d (64: none) and every +note ticket not asked about for the ticket lifetime. +fn sp_tkpack d ulong to void +k = ulong 0 +for t ulong get scpol 6 bound 64 +if ne t d +if lt add get stts t get scpol 7 get scst 2 +put scst 11 add get scst 11 1 +else +put sttk k get sttk t +put stts k get stts t +k = add k 1 +end +end +end +put scpol 6 k +end + +note Refresh ticket t, or give id a ticket at the end when it has none and +note the line has room (a caller refused with the line full holds none). +fn sp_tkhold id ulong t ulong to void +if lt t 64 +put stts t get scst 2 +ret +end +n = get scpol 6 +if lt n 64 +put sttk n id +put stts n get scst 2 +put scpol 6 add n 1 +put scst 10 add get scst 10 1 +end +end + +note Creator: may id be admitted now? Not at the admission limit; below it, +note ticket holders come first in ticket order, then anyone new. A refused +note caller gets or keeps a ticket. Asking again changes nothing else, so a +note caller may ask before sched_admitr (as jn_admit does). +fn sched_room id ulong to bool +sp_tkpack 64 +t = sp_tkpos id +if ge sched_count 1 3 get sclim 0 +sp_tkhold id t +ret false +end +n = get scpol 6 +if eq n 0 +ret true +end +room = sub get sclim 0 sched_count 1 3 +if lt t 64 +if lt t room +ret true +end +else +if gt room n +ret true +end +end +sp_tkhold id t +ret false +end + note Creator: admit job id needing req (packed resources). deps 0 makes it note ready at once; otherwise it waits for a publication whose topics meet note deps. flags bit 0: safe to rerun after its worker dies. Returns the job note slot; -8 when req exceeds the configured capacity of a kind (it could -note never run); -2 when admitted work (waiting, ready, running) is at its -note limit: refused, not queued. +note never run); -2 when sched_room refuses: at the admission limit, or +note ticket holders ahead; the caller keeps a ticket and asks again. fn sched_admitr id ulong deps ulong flags ulong req ulong to long if not sp_feas req put scst 7 add get scst 7 1 ret neg long 8 end -if ge sched_count 1 3 get sclim 0 +if not sched_room id ret neg long 2 end for j ulong 64 if eq get sjst j 0 +t = sp_tkpos id +if lt t 64 +sp_tkpack t +end put sjid j id put sjdep j deps put sjfl j flags @@ -1217,6 +1328,8 @@ put sjw j 0 put sjneed j req put sjheld j 0 put sjbyp j 0 +put sjlse j 0 +put sjdue j 0 put sjarr j get scst 0 put scst 0 add get scst 0 1 if eq deps 0 @@ -1230,6 +1343,50 @@ end ret neg long 2 end +note Creator: job j (waiting, ready or running) gets a lease of ns from its +note next assignment, or from now when it runs; 0 removes it. 0, or -3. +fn sched_lease j ulong ns ulong to long +if ge j 64 +ret neg long 3 +end +s = get sjst j +if or lt s 1 gt s 3 +ret neg long 3 +end +put sjlse j ns +if eq s 3 +put sjdue j 0 +if gt ns 0 +put sjdue j add ulong monons ns +end +end +ret 0 +end + +note Creator: a running job past its lease whose worker has not reported +note done, reported once (its deadline is cleared): its slot, or 64. The +note authority cancels or kills it; the release follows from the worker's +note report or reap. +fn sched_overdue to ulong +now = ulong monons +for j ulong 64 +if eq get sjst j 3 +d = get sjdue j +if gt d 0 +if ge now d +w = get sjw j +if ne sc_cell w 64 get scseq w +put sjdue j 0 +put scst 12 add get scst 12 1 +ret j +end +end +end +end +end +ret 64 +end + note Creator: sched_admitr with no resource need beyond one worker. fn sched_admit id ulong deps ulong flags ulong to long ret sched_admitr id deps flags 0 @@ -1270,6 +1427,10 @@ put sjst j 3 put sjw j w put sjatt j add get sjatt j 1 put sjbyp j 0 +put sjdue j 0 +if gt get sjlse j 0 +put sjdue j add ulong monons get sjlse j +end sp_take j if eq get scpol 5 add j 1 put scpol 5 0 @@ -1293,6 +1454,7 @@ note not fit holds back every later job. Returns the slot or 64. fn sp_fifo to ulong h = ulong 64 for j ulong 64 +put scst 3 add get scst 3 1 if eq get sjst j 2 if eq h 64 h = j @@ -1303,7 +1465,6 @@ end end end end -put scst 3 add get scst 3 64 if eq h 64 ret 64 end @@ -1314,6 +1475,83 @@ put scst 8 add get scst 8 1 ret 64 end +note Policy 1, fair fitting: the reserved job first when it fits; else the +note oldest admitted ready job, among win slots from the cursor, that fits +note without the capacity the reserved job still lacks. Returns the slot or +note 64. Work per pick is bounded by win. +fn sp_fair to ulong +rq = ulong 0 +r = get scpol 5 +if gt r 0 +rj = sub r 1 +if eq get sjst rj 2 +if sp_fits get sjneed rj 0 +ret rj +end +rq = get sjneed rj +else +put scpol 5 0 +end +end +win = get scpol 1 +cur = get scpol 4 +b = ulong 64 +for i ulong win bound 64 +put scst 3 add get scst 3 1 +j = rem add cur i 64 +if eq get sjst j 2 +if sp_fits get sjneed j rq +if eq b 64 +b = j +else +if lt get sjarr j get sjarr b +b = j +end +end +end +end +end +ret b +end + +note After a fair dispatch event in which ya - 1 was the youngest admission +note assigned (ya 0: none): every ready job admitted before it was bypassed +note once; with no reservation, the oldest job at the bypass budget is +note reserved. The cursor moves on by the window. +fn sp_after ya ulong to void +if gt ya 0 +for j ulong 64 +if eq get sjst j 2 +if lt add get sjarr j 1 ya +put sjbyp j add get sjbyp j 1 +put scst 5 add get scst 5 1 +end +end +end +end +if eq get scpol 5 0 +o = ulong 64 +for j ulong 64 +if eq get sjst j 2 +if ge get sjbyp j get scpol 3 +if eq o 64 +o = j +else +if lt get sjarr j get sjarr o +o = j +end +end +end +end +end +if lt o 64 +put scpol 5 add o 1 +put scst 6 add get scst 6 1 +end +end +put scpol 4 rem add get scpol 4 get scpol 1 64 +end + note Creator: assign ready jobs to idle live workers under the policy, at note most the dispatch budget per call. Returns the number assigned. fn sched_dispatch c long to ulong @@ -1322,19 +1560,32 @@ ret 0 end n = mapget c 48 8 k = ulong 0 +ya = ulong 0 +fair = eq get scpol 0 1 put scst 2 add get scst 2 1 for i ulong get scpol 2 bound 64 w = sp_idle n if ge w 64 break end +j = ulong 64 +if fair +j = sp_fair +else j = sp_fifo +end if ge j 64 break end +if gt add get sjarr j 1 ya +ya = add get sjarr j 1 +end sp_start c j w k = add k 1 end +if fair +sp_after ya +end ret k end @@ -1492,6 +1743,9 @@ end s = get sjst j if or eq s 1 eq s 2 put sjst j 0 +if eq get scpol 5 add j 1 +put scpol 5 0 +end ret 1 end if eq s 3 diff --git a/seed/node/sched.om b/seed/node/sched.om index c3df18428..9824a0540 100644 --- a/seed/node/sched.om +++ b/seed/node/sched.om @@ -23,8 +23,28 @@ note never in part. Every job also needs one idle live worker. note sjarr: admission order (waiting age; kept across reruns). sjrdy: order note in which the job last became ready. sjbyp: times it was bypassed. note Decisions read only these logical counters, never the clock. +note +note Policy 1, fair fitting (DRA-396): each pick examines at most win slots +note from a persistent cursor (which moves on by win per dispatch event, so +note every slot is examined within ceil(64/win) events) and takes the oldest +note admitted ready job that fits. A ready job older than a job assigned in +note the same event was bypassed; once the oldest such job reaches the +note bypass budget it is reserved: it is offered first, and no other job may +note use, of any kind, the capacity it still lacks (others may use only +note free capacity beyond its need). Neither the free capacity it can reach +note nor its age ever shrinks, so it runs once running work releases enough +note (liveness assumes: every running job ends, by completion or by its +note lease, at least one worker stays live, and dispatch runs after +note releases). Requests over capacity are refused at admission. +note Admission tickets: a caller refused at the admission limit holds a +note ticket; when room returns, ticket holders enter in ticket order before +note anyone new, so a full table cannot exclude a caller that keeps asking. +note A ticket not asked about for ttl dispatch events lapses. +note Leases: a running job with a lease is reported once by sched_overdue +note after its lease passes; the authority then cancels or kills it, which +note releases its resources. const SJCAP ulong 64 -const SPVER ulong 1 +const SPVER ulong 2 global scmap long 2 global sclim ulong 2 global sjst ulong 64 @@ -39,20 +59,25 @@ global sjheld ulong 64 global sjarr ulong 64 global sjrdy ulong 64 global sjbyp ulong 64 +global sjlse ulong 64 +global sjdue ulong 64 +global sttk ulong 64 +global stts ulong 64 global scbusy ulong 64 global scseq ulong 64 global swcur ulong 2 global scpause ulong 1 global scap ulong 4 global suse ulong 4 -note Policy words: 0 policy (0 FIFO head-of-line), 1 candidate window in -note slots, 2 dispatch budget per event, 3 bypass budget, 4 cursor, -note 5 reserved job slot + 1 (0 none). +note Policy words: 0 policy (0 FIFO head-of-line, 1 fair fitting), 1 +note candidate window in slots, 2 dispatch budget per event, 3 bypass +note budget, 4 cursor, 5 reserved job slot + 1 (0 none), 6 tickets held, +note 7 ticket lifetime in dispatch events. global scpol ulong 8 note Counters (sched_stat): 0 admissions, 1 ready stamps, 2 dispatch events, note 3 slots examined, 4 jobs assigned, 5 bypasses, 6 reservations made, note 7 impossible requests refused, 8 head-of-line stops, 9 reserved jobs -note assigned. +note assigned, 10 tickets issued, 11 tickets lapsed, 12 leases overdue. global scst ulong 16 fn sc_cell w ulong off ulong to ulong @@ -92,6 +117,8 @@ put sclim 1 rl for j ulong 64 put sjst j 0 put sjheld j 0 +put sjlse j 0 +put sjdue j 0 put scbusy j 0 put scseq j 0 end @@ -102,12 +129,14 @@ end for i ulong 16 put scst i 0 end -put scpol 0 0 +put scpol 0 1 put scpol 1 64 put scpol 2 64 put scpol 3 4 put scpol 4 0 put scpol 5 0 +put scpol 6 0 +put scpol 7 1000 put scpause 0 0 ret 0 end @@ -179,7 +208,7 @@ put scst 1 add get scst 1 1 end note Creator: counter i of scst, capacity (i 16..19) or use (i 20..23) of a -note kind, or policy word (i 24..29). +note kind, or policy word (i 24..31). fn sched_stat i ulong to ulong if lt i 16 ret get scst i @@ -190,7 +219,7 @@ end if lt i 24 ret get suse sub i 20 end -if lt i 30 +if lt i 32 ret get scpol sub i 24 end ret 0 @@ -222,11 +251,12 @@ end ret 0 end -note Creator: policy p (0 FIFO head-of-line), candidate window win slots -note (1..64), dispatch budget db jobs per event (1..64), bypass budget by -note (1..65535). The cursor and any reservation are kept. 0 or -7. -fn sched_policy p ulong win ulong db ulong by ulong to long -if gt p 0 +note Creator: policy p (0 FIFO head-of-line, 1 fair fitting), candidate +note window win slots (1..64), dispatch budget db jobs per event (1..64), +note bypass budget by (1..65535), ticket lifetime ttl dispatch events +note (1..1000000). The cursor and any reservation are kept. 0 or -7. +fn sched_policy p ulong win ulong db ulong by ulong ttl ulong to long +if gt p 1 ret neg long 7 end if or eq win 0 gt win 64 @@ -238,10 +268,14 @@ end if or eq by 0 gt by 65535 ret neg long 7 end +if or eq ttl 0 gt ttl 1000000 +ret neg long 7 +end put scpol 0 p put scpol 1 win put scpol 2 db put scpol 3 by +put scpol 7 ttl ret 0 end @@ -266,22 +300,99 @@ end ret n end +note Position of id's admission ticket, or 64. +fn sp_tkpos id ulong to ulong +for t ulong get scpol 6 bound 64 +if eq get sttk t id +ret t +end +end +ret 64 +end + +note Compact the tickets in order, dropping ticket d (64: none) and every +note ticket not asked about for the ticket lifetime. +fn sp_tkpack d ulong to void +k = ulong 0 +for t ulong get scpol 6 bound 64 +if ne t d +if lt add get stts t get scpol 7 get scst 2 +put scst 11 add get scst 11 1 +else +put sttk k get sttk t +put stts k get stts t +k = add k 1 +end +end +end +put scpol 6 k +end + +note Refresh ticket t, or give id a ticket at the end when it has none and +note the line has room (a caller refused with the line full holds none). +fn sp_tkhold id ulong t ulong to void +if lt t 64 +put stts t get scst 2 +ret +end +n = get scpol 6 +if lt n 64 +put sttk n id +put stts n get scst 2 +put scpol 6 add n 1 +put scst 10 add get scst 10 1 +end +end + +note Creator: may id be admitted now? Not at the admission limit; below it, +note ticket holders come first in ticket order, then anyone new. A refused +note caller gets or keeps a ticket. Asking again changes nothing else, so a +note caller may ask before sched_admitr (as jn_admit does). +fn sched_room id ulong to bool +sp_tkpack 64 +t = sp_tkpos id +if ge sched_count 1 3 get sclim 0 +sp_tkhold id t +ret false +end +n = get scpol 6 +if eq n 0 +ret true +end +room = sub get sclim 0 sched_count 1 3 +if lt t 64 +if lt t room +ret true +end +else +if gt room n +ret true +end +end +sp_tkhold id t +ret false +end + note Creator: admit job id needing req (packed resources). deps 0 makes it note ready at once; otherwise it waits for a publication whose topics meet note deps. flags bit 0: safe to rerun after its worker dies. Returns the job note slot; -8 when req exceeds the configured capacity of a kind (it could -note never run); -2 when admitted work (waiting, ready, running) is at its -note limit: refused, not queued. +note never run); -2 when sched_room refuses: at the admission limit, or +note ticket holders ahead; the caller keeps a ticket and asks again. fn sched_admitr id ulong deps ulong flags ulong req ulong to long if not sp_feas req put scst 7 add get scst 7 1 ret neg long 8 end -if ge sched_count 1 3 get sclim 0 +if not sched_room id ret neg long 2 end for j ulong 64 if eq get sjst j 0 +t = sp_tkpos id +if lt t 64 +sp_tkpack t +end put sjid j id put sjdep j deps put sjfl j flags @@ -291,6 +402,8 @@ put sjw j 0 put sjneed j req put sjheld j 0 put sjbyp j 0 +put sjlse j 0 +put sjdue j 0 put sjarr j get scst 0 put scst 0 add get scst 0 1 if eq deps 0 @@ -304,6 +417,50 @@ end ret neg long 2 end +note Creator: job j (waiting, ready or running) gets a lease of ns from its +note next assignment, or from now when it runs; 0 removes it. 0, or -3. +fn sched_lease j ulong ns ulong to long +if ge j 64 +ret neg long 3 +end +s = get sjst j +if or lt s 1 gt s 3 +ret neg long 3 +end +put sjlse j ns +if eq s 3 +put sjdue j 0 +if gt ns 0 +put sjdue j add ulong monons ns +end +end +ret 0 +end + +note Creator: a running job past its lease whose worker has not reported +note done, reported once (its deadline is cleared): its slot, or 64. The +note authority cancels or kills it; the release follows from the worker's +note report or reap. +fn sched_overdue to ulong +now = ulong monons +for j ulong 64 +if eq get sjst j 3 +d = get sjdue j +if gt d 0 +if ge now d +w = get sjw j +if ne sc_cell w 64 get scseq w +put sjdue j 0 +put scst 12 add get scst 12 1 +ret j +end +end +end +end +end +ret 64 +end + note Creator: sched_admitr with no resource need beyond one worker. fn sched_admit id ulong deps ulong flags ulong to long ret sched_admitr id deps flags 0 @@ -344,6 +501,10 @@ put sjst j 3 put sjw j w put sjatt j add get sjatt j 1 put sjbyp j 0 +put sjdue j 0 +if gt get sjlse j 0 +put sjdue j add ulong monons get sjlse j +end sp_take j if eq get scpol 5 add j 1 put scpol 5 0 @@ -367,6 +528,7 @@ note not fit holds back every later job. Returns the slot or 64. fn sp_fifo to ulong h = ulong 64 for j ulong 64 +put scst 3 add get scst 3 1 if eq get sjst j 2 if eq h 64 h = j @@ -377,7 +539,6 @@ end end end end -put scst 3 add get scst 3 64 if eq h 64 ret 64 end @@ -388,6 +549,83 @@ put scst 8 add get scst 8 1 ret 64 end +note Policy 1, fair fitting: the reserved job first when it fits; else the +note oldest admitted ready job, among win slots from the cursor, that fits +note without the capacity the reserved job still lacks. Returns the slot or +note 64. Work per pick is bounded by win. +fn sp_fair to ulong +rq = ulong 0 +r = get scpol 5 +if gt r 0 +rj = sub r 1 +if eq get sjst rj 2 +if sp_fits get sjneed rj 0 +ret rj +end +rq = get sjneed rj +else +put scpol 5 0 +end +end +win = get scpol 1 +cur = get scpol 4 +b = ulong 64 +for i ulong win bound 64 +put scst 3 add get scst 3 1 +j = rem add cur i 64 +if eq get sjst j 2 +if sp_fits get sjneed j rq +if eq b 64 +b = j +else +if lt get sjarr j get sjarr b +b = j +end +end +end +end +end +ret b +end + +note After a fair dispatch event in which ya - 1 was the youngest admission +note assigned (ya 0: none): every ready job admitted before it was bypassed +note once; with no reservation, the oldest job at the bypass budget is +note reserved. The cursor moves on by the window. +fn sp_after ya ulong to void +if gt ya 0 +for j ulong 64 +if eq get sjst j 2 +if lt add get sjarr j 1 ya +put sjbyp j add get sjbyp j 1 +put scst 5 add get scst 5 1 +end +end +end +end +if eq get scpol 5 0 +o = ulong 64 +for j ulong 64 +if eq get sjst j 2 +if ge get sjbyp j get scpol 3 +if eq o 64 +o = j +else +if lt get sjarr j get sjarr o +o = j +end +end +end +end +end +if lt o 64 +put scpol 5 add o 1 +put scst 6 add get scst 6 1 +end +end +put scpol 4 rem add get scpol 4 get scpol 1 64 +end + note Creator: assign ready jobs to idle live workers under the policy, at note most the dispatch budget per call. Returns the number assigned. fn sched_dispatch c long to ulong @@ -396,19 +634,32 @@ ret 0 end n = mapget c 48 8 k = ulong 0 +ya = ulong 0 +fair = eq get scpol 0 1 put scst 2 add get scst 2 1 for i ulong get scpol 2 bound 64 w = sp_idle n if ge w 64 break end +j = ulong 64 +if fair +j = sp_fair +else j = sp_fifo +end if ge j 64 break end +if gt add get sjarr j 1 ya +ya = add get sjarr j 1 +end sp_start c j w k = add k 1 end +if fair +sp_after ya +end ret k end @@ -566,6 +817,9 @@ end s = get sjst j if or eq s 1 eq s 2 put sjst j 0 +if eq get scpol 5 add j 1 +put scpol 5 0 +end ret 1 end if eq s 3 diff --git a/seed/node/schedpol-gate.om b/seed/node/schedpol-gate.om index ef15476ba..5231266ab 100644 --- a/seed/node/schedpol-gate.om +++ b/seed/node/schedpol-gate.om @@ -949,8 +949,28 @@ note never in part. Every job also needs one idle live worker. note sjarr: admission order (waiting age; kept across reruns). sjrdy: order note in which the job last became ready. sjbyp: times it was bypassed. note Decisions read only these logical counters, never the clock. +note +note Policy 1, fair fitting (DRA-396): each pick examines at most win slots +note from a persistent cursor (which moves on by win per dispatch event, so +note every slot is examined within ceil(64/win) events) and takes the oldest +note admitted ready job that fits. A ready job older than a job assigned in +note the same event was bypassed; once the oldest such job reaches the +note bypass budget it is reserved: it is offered first, and no other job may +note use, of any kind, the capacity it still lacks (others may use only +note free capacity beyond its need). Neither the free capacity it can reach +note nor its age ever shrinks, so it runs once running work releases enough +note (liveness assumes: every running job ends, by completion or by its +note lease, at least one worker stays live, and dispatch runs after +note releases). Requests over capacity are refused at admission. +note Admission tickets: a caller refused at the admission limit holds a +note ticket; when room returns, ticket holders enter in ticket order before +note anyone new, so a full table cannot exclude a caller that keeps asking. +note A ticket not asked about for ttl dispatch events lapses. +note Leases: a running job with a lease is reported once by sched_overdue +note after its lease passes; the authority then cancels or kills it, which +note releases its resources. const SJCAP ulong 64 -const SPVER ulong 1 +const SPVER ulong 2 global scmap long 2 global sclim ulong 2 global sjst ulong 64 @@ -965,20 +985,25 @@ global sjheld ulong 64 global sjarr ulong 64 global sjrdy ulong 64 global sjbyp ulong 64 +global sjlse ulong 64 +global sjdue ulong 64 +global sttk ulong 64 +global stts ulong 64 global scbusy ulong 64 global scseq ulong 64 global swcur ulong 2 global scpause ulong 1 global scap ulong 4 global suse ulong 4 -note Policy words: 0 policy (0 FIFO head-of-line), 1 candidate window in -note slots, 2 dispatch budget per event, 3 bypass budget, 4 cursor, -note 5 reserved job slot + 1 (0 none). +note Policy words: 0 policy (0 FIFO head-of-line, 1 fair fitting), 1 +note candidate window in slots, 2 dispatch budget per event, 3 bypass +note budget, 4 cursor, 5 reserved job slot + 1 (0 none), 6 tickets held, +note 7 ticket lifetime in dispatch events. global scpol ulong 8 note Counters (sched_stat): 0 admissions, 1 ready stamps, 2 dispatch events, note 3 slots examined, 4 jobs assigned, 5 bypasses, 6 reservations made, note 7 impossible requests refused, 8 head-of-line stops, 9 reserved jobs -note assigned. +note assigned, 10 tickets issued, 11 tickets lapsed, 12 leases overdue. global scst ulong 16 fn sc_cell w ulong off ulong to ulong @@ -1018,6 +1043,8 @@ put sclim 1 rl for j ulong 64 put sjst j 0 put sjheld j 0 +put sjlse j 0 +put sjdue j 0 put scbusy j 0 put scseq j 0 end @@ -1028,12 +1055,14 @@ end for i ulong 16 put scst i 0 end -put scpol 0 0 +put scpol 0 1 put scpol 1 64 put scpol 2 64 put scpol 3 4 put scpol 4 0 put scpol 5 0 +put scpol 6 0 +put scpol 7 1000 put scpause 0 0 ret 0 end @@ -1105,7 +1134,7 @@ put scst 1 add get scst 1 1 end note Creator: counter i of scst, capacity (i 16..19) or use (i 20..23) of a -note kind, or policy word (i 24..29). +note kind, or policy word (i 24..31). fn sched_stat i ulong to ulong if lt i 16 ret get scst i @@ -1116,7 +1145,7 @@ end if lt i 24 ret get suse sub i 20 end -if lt i 30 +if lt i 32 ret get scpol sub i 24 end ret 0 @@ -1148,11 +1177,12 @@ end ret 0 end -note Creator: policy p (0 FIFO head-of-line), candidate window win slots -note (1..64), dispatch budget db jobs per event (1..64), bypass budget by -note (1..65535). The cursor and any reservation are kept. 0 or -7. -fn sched_policy p ulong win ulong db ulong by ulong to long -if gt p 0 +note Creator: policy p (0 FIFO head-of-line, 1 fair fitting), candidate +note window win slots (1..64), dispatch budget db jobs per event (1..64), +note bypass budget by (1..65535), ticket lifetime ttl dispatch events +note (1..1000000). The cursor and any reservation are kept. 0 or -7. +fn sched_policy p ulong win ulong db ulong by ulong ttl ulong to long +if gt p 1 ret neg long 7 end if or eq win 0 gt win 64 @@ -1164,10 +1194,14 @@ end if or eq by 0 gt by 65535 ret neg long 7 end +if or eq ttl 0 gt ttl 1000000 +ret neg long 7 +end put scpol 0 p put scpol 1 win put scpol 2 db put scpol 3 by +put scpol 7 ttl ret 0 end @@ -1192,22 +1226,99 @@ end ret n end +note Position of id's admission ticket, or 64. +fn sp_tkpos id ulong to ulong +for t ulong get scpol 6 bound 64 +if eq get sttk t id +ret t +end +end +ret 64 +end + +note Compact the tickets in order, dropping ticket d (64: none) and every +note ticket not asked about for the ticket lifetime. +fn sp_tkpack d ulong to void +k = ulong 0 +for t ulong get scpol 6 bound 64 +if ne t d +if lt add get stts t get scpol 7 get scst 2 +put scst 11 add get scst 11 1 +else +put sttk k get sttk t +put stts k get stts t +k = add k 1 +end +end +end +put scpol 6 k +end + +note Refresh ticket t, or give id a ticket at the end when it has none and +note the line has room (a caller refused with the line full holds none). +fn sp_tkhold id ulong t ulong to void +if lt t 64 +put stts t get scst 2 +ret +end +n = get scpol 6 +if lt n 64 +put sttk n id +put stts n get scst 2 +put scpol 6 add n 1 +put scst 10 add get scst 10 1 +end +end + +note Creator: may id be admitted now? Not at the admission limit; below it, +note ticket holders come first in ticket order, then anyone new. A refused +note caller gets or keeps a ticket. Asking again changes nothing else, so a +note caller may ask before sched_admitr (as jn_admit does). +fn sched_room id ulong to bool +sp_tkpack 64 +t = sp_tkpos id +if ge sched_count 1 3 get sclim 0 +sp_tkhold id t +ret false +end +n = get scpol 6 +if eq n 0 +ret true +end +room = sub get sclim 0 sched_count 1 3 +if lt t 64 +if lt t room +ret true +end +else +if gt room n +ret true +end +end +sp_tkhold id t +ret false +end + note Creator: admit job id needing req (packed resources). deps 0 makes it note ready at once; otherwise it waits for a publication whose topics meet note deps. flags bit 0: safe to rerun after its worker dies. Returns the job note slot; -8 when req exceeds the configured capacity of a kind (it could -note never run); -2 when admitted work (waiting, ready, running) is at its -note limit: refused, not queued. +note never run); -2 when sched_room refuses: at the admission limit, or +note ticket holders ahead; the caller keeps a ticket and asks again. fn sched_admitr id ulong deps ulong flags ulong req ulong to long if not sp_feas req put scst 7 add get scst 7 1 ret neg long 8 end -if ge sched_count 1 3 get sclim 0 +if not sched_room id ret neg long 2 end for j ulong 64 if eq get sjst j 0 +t = sp_tkpos id +if lt t 64 +sp_tkpack t +end put sjid j id put sjdep j deps put sjfl j flags @@ -1217,6 +1328,8 @@ put sjw j 0 put sjneed j req put sjheld j 0 put sjbyp j 0 +put sjlse j 0 +put sjdue j 0 put sjarr j get scst 0 put scst 0 add get scst 0 1 if eq deps 0 @@ -1230,6 +1343,50 @@ end ret neg long 2 end +note Creator: job j (waiting, ready or running) gets a lease of ns from its +note next assignment, or from now when it runs; 0 removes it. 0, or -3. +fn sched_lease j ulong ns ulong to long +if ge j 64 +ret neg long 3 +end +s = get sjst j +if or lt s 1 gt s 3 +ret neg long 3 +end +put sjlse j ns +if eq s 3 +put sjdue j 0 +if gt ns 0 +put sjdue j add ulong monons ns +end +end +ret 0 +end + +note Creator: a running job past its lease whose worker has not reported +note done, reported once (its deadline is cleared): its slot, or 64. The +note authority cancels or kills it; the release follows from the worker's +note report or reap. +fn sched_overdue to ulong +now = ulong monons +for j ulong 64 +if eq get sjst j 3 +d = get sjdue j +if gt d 0 +if ge now d +w = get sjw j +if ne sc_cell w 64 get scseq w +put sjdue j 0 +put scst 12 add get scst 12 1 +ret j +end +end +end +end +end +ret 64 +end + note Creator: sched_admitr with no resource need beyond one worker. fn sched_admit id ulong deps ulong flags ulong to long ret sched_admitr id deps flags 0 @@ -1270,6 +1427,10 @@ put sjst j 3 put sjw j w put sjatt j add get sjatt j 1 put sjbyp j 0 +put sjdue j 0 +if gt get sjlse j 0 +put sjdue j add ulong monons get sjlse j +end sp_take j if eq get scpol 5 add j 1 put scpol 5 0 @@ -1293,6 +1454,7 @@ note not fit holds back every later job. Returns the slot or 64. fn sp_fifo to ulong h = ulong 64 for j ulong 64 +put scst 3 add get scst 3 1 if eq get sjst j 2 if eq h 64 h = j @@ -1303,7 +1465,6 @@ end end end end -put scst 3 add get scst 3 64 if eq h 64 ret 64 end @@ -1314,6 +1475,83 @@ put scst 8 add get scst 8 1 ret 64 end +note Policy 1, fair fitting: the reserved job first when it fits; else the +note oldest admitted ready job, among win slots from the cursor, that fits +note without the capacity the reserved job still lacks. Returns the slot or +note 64. Work per pick is bounded by win. +fn sp_fair to ulong +rq = ulong 0 +r = get scpol 5 +if gt r 0 +rj = sub r 1 +if eq get sjst rj 2 +if sp_fits get sjneed rj 0 +ret rj +end +rq = get sjneed rj +else +put scpol 5 0 +end +end +win = get scpol 1 +cur = get scpol 4 +b = ulong 64 +for i ulong win bound 64 +put scst 3 add get scst 3 1 +j = rem add cur i 64 +if eq get sjst j 2 +if sp_fits get sjneed j rq +if eq b 64 +b = j +else +if lt get sjarr j get sjarr b +b = j +end +end +end +end +end +ret b +end + +note After a fair dispatch event in which ya - 1 was the youngest admission +note assigned (ya 0: none): every ready job admitted before it was bypassed +note once; with no reservation, the oldest job at the bypass budget is +note reserved. The cursor moves on by the window. +fn sp_after ya ulong to void +if gt ya 0 +for j ulong 64 +if eq get sjst j 2 +if lt add get sjarr j 1 ya +put sjbyp j add get sjbyp j 1 +put scst 5 add get scst 5 1 +end +end +end +end +if eq get scpol 5 0 +o = ulong 64 +for j ulong 64 +if eq get sjst j 2 +if ge get sjbyp j get scpol 3 +if eq o 64 +o = j +else +if lt get sjarr j get sjarr o +o = j +end +end +end +end +end +if lt o 64 +put scpol 5 add o 1 +put scst 6 add get scst 6 1 +end +end +put scpol 4 rem add get scpol 4 get scpol 1 64 +end + note Creator: assign ready jobs to idle live workers under the policy, at note most the dispatch budget per call. Returns the number assigned. fn sched_dispatch c long to ulong @@ -1322,19 +1560,32 @@ ret 0 end n = mapget c 48 8 k = ulong 0 +ya = ulong 0 +fair = eq get scpol 0 1 put scst 2 add get scst 2 1 for i ulong get scpol 2 bound 64 w = sp_idle n if ge w 64 break end +j = ulong 64 +if fair +j = sp_fair +else j = sp_fifo +end if ge j 64 break end +if gt add get sjarr j 1 ya +ya = add get sjarr j 1 +end sp_start c j w k = add k 1 end +if fair +sp_after ya +end ret k end @@ -1492,6 +1743,9 @@ end s = get sjst j if or eq s 1 eq s 2 put sjst j 0 +if eq get scpol 5 add j 1 +put scpol 5 0 +end ret 1 end if eq s 3 @@ -1608,11 +1862,14 @@ end note Concatenate after transport.om, pool.om, super.om and sched.om. CPU-only note acceptance of the resource-aware selection policy (P-DRA-14) with real note forked workers: impossible requests, the capacity invariant under churn, -note ready order, and the head-of-line scenarios of the reference pump -note (aien-sovereign-core-mv spark-harness scheduler/core.rs Core::pump). +note ready order, the head-of-line scenarios of the reference pump +note (aien-sovereign-core-mv spark-harness scheduler/core.rs Core::pump), +note starvation under repeated small arrivals, admission tickets, lease +note expiry and cancellation of a reserved job. note After every creator step the test checks that no kind is used beyond its note capacity and that the use equals the needs of the jobs holding them. -note No GPU, model or network. +note Argument "fifo" runs policy 0, "noreserve" policy 1 with the bypass +note budget out of reach: the negative controls. No GPU, model or network. text pok "PASS node schedpol\n" text pst "schedpol events=" text pex " examined=" @@ -1626,6 +1883,8 @@ text pw2 " fits_behind=" text pw3 " free_cpu=" text pw4 " idle_worker=" global ptc long 1 +note Mode: 0 default policy, 1 fifo, 2 noreserve. +global ptm ulong 1 fn pt_ok ok bool code int to void if not ok @@ -1727,6 +1986,12 @@ put ptc 0 c pt_ok eq sup_init c 0 code pt_ok eq sched_new c a rl 0 code pt_ok eq sched_cap caps 0 code +if eq get ptm 0 1 +pt_ok eq sched_policy 0 64 64 4 1000 0 code +end +if eq get ptm 0 2 +pt_ok eq sched_policy 1 64 64 65535 1000 0 code +end for i ulong w bound 64 pt_ok pt_spawn c i code end @@ -1766,11 +2031,21 @@ pt_ok le get suse k get scap k code end end -note One creator step of up to 10 ms, then the invariant. +note One creator step of up to 10 ms, then the invariant and the scan +note budget: no dispatch event examined more than budget x window slots +note (FIFO, policy 0, scans all 64 per pick). 9 when exceeded. fn pt_step c long code int to void +e0 = sched_stat 2 +x0 = sched_stat 3 r = sched_step c 10000000 pt_ok ge r 0 code pt_inv code +w = sched_stat 25 +if eq sched_stat 24 0 +w = ulong 64 +end +lim = mul mul sub sched_stat 2 e0 sched_stat 26 w +pt_ok le sub sched_stat 3 x0 lim 9 end note Step until job j is in a state in lo..hi, up to ms. True when reached. @@ -1916,15 +2191,21 @@ end note Phase F: ready order. With one worker, x is admitted first waiting on note topic 8 and y second ready at once; then topic 8 is published. FIFO -note (policy 0) serves the job that became ready first, y. +note (policy 0) serves the job that became ready first, y; fair fitting +note serves the job admitted first, x (waiting age counts from admission). fn pt_order to void buf = new uchar 4096 0 c = pt_setup 1 8 8 pt_req 4 1024 1 8 50 x = pt_admit 60050 8 0 51 y = pt_admit 70050 0 0 52 pt_ok gt sched_publish c 8 buf 16 0 53 +if eq sched_stat 24 0 pt_ok eq get sjst y 3 54 pt_ok eq get sjst x 2 55 +else +pt_ok eq get sjst x 3 54 +pt_ok eq get sjst y 2 55 +end pt_drain c 2 3000 56 pt_down c 57 end @@ -2008,6 +2289,194 @@ pt_down c 28 ret v end +note Phase S: starvation under repeated small arrivals. Three workers, 4 +note CPU. Small jobs (1 CPU) start staggered (100, 200, 300 ms), and each +note that finishes is replaced by one of 300 ms, so the small jobs never +note all end together; big (4 CPU, 50 ms) needs every CPU free. The target: +note big runs within 4 s. 61 means it never did: the small jobs kept the +note CPU partly busy (the "noreserve" control). +fn pt_starve to void +c = pt_setup 3 16 8 pt_req 4 1024 1 8 60 +for i ulong 3 +j = pt_admit mul add i 1 100100 0 pt_req 1 0 0 0 60 +end +s = ulong 4 +g = pt_admit 90050 0 pt_req 4 0 0 0 60 +dl = add ulong monons 4000000000 +ok = false +for t ulong 1000000 +if ge get sjst g 3 +ok = true +break +end +if ge ulong monons dl +break +end +if lt sched_count 1 3 4 +j = pt_admit add mul s 100000 300 0 pt_req 1 0 0 0 60 +s = add s 1 +end +pt_step c 60 +n = pt_review 60 +end +pt_ok ok 61 +pt_ok ge sched_stat 6 1 62 +pt_ok ge sched_stat 9 1 63 +pt_drain c sched_count 1 4 5000 64 +pt_stats +pt_ok eq get suse 0 0 65 +pt_down c 66 +end + +note Phase Q: admission tickets. Limit 2: p1 (400 ms) and p2 (900 ms) fill +note it; X then Y are refused and hold tickets in that order. When p1 is +note reviewed there is room for one: Y asking first is refused (75), X is +note admitted (76); Y enters once more room returns (78). A ticket not +note asked about for the lifetime (20 events) lapses and stops blocking (79). +fn pt_tickets to void +c = pt_setup 2 2 8 pt_req 4 1024 1 8 70 +pt_ok eq sched_policy sched_stat 24 64 64 sched_stat 27 1000 0 70 +p1 = pt_admit 100400 0 0 70 +p2 = pt_admit 110900 0 0 70 +pt_ok eq sched_admitr 120050 0 0 0 neg long 2 71 +pt_ok eq sched_admitr 130050 0 0 0 neg long 2 72 +pt_ok eq sched_stat 30 2 73 +pt_drain c 1 3000 74 +pt_ok eq sched_admitr 130050 0 0 0 neg long 2 75 +pt_ok ge sched_admitr 120050 0 0 0 0 76 +pt_drain c 2 3000 77 +pt_ok ge sched_admitr 130050 0 0 0 0 78 +pt_ok eq sched_policy sched_stat 24 64 64 sched_stat 27 20 0 79 +f = pt_admit 140900 0 0 79 +pt_ok eq sched_admitr 150050 0 0 0 neg long 2 79 +e0 = sched_stat 2 +dl = add ulong monons 3000000000 +for t ulong 1000000 +if le sched_count 1 3 1 +if gt sched_stat 2 add e0 21 +break +end +end +pt_ok lt ulong monons dl 79 +pt_step c 79 +n = pt_review 79 +end +pt_ok ge sched_admitr 160050 0 0 0 0 80 +pt_ok ge sched_stat 11 1 80 +pt_drain c 2 3000 80 +pt_down c 80 +end + +note Step until sched_overdue reports a job, up to 2 s: its slot, or 64. +fn pt_waitod c long code int to ulong +t0 = ulong monons +for t ulong 1000000 +o = sched_overdue +if lt o 64 +ret o +end +if gt sub ulong monons t0 2000000000 +ret 64 +end +pt_step c code +end +ret 64 +end + +note Phase L: lease expiry. h (2 of 2 CPU, 3 s, not safe to rerun) has a +note 200 ms lease: sched_overdue reports it once, not before the lease; +note the creator kills its worker; h becomes UNKNOWN and its CPU is free. +note h2 (2 CPU, 400 ms, safe to rerun, 100 ms lease) is killed the same +note way: it is ready or running again with its admission age kept, and +note completes. Then a new 2-CPU job runs. +fn pt_lease to void +c = pt_setup 3 8 8 pt_req 2 1024 1 8 81 +h = pt_admit 173000 0 pt_req 2 0 0 0 81 +pt_ok eq sched_lease h 200000000 0 81 +pt_ok pt_until c h 3 3 2000 81 81 +t0 = ulong monons +o = pt_waitod c 82 +pt_ok eq o h 82 +pt_ok ge sub ulong monons t0 150000000 83 +pt_ok eq sched_overdue 64 84 +r = killpid int get swpid get sjw h 9 +pt_ok pt_until c h 6 6 2000 85 85 +pt_ok eq get suse 0 0 86 +pt_ok eq sched_settle h 0 87 +x = sched_admitr 180400 0 1 pt_req 2 0 0 0 +pt_ok ge x 0 140 +h2 = ulong x +pt_ok eq sched_lease h2 100000000 0 140 +pt_ok pt_until c h2 3 3 2000 140 140 +ar = get sjarr h2 +pt_ok eq pt_waitod c 141 h2 141 +w = get sjw h2 +r = killpid int get swpid w 9 +dl = add ulong monons 2000000000 +for t ulong 1000000 +if eq get swpid w 0 +break +end +pt_ok lt ulong monons dl 142 +pt_step c 142 +end +pt_ok eq get sjarr h2 ar 143 +s = get sjst h2 +pt_ok and ge s 2 le s 3 144 +pt_drain c 1 3000 145 +z = pt_admit 190050 0 pt_req 2 0 0 0 88 +pt_drain c 1 3000 88 +pt_down c 89 +end + +note Phase R: cancellation of a reserved job. Bypass budget 1: a (1 of 2 +note CPU) runs, b (2 CPU) waits, x (1 CPU) runs past it, so b is reserved. +note Cancelling b frees it with no effect and clears the reservation. +fn pt_rcancel to void +c = pt_setup 2 8 8 pt_req 2 1024 1 8 90 +pt_ok eq sched_policy sched_stat 24 64 64 1 1000 0 90 +a = pt_admit 190600 0 pt_req 1 0 0 0 90 +pt_ok pt_until c a 3 3 2000 90 90 +b = pt_admit 200050 0 pt_req 2 0 0 0 90 +x = pt_admit 210050 0 pt_req 1 0 0 0 90 +pt_ok pt_until c x 3 4 400 90 91 +pt_ok eq sched_stat 29 add b 1 92 +pt_ok eq sched_cancel b 1 93 +pt_ok eq sched_stat 29 0 94 +pt_drain c 2 3000 95 +pt_ok eq get suse 0 0 96 +pt_down c 97 +end + +note Phase W: bounded candidate work. Window 4 slots, dispatch budget 2: +note 12 ready jobs fill slots 0..11, beyond any one window. Each pick reads +note at most 4 slots (checked at every step, exit 9) and the cursor still +note reaches every slot, so all 12 run. 101 means some never did. +fn pt_window to void +c = pt_setup 2 16 16 pt_req 4 1024 1 8 101 +pt_ok eq sched_policy sched_stat 24 4 2 sched_stat 27 1000 0 101 +for i ulong 12 +j = pt_admit add mul add i 1 10000 30 0 0 101 +end +pt_drain c 12 5000 101 +pt_ok eq sched_stat 4 12 102 +pt_down c 103 +end + +fn pt_mode to void +a = new uchar 16 0 +if ne argcnt 2 +ret +end +n = argread 1 a 0 16 +if eq n 4 +put ptm 0 1 +end +if eq n 9 +put ptm 0 2 +end +end + fn pt_stats to void r = write 1 pst 0 len pst pt_num sched_stat 2 @@ -2027,6 +2496,7 @@ end note The regression phases A and B return their verdict, so both run and note print their witness; the first failing one is the exit status. fn main to int +pt_mode pt_impossible pt_churn pt_release @@ -2039,6 +2509,11 @@ end if ne rb 0 ret rb end +pt_starve +pt_tickets +pt_lease +pt_rcancel +pt_window if ne write 1 pok 0 len pok long len pok ret 100 end diff --git a/seed/node/schedpol-test.om b/seed/node/schedpol-test.om index 5535dd71c..2249dd6a5 100644 --- a/seed/node/schedpol-test.om +++ b/seed/node/schedpol-test.om @@ -1,11 +1,14 @@ note Concatenate after transport.om, pool.om, super.om and sched.om. CPU-only note acceptance of the resource-aware selection policy (P-DRA-14) with real note forked workers: impossible requests, the capacity invariant under churn, -note ready order, and the head-of-line scenarios of the reference pump -note (aien-sovereign-core-mv spark-harness scheduler/core.rs Core::pump). +note ready order, the head-of-line scenarios of the reference pump +note (aien-sovereign-core-mv spark-harness scheduler/core.rs Core::pump), +note starvation under repeated small arrivals, admission tickets, lease +note expiry and cancellation of a reserved job. note After every creator step the test checks that no kind is used beyond its note capacity and that the use equals the needs of the jobs holding them. -note No GPU, model or network. +note Argument "fifo" runs policy 0, "noreserve" policy 1 with the bypass +note budget out of reach: the negative controls. No GPU, model or network. text pok "PASS node schedpol\n" text pst "schedpol events=" text pex " examined=" @@ -19,6 +22,8 @@ text pw2 " fits_behind=" text pw3 " free_cpu=" text pw4 " idle_worker=" global ptc long 1 +note Mode: 0 default policy, 1 fifo, 2 noreserve. +global ptm ulong 1 fn pt_ok ok bool code int to void if not ok @@ -120,6 +125,12 @@ put ptc 0 c pt_ok eq sup_init c 0 code pt_ok eq sched_new c a rl 0 code pt_ok eq sched_cap caps 0 code +if eq get ptm 0 1 +pt_ok eq sched_policy 0 64 64 4 1000 0 code +end +if eq get ptm 0 2 +pt_ok eq sched_policy 1 64 64 65535 1000 0 code +end for i ulong w bound 64 pt_ok pt_spawn c i code end @@ -159,11 +170,21 @@ pt_ok le get suse k get scap k code end end -note One creator step of up to 10 ms, then the invariant. +note One creator step of up to 10 ms, then the invariant and the scan +note budget: no dispatch event examined more than budget x window slots +note (FIFO, policy 0, scans all 64 per pick). 9 when exceeded. fn pt_step c long code int to void +e0 = sched_stat 2 +x0 = sched_stat 3 r = sched_step c 10000000 pt_ok ge r 0 code pt_inv code +w = sched_stat 25 +if eq sched_stat 24 0 +w = ulong 64 +end +lim = mul mul sub sched_stat 2 e0 sched_stat 26 w +pt_ok le sub sched_stat 3 x0 lim 9 end note Step until job j is in a state in lo..hi, up to ms. True when reached. @@ -309,15 +330,21 @@ end note Phase F: ready order. With one worker, x is admitted first waiting on note topic 8 and y second ready at once; then topic 8 is published. FIFO -note (policy 0) serves the job that became ready first, y. +note (policy 0) serves the job that became ready first, y; fair fitting +note serves the job admitted first, x (waiting age counts from admission). fn pt_order to void buf = new uchar 4096 0 c = pt_setup 1 8 8 pt_req 4 1024 1 8 50 x = pt_admit 60050 8 0 51 y = pt_admit 70050 0 0 52 pt_ok gt sched_publish c 8 buf 16 0 53 +if eq sched_stat 24 0 pt_ok eq get sjst y 3 54 pt_ok eq get sjst x 2 55 +else +pt_ok eq get sjst x 3 54 +pt_ok eq get sjst y 2 55 +end pt_drain c 2 3000 56 pt_down c 57 end @@ -401,6 +428,194 @@ pt_down c 28 ret v end +note Phase S: starvation under repeated small arrivals. Three workers, 4 +note CPU. Small jobs (1 CPU) start staggered (100, 200, 300 ms), and each +note that finishes is replaced by one of 300 ms, so the small jobs never +note all end together; big (4 CPU, 50 ms) needs every CPU free. The target: +note big runs within 4 s. 61 means it never did: the small jobs kept the +note CPU partly busy (the "noreserve" control). +fn pt_starve to void +c = pt_setup 3 16 8 pt_req 4 1024 1 8 60 +for i ulong 3 +j = pt_admit mul add i 1 100100 0 pt_req 1 0 0 0 60 +end +s = ulong 4 +g = pt_admit 90050 0 pt_req 4 0 0 0 60 +dl = add ulong monons 4000000000 +ok = false +for t ulong 1000000 +if ge get sjst g 3 +ok = true +break +end +if ge ulong monons dl +break +end +if lt sched_count 1 3 4 +j = pt_admit add mul s 100000 300 0 pt_req 1 0 0 0 60 +s = add s 1 +end +pt_step c 60 +n = pt_review 60 +end +pt_ok ok 61 +pt_ok ge sched_stat 6 1 62 +pt_ok ge sched_stat 9 1 63 +pt_drain c sched_count 1 4 5000 64 +pt_stats +pt_ok eq get suse 0 0 65 +pt_down c 66 +end + +note Phase Q: admission tickets. Limit 2: p1 (400 ms) and p2 (900 ms) fill +note it; X then Y are refused and hold tickets in that order. When p1 is +note reviewed there is room for one: Y asking first is refused (75), X is +note admitted (76); Y enters once more room returns (78). A ticket not +note asked about for the lifetime (20 events) lapses and stops blocking (79). +fn pt_tickets to void +c = pt_setup 2 2 8 pt_req 4 1024 1 8 70 +pt_ok eq sched_policy sched_stat 24 64 64 sched_stat 27 1000 0 70 +p1 = pt_admit 100400 0 0 70 +p2 = pt_admit 110900 0 0 70 +pt_ok eq sched_admitr 120050 0 0 0 neg long 2 71 +pt_ok eq sched_admitr 130050 0 0 0 neg long 2 72 +pt_ok eq sched_stat 30 2 73 +pt_drain c 1 3000 74 +pt_ok eq sched_admitr 130050 0 0 0 neg long 2 75 +pt_ok ge sched_admitr 120050 0 0 0 0 76 +pt_drain c 2 3000 77 +pt_ok ge sched_admitr 130050 0 0 0 0 78 +pt_ok eq sched_policy sched_stat 24 64 64 sched_stat 27 20 0 79 +f = pt_admit 140900 0 0 79 +pt_ok eq sched_admitr 150050 0 0 0 neg long 2 79 +e0 = sched_stat 2 +dl = add ulong monons 3000000000 +for t ulong 1000000 +if le sched_count 1 3 1 +if gt sched_stat 2 add e0 21 +break +end +end +pt_ok lt ulong monons dl 79 +pt_step c 79 +n = pt_review 79 +end +pt_ok ge sched_admitr 160050 0 0 0 0 80 +pt_ok ge sched_stat 11 1 80 +pt_drain c 2 3000 80 +pt_down c 80 +end + +note Step until sched_overdue reports a job, up to 2 s: its slot, or 64. +fn pt_waitod c long code int to ulong +t0 = ulong monons +for t ulong 1000000 +o = sched_overdue +if lt o 64 +ret o +end +if gt sub ulong monons t0 2000000000 +ret 64 +end +pt_step c code +end +ret 64 +end + +note Phase L: lease expiry. h (2 of 2 CPU, 3 s, not safe to rerun) has a +note 200 ms lease: sched_overdue reports it once, not before the lease; +note the creator kills its worker; h becomes UNKNOWN and its CPU is free. +note h2 (2 CPU, 400 ms, safe to rerun, 100 ms lease) is killed the same +note way: it is ready or running again with its admission age kept, and +note completes. Then a new 2-CPU job runs. +fn pt_lease to void +c = pt_setup 3 8 8 pt_req 2 1024 1 8 81 +h = pt_admit 173000 0 pt_req 2 0 0 0 81 +pt_ok eq sched_lease h 200000000 0 81 +pt_ok pt_until c h 3 3 2000 81 81 +t0 = ulong monons +o = pt_waitod c 82 +pt_ok eq o h 82 +pt_ok ge sub ulong monons t0 150000000 83 +pt_ok eq sched_overdue 64 84 +r = killpid int get swpid get sjw h 9 +pt_ok pt_until c h 6 6 2000 85 85 +pt_ok eq get suse 0 0 86 +pt_ok eq sched_settle h 0 87 +x = sched_admitr 180400 0 1 pt_req 2 0 0 0 +pt_ok ge x 0 140 +h2 = ulong x +pt_ok eq sched_lease h2 100000000 0 140 +pt_ok pt_until c h2 3 3 2000 140 140 +ar = get sjarr h2 +pt_ok eq pt_waitod c 141 h2 141 +w = get sjw h2 +r = killpid int get swpid w 9 +dl = add ulong monons 2000000000 +for t ulong 1000000 +if eq get swpid w 0 +break +end +pt_ok lt ulong monons dl 142 +pt_step c 142 +end +pt_ok eq get sjarr h2 ar 143 +s = get sjst h2 +pt_ok and ge s 2 le s 3 144 +pt_drain c 1 3000 145 +z = pt_admit 190050 0 pt_req 2 0 0 0 88 +pt_drain c 1 3000 88 +pt_down c 89 +end + +note Phase R: cancellation of a reserved job. Bypass budget 1: a (1 of 2 +note CPU) runs, b (2 CPU) waits, x (1 CPU) runs past it, so b is reserved. +note Cancelling b frees it with no effect and clears the reservation. +fn pt_rcancel to void +c = pt_setup 2 8 8 pt_req 2 1024 1 8 90 +pt_ok eq sched_policy sched_stat 24 64 64 1 1000 0 90 +a = pt_admit 190600 0 pt_req 1 0 0 0 90 +pt_ok pt_until c a 3 3 2000 90 90 +b = pt_admit 200050 0 pt_req 2 0 0 0 90 +x = pt_admit 210050 0 pt_req 1 0 0 0 90 +pt_ok pt_until c x 3 4 400 90 91 +pt_ok eq sched_stat 29 add b 1 92 +pt_ok eq sched_cancel b 1 93 +pt_ok eq sched_stat 29 0 94 +pt_drain c 2 3000 95 +pt_ok eq get suse 0 0 96 +pt_down c 97 +end + +note Phase W: bounded candidate work. Window 4 slots, dispatch budget 2: +note 12 ready jobs fill slots 0..11, beyond any one window. Each pick reads +note at most 4 slots (checked at every step, exit 9) and the cursor still +note reaches every slot, so all 12 run. 101 means some never did. +fn pt_window to void +c = pt_setup 2 16 16 pt_req 4 1024 1 8 101 +pt_ok eq sched_policy sched_stat 24 4 2 sched_stat 27 1000 0 101 +for i ulong 12 +j = pt_admit add mul add i 1 10000 30 0 0 101 +end +pt_drain c 12 5000 101 +pt_ok eq sched_stat 4 12 102 +pt_down c 103 +end + +fn pt_mode to void +a = new uchar 16 0 +if ne argcnt 2 +ret +end +n = argread 1 a 0 16 +if eq n 4 +put ptm 0 1 +end +if eq n 9 +put ptm 0 2 +end +end + fn pt_stats to void r = write 1 pst 0 len pst pt_num sched_stat 2 @@ -420,6 +635,7 @@ end note The regression phases A and B return their verdict, so both run and note print their witness; the first failing one is the exit status. fn main to int +pt_mode pt_impossible pt_churn pt_release @@ -432,6 +648,11 @@ end if ne rb 0 ret rb end +pt_starve +pt_tickets +pt_lease +pt_rcancel +pt_window if ne write 1 pok 0 len pok long len pok ret 100 end From fc5ca9fbc49df5bb32774b4beaab99379d0b513f Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Fri, 6 Nov 2026 23:30:56 -0600 Subject: [PATCH 02/20] chore(crumb): recompile after DRA-396 --- .crumb | 8 ++++---- seed/node/.crumb | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.crumb b/.crumb index f52231b71..6d7cfd3ed 100644 --- a/.crumb +++ b/.crumb @@ -108,14 +108,14 @@ } ], "children_root": "sha256:966bedb54caa4209f9ab84526da66f6b13ce72e8831470170364eb5881355748", - "compiled_at": "2026-11-07T05:24:59Z", + "compiled_at": "2026-11-07T05:30:54Z", "compiler": "crumb-compile/1", - "digest": "sha256:637c74506d66dc02aac6516cc910dde36a093db01fc824fdcfbc2a28746e64ae", + "digest": "sha256:227b66a0461af809959132effab7fb8ce89090da7e4737830798cfe8a3b52cd6", "evidence_files": 15701, "evidence_root": "sha256:85d012f3953b2dc22d5b3b69bddf395109e1906144bb3ae6bdedf7ffbc9bb909", "files": 24262, - "generated_at_commit": "68c4686b47f8d851311cfc054106dc60418edd8f", - "source_tree": "sha256:d4474f1344daa70ec056e39d6005e97294ac723f3d31158952e3b503915ee560" + "generated_at_commit": "d868f381bbd61fa6889fb6af01b9a6bb346870a9", + "source_tree": "sha256:e69f6d764b5775b32238e802e246360d4cbe5d7a9e9c619a65ec60f515db5eed" }, "owner_lane": "", "provenance": { diff --git a/seed/node/.crumb b/seed/node/.crumb index 1490be0cb..b4f07b18a 100644 --- a/seed/node/.crumb +++ b/seed/node/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-11-07T05:22:36Z", + "compiled_at": "2026-11-07T05:30:54Z", "compiler": "crumb-compile/1", - "digest": "sha256:65192349b7404c211a674800b04944de68f6bc3708a67b746294f1a1ecd6a9a2", + "digest": "sha256:52bf352c6bc115785006025498a531cde0eba3fa039923759e6697e1ae396294", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 26, - "generated_at_commit": "41282f5f9b920e0a049159f6eff59938f029d474", - "source_tree": "sha256:9616c594c149318463cb00a65a3a8866efda168db76ac87f8d58284da492fcb4" + "generated_at_commit": "d868f381bbd61fa6889fb6af01b9a6bb346870a9", + "source_tree": "sha256:0f32928b2aeab8cb2e3eaa16cb07b40899d24ae453981b209cd5c7ecc120b698" }, "owner_lane": "", "seed": { From c4be7afb33fc9a663766bf2100e9afcd63914108 Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Fri, 6 Nov 2026 23:35:47 -0600 Subject: [PATCH 03/20] node(sched): phase Q note names the lapse check (80) --- .crumb | 8 ++++---- seed/node/.crumb | 8 ++++---- seed/node/schedpol-gate.om | 3 ++- seed/node/schedpol-test.om | 3 ++- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.crumb b/.crumb index 6d7cfd3ed..a51ec16fb 100644 --- a/.crumb +++ b/.crumb @@ -108,14 +108,14 @@ } ], "children_root": "sha256:966bedb54caa4209f9ab84526da66f6b13ce72e8831470170364eb5881355748", - "compiled_at": "2026-11-07T05:30:54Z", + "compiled_at": "2026-11-07T05:35:46Z", "compiler": "crumb-compile/1", - "digest": "sha256:227b66a0461af809959132effab7fb8ce89090da7e4737830798cfe8a3b52cd6", + "digest": "sha256:658a4c9d424d945d1f1fbd20c9fce7ff83ba8cd5153e7cb1eee200f5cc9f3334", "evidence_files": 15701, "evidence_root": "sha256:85d012f3953b2dc22d5b3b69bddf395109e1906144bb3ae6bdedf7ffbc9bb909", "files": 24262, - "generated_at_commit": "d868f381bbd61fa6889fb6af01b9a6bb346870a9", - "source_tree": "sha256:e69f6d764b5775b32238e802e246360d4cbe5d7a9e9c619a65ec60f515db5eed" + "generated_at_commit": "fc5ca9fbc49df5bb32774b4beaab99379d0b513f", + "source_tree": "sha256:af253f7b121b0855a56c847ebbc4284854938925b02c9a79490ad2705289f3f1" }, "owner_lane": "", "provenance": { diff --git a/seed/node/.crumb b/seed/node/.crumb index b4f07b18a..ed551b6f4 100644 --- a/seed/node/.crumb +++ b/seed/node/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-11-07T05:30:54Z", + "compiled_at": "2026-11-07T05:35:46Z", "compiler": "crumb-compile/1", - "digest": "sha256:52bf352c6bc115785006025498a531cde0eba3fa039923759e6697e1ae396294", + "digest": "sha256:fd0e1019171b9db7cbe9e91ad1d0113b339c40a80e5be79bbff83f91047a286d", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 26, - "generated_at_commit": "d868f381bbd61fa6889fb6af01b9a6bb346870a9", - "source_tree": "sha256:0f32928b2aeab8cb2e3eaa16cb07b40899d24ae453981b209cd5c7ecc120b698" + "generated_at_commit": "fc5ca9fbc49df5bb32774b4beaab99379d0b513f", + "source_tree": "sha256:e7cddbfc8fcc31e570a944c1e2e576f5caa598eb42127e1f8c59aa534cd1627f" }, "owner_lane": "", "seed": { diff --git a/seed/node/schedpol-gate.om b/seed/node/schedpol-gate.om index 5231266ab..2997b79d3 100644 --- a/seed/node/schedpol-gate.om +++ b/seed/node/schedpol-gate.om @@ -2332,7 +2332,8 @@ note Phase Q: admission tickets. Limit 2: p1 (400 ms) and p2 (900 ms) fill note it; X then Y are refused and hold tickets in that order. When p1 is note reviewed there is room for one: Y asking first is refused (75), X is note admitted (76); Y enters once more room returns (78). A ticket not -note asked about for the lifetime (20 events) lapses and stops blocking (79). +note asked about for the lifetime (20 events) lapses, so a new caller is +note admitted although the old holder never came back (80). fn pt_tickets to void c = pt_setup 2 2 8 pt_req 4 1024 1 8 70 pt_ok eq sched_policy sched_stat 24 64 64 sched_stat 27 1000 0 70 diff --git a/seed/node/schedpol-test.om b/seed/node/schedpol-test.om index 2249dd6a5..16378522e 100644 --- a/seed/node/schedpol-test.om +++ b/seed/node/schedpol-test.om @@ -471,7 +471,8 @@ note Phase Q: admission tickets. Limit 2: p1 (400 ms) and p2 (900 ms) fill note it; X then Y are refused and hold tickets in that order. When p1 is note reviewed there is room for one: Y asking first is refused (75), X is note admitted (76); Y enters once more room returns (78). A ticket not -note asked about for the lifetime (20 events) lapses and stops blocking (79). +note asked about for the lifetime (20 events) lapses, so a new caller is +note admitted although the old holder never came back (80). fn pt_tickets to void c = pt_setup 2 2 8 pt_req 4 1024 1 8 70 pt_ok eq sched_policy sched_stat 24 64 64 sched_stat 27 1000 0 70 From 580ca4db9e7ba751bb8abd0810b291b2762c49a6 Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Fri, 6 Nov 2026 23:46:20 -0600 Subject: [PATCH 04/20] evidence(node-schedpol): record two receipts deleted before commit (9d68aa95 FAIL phase-V race at 5a913360; a612ce2f 31/0 at fc5ca9fb), reconstructed from console output --- ...dfefdce325ce9ea92ca153f7cce4a976cf4dd.json | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 evidence/node-schedpol/discarded-runs.1185bb4bc05d495130fc608b004dfefdce325ce9ea92ca153f7cce4a976cf4dd.json diff --git a/evidence/node-schedpol/discarded-runs.1185bb4bc05d495130fc608b004dfefdce325ce9ea92ca153f7cce4a976cf4dd.json b/evidence/node-schedpol/discarded-runs.1185bb4bc05d495130fc608b004dfefdce325ce9ea92ca153f7cce4a976cf4dd.json new file mode 100644 index 000000000..a7ffd8084 --- /dev/null +++ b/evidence/node-schedpol/discarded-runs.1185bb4bc05d495130fc608b004dfefdce325ce9ea92ca153f7cce4a976cf4dd.json @@ -0,0 +1,38 @@ +{ + "kind": "record of receipts deleted before commit (reconstructed from the runner console output; the original files are lost)", + "note": "Both files were generated with receipt.py --write, never committed, and removed from the working tree by the sched lane. This record keeps their outcome. It is not the original receipt and carries none of its hashes beyond the receipt digest the runner printed.", + "project": "P-DRA-14", + "runs": [ + { + "cases": "cases-395 (21 cases)", + "cause": "phase V race: the done report of the second job could land after the last collect, so suse was read before release. Not the mutation: phase V does not use sched_publish.", + "failed_case": { + "case": "mut-ready-unstamped", + "expected_exit": 54, + "run_exit": 122, + "stderr": "", + "stdout": "", + "wall_ms": 928 + }, + "fix": "0bea48c3: one more collect before the release check; 30/30 stable after; receipt b5a72289 at 68c4686b", + "issue": "DRA-395", + "receipt_sha256": "9d68aa954362249db24a62748518d45c60f2dd2bb3fad71a9b597e45362910ff", + "source_commit": "5a913360", + "summary": { + "fail": 1, + "pass": 20 + } + }, + { + "cases": "cases-396 (31 cases)", + "issue": "DRA-396", + "receipt_sha256": "a612ce2f2de6a09c3ccabd989cecc6ab8b05b492ff64a2cba8d81c7248c4e6ba", + "source_commit": "fc5ca9fb", + "summary": { + "fail": 0, + "pass": 31 + }, + "why_removed": "superseded by a fixture-note correction (phase Q lapse code 79 -> 80) before commit; removal was wrong, a rerun should add a file" + } + ] +} From d1d0323cc52aa73e3f701a89fd8c8d2521c80d8f Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Fri, 6 Nov 2026 23:46:22 -0600 Subject: [PATCH 05/20] chore(crumb): recompile --- .crumb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.crumb b/.crumb index a51ec16fb..9791205ec 100644 --- a/.crumb +++ b/.crumb @@ -108,14 +108,14 @@ } ], "children_root": "sha256:966bedb54caa4209f9ab84526da66f6b13ce72e8831470170364eb5881355748", - "compiled_at": "2026-11-07T05:35:46Z", + "compiled_at": "2026-11-07T05:46:21Z", "compiler": "crumb-compile/1", - "digest": "sha256:658a4c9d424d945d1f1fbd20c9fce7ff83ba8cd5153e7cb1eee200f5cc9f3334", - "evidence_files": 15701, - "evidence_root": "sha256:85d012f3953b2dc22d5b3b69bddf395109e1906144bb3ae6bdedf7ffbc9bb909", - "files": 24262, - "generated_at_commit": "fc5ca9fbc49df5bb32774b4beaab99379d0b513f", - "source_tree": "sha256:af253f7b121b0855a56c847ebbc4284854938925b02c9a79490ad2705289f3f1" + "digest": "sha256:4718a743df65f9fb251ed3b2d6805f4a55de1412bb893cbdd627478a5661b8c3", + "evidence_files": 15702, + "evidence_root": "sha256:487ad1ec3f3d7273273189493887fc7b4c5083fc5d32310b19c3b5497393d209", + "files": 24263, + "generated_at_commit": "580ca4db9e7ba751bb8abd0810b291b2762c49a6", + "source_tree": "sha256:8c27868846810046a254ee33917e178534846cfc50932051999abcc0b804160f" }, "owner_lane": "", "provenance": { From 9e09bdab2e0414a5f9085327110ab69b93f8f8fc Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Fri, 6 Nov 2026 23:50:26 -0600 Subject: [PATCH 06/20] evidence(node-schedpol): DRA-396 receipt 8a46f801 at d1d0323c, 31 PASS / 0 FAIL --- ...5c799fc7ff79da89946e53acbeb934b2e973b.json | 1174 +++++++++++++++++ 1 file changed, 1174 insertions(+) create mode 100644 evidence/node-schedpol/receipt.8a46f80121b75f85eb986cc61bc5c799fc7ff79da89946e53acbeb934b2e973b.json diff --git a/evidence/node-schedpol/receipt.8a46f80121b75f85eb986cc61bc5c799fc7ff79da89946e53acbeb934b2e973b.json b/evidence/node-schedpol/receipt.8a46f80121b75f85eb986cc61bc5c799fc7ff79da89946e53acbeb934b2e973b.json new file mode 100644 index 000000000..a8afa2c80 --- /dev/null +++ b/evidence/node-schedpol/receipt.8a46f80121b75f85eb986cc61bc5c799fc7ff79da89946e53acbeb934b2e973b.json @@ -0,0 +1,1174 @@ +{ + "checks": [ + { + "binary_sha256": "a45e89f44c26666181a215b847d475460d6d4ecdee944f4904644286979a719b", + "case": "schedpol-gate", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-395", + "repeat": { + "outcomes": { + "0": 10 + }, + "runs": 10 + }, + "run_exit": 0, + "source_sha256": "8d0c497ecb844d28b99863add00b5b820e0909a8f58f49968d1adb9da78ee978", + "stderr": "", + "stdout": "schedpol events=110 examined=4608 assigned=10 hol_stops=0 bypasses=4 reservations=1\nPASS node schedpol\n", + "stdout_has": [ + "PASS node schedpol" + ], + "verdict": "PASS", + "wall_ms": 81082 + }, + { + "binary_sha256": "a45e89f44c26666181a215b847d475460d6d4ecdee944f4904644286979a719b", + "case": "schedpol-gate-fifo", + "compile_exit": 0, + "expected_exit": 11, + "issue": "DRA-396", + "repeat": { + "outcomes": { + "11": 5 + }, + "runs": 5 + }, + "run_exit": 11, + "source_sha256": "8d0c497ecb844d28b99863add00b5b820e0909a8f58f49968d1adb9da78ee978", + "stderr": "", + "stdout": "schedpol hol witness head=20050 fits_behind=30050 free_cpu=1 idle_worker=1 hol_stops=40\nschedpol hol witness head=20050 fits_behind=50050 free_cpu=1 idle_worker=1 hol_stops=40\n", + "stdout_has": [ + "schedpol hol witness head=20050 fits_behind=30050 free_cpu=1 idle_worker=1", + "schedpol hol witness head=20050 fits_behind=50050 free_cpu=1 idle_worker=1" + ], + "verdict": "PASS", + "wall_ms": 14606 + }, + { + "binary_sha256": "a45e89f44c26666181a215b847d475460d6d4ecdee944f4904644286979a719b", + "case": "schedpol-gate-noreserve", + "compile_exit": 0, + "expected_exit": 61, + "issue": "DRA-396", + "repeat": { + "outcomes": { + "61": 5 + }, + "runs": 5 + }, + "run_exit": 61, + "source_sha256": "8d0c497ecb844d28b99863add00b5b820e0909a8f58f49968d1adb9da78ee978", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 34233 + }, + { + "binary_sha256": "c1898fbe5ca3c36c4e52c88aead365b46a4abff6b7358923b4a8fdb42bf08c5d", + "case": "sched-gate", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-287", + "run_exit": 0, + "source_sha256": "f003d1aae530d365dbeff7e355c5961f8b8d081a6eb1c89da3f9f0aaa917f573", + "stderr": "", + "stdout": "idle ticks workers=0 creator=0 wake rounds=200 mean_us=21 max_us=224\nPASS node sched\n", + "verdict": "PASS", + "wall_ms": 7965 + }, + { + "binary_sha256": "be2ced1fc03c69b0c9e4e0a6ac6f9b379f563d93653e67e725e2007f86344364", + "case": "auth-gate", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-288", + "run_exit": 0, + "source_sha256": "d524f5180b908a0aea2dfa26a4d6456ca0fc9ebf8c3f0e6c26f272da8fec8419", + "stderr": "", + "stdout": "PASS node authority\n", + "verdict": "PASS", + "wall_ms": 753 + }, + { + "binary_sha256": "32f6ab04149379de923859ba0f5988a490f67e8d3ba979707b62024becc05e9b", + "case": "journal-gate", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-289", + "run_exit": 0, + "source_sha256": "9977322687e4e31a3d6bb6f388f1badaac897d287bdf33aacb3c98f93262c574", + "stderr": "", + "stdout": "PASS node journal\n", + "verdict": "PASS", + "wall_ms": 3322 + }, + { + "binary_sha256": "6bb9918cf98f910fa9dfeafc6485f8a35e9796f7c28280f479f82742dfb343d1", + "case": "code-test-unit", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-290", + "run_exit": 0, + "source_sha256": "7abff531eabe8f5a71d0fcf1fe58669d9f53f61103a0c8dbec8921e626cf9c8d", + "stderr": "", + "stdout": "CWR 0 0 2\n\n\n\nCWE 0 0 2 1\nCWE 0 1002 1 2\nCWR 0 0 2\n\n\n\nCWE 0 0 2 1\nCWO 0 FAIL 11 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 2\nCWO 0 FAIL 10 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 9\nCWO 0 FAIL 10 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 10 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 2\nCWE 0 1013 1 3\nCWR 0 0 2\n\n\n\nCWE 0 0 2 2\nCWE 0 1023 1 3\nCWR 0 0 2\n\n\n\nCWE 0 0 2 2\nCWO 0 FAIL 10 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 13 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 13 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 13 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 13 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 11 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWE 0 1034 1 4\nCWR 0 0 13\nTests passed.\nCWE 0 0 2 4\nCWO 0 FAIL 14 0\nCWR 0 0 13\nTests passed.\nCWE 0 0 2 4\nCWO 0 FAIL 14 0\nCWR 0 0 13\nTests passed.\nCWE 0 0 2 4\nCWE 0 1045 1 5\nCWR 0 0 15\nFile not found.\nCWE 0 0 2 5\nCWO 0 FAIL 10 0\nCWR 0 0 15\nFile not found.\nCWE 0 0 2 5\nCWO 0 PASS 1 0\nCWO 0 FAIL 18 0\nCWO 0 FAIL 18 0\nCWO 0 FAIL 18 0\nCWE 0 0 3 0\nCWE 0 0 3 1\nCWE 0 0 3 2\nCWO 0 FAIL 17 0\nCWE 0 0 3 6\nCWE 0 0 3 6\nCWO 0 FAIL 15 0\nCWE 0 0 3 0\nCWE 0 0 3 4\nCWO 0 FAIL 17 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWE 0 1054 1 4\nCWE 0 0 3 0\nCWE 0 0 3 0\nCWO 0 FAIL 15 0\nCWE 0 0 3 5\nCWO 0 FAIL 13 0\nCWE 0 0 3 0\nCWO 0 PASS 1 0\nCWE 0 0 3 6\nCWO 0 FAIL 15 0\nCWE 0 0 3 0\nCWO 0 FAIL 15 0\nCWO 0 FAIL 12 7\nCWO 0 FAIL 20 0\nCWE 0 1061 1 1\nCWP 0 1 193\nTask: Fix the error in this file and confirm its goal.\nFile: jobs/item76666.om\nGoal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.\nState: unread\nAnswer:\n\ncode checks=54 fail=0\n", + "verdict": "PASS", + "wall_ms": 49 + }, + { + "binary_sha256": "3866cf0957f260f2c113eb33e544367209ad688aef545201025f3afd75234fac", + "case": "mut-impossible-admitted", + "compile_exit": 0, + "expected_exit": 31, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "if not sp_feas req\n", + "to": "if false\n" + }, + "run_exit": 31, + "source_sha256": "aa631944caa7c596158e20c9c642d324ec01f93b9203997ee4a97ffb6ca4e68a", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 1 + }, + { + "binary_sha256": "40d1a18d701c7ab1ec35a3490e4995b4b847d11b0a760fa63bac454a10d87ffa", + "case": "mut-collect-no-release", + "compile_exit": 0, + "expected_exit": 133, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "j = sub b 1\nsp_give j\n", + "to": "j = sub b 1\n" + }, + "run_exit": 133, + "source_sha256": "d8004311364059e7f186bf5ee048b7a3a67874ba7e575551105cfc9eb70818d7", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 413 + }, + { + "binary_sha256": "9063d726a3fa169717e97c41b1825ffb580bcd30a297f82494c6063cc7c57cde", + "case": "mut-capacity-ignored", + "compile_exit": 0, + "expected_exit": 44, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "if gt sp_need req k a\n", + "to": "if false\n" + }, + "run_exit": 44, + "source_sha256": "54097bd927a2b0f3e8bb86c108cce01019232d184aacf4b5d7e38a4da662bb37", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 435 + }, + { + "binary_sha256": "b31b628ae60d8fd7508a54bb197beee6beb7e06e82363ce5e849d3d3a5226493", + "case": "mut-ready-unstamped", + "compile_exit": 0, + "expected_exit": 54, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ne and get sjdep j topics 0\nsp_ready j\n", + "to": "if ne and get sjdep j topics 0\nput sjst j 2\n" + }, + "run_exit": 54, + "source_sha256": "0cd2f6c6f674e02bc94c6e22be5699b4d6bc4822e41f6394d94544c227e97e69", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 1013 + }, + { + "binary_sha256": "f4b6cf96f3c8130e162e0d1eca01bbc02db9386d81c22bf32eb1005e4b1d5f37", + "case": "mut-give-after-review", + "compile_exit": 0, + "expected_exit": 122, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "j = sub b 1\nsp_give j\nif ge sched_count 4 4 get sclim 1\ncontinue\nend\n", + "to": "j = sub b 1\nif ge sched_count 4 4 get sclim 1\ncontinue\nend\nsp_give j\n" + }, + "run_exit": 122, + "source_sha256": "35d1d8d9e1c4d277eaf5d193953ceaef63495782dd99c6f4c3e6843b61a33be6", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 896 + }, + { + "binary_sha256": "955d84d903ef1484b4e063a3e31276063dcee1d33f9f0f48e03066b46572a176", + "case": "mut-no-take", + "compile_exit": 0, + "expected_exit": 130, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "end\nsp_take j\nif eq get scpol 5 add j 1\n", + "to": "end\nif eq get scpol 5 add j 1\n" + }, + "run_exit": 130, + "source_sha256": "f0faff3b7550933cbbf7c6cc3aa47d9a0088f46d808f1f4aac7c133f6cd5a11c", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 11 + }, + { + "binary_sha256": "d24b49ded2cb86195f38519101b09ddad61c4115430d073d5be57126401b8675", + "case": "mut-cap-below-use", + "compile_exit": 0, + "expected_exit": 131, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "if lt sp_need caps k get suse k\n", + "to": "if false\n" + }, + "run_exit": 131, + "source_sha256": "5ffb9a8ddecb176381f38d567470dec70f50b5711f3a11dea670b343c81c0af6", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 11 + }, + { + "binary_sha256": "f648ef3526d20bc74ca24776a773b64222bb756e883bb96734825baa81056337", + "case": "mut287-wake-all", + "compile_exit": 0, + "expected_exit": 16, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ne and sc_cell w 32 topics 0\n", + "to": "if true\n" + }, + "run_exit": 16, + "source_sha256": "a2f653c30c921f004ff92402aad859d42de9a9296634bf1d3671fe70a2917eda", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 601 + }, + { + "binary_sha256": "99b19a90bdbb289ea234549981d2b01e229bc08a49a9c249f943bb1cc0bdabc1", + "case": "mut287-no-wake", + "compile_exit": 0, + "expected_exit": 34, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "sc_set w 0 q\nsc_wake w\n", + "to": "sc_set w 0 q\n" + }, + "run_exit": 34, + "source_sha256": "bde0767cc6ce40cb433256a3c59b05182b895dbc36522e5e662c983a37f26fb8", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 6320 + }, + { + "binary_sha256": "b5eea930ca32ca47a9541c1faf403a3523e9fb53578f5fccafcf66e5e3e7d7c5", + "case": "mut287-review-unbounded", + "compile_exit": 0, + "expected_exit": 50, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ge sched_count 4 4 get sclim 1\n", + "to": "if false\n" + }, + "run_exit": 50, + "source_sha256": "8c74158ae840512702065168cae3e74036b0fabf62e1612a83af33785506280c", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 3358 + }, + { + "binary_sha256": "23a70d67b23fdc2748fd1f578edeacbe018ccd78c629e97fcfe888b1aaaaf718", + "case": "mut287-admit-unbounded", + "compile_exit": 0, + "expected_exit": 48, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ge sched_count 1 3 get sclim 0\n", + "to": "if false\n" + }, + "run_exit": 48, + "source_sha256": "c1634072828456dcc9ce05268bf97f605300e025b6a2c5b3372dba93f9a8c889", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 2842 + }, + { + "binary_sha256": "4ae595b592d61d9fa044b2f9d5957e73c2244938297d3e5f88f93777e98cfe37", + "case": "mut287-unknown-rerun", + "compile_exit": 0, + "expected_exit": 83, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "put sjst j 6\n", + "to": "put sjst j 2\n" + }, + "run_exit": 83, + "source_sha256": "d1cfbbb069dddc79b3e12e5e91940c8dbce758e8c94d5111136de345faaf02bf", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 6769 + }, + { + "binary_sha256": "49029576c267e79bf3d777c65fb600e40c29f01a358216a4dac74405551bd5a8", + "case": "mut287-lost-no-ack", + "compile_exit": 0, + "expected_exit": 92, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "sc_set w 64 get scseq w\n", + "to": "" + }, + "run_exit": 92, + "source_sha256": "4bbd87d8c49f1e78faabdf78d40d7df3c61199a513f4bb0c8630d9b9d8c3ec18", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 5280 + }, + { + "binary_sha256": "67d4254d37d4c41ac5f2754bb1a170bdb8f41e5e4827215011fefd4bd491badf", + "case": "mut287-deps-ignored", + "compile_exit": 0, + "expected_exit": 68, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "put sjst j 1\n", + "to": "put sjst j 2\n" + }, + "run_exit": 68, + "source_sha256": "73230032e14f3fd578cb78514aef7331a14ee89ed8e13baa8ef17c9f5203c431", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 3430 + }, + { + "binary_sha256": "ee751de4371b0d18e523634eff4ea4fa8b24cda72f378d7e0fdb7e40933c9561", + "case": "mut287-super-spin", + "compile_exit": 0, + "expected_exit": 138, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/super.om", + "from": "iv = interval\n", + "to": "iv = long 0\n" + }, + "run_exit": 138, + "source_sha256": "924e9c46e77bd81536d94b448c423977638d199253f39238302d5ff23aa8c62e", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 2211 + }, + { + "binary_sha256": "df3bb45631784a631ac3e5dff51a6192e93f2dbec813a23455169db3f34676ca", + "case": "mut288-pause-ignored", + "compile_exit": 0, + "expected_exit": 121, + "issue": "DRA-288", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ne get scpause 0 0\n", + "to": "if false\n" + }, + "run_exit": 121, + "source_sha256": "740fc96446b66b3e03a5b7291f04ba8d54f0fe8a62a33112dbd11c663cb9937f", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 738 + }, + { + "binary_sha256": "3040936a7c9d3053b52982bd918bed91911bab2c42a124dc20f36ee6a5eed693", + "case": "mut396-cursor-stuck", + "compile_exit": 0, + "expected_exit": 101, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "put scpol 4 rem add get scpol 4 get scpol 1 64\n", + "to": "" + }, + "run_exit": 101, + "source_sha256": "d69a57acc474ec0aba065a0baa04b6820ae74945dccbf7e94a0fbe9f7618d1af", + "stderr": "", + "stdout": "schedpol events=109 examined=4544 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 12186 + }, + { + "binary_sha256": "e6e86b506105aeb7badcd478e62b994381e865d323a31d9b4707aeb4fe97d234", + "case": "mut396-tickets-ignored", + "compile_exit": 0, + "expected_exit": 75, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "n = get scpol 6\nif eq n 0\nret true\nend\nroom", + "to": "n = ulong 0\nif eq n 0\nret true\nend\nroom" + }, + "run_exit": 75, + "source_sha256": "5c6e6ff14707ec7a2031f5bab093951affddfdddc2100e0730e24f45b694f91f", + "stderr": "", + "stdout": "schedpol events=108 examined=4480 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 4378 + }, + { + "binary_sha256": "cb7ebe05a850fed1c600bb2299ccaaf9308a758daf389c055a64023cb4fa066a", + "case": "mut396-no-holdback", + "compile_exit": 0, + "expected_exit": 61, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "rq = get sjneed rj\n", + "to": "rq = ulong 0\n" + }, + "run_exit": 61, + "source_sha256": "1a113c2043714e2e80c82d7733aa63165632885a92b5697688e05aa7235c41c2", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 6832 + }, + { + "binary_sha256": "aef4bb53866e7c8e731ccc695edd0e3d38f0a5564e08a405ea643bc179f14706", + "case": "mut396-never-reserve", + "compile_exit": 0, + "expected_exit": 61, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "put scpol 5 add o 1\n", + "to": "" + }, + "run_exit": 61, + "source_sha256": "6315b5a83e85ceebde92ff746cac46e835f50bc39cd59f0e670198e4c960bd2c", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 6830 + }, + { + "binary_sha256": "4a09c45fc5583e6d1cc324b9cd9f41b667c0b1baebd1ed2631175bdf4093f8dc", + "case": "mut396-lease-never", + "compile_exit": 0, + "expected_exit": 82, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ge now d\n", + "to": "if false\n" + }, + "run_exit": 82, + "source_sha256": "cc367c5f92f735fe225499a291bf8b04d367f526cc5a2b9fdb2c338b69ea39e7", + "stderr": "", + "stdout": "schedpol events=108 examined=4480 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 7772 + }, + { + "binary_sha256": "6f6bec3606faba91d609ea3dab93c7b9acf678679f091638778209528f378e18", + "case": "mut396-cancel-keeps-reserve", + "compile_exit": 0, + "expected_exit": 94, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "put sjst j 0\nif eq get scpol 5 add j 1\nput scpol 5 0\nend\n", + "to": "put sjst j 0\n" + }, + "run_exit": 94, + "source_sha256": "04b13c9012cf14f8be33edc21d68a92bd59c4f65930980afa746bfca34b1e097", + "stderr": "", + "stdout": "schedpol events=112 examined=4672 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 6612 + }, + { + "binary_sha256": "3ff2202873416de387e2942747bbc2487b6ab858e5661486ab93ad28d66c6700", + "case": "mut396-window-ignored", + "compile_exit": 0, + "expected_exit": 9, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "for i ulong win bound 64\n", + "to": "for i ulong 64 bound 64\n" + }, + "run_exit": 9, + "source_sha256": "1a761e3ed4b1287bd52c02998c0be92e21be34ef084d0e829f5e54f313e8cf26", + "stderr": "", + "stdout": "schedpol events=109 examined=4480 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 7215 + }, + { + "binary_sha256": "b0e477a5bb6670fb5f4a136fac91cee0ff06419002562c4fce8570c5e9e205a8", + "case": "mut396-tickets-never-lapse", + "compile_exit": 0, + "expected_exit": 80, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if lt add get stts t get scpol 7 get scst 2\n", + "to": "if false\n" + }, + "run_exit": 80, + "source_sha256": "2ee0015661cb7dad00abd8b7c2861e6cd5c52118be232d20b5cdec6cdff6a055", + "stderr": "", + "stdout": "schedpol events=109 examined=4544 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 5065 + } + ], + "compiler": { + "path": "seed/out/omc", + "sha256": "5f90edea61bac241398df5036990d899361a5acd9decb37954ce088ec0f6f6df" + }, + "cpu_affinity": [ + 8, + 9 + ], + "execution": "NATIVE Linux AArch64 host CPU (DGX Spark host, no GPU opened)", + "hashes": { + "seed/authority/action.om": "59cb9c3dfdcd9193bc4a272deda4fcd256a0d7693f3bcb58bc4e30ed78faab2b", + "seed/node/auth-gate.om": "d524f5180b908a0aea2dfa26a4d6456ca0fc9ebf8c3f0e6c26f272da8fec8419", + "seed/node/auth-test.om": "af66c87f83d73a5bdbaf181378eb69bb0645a86fe9b39de2f1b714041fbc20b8", + "seed/node/auth.om": "edf2f075d3751a8025363bc658252537f865dfc29f975fcf5d93c353b3282b30", + "seed/node/code-test.om": "df87a21e31f38d85ab9145af3fb18bafc52144a20aed0d9fbad60f6059ddacd0", + "seed/node/code.om": "aa9f8463fbe9534626c205e991e3a2170a25cbf91a106932ec399353583c0bf7", + "seed/node/gram.om": "ebba1f4c693f218969dc2f17eb680760977d38d694ac76db477853aefa64b291", + "seed/node/journal-gate.om": "9977322687e4e31a3d6bb6f388f1badaac897d287bdf33aacb3c98f93262c574", + "seed/node/journal.om": "7f5aa6f6aa697087c4dd5c8248fd747dc8a08f1f57793243cb56f8f709c83ae4", + "seed/node/pool.om": "e7fba928bdc5c4194e7aee42109265de4f172d2b197946133d788b2dbcb30ccc", + "seed/node/sched-gate.om": "f003d1aae530d365dbeff7e355c5961f8b8d081a6eb1c89da3f9f0aaa917f573", + "seed/node/sched-test.om": "29a3587d35a217403c63395eb2b11b4992727812af66512be3e452ea6381a545", + "seed/node/sched.om": "4ad0cc9eaa3b5aa2fcae4a1e7df0b384bb5985fba9e9d7cb4febadcb08070724", + "seed/node/schedpol-gate.om": "8d0c497ecb844d28b99863add00b5b820e0909a8f58f49968d1adb9da78ee978", + "seed/node/schedpol-test.om": "45dcde63875b9fd8938d38f23747178768e62efc5fdd8a2dea8636672ccfd294", + "seed/node/super.om": "d104ac8116c6df57fdc93f03791d7315e5b60875d8d6177480ef9967b6f53d5a", + "seed/node/transport.om": "d0dd69ef5e0b71294a2390b3526865d62ca07accd269b9ce57a028339e34f6da" + }, + "issue": "DRA-396", + "platform": "Linux 7.0.0-1019-nvidia aarch64 spark-b87b", + "project": "P-DRA-14", + "script": { + "cases": { + "cases": [ + { + "case": "schedpol-gate", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "expect": 0, + "gate": "seed/node/schedpol-gate.om", + "issue": "DRA-395", + "repeat": 10, + "stdout_has": [ + "PASS node schedpol" + ], + "timeout": 120 + }, + { + "args": [ + "fifo" + ], + "case": "schedpol-gate-fifo", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "expect": 11, + "gate": "seed/node/schedpol-gate.om", + "issue": "DRA-396", + "repeat": 5, + "stdout_has": [ + "schedpol hol witness head=20050 fits_behind=30050 free_cpu=1 idle_worker=1", + "schedpol hol witness head=20050 fits_behind=50050 free_cpu=1 idle_worker=1" + ], + "timeout": 120 + }, + { + "args": [ + "noreserve" + ], + "case": "schedpol-gate-noreserve", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "expect": 61, + "gate": "seed/node/schedpol-gate.om", + "issue": "DRA-396", + "repeat": 5, + "timeout": 120 + }, + { + "case": "sched-gate", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "expect": 0, + "gate": "seed/node/sched-gate.om", + "issue": "DRA-287" + }, + { + "case": "auth-gate", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/auth-test.om" + ], + "expect": 0, + "gate": "seed/node/auth-gate.om", + "issue": "DRA-288" + }, + { + "case": "journal-gate", + "clean": [ + "build/node/jt" + ], + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/journal-test.om" + ], + "expect": 0, + "gate": "seed/node/journal-gate.om", + "issue": "DRA-289" + }, + { + "args": [ + "unit", + "build/node/cu" + ], + "case": "code-test-unit", + "clean": [ + "build/node/cu" + ], + "expect": 0, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/gram.om", + "seed/node/code.om", + "seed/node/code-test.om" + ], + "issue": "DRA-290", + "om2": true + }, + { + "case": "mut-impossible-admitted", + "expect": 31, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "if not sp_feas req\n", + "if false\n" + ], + "why": "C: impossible request admitted; check sched_admitr == -8 code 31" + }, + { + "case": "mut-collect-no-release", + "expect": 133, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "j = sub b 1\nsp_give j\n", + "j = sub b 1\n" + ], + "why": "C: jobs reviewed still hold; pt_inv in pt_drain code 133" + }, + { + "case": "mut-capacity-ignored", + "expect": 44, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "if gt sp_need req k a\n", + "if false\n" + ], + "why": "D: use exceeds capacity; pt_inv in pt_drain code 44" + }, + { + "args": [ + "fifo" + ], + "case": "mut-ready-unstamped", + "expect": 54, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "if ne and get sjdep j topics 0\nsp_ready j\n", + "if ne and get sjdep j topics 0\nput sjst j 2\n" + ], + "why": "F under fifo: ready order wrong, y not first; code 54" + }, + { + "case": "mut-give-after-review", + "expect": 122, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "j = sub b 1\nsp_give j\nif ge sched_count 4 4 get sclim 1\ncontinue\nend\n", + "j = sub b 1\nif ge sched_count 4 4 get sclim 1\ncontinue\nend\nsp_give j\n" + ], + "why": "V: second CPU not released while review full; suse==0 code 122" + }, + { + "case": "mut-no-take", + "expect": 130, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "end\nsp_take j\nif eq get scpol 5 add j 1\n", + "end\nif eq get scpol 5 add j 1\n" + ], + "why": "C: running unfinished job holds nothing; pt_inv in pt_until code 130" + }, + { + "case": "mut-cap-below-use", + "expect": 131, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "if lt sp_need caps k get suse k\n", + "if false\n" + ], + "why": "C: sched_cap below use accepted; == -8 code 131" + }, + { + "case": "mut287-wake-all", + "expect": 16, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "if ne and sc_cell w 32 topics 0\n", + "if true\n" + ] + }, + { + "case": "mut287-no-wake", + "expect": 34, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "sc_set w 0 q\nsc_wake w\n", + "sc_set w 0 q\n" + ] + }, + { + "case": "mut287-review-unbounded", + "expect": 50, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "if ge sched_count 4 4 get sclim 1\n", + "if false\n" + ] + }, + { + "case": "mut287-admit-unbounded", + "expect": 48, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "if ge sched_count 1 3 get sclim 0\n", + "if false\n" + ] + }, + { + "case": "mut287-unknown-rerun", + "expect": 83, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "put sjst j 6\n", + "put sjst j 2\n" + ] + }, + { + "case": "mut287-lost-no-ack", + "expect": 92, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "sc_set w 64 get scseq w\n", + "" + ] + }, + { + "case": "mut287-deps-ignored", + "expect": 68, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "put sjst j 1\n", + "put sjst j 2\n" + ] + }, + { + "args": [ + "idle" + ], + "case": "mut287-super-spin", + "expect": 138, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/super.om", + "iv = interval\n", + "iv = long 0\n" + ] + }, + { + "case": "mut288-pause-ignored", + "expect": 121, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/auth-test.om" + ], + "issue": "DRA-288", + "mutate": [ + "seed/node/sched.om", + "if ne get scpause 0 0\n", + "if false\n" + ] + }, + { + "case": "mut396-cursor-stuck", + "expect": 101, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "put scpol 4 rem add get scpol 4 get scpol 1 64\n", + "" + ], + "why": "W: only slots 0..3 ever read; jobs in 4..11 never run; pt_drain 101" + }, + { + "case": "mut396-tickets-ignored", + "expect": 75, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "n = get scpol 6\nif eq n 0\nret true\nend\nroom", + "n = ulong 0\nif eq n 0\nret true\nend\nroom" + ], + "why": "Q: Y asking first admitted instead of refused; code 75" + }, + { + "case": "mut396-no-holdback", + "expect": 61, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "rq = get sjneed rj\n", + "rq = ulong 0\n" + ], + "why": "S: smalls refill freed CPU, big never runs; first check code 61" + }, + { + "case": "mut396-never-reserve", + "expect": 61, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "put scpol 5 add o 1\n", + "" + ], + "why": "S: no reservation, big never runs; first check code 61" + }, + { + "case": "mut396-lease-never", + "expect": 82, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if ge now d\n", + "if false\n" + ], + "why": "L: sched_overdue never reports; eq o h code 82" + }, + { + "case": "mut396-cancel-keeps-reserve", + "expect": 94, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "put sjst j 0\nif eq get scpol 5 add j 1\nput scpol 5 0\nend\n", + "put sjst j 0\n" + ], + "why": "R: reservation survives cancel; sched_stat 29 == 0 code 94" + }, + { + "case": "mut396-window-ignored", + "expect": 9, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "for i ulong win bound 64\n", + "for i ulong 64 bound 64\n" + ], + "why": "pt_step scan bound: slots read > events*db*win; exit 9" + }, + { + "case": "mut396-tickets-never-lapse", + "expect": 80, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if lt add get stts t get scpol 7 get scst 2\n", + "if false\n" + ], + "why": "Q: stale ticket of 150050 blocks new caller 160050; ge 0 code 80" + } + ], + "issue": "DRA-396", + "statuses": { + "DRA-396": "IMPLEMENTED, EXERCISED on native host; not QUALIFIED; not MERGED; not DEPLOYED", + "expected_exits": "derived from the check site each mutant targets (field why), then compared with runs", + "gpu": "NOT_RUN (not involved)" + } + }, + "cases_sha256": "503df079f0936efed91a6899634e90d424b5b525729024528bd01d63acfd43fb", + "path": "~/handoffs/hive/sched/bin/receipt.py", + "sha256": "350fbf0733c51486123c2854d1cd8ec4578622842da645769a653182b1d35cfa", + "source": "#!/usr/bin/env python3\n\"\"\"Run a scheduler-policy case list against a clean omega-mv checkout and\nwrite a content-addressed receipt (evidence//receipt..json).\n\nUsage: receipt.py CASES.json REPO OUTDIR_REL [--write]\nRun it under the queen pool lock, e.g.\n flock -o ~/handoffs/hive/queen/pool-8-9.lock taskset -c 8-9 nice -n 10 receipt.py ...\n\nA case: {\"case\", \"issue\", \"fragments\": [paths] | \"gate\": path, \"om2\": bool,\n \"mutate\": [path, old, new] (optional; old must occur exactly once),\n \"args\": [..], \"expect\": int, \"timeout\": s, \"clean\": [rel dirs removed first],\n \"stdout_has\": [substrings every run must print] (optional),\n \"repeat\": N runs, each must pass (optional, default 1)}.\nThe receipt embeds this script's source and the case list for replay.\nMutants are applied to a disposable copy of the fragment; the checkout is\nnever modified. Verification tooling only: the implementation is the .om.\n\"\"\"\nimport hashlib, json, os, platform, shutil, subprocess, sys, tempfile, time, datetime\n\ndef sh(cmd, cwd, **kw):\n return subprocess.run(cmd, cwd=cwd, capture_output=True, **kw)\n\ndef sha(path):\n h = hashlib.sha256()\n with open(path, 'rb') as f:\n h.update(f.read())\n return h.hexdigest()\n\ndef main():\n cases_path, repo, outrel = sys.argv[1], os.path.abspath(sys.argv[2]), sys.argv[3]\n write = '--write' in sys.argv\n spec = json.load(open(cases_path))\n dirty = sh(['git', 'status', '--porcelain', '--untracked-files=normal'], repo).stdout.decode()\n dirty = [l for l in dirty.splitlines() if not l[3:].startswith('build/')]\n if dirty:\n print('REFUSED: dirty tree\\n' + '\\n'.join(dirty), file=sys.stderr)\n sys.exit(3)\n head = sh(['git', 'rev-parse', 'HEAD'], repo).stdout.decode().strip()\n tree = sh(['git', 'rev-parse', 'HEAD^{tree}'], repo).stdout.decode().strip()\n omc = os.path.join(repo, 'seed/out/omc')\n work = tempfile.mkdtemp(prefix='schedrcpt-')\n files = set()\n results = []\n for c in spec['cases']:\n frags = c.get('fragments') or [c['gate']]\n src = b'om2\\n' if c.get('om2') else b''\n mut = c.get('mutate')\n if mut and mut[0] not in frags:\n print(f'REFUSED: mutant {c[\"case\"]}: {mut[0]} is not one of its fragments', file=sys.stderr)\n sys.exit(4)\n for fr in frags:\n files.add(fr)\n data = open(os.path.join(repo, fr), 'rb').read()\n if mut and mut[0] == fr:\n old, new = mut[1].encode(), mut[2].encode()\n n = data.count(old)\n if n != 1:\n print(f'REFUSED: mutant {c[\"case\"]}: pattern occurs {n} times', file=sys.stderr)\n sys.exit(4)\n data = data.replace(old, new)\n src += data\n if c.get('gate') and not mut and c.get('compose'):\n composed = b''.join(open(os.path.join(repo, f), 'rb').read() for f in c['compose'])\n if composed != src:\n print(f'REFUSED: {c[\"gate\"]} is not the concatenation', file=sys.stderr)\n sys.exit(5)\n binp = os.path.join(work, c['case'])\n p = subprocess.run([omc], input=src, capture_output=True)\n with open(binp, 'wb') as f:\n f.write(p.stdout)\n os.chmod(binp, 0o755)\n r = {'case': c['case'], 'issue': c.get('issue'), 'compile_exit': p.returncode,\n 'expected_exit': c['expect'], 'source_sha256': hashlib.sha256(src).hexdigest()}\n if mut:\n r['mutation'] = {'file': mut[0], 'from': mut[1], 'to': mut[2]}\n if p.returncode != 0:\n r.update(run_exit=None, verdict='FAIL', stderr=p.stderr.decode(errors='replace'))\n results.append(r)\n continue\n runs, code, out, err = [], None, b'', b''\n t0 = time.monotonic()\n for n in range(c.get('repeat', 1)):\n for d in c.get('clean', []):\n shutil.rmtree(os.path.join(repo, d), ignore_errors=True)\n try:\n q = subprocess.run([binp] + c.get('args', []), cwd=repo, capture_output=True,\n timeout=c.get('timeout', 120))\n code, out, err = q.returncode, q.stdout, q.stderr\n except subprocess.TimeoutExpired as e:\n code, out, err = 'timeout', e.stdout or b'', e.stderr or b''\n text = out.decode(errors='replace')\n miss = [s for s in c.get('stdout_has', []) if s not in text]\n runs.append({'exit': code, 'missing_stdout': miss})\n ok = all(x['exit'] == c['expect'] and not x['missing_stdout'] for x in runs)\n r.update(run_exit=code, wall_ms=int((time.monotonic() - t0) * 1000),\n stdout=out.decode(errors='replace')[-4000:],\n stderr=err.decode(errors='replace')[-2000:],\n binary_sha256=sha(binp),\n verdict='PASS' if ok else 'FAIL')\n if c.get('stdout_has'):\n r['stdout_has'] = c['stdout_has']\n if len(runs) > 1:\n hist = {}\n for x in runs:\n k = f\"{x['exit']}{'' if not x['missing_stdout'] else ' missing-stdout'}\"\n hist[k] = hist.get(k, 0) + 1\n r['repeat'] = {'runs': len(runs), 'outcomes': hist}\n results.append(r)\n print(f\"{r['verdict']} {c['case']} expect={c['expect']} got={code}\"\n + (f\" runs={r['repeat']['outcomes']}\" if len(runs) > 1 else ''), flush=True)\n shutil.rmtree(work, ignore_errors=True)\n rec = {\n 'project': 'P-DRA-14', 'issue': spec['issue'], 'source_commit': head, 'source_tree': tree,\n 'platform': ' '.join([platform.system(), platform.release(), platform.machine(), platform.node()]),\n 'cpu_affinity': sorted(os.sched_getaffinity(0)),\n 'execution': 'NATIVE Linux AArch64 host CPU (DGX Spark host, no GPU opened)',\n 'timestamp_utc': datetime.datetime.now(datetime.timezone.utc).isoformat(),\n 'compiler': {'path': 'seed/out/omc', 'sha256': sha(omc)},\n 'hashes': {f: sha(os.path.join(repo, f)) for f in sorted(files)},\n 'script': {'path': '~/handoffs/hive/sched/bin/receipt.py', 'sha256': sha(__file__),\n 'source': open(__file__).read(),\n 'cases_sha256': sha(cases_path), 'cases': spec},\n 'statuses': spec.get('statuses', {}),\n 'checks': results,\n 'summary': {'pass': sum(r['verdict'] == 'PASS' for r in results),\n 'fail': sum(r['verdict'] != 'PASS' for r in results)},\n }\n body = (json.dumps(rec, indent=2, sort_keys=True) + '\\n').encode()\n digest = hashlib.sha256(body).hexdigest()\n print(f\"summary pass={rec['summary']['pass']} fail={rec['summary']['fail']} receipt_sha256={digest}\")\n if write:\n d = os.path.join(repo, outrel)\n os.makedirs(d, exist_ok=True)\n path = os.path.join(d, f'receipt.{digest}.json')\n with open(path, 'wb') as f:\n f.write(body)\n print(path)\n else:\n with open(os.path.join(tempfile.gettempdir(), f'sched-receipt-{digest}.json'), 'wb') as f:\n f.write(body)\n sys.exit(0 if rec['summary']['fail'] == 0 else 1)\n\nmain()\n" + }, + "source_commit": "d1d0323cc52aa73e3f701a89fd8c8d2521c80d8f", + "source_tree": "8a471f4edf8f8721eb43961f076c90254621ae05", + "statuses": { + "DRA-396": "IMPLEMENTED, EXERCISED on native host; not QUALIFIED; not MERGED; not DEPLOYED", + "expected_exits": "derived from the check site each mutant targets (field why), then compared with runs", + "gpu": "NOT_RUN (not involved)" + }, + "summary": { + "fail": 0, + "pass": 31 + }, + "timestamp_utc": "2026-11-07T05:50:16.565338+00:00" +} From 37b01f1891868bb7fdbfca6a974afe8649747910 Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Fri, 6 Nov 2026 23:50:31 -0600 Subject: [PATCH 07/20] chore(crumb): recompile after DRA-396 receipt --- .crumb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.crumb b/.crumb index 9791205ec..dbfe33612 100644 --- a/.crumb +++ b/.crumb @@ -108,14 +108,14 @@ } ], "children_root": "sha256:966bedb54caa4209f9ab84526da66f6b13ce72e8831470170364eb5881355748", - "compiled_at": "2026-11-07T05:46:21Z", + "compiled_at": "2026-11-07T05:50:29Z", "compiler": "crumb-compile/1", - "digest": "sha256:4718a743df65f9fb251ed3b2d6805f4a55de1412bb893cbdd627478a5661b8c3", - "evidence_files": 15702, - "evidence_root": "sha256:487ad1ec3f3d7273273189493887fc7b4c5083fc5d32310b19c3b5497393d209", - "files": 24263, - "generated_at_commit": "580ca4db9e7ba751bb8abd0810b291b2762c49a6", - "source_tree": "sha256:8c27868846810046a254ee33917e178534846cfc50932051999abcc0b804160f" + "digest": "sha256:3b0d54980411c3bb00b54640b30ca7b129c9fdf3a3ebf60abc491c2c6413ef14", + "evidence_files": 15703, + "evidence_root": "sha256:18f1108fa7f81636aa11261cb78b2cc65226094a10ae5967455fcacdd2aaed36", + "files": 24264, + "generated_at_commit": "9e09bdab2e0414a5f9085327110ab69b93f8f8fc", + "source_tree": "sha256:ac5aae5ad3c69904f4c4d294b5684223cb9a6bed02e21921c421996db5cf620b" }, "owner_lane": "", "provenance": { From b0dcba4ca1c7b0b01ba54120a71939967ad6c7ff Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Sat, 7 Nov 2026 00:02:03 -0600 Subject: [PATCH 08/20] node(sched): DRA-396 review r1 fixes: room bounded by free slots, strict ticket order, jn_admit duplicate check first, reserved probe and maintenance reads counted, cursor advances only after a scan, liveness needs review progress, lease checked against its deadline --- CONTRIBUTORS.md | 2 +- seed/node/README.md | 90 ++++++++++------- seed/node/auth-gate.om | 83 +++++++++------- seed/node/journal-gate.om | 110 ++++++++++++++------- seed/node/journal-test.om | 27 ++++++ seed/node/journal.om | 15 +-- seed/node/sched-gate.om | 68 +++++++------ seed/node/sched.om | 68 +++++++------ seed/node/schedpol-gate.om | 192 ++++++++++++++++++++++++++++++------- seed/node/schedpol-test.om | 124 ++++++++++++++++++++++-- 10 files changed, 561 insertions(+), 218 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 7235d56cb..ae3004877 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -14,7 +14,7 @@ The current development method is [Human-Directed Agentic Engineering (HDAE)](RE | Claude Opus 5.5 (via omp) | DRA-289 for `seed/node`: `journal.om`, a checksummed append-only journal of every authority transition (OPEN, ADMIT, START, DONE, RELEASE, REVOKE, PAUSE, CANCEL), each checked by the recovery tables, written and fdatasync'd before anything acts on it or publishes it; a failed write or sync stops all later appends. `flock` fencing that forked workers also hold, fence numbers per creator incarnation, torn-tail cutting, refusal of corrupt records, other format versions and other objectives. Restart recovery settles operations left in flight (idempotent class 3 by its key, class 1 UNKNOWN and never rerun), releases or readmits each job, and restores authority generation and pause. `auth.om` journals through it and accepts class 3. `journal-gate.om` crashes real creators at every boundary, SIGKILLs them mid-tool and checks the result with its own reader; ten negative controls. Native AArch64 host evidence only; not QUALIFIED on the Spark gate. | | Claude Opus 5.5 (via omp) | DRA-290 for `seed/node`: `code.om`, the coding workflow driving the own Omega model (round40 checkpoint, served by aien-train `ollm serve` `/v1/completions`, aien-train #76) through the Node's scheduler, authority and journal: one inference at a time, typed read/check/replace jobs and a review check, each a cancellable child process group, the round40 repair policy enforced by the creator before every grant, explicit failure reasons and no fallback provider. `infer.om`, a bounded loopback-only completion client returning a versioned record; `tool.om`, the read/check/replace tools inside one root with omagent's path rule (moved to `seed/agent/path.om`), durable replace and sandboxed tests; `gram.om`, the repair grammar. `code-test.om` (54 checks, 15 mutants), `tests/tool-replay.py` (all 108 recorded round40 runs) and live own-model runs with cancellation and crash restart. `seed/agent/agent.om` now kills the tool's whole process group; `seed/authority/action.om` renames a local so the node composes as OM-2. Native AArch64 host evidence only; not QUALIFIED on the Spark gate. | | Claude Opus 5.5 (via omp, sched lane) | P-DRA-14 DRA-395 for `seed/node`: reconciled scheduler ownership (the spark-harness `Core::pump` at aien-sovereign-core-mv `dffdbd19` is reference-only and not deployed) and reproduced its head-of-line block in Rust and natively. `sched.om` gains four-kind resource requests packed in one word, capacity admission that refuses impossible requests and capacities below use, atomic take and release (also while a result waits for review room), and policy 0 (FIFO with the pump's head-of-line stop rule) behind one `sched_dispatch`. `schedpol-test.om` checks the capacity invariant after every creator step; its blocked-head phases print a checked witness and fail (exit 11) until fair fitting lands (DRA-396). Seven negative controls; independent review by openai-codex/gpt-6-astra. Native AArch64 host evidence only. | -| Claude Opus 5.5 (via omp, sched lane) | P-DRA-14 DRA-396 for `seed/node`: policy 1 in `sched.om`, now the default: fair fitting over a bounded window from a persistent cursor, oldest admitted first, a bypass budget that reserves the oldest bypassed job and holds back the capacity it still lacks, admission tickets so a full table cannot exclude a caller that keeps asking (`sched_room`, also asked by `jn_admit`), and leases reported once by `sched_overdue`. Slots examined are counted per read and checked against the window at every step. `schedpol-test.om` adds starvation, ticket, lease, reserved-cancel and window phases, with `fifo` and `noreserve` controls (exits 11 and 61) and eight new mutants. Native AArch64 host evidence only. | +| Claude Opus 5.5 (via omp, sched lane) | P-DRA-14 DRA-396 for `seed/node`: policy 1 in `sched.om`, now the default: fair fitting over a bounded window from a persistent cursor that advances only after a window was scanned, oldest admitted first, a bypass budget that reserves the oldest bypassed job and holds back the capacity it still lacks, admission tickets in strict order with room bounded by free table slots (`sched_room`, also asked by `jn_admit` after its duplicate check), and leases reported once by `sched_overdue`. Candidate and maintenance reads are counted and checked at every step. `schedpol-test.om` adds starvation, ticket, lease, reserved-cancel, window, ticket-order, full-table and review-liveness phases, with `fifo` and `noreserve` controls (exits 11 and 61); `journal-test.om` case 16; thirteen DRA-396 mutants. Independent review by openai-codex/gpt-6-astra. Native AArch64 host evidence only. | | Grok 4.7 (via Cursor Agent) | Merged main `fd3751b31` (#1020, carrying #1045 and #1050) into #1052. The only conflict was the generated root `.crumb` (child `last_commit` stamps, the `tests` digest, and the root digest). Recompiled with the crumb.lock tool (`d0f0b95d`); `crumb verify .` current. The #525/#962 pins were left as committed: `src/checker2/c2_check.c`, `src/compiler/osc_ir.c` and `src/compiler/osc_ir.h` still hash to the SHA-256s in `ACCEPTED`. | | Claude Opus 5.5 (via omp) | #1020 (actions/cache-4.3.0 ->6.1.0): merged main `d3d1b1bc` and recompiled the root crumb with the crumb.lock tool (`d0f0b95d`). The root crumb's source tree covers `.github/workflows/`, so the bump alone left it stale and `AIEN Checks` failed at `crumb verify .` (`1 of 188 crumbs stale`). | | Claude Opus 5.5 (via omp) | #1018 (actions/upload-artifact-4 ->7): merged main `d3d1b1bc` and recompiled the root crumb with the crumb.lock tool (`d0f0b95d`). The root crumb's source tree covers `.github/workflows/`, so the bump alone left it stale and `AIEN Checks` failed at `crumb verify .` (`1 of 188 crumbs stale`). | diff --git a/seed/node/README.md b/seed/node/README.md index 6eeaeac66..1628d0e07 100644 --- a/seed/node/README.md +++ b/seed/node/README.md @@ -505,11 +505,15 @@ command, output) is kept in `evidence/node-schedpol/rust-reference.*.json`. Policy 1 is the default; policy 0 stays as the FIFO baseline for the DRA-399 comparison. Both are arms of one `sched_dispatch`. -Each pick reads at most `win` slots (default 64), starting at a cursor that -persists across dispatch events and moves on by `win` after each event, so -every slot is examined within ceil(64/`win`) events. Among the examined ready -jobs the pick takes the one admitted first (`sjarr`: unique, so no ties) that -fits. At most `db` jobs are assigned per event. Waiting age is the admission +Each pick reads the reserved slot, if any, and at most `win` slots (default +64) starting at a cursor that persists across dispatch events. The cursor +moves on by `win` after each event in which a window was scanned (none is +scanned when no worker is idle, or when the reserved job took the only +pick), so every slot is examined within ceil(64/`win`) window scans. Among +the examined ready jobs the pick takes the one admitted first (`sjarr`: +unique, so no ties) that fits. At most `db` jobs are assigned per event. +After each event one pass over the table counts bypasses and picks a +reservation (64 maintenance reads). Waiting age is the admission order, kept when a rerunnable job goes back to ready after its worker died. Under policy 1 phase F serves the job admitted first. @@ -524,22 +528,31 @@ reserved job ends the reservation. Liveness rests on these assumptions: every running job ends (completes, or its lease is enforced by the authority); at least one worker stays live; -dispatch runs after releases (every `sched_step` collects, then dispatches); -no request exceeds capacity (refused at admission, -8). Under them a reserved -job runs once the jobs running at its reservation have finished, and each -ready job is examined within ceil(64/`win`) events. There is one -reservation at a time, and it goes to the oldest job at the bypass budget. -A job at the budget therefore waits only for the reservations of jobs -admitted before it, a finite set; later arrivals never take the reservation -first. Workers are not a resource kind: the reserved job is offered first at -every pick, so it takes the first idle worker once it fits. - -Admission tickets. `sched_room id` refuses at the admission limit and gives -the refused caller a ticket; once below the limit, ticket holders enter in -ticket order before anyone new. `sched_admitr` and `jn_admit` (before it -journals ADMIT) ask it. A ticket not asked about for `ttl` dispatch events -(default 1000) lapses, so a caller that went away cannot hold the line; at -most 64 tickets are held, and a caller refused with the line full holds none. +results in review are eventually reviewed, so a worker holding a finished +result while review is full is eventually freed (phase Z shows the reserved +job waiting on review, then running); dispatch is eventually unpaused and +runs after releases (every `sched_step` collects, then dispatches); no +request exceeds capacity (refused at admission, -8). Under them a reserved +job runs once the jobs running at its reservation have finished and a +worker is free, and each ready job is examined within ceil(64/`win`) window +scans. There is one reservation at a time, and it goes to the oldest job at +the bypass budget. A job at the budget therefore waits only for the +reservations of jobs admitted before it, a finite set; later arrivals never +take the reservation first. Workers are not a resource kind: the reserved +job is offered first at every pick, so it takes the first idle worker once +it fits. + +Admission tickets. Room is the smaller of the admission headroom and the free +table slots: a job in review or UNKNOWN keeps its slot, so a table full of +unreviewed results refuses admission even below the limit. `sched_room id` +refuses without room and gives the refused caller a ticket. While tickets +are held only the first holder may enter, whatever the room; a new caller +takes a ticket behind them. `sched_admitr` asks it; so does `jn_admit`, +after its duplicate check and before it journals ADMIT, and a true answer +guarantees the slot (one creator). A ticket not asked about for `ttl` +dispatch events (default 1000) lapses, so a caller that went away holds the +line for at most that long; at most 64 tickets are held, and a caller +refused with the line full holds none. Leases. `sched_lease j ns` gives a job a lease counted from its assignment; `sched_overdue` reports a running job past its lease whose worker has not @@ -549,36 +562,49 @@ used for reporting only; selection reads logical counters. | Function | Contract | | --- | --- | -| `sched_room id` | May id be admitted now; a refused caller gets or keeps a ticket. | +| `sched_room id` | May id be admitted now: room is min(admission headroom, free slots); while tickets are held only the first holder may enter. A refused caller gets or keeps a ticket. | | `sched_lease j ns` | Lease for a waiting, ready or running job, from its next assignment; 0 removes it; -3 otherwise. | | `sched_overdue` | Slot of a running, unfinished job past its lease, reported once; 64 when none. | `schedpol-gate` takes one optional argument: `fifo` runs every phase under policy 0, `noreserve` sets the bypass budget to 65535 (no reservation in -practice). Each step also checks the scan bound: the slots examined since the -last step are at most events × `db` × `win` (64 per pick under policy 0), -exit 9. +practice). Each step also checks the bounds since the last step: candidate +reads at most events × `db` × (`win` + 1), the reserved probe included (64 +per pick under policy 0), exit 9; maintenance reads at most 64 per event, +exit 14; the cursor unchanged unless a window was scanned, exit 15. These +checks read the scheduler's own counters, so they bound the work the +counters record; they are not an independent trace of memory reads. | Phase | Scenario | Exit when it fails | | --- | --- | --- | | S | three workers, 4 CPU; 1-CPU jobs start staggered and each one finishing is replaced, so the CPUs are never all free at once; big (4 CPU) arrives: it is reserved and runs | 61 never ran (the `noreserve` control), 62..66 | -| Q | admission limit 2: X then Y refused hold tickets; with room for one, Y is refused and X admitted; Y enters later; a ticket not asked about lapses | 70..80 | -| L | 200 ms lease on a 3 s job not safe to rerun: reported once, after the lease; worker killed, job UNKNOWN, CPU free. A rerunnable job killed the same way keeps its admission age and completes | 81..89, 140..145 | +| Q | admission limit 2: X then Y refused hold tickets; with room for one, Y is refused and X admitted; Y enters later; a ticket not asked about lapses, so a new caller enters | 70..80 | +| L | 200 ms lease on a 3 s job not safe to rerun: the deadline is at least 200 ms after admission and the report comes at or after it, once; worker killed, job UNKNOWN, CPU free. A rerunnable job killed the same way keeps its admission age and completes | 81..89, 140..145 | | R | the reserved job is cancelled: freed with no effect, reservation cleared | 90..97 | -| W | window 4, budget 2, 12 ready jobs in slots 0..11: every pick reads at most 4 slots and all 12 run | 9, 101..103 | +| W | window 4, budget 2, 12 ready jobs in slots 0..11: every pick reads at most 5 slots and all 12 run | 9, 101..103 | +| T | limit 3 and three ticket holders; with two openings the second holder and a new caller are refused, the first two holders enter in order; with three, the new caller (now a holder) waits for the holder ahead | 104..109 | +| X | every slot holds a job in review, admission limit not reached: a new caller is refused and holds a ticket; one review frees one slot, which goes to the first holder | 190..194 | +| Z | review limit 1 and full; a reserved job stays ready with all CPU free while the workers hold finished results; reviewing lets it run | 195..199 | -Phases S to W run after A and B, so under `fifo` the gate stops at 11. +Phases S to Z run after A and B, so under `fifo` the gate stops at 11. +`journal-gate` case 16 checks `jn_admit` at the admission limit: a duplicate +id is refused as a duplicate and takes no ticket (170..173). -| Change to `sched.om` | Expected exit | +| Change | Expected exit (derived from the check it trips) | | --- | --- | -| cursor never moves (`put scpol 4 …` deleted from `sp_after`) | 101 | -| tickets ignored (`n = get scpol 6` to `n = ulong 0` in `sched_room`) | 75 | +| cursor never moves (`put scpol 4 …` deleted from `sp_after`) | 101: slots beyond the first window never run in W | +| cursor moves in every event (`if sc` to `if true` in `sp_after`) | 15 | +| tickets ignored (`if eq get scpol 6 0` to `if true` in `sched_room`) | 75 | +| holders below the room may enter (`if eq t 0` to `if lt t room`) | 105 | +| room ignores free slots (`fs = sched_count 0 0` to `fs = ulong 64`) | 191 | | no hold-back for the reserved job (`rq = get sjneed rj` to `rq = ulong 0`) | 61 | | never reserve (`put scpol 5 add o 1` deleted) | 61 | | lease never reported (`if ge now d` to `if false`) | 82 | +| lease reported 100 ms early (`if ge now d` to `if ge add now 100000000 d`) | 83 | | cancel keeps the reservation | 94 | | window ignored (`for i ulong win` to `for i ulong 64` in `sp_fair`) | 9 | | tickets never lapse | 80 | +| `jn_admit` asks for room before the duplicate check (`journal.om`) | 170 (`journal-gate`) | ## Proposals, authority and cancellation (DRA-288) diff --git a/seed/node/auth-gate.om b/seed/node/auth-gate.om index 5f4eb0e7d..1b4658e7e 100644 --- a/seed/node/auth-gate.om +++ b/seed/node/auth-gate.om @@ -1001,9 +1001,10 @@ note budget, 4 cursor, 5 reserved job slot + 1 (0 none), 6 tickets held, note 7 ticket lifetime in dispatch events. global scpol ulong 8 note Counters (sched_stat): 0 admissions, 1 ready stamps, 2 dispatch events, -note 3 slots examined, 4 jobs assigned, 5 bypasses, 6 reservations made, -note 7 impossible requests refused, 8 head-of-line stops, 9 reserved jobs -note assigned, 10 tickets issued, 11 tickets lapsed, 12 leases overdue. +note 3 candidate slot reads, 4 jobs assigned, 5 bypasses, 6 reservations +note made, 7 impossible requests refused, 8 head-of-line stops, 9 reserved +note jobs assigned, 10 tickets issued, 11 tickets lapsed, 12 leases overdue, +note 13 maintenance slot reads, 14 window scans. global scst ulong 16 fn sc_cell w ulong off ulong to ulong @@ -1270,28 +1271,29 @@ put scst 10 add get scst 10 1 end end -note Creator: may id be admitted now? Not at the admission limit; below it, -note ticket holders come first in ticket order, then anyone new. A refused -note caller gets or keeps a ticket. Asking again changes nothing else, so a -note caller may ask before sched_admitr (as jn_admit does). +note Creator: may id be admitted now? Room is the smaller of the admission +note headroom and the free table slots (a job in review or UNKNOWN holds +note its slot). While tickets are held only the first holder may enter; +note with none, anyone may while there is room. A refused caller gets or +note keeps a ticket. Asking again changes nothing else, and a true answer +note guarantees the slot for the next sched_admitr (single creator), so a +note caller may ask before journaling (as jn_admit does). fn sched_room id ulong to bool sp_tkpack 64 t = sp_tkpos id -if ge sched_count 1 3 get sclim 0 -sp_tkhold id t -ret false +room = ulong 0 +if lt sched_count 1 3 get sclim 0 +room = sub get sclim 0 sched_count 1 3 end -n = get scpol 6 -if eq n 0 -ret true +fs = sched_count 0 0 +if lt fs room +room = fs end -room = sub get sclim 0 sched_count 1 3 -if lt t 64 -if lt t room +if gt room 0 +if eq get scpol 6 0 ret true end -else -if gt room n +if eq t 0 ret true end end @@ -1478,12 +1480,14 @@ end note Policy 1, fair fitting: the reserved job first when it fits; else the note oldest admitted ready job, among win slots from the cursor, that fits note without the capacity the reserved job still lacks. Returns the slot or -note 64. Work per pick is bounded by win. +note 64. Every slot read counts (counter 3: the reserved probe and the +note window), at most win + 1 per pick; counter 14 counts window scans. fn sp_fair to ulong rq = ulong 0 r = get scpol 5 if gt r 0 rj = sub r 1 +put scst 3 add get scst 3 1 if eq get sjst rj 2 if sp_fits get sjneed rj 0 ret rj @@ -1496,6 +1500,7 @@ end win = get scpol 1 cur = get scpol 4 b = ulong 64 +put scst 14 add get scst 14 1 for i ulong win bound 64 put scst 3 add get scst 3 1 j = rem add cur i 64 @@ -1517,22 +1522,21 @@ end note After a fair dispatch event in which ya - 1 was the youngest admission note assigned (ya 0: none): every ready job admitted before it was bypassed note once; with no reservation, the oldest job at the bypass budget is -note reserved. The cursor moves on by the window. -fn sp_after ya ulong to void -if gt ya 0 +note reserved. One pass over the table (64 maintenance reads, counter 13). +note The cursor moves on by the window only when a window was scanned in +note the event (sc), so no window is skipped unexamined. +fn sp_after ya ulong sc bool to void +o = ulong 64 +nores = eq get scpol 5 0 for j ulong 64 if eq get sjst j 2 +if gt ya 0 if lt add get sjarr j 1 ya put sjbyp j add get sjbyp j 1 put scst 5 add get scst 5 1 end end -end -end -if eq get scpol 5 0 -o = ulong 64 -for j ulong 64 -if eq get sjst j 2 +if nores if ge get sjbyp j get scpol 3 if eq o 64 o = j @@ -1544,13 +1548,16 @@ end end end end +end +put scst 13 add get scst 13 64 if lt o 64 put scpol 5 add o 1 put scst 6 add get scst 6 1 end -end +if sc put scpol 4 rem add get scpol 4 get scpol 1 64 end +end note Creator: assign ready jobs to idle live workers under the policy, at note most the dispatch budget per call. Returns the number assigned. @@ -1563,6 +1570,7 @@ k = ulong 0 ya = ulong 0 fair = eq get scpol 0 1 put scst 2 add get scst 2 1 +s0 = get scst 14 for i ulong get scpol 2 bound 64 w = sp_idle n if ge w 64 @@ -1584,7 +1592,7 @@ sp_start c j w k = add k 1 end if fair -sp_after ya +sp_after ya gt get scst 14 s0 end ret k end @@ -2708,17 +2716,18 @@ end ret 0 end -note Admit job id durably: ADMIT is appended before sched_admit. -2 when -note sched_room refuses (admission limit, or ticket holders ahead), -4 an -note id already in the journal, -5 the journal refused, else sched_admit's -note slot. +note Admit job id durably: ADMIT is appended before sched_admit. -4 an id +note already in the journal (checked first, so a duplicate never takes or +note refreshes an admission ticket), -2 when sched_room refuses (admission +note limit, no free slot, or ticket holders ahead), -5 the journal refused, +note else sched_admit's slot. fn jn_admit id ulong deps ulong flags ulong to long -if not sched_room id -ret neg long 2 -end if ge jn_jfind id 0 ret neg long 4 end +if not sched_room id +ret neg long 2 +end if ne jn_rec 2 id deps flags 0 ret neg long 5 end diff --git a/seed/node/journal-gate.om b/seed/node/journal-gate.om index 538a6b7fc..0fd5e2c33 100644 --- a/seed/node/journal-gate.om +++ b/seed/node/journal-gate.om @@ -1001,9 +1001,10 @@ note budget, 4 cursor, 5 reserved job slot + 1 (0 none), 6 tickets held, note 7 ticket lifetime in dispatch events. global scpol ulong 8 note Counters (sched_stat): 0 admissions, 1 ready stamps, 2 dispatch events, -note 3 slots examined, 4 jobs assigned, 5 bypasses, 6 reservations made, -note 7 impossible requests refused, 8 head-of-line stops, 9 reserved jobs -note assigned, 10 tickets issued, 11 tickets lapsed, 12 leases overdue. +note 3 candidate slot reads, 4 jobs assigned, 5 bypasses, 6 reservations +note made, 7 impossible requests refused, 8 head-of-line stops, 9 reserved +note jobs assigned, 10 tickets issued, 11 tickets lapsed, 12 leases overdue, +note 13 maintenance slot reads, 14 window scans. global scst ulong 16 fn sc_cell w ulong off ulong to ulong @@ -1270,28 +1271,29 @@ put scst 10 add get scst 10 1 end end -note Creator: may id be admitted now? Not at the admission limit; below it, -note ticket holders come first in ticket order, then anyone new. A refused -note caller gets or keeps a ticket. Asking again changes nothing else, so a -note caller may ask before sched_admitr (as jn_admit does). +note Creator: may id be admitted now? Room is the smaller of the admission +note headroom and the free table slots (a job in review or UNKNOWN holds +note its slot). While tickets are held only the first holder may enter; +note with none, anyone may while there is room. A refused caller gets or +note keeps a ticket. Asking again changes nothing else, and a true answer +note guarantees the slot for the next sched_admitr (single creator), so a +note caller may ask before journaling (as jn_admit does). fn sched_room id ulong to bool sp_tkpack 64 t = sp_tkpos id -if ge sched_count 1 3 get sclim 0 -sp_tkhold id t -ret false +room = ulong 0 +if lt sched_count 1 3 get sclim 0 +room = sub get sclim 0 sched_count 1 3 end -n = get scpol 6 -if eq n 0 -ret true +fs = sched_count 0 0 +if lt fs room +room = fs end -room = sub get sclim 0 sched_count 1 3 -if lt t 64 -if lt t room +if gt room 0 +if eq get scpol 6 0 ret true end -else -if gt room n +if eq t 0 ret true end end @@ -1478,12 +1480,14 @@ end note Policy 1, fair fitting: the reserved job first when it fits; else the note oldest admitted ready job, among win slots from the cursor, that fits note without the capacity the reserved job still lacks. Returns the slot or -note 64. Work per pick is bounded by win. +note 64. Every slot read counts (counter 3: the reserved probe and the +note window), at most win + 1 per pick; counter 14 counts window scans. fn sp_fair to ulong rq = ulong 0 r = get scpol 5 if gt r 0 rj = sub r 1 +put scst 3 add get scst 3 1 if eq get sjst rj 2 if sp_fits get sjneed rj 0 ret rj @@ -1496,6 +1500,7 @@ end win = get scpol 1 cur = get scpol 4 b = ulong 64 +put scst 14 add get scst 14 1 for i ulong win bound 64 put scst 3 add get scst 3 1 j = rem add cur i 64 @@ -1517,22 +1522,21 @@ end note After a fair dispatch event in which ya - 1 was the youngest admission note assigned (ya 0: none): every ready job admitted before it was bypassed note once; with no reservation, the oldest job at the bypass budget is -note reserved. The cursor moves on by the window. -fn sp_after ya ulong to void -if gt ya 0 +note reserved. One pass over the table (64 maintenance reads, counter 13). +note The cursor moves on by the window only when a window was scanned in +note the event (sc), so no window is skipped unexamined. +fn sp_after ya ulong sc bool to void +o = ulong 64 +nores = eq get scpol 5 0 for j ulong 64 if eq get sjst j 2 +if gt ya 0 if lt add get sjarr j 1 ya put sjbyp j add get sjbyp j 1 put scst 5 add get scst 5 1 end end -end -end -if eq get scpol 5 0 -o = ulong 64 -for j ulong 64 -if eq get sjst j 2 +if nores if ge get sjbyp j get scpol 3 if eq o 64 o = j @@ -1544,13 +1548,16 @@ end end end end +end +put scst 13 add get scst 13 64 if lt o 64 put scpol 5 add o 1 put scst 6 add get scst 6 1 end -end +if sc put scpol 4 rem add get scpol 4 get scpol 1 64 end +end note Creator: assign ready jobs to idle live workers under the policy, at note most the dispatch budget per call. Returns the number assigned. @@ -1563,6 +1570,7 @@ k = ulong 0 ya = ulong 0 fair = eq get scpol 0 1 put scst 2 add get scst 2 1 +s0 = get scst 14 for i ulong get scpol 2 bound 64 w = sp_idle n if ge w 64 @@ -1584,7 +1592,7 @@ sp_start c j w k = add k 1 end if fair -sp_after ya +sp_after ya gt get scst 14 s0 end ret k end @@ -2708,17 +2716,18 @@ end ret 0 end -note Admit job id durably: ADMIT is appended before sched_admit. -2 when -note sched_room refuses (admission limit, or ticket holders ahead), -4 an -note id already in the journal, -5 the journal refused, else sched_admit's -note slot. +note Admit job id durably: ADMIT is appended before sched_admit. -4 an id +note already in the journal (checked first, so a duplicate never takes or +note refreshes an admission ticket), -2 when sched_room refuses (admission +note limit, no free slot, or ticket holders ahead), -5 the journal refused, +note else sched_admit's slot. fn jn_admit id ulong deps ulong flags ulong to long -if not sched_room id -ret neg long 2 -end if ge jn_jfind id 0 ret neg long 4 end +if not sched_room id +ret neg long 2 +end if ne jn_rec 2 id deps flags 0 ret neg long 5 end @@ -4490,6 +4499,32 @@ jt_common 1001 2 1 160 jt_ok eq jt_cnt 7 0 2 166 end +note Case 16, admission at the limit (P-DRA-14, DRA-396): with admission +note limit 2 full, a duplicate id is refused as a duplicate (-4) and takes +note no ticket (170, 171); a new id is refused and takes one (172); once a +note slot frees, the duplicate asking again does not hold it up: the ticket +note holder enters (173). Nothing is spawned; the journal is real. +fn jt_c16 to void +jt_clean +c = pool_new 2 2 +jt_ok gt c 0 170 +jt_ok eq sup_init c 0 170 +jt_ok eq sched_new c 2 8 0 170 +jt_ok eq jt_open 1 3000 0 170 +a = jn_admit 7001 0 0 +jt_ok ge a 0 170 +jt_ok ge jn_admit 7002 0 0 0 170 +jt_ok eq jn_admit 7001 0 0 neg long 4 170 +jt_ok eq sched_stat 30 0 171 +jt_ok eq jn_admit 7003 0 0 neg long 2 172 +jt_ok eq sched_stat 30 1 172 +jt_ok eq sched_cancel ulong a 1 173 +jt_ok eq jn_admit 7001 0 0 neg long 4 173 +jt_ok ge jn_admit 7003 0 0 0 173 +jn_close +jt_clean +end + fn main to int m = mapnew neg int 1 0 4096 3 33 jt_ok gt m 0 9 @@ -4508,6 +4543,7 @@ jt_c10 jt_c11 jt_c12 jt_c15 +jt_c16 if ne write 1 jtok 0 len jtok long len jtok ret 100 end diff --git a/seed/node/journal-test.om b/seed/node/journal-test.om index fb06f9816..e5a4cd961 100644 --- a/seed/node/journal-test.om +++ b/seed/node/journal-test.om @@ -827,6 +827,32 @@ jt_common 1001 2 1 160 jt_ok eq jt_cnt 7 0 2 166 end +note Case 16, admission at the limit (P-DRA-14, DRA-396): with admission +note limit 2 full, a duplicate id is refused as a duplicate (-4) and takes +note no ticket (170, 171); a new id is refused and takes one (172); once a +note slot frees, the duplicate asking again does not hold it up: the ticket +note holder enters (173). Nothing is spawned; the journal is real. +fn jt_c16 to void +jt_clean +c = pool_new 2 2 +jt_ok gt c 0 170 +jt_ok eq sup_init c 0 170 +jt_ok eq sched_new c 2 8 0 170 +jt_ok eq jt_open 1 3000 0 170 +a = jn_admit 7001 0 0 +jt_ok ge a 0 170 +jt_ok ge jn_admit 7002 0 0 0 170 +jt_ok eq jn_admit 7001 0 0 neg long 4 170 +jt_ok eq sched_stat 30 0 171 +jt_ok eq jn_admit 7003 0 0 neg long 2 172 +jt_ok eq sched_stat 30 1 172 +jt_ok eq sched_cancel ulong a 1 173 +jt_ok eq jn_admit 7001 0 0 neg long 4 173 +jt_ok ge jn_admit 7003 0 0 0 173 +jn_close +jt_clean +end + fn main to int m = mapnew neg int 1 0 4096 3 33 jt_ok gt m 0 9 @@ -845,6 +871,7 @@ jt_c10 jt_c11 jt_c12 jt_c15 +jt_c16 if ne write 1 jtok 0 len jtok long len jtok ret 100 end diff --git a/seed/node/journal.om b/seed/node/journal.om index fec3efe22..1918d20e1 100644 --- a/seed/node/journal.om +++ b/seed/node/journal.om @@ -684,17 +684,18 @@ end ret 0 end -note Admit job id durably: ADMIT is appended before sched_admit. -2 when -note sched_room refuses (admission limit, or ticket holders ahead), -4 an -note id already in the journal, -5 the journal refused, else sched_admit's -note slot. +note Admit job id durably: ADMIT is appended before sched_admit. -4 an id +note already in the journal (checked first, so a duplicate never takes or +note refreshes an admission ticket), -2 when sched_room refuses (admission +note limit, no free slot, or ticket holders ahead), -5 the journal refused, +note else sched_admit's slot. fn jn_admit id ulong deps ulong flags ulong to long -if not sched_room id -ret neg long 2 -end if ge jn_jfind id 0 ret neg long 4 end +if not sched_room id +ret neg long 2 +end if ne jn_rec 2 id deps flags 0 ret neg long 5 end diff --git a/seed/node/sched-gate.om b/seed/node/sched-gate.om index 0bfafba9f..7752da795 100644 --- a/seed/node/sched-gate.om +++ b/seed/node/sched-gate.om @@ -1001,9 +1001,10 @@ note budget, 4 cursor, 5 reserved job slot + 1 (0 none), 6 tickets held, note 7 ticket lifetime in dispatch events. global scpol ulong 8 note Counters (sched_stat): 0 admissions, 1 ready stamps, 2 dispatch events, -note 3 slots examined, 4 jobs assigned, 5 bypasses, 6 reservations made, -note 7 impossible requests refused, 8 head-of-line stops, 9 reserved jobs -note assigned, 10 tickets issued, 11 tickets lapsed, 12 leases overdue. +note 3 candidate slot reads, 4 jobs assigned, 5 bypasses, 6 reservations +note made, 7 impossible requests refused, 8 head-of-line stops, 9 reserved +note jobs assigned, 10 tickets issued, 11 tickets lapsed, 12 leases overdue, +note 13 maintenance slot reads, 14 window scans. global scst ulong 16 fn sc_cell w ulong off ulong to ulong @@ -1270,28 +1271,29 @@ put scst 10 add get scst 10 1 end end -note Creator: may id be admitted now? Not at the admission limit; below it, -note ticket holders come first in ticket order, then anyone new. A refused -note caller gets or keeps a ticket. Asking again changes nothing else, so a -note caller may ask before sched_admitr (as jn_admit does). +note Creator: may id be admitted now? Room is the smaller of the admission +note headroom and the free table slots (a job in review or UNKNOWN holds +note its slot). While tickets are held only the first holder may enter; +note with none, anyone may while there is room. A refused caller gets or +note keeps a ticket. Asking again changes nothing else, and a true answer +note guarantees the slot for the next sched_admitr (single creator), so a +note caller may ask before journaling (as jn_admit does). fn sched_room id ulong to bool sp_tkpack 64 t = sp_tkpos id -if ge sched_count 1 3 get sclim 0 -sp_tkhold id t -ret false +room = ulong 0 +if lt sched_count 1 3 get sclim 0 +room = sub get sclim 0 sched_count 1 3 end -n = get scpol 6 -if eq n 0 -ret true +fs = sched_count 0 0 +if lt fs room +room = fs end -room = sub get sclim 0 sched_count 1 3 -if lt t 64 -if lt t room +if gt room 0 +if eq get scpol 6 0 ret true end -else -if gt room n +if eq t 0 ret true end end @@ -1478,12 +1480,14 @@ end note Policy 1, fair fitting: the reserved job first when it fits; else the note oldest admitted ready job, among win slots from the cursor, that fits note without the capacity the reserved job still lacks. Returns the slot or -note 64. Work per pick is bounded by win. +note 64. Every slot read counts (counter 3: the reserved probe and the +note window), at most win + 1 per pick; counter 14 counts window scans. fn sp_fair to ulong rq = ulong 0 r = get scpol 5 if gt r 0 rj = sub r 1 +put scst 3 add get scst 3 1 if eq get sjst rj 2 if sp_fits get sjneed rj 0 ret rj @@ -1496,6 +1500,7 @@ end win = get scpol 1 cur = get scpol 4 b = ulong 64 +put scst 14 add get scst 14 1 for i ulong win bound 64 put scst 3 add get scst 3 1 j = rem add cur i 64 @@ -1517,22 +1522,21 @@ end note After a fair dispatch event in which ya - 1 was the youngest admission note assigned (ya 0: none): every ready job admitted before it was bypassed note once; with no reservation, the oldest job at the bypass budget is -note reserved. The cursor moves on by the window. -fn sp_after ya ulong to void -if gt ya 0 +note reserved. One pass over the table (64 maintenance reads, counter 13). +note The cursor moves on by the window only when a window was scanned in +note the event (sc), so no window is skipped unexamined. +fn sp_after ya ulong sc bool to void +o = ulong 64 +nores = eq get scpol 5 0 for j ulong 64 if eq get sjst j 2 +if gt ya 0 if lt add get sjarr j 1 ya put sjbyp j add get sjbyp j 1 put scst 5 add get scst 5 1 end end -end -end -if eq get scpol 5 0 -o = ulong 64 -for j ulong 64 -if eq get sjst j 2 +if nores if ge get sjbyp j get scpol 3 if eq o 64 o = j @@ -1544,13 +1548,16 @@ end end end end +end +put scst 13 add get scst 13 64 if lt o 64 put scpol 5 add o 1 put scst 6 add get scst 6 1 end -end +if sc put scpol 4 rem add get scpol 4 get scpol 1 64 end +end note Creator: assign ready jobs to idle live workers under the policy, at note most the dispatch budget per call. Returns the number assigned. @@ -1563,6 +1570,7 @@ k = ulong 0 ya = ulong 0 fair = eq get scpol 0 1 put scst 2 add get scst 2 1 +s0 = get scst 14 for i ulong get scpol 2 bound 64 w = sp_idle n if ge w 64 @@ -1584,7 +1592,7 @@ sp_start c j w k = add k 1 end if fair -sp_after ya +sp_after ya gt get scst 14 s0 end ret k end diff --git a/seed/node/sched.om b/seed/node/sched.om index 9824a0540..be2590ebb 100644 --- a/seed/node/sched.om +++ b/seed/node/sched.om @@ -75,9 +75,10 @@ note budget, 4 cursor, 5 reserved job slot + 1 (0 none), 6 tickets held, note 7 ticket lifetime in dispatch events. global scpol ulong 8 note Counters (sched_stat): 0 admissions, 1 ready stamps, 2 dispatch events, -note 3 slots examined, 4 jobs assigned, 5 bypasses, 6 reservations made, -note 7 impossible requests refused, 8 head-of-line stops, 9 reserved jobs -note assigned, 10 tickets issued, 11 tickets lapsed, 12 leases overdue. +note 3 candidate slot reads, 4 jobs assigned, 5 bypasses, 6 reservations +note made, 7 impossible requests refused, 8 head-of-line stops, 9 reserved +note jobs assigned, 10 tickets issued, 11 tickets lapsed, 12 leases overdue, +note 13 maintenance slot reads, 14 window scans. global scst ulong 16 fn sc_cell w ulong off ulong to ulong @@ -344,28 +345,29 @@ put scst 10 add get scst 10 1 end end -note Creator: may id be admitted now? Not at the admission limit; below it, -note ticket holders come first in ticket order, then anyone new. A refused -note caller gets or keeps a ticket. Asking again changes nothing else, so a -note caller may ask before sched_admitr (as jn_admit does). +note Creator: may id be admitted now? Room is the smaller of the admission +note headroom and the free table slots (a job in review or UNKNOWN holds +note its slot). While tickets are held only the first holder may enter; +note with none, anyone may while there is room. A refused caller gets or +note keeps a ticket. Asking again changes nothing else, and a true answer +note guarantees the slot for the next sched_admitr (single creator), so a +note caller may ask before journaling (as jn_admit does). fn sched_room id ulong to bool sp_tkpack 64 t = sp_tkpos id -if ge sched_count 1 3 get sclim 0 -sp_tkhold id t -ret false +room = ulong 0 +if lt sched_count 1 3 get sclim 0 +room = sub get sclim 0 sched_count 1 3 end -n = get scpol 6 -if eq n 0 -ret true +fs = sched_count 0 0 +if lt fs room +room = fs end -room = sub get sclim 0 sched_count 1 3 -if lt t 64 -if lt t room +if gt room 0 +if eq get scpol 6 0 ret true end -else -if gt room n +if eq t 0 ret true end end @@ -552,12 +554,14 @@ end note Policy 1, fair fitting: the reserved job first when it fits; else the note oldest admitted ready job, among win slots from the cursor, that fits note without the capacity the reserved job still lacks. Returns the slot or -note 64. Work per pick is bounded by win. +note 64. Every slot read counts (counter 3: the reserved probe and the +note window), at most win + 1 per pick; counter 14 counts window scans. fn sp_fair to ulong rq = ulong 0 r = get scpol 5 if gt r 0 rj = sub r 1 +put scst 3 add get scst 3 1 if eq get sjst rj 2 if sp_fits get sjneed rj 0 ret rj @@ -570,6 +574,7 @@ end win = get scpol 1 cur = get scpol 4 b = ulong 64 +put scst 14 add get scst 14 1 for i ulong win bound 64 put scst 3 add get scst 3 1 j = rem add cur i 64 @@ -591,22 +596,21 @@ end note After a fair dispatch event in which ya - 1 was the youngest admission note assigned (ya 0: none): every ready job admitted before it was bypassed note once; with no reservation, the oldest job at the bypass budget is -note reserved. The cursor moves on by the window. -fn sp_after ya ulong to void -if gt ya 0 +note reserved. One pass over the table (64 maintenance reads, counter 13). +note The cursor moves on by the window only when a window was scanned in +note the event (sc), so no window is skipped unexamined. +fn sp_after ya ulong sc bool to void +o = ulong 64 +nores = eq get scpol 5 0 for j ulong 64 if eq get sjst j 2 +if gt ya 0 if lt add get sjarr j 1 ya put sjbyp j add get sjbyp j 1 put scst 5 add get scst 5 1 end end -end -end -if eq get scpol 5 0 -o = ulong 64 -for j ulong 64 -if eq get sjst j 2 +if nores if ge get sjbyp j get scpol 3 if eq o 64 o = j @@ -618,13 +622,16 @@ end end end end +end +put scst 13 add get scst 13 64 if lt o 64 put scpol 5 add o 1 put scst 6 add get scst 6 1 end -end +if sc put scpol 4 rem add get scpol 4 get scpol 1 64 end +end note Creator: assign ready jobs to idle live workers under the policy, at note most the dispatch budget per call. Returns the number assigned. @@ -637,6 +644,7 @@ k = ulong 0 ya = ulong 0 fair = eq get scpol 0 1 put scst 2 add get scst 2 1 +s0 = get scst 14 for i ulong get scpol 2 bound 64 w = sp_idle n if ge w 64 @@ -658,7 +666,7 @@ sp_start c j w k = add k 1 end if fair -sp_after ya +sp_after ya gt get scst 14 s0 end ret k end diff --git a/seed/node/schedpol-gate.om b/seed/node/schedpol-gate.om index 2997b79d3..43d8c4ef4 100644 --- a/seed/node/schedpol-gate.om +++ b/seed/node/schedpol-gate.om @@ -1001,9 +1001,10 @@ note budget, 4 cursor, 5 reserved job slot + 1 (0 none), 6 tickets held, note 7 ticket lifetime in dispatch events. global scpol ulong 8 note Counters (sched_stat): 0 admissions, 1 ready stamps, 2 dispatch events, -note 3 slots examined, 4 jobs assigned, 5 bypasses, 6 reservations made, -note 7 impossible requests refused, 8 head-of-line stops, 9 reserved jobs -note assigned, 10 tickets issued, 11 tickets lapsed, 12 leases overdue. +note 3 candidate slot reads, 4 jobs assigned, 5 bypasses, 6 reservations +note made, 7 impossible requests refused, 8 head-of-line stops, 9 reserved +note jobs assigned, 10 tickets issued, 11 tickets lapsed, 12 leases overdue, +note 13 maintenance slot reads, 14 window scans. global scst ulong 16 fn sc_cell w ulong off ulong to ulong @@ -1270,28 +1271,29 @@ put scst 10 add get scst 10 1 end end -note Creator: may id be admitted now? Not at the admission limit; below it, -note ticket holders come first in ticket order, then anyone new. A refused -note caller gets or keeps a ticket. Asking again changes nothing else, so a -note caller may ask before sched_admitr (as jn_admit does). +note Creator: may id be admitted now? Room is the smaller of the admission +note headroom and the free table slots (a job in review or UNKNOWN holds +note its slot). While tickets are held only the first holder may enter; +note with none, anyone may while there is room. A refused caller gets or +note keeps a ticket. Asking again changes nothing else, and a true answer +note guarantees the slot for the next sched_admitr (single creator), so a +note caller may ask before journaling (as jn_admit does). fn sched_room id ulong to bool sp_tkpack 64 t = sp_tkpos id -if ge sched_count 1 3 get sclim 0 -sp_tkhold id t -ret false +room = ulong 0 +if lt sched_count 1 3 get sclim 0 +room = sub get sclim 0 sched_count 1 3 end -n = get scpol 6 -if eq n 0 -ret true +fs = sched_count 0 0 +if lt fs room +room = fs end -room = sub get sclim 0 sched_count 1 3 -if lt t 64 -if lt t room +if gt room 0 +if eq get scpol 6 0 ret true end -else -if gt room n +if eq t 0 ret true end end @@ -1478,12 +1480,14 @@ end note Policy 1, fair fitting: the reserved job first when it fits; else the note oldest admitted ready job, among win slots from the cursor, that fits note without the capacity the reserved job still lacks. Returns the slot or -note 64. Work per pick is bounded by win. +note 64. Every slot read counts (counter 3: the reserved probe and the +note window), at most win + 1 per pick; counter 14 counts window scans. fn sp_fair to ulong rq = ulong 0 r = get scpol 5 if gt r 0 rj = sub r 1 +put scst 3 add get scst 3 1 if eq get sjst rj 2 if sp_fits get sjneed rj 0 ret rj @@ -1496,6 +1500,7 @@ end win = get scpol 1 cur = get scpol 4 b = ulong 64 +put scst 14 add get scst 14 1 for i ulong win bound 64 put scst 3 add get scst 3 1 j = rem add cur i 64 @@ -1517,22 +1522,21 @@ end note After a fair dispatch event in which ya - 1 was the youngest admission note assigned (ya 0: none): every ready job admitted before it was bypassed note once; with no reservation, the oldest job at the bypass budget is -note reserved. The cursor moves on by the window. -fn sp_after ya ulong to void -if gt ya 0 +note reserved. One pass over the table (64 maintenance reads, counter 13). +note The cursor moves on by the window only when a window was scanned in +note the event (sc), so no window is skipped unexamined. +fn sp_after ya ulong sc bool to void +o = ulong 64 +nores = eq get scpol 5 0 for j ulong 64 if eq get sjst j 2 +if gt ya 0 if lt add get sjarr j 1 ya put sjbyp j add get sjbyp j 1 put scst 5 add get scst 5 1 end end -end -end -if eq get scpol 5 0 -o = ulong 64 -for j ulong 64 -if eq get sjst j 2 +if nores if ge get sjbyp j get scpol 3 if eq o 64 o = j @@ -1544,13 +1548,16 @@ end end end end +end +put scst 13 add get scst 13 64 if lt o 64 put scpol 5 add o 1 put scst 6 add get scst 6 1 end -end +if sc put scpol 4 rem add get scpol 4 get scpol 1 64 end +end note Creator: assign ready jobs to idle live workers under the policy, at note most the dispatch budget per call. Returns the number assigned. @@ -1563,6 +1570,7 @@ k = ulong 0 ya = ulong 0 fair = eq get scpol 0 1 put scst 2 add get scst 2 1 +s0 = get scst 14 for i ulong get scpol 2 bound 64 w = sp_idle n if ge w 64 @@ -1584,7 +1592,7 @@ sp_start c j w k = add k 1 end if fair -sp_after ya +sp_after ya gt get scst 14 s0 end ret k end @@ -2032,11 +2040,16 @@ end end note One creator step of up to 10 ms, then the invariant and the scan -note budget: no dispatch event examined more than budget x window slots -note (FIFO, policy 0, scans all 64 per pick). 9 when exceeded. +note bounds since the last step: candidate reads at most events x budget x +note (window + 1), the reserved probe included (FIFO, policy 0, reads at +note most 64 per pick), 9; maintenance reads at most 64 per event, 14; the +note cursor moves only in events that scanned a window, 15. fn pt_step c long code int to void e0 = sched_stat 2 x0 = sched_stat 3 +m0 = sched_stat 13 +s0 = sched_stat 14 +u0 = sched_stat 28 r = sched_step c 10000000 pt_ok ge r 0 code pt_inv code @@ -2044,8 +2057,13 @@ w = sched_stat 25 if eq sched_stat 24 0 w = ulong 64 end -lim = mul mul sub sched_stat 2 e0 sched_stat 26 w +ev = sub sched_stat 2 e0 +lim = mul mul ev sched_stat 26 add w 1 pt_ok le sub sched_stat 3 x0 lim 9 +pt_ok le sub sched_stat 13 m0 mul ev 64 14 +if eq sched_stat 14 s0 +pt_ok eq sched_stat 28 u0 15 +end end note Step until job j is in a state in lo..hi, up to ms. True when reached. @@ -2385,20 +2403,23 @@ ret 64 end note Phase L: lease expiry. h (2 of 2 CPU, 3 s, not safe to rerun) has a -note 200 ms lease: sched_overdue reports it once, not before the lease; -note the creator kills its worker; h becomes UNKNOWN and its CPU is free. +note 200 ms lease: its deadline is at least 200 ms after h was admitted, and +note sched_overdue reports it once, at or after that deadline (83); the +note creator kills its worker; h becomes UNKNOWN and its CPU is free. note h2 (2 CPU, 400 ms, safe to rerun, 100 ms lease) is killed the same note way: it is ready or running again with its admission age kept, and note completes. Then a new 2-CPU job runs. fn pt_lease to void c = pt_setup 3 8 8 pt_req 2 1024 1 8 81 +t0 = ulong monons h = pt_admit 173000 0 pt_req 2 0 0 0 81 pt_ok eq sched_lease h 200000000 0 81 pt_ok pt_until c h 3 3 2000 81 81 -t0 = ulong monons +due = get sjdue h +pt_ok ge due add t0 200000000 83 o = pt_waitod c 82 pt_ok eq o h 82 -pt_ok ge sub ulong monons t0 150000000 83 +pt_ok ge ulong monons due 83 pt_ok eq sched_overdue 64 84 r = killpid int get swpid get sjw h 9 pt_ok pt_until c h 6 6 2000 85 85 @@ -2464,6 +2485,100 @@ pt_ok eq sched_stat 4 12 102 pt_down c 103 end +note Phase T: ticket order with several openings. Limit 3 held by p1, p2 +note (400 ms) and p3 (900 ms); X, Y, Z are refused in that order and hold +note tickets (104). With two openings, Y asking first is refused (105), and +note so is a new caller W, who takes a ticket behind Z (106); X enters +note (107), then Y (108). With three openings, W asking first is refused, +note then Z and W enter (109). +fn pt_torder to void +c = pt_setup 3 3 8 pt_req 4 1024 1 8 104 +p = pt_admit 400400 0 0 104 +p = pt_admit 410400 0 0 104 +p = pt_admit 420900 0 0 104 +pt_ok eq sched_admitr 430050 0 0 0 neg long 2 104 +pt_ok eq sched_admitr 440050 0 0 0 neg long 2 104 +pt_ok eq sched_admitr 450050 0 0 0 neg long 2 104 +pt_ok eq sched_stat 30 3 104 +pt_drain c 2 3000 104 +pt_ok eq sched_admitr 440050 0 0 0 neg long 2 105 +pt_ok eq sched_admitr 460050 0 0 0 neg long 2 106 +pt_ok eq sched_stat 30 4 106 +pt_ok ge sched_admitr 430050 0 0 0 0 107 +pt_ok ge sched_admitr 440050 0 0 0 0 108 +pt_drain c 3 3000 108 +pt_ok eq sched_admitr 460050 0 0 0 neg long 2 109 +pt_ok ge sched_admitr 450050 0 0 0 0 109 +pt_ok ge sched_admitr 460050 0 0 0 0 109 +pt_drain c 2 3000 109 +pt_down c 109 +end + +note Phase X: the table, not the admission limit, is full. Admission limit +note and review limit 64; 64 jobs finish and wait in review, so none is +note admitted, waiting, ready or running. A new caller is refused and takes +note a ticket (190, 191), as is a second (192). One review frees one slot: +note the second holder is refused, the first enters (193, 194). +fn pt_slots to void +c = pt_setup 3 64 64 pt_req 4 1024 1 8 190 +for i ulong 64 +j = pt_admit add 500001 mul i 10000 0 0 190 +end +dl = add ulong monons 5000000000 +for t ulong 1000000 +if eq sched_count 4 4 64 +break +end +pt_ok lt ulong monons dl 190 +pt_step c 190 +end +pt_ok not sched_room 600050 191 +pt_ok eq sched_stat 30 1 191 +pt_ok eq sched_admitr 600050 0 0 0 neg long 2 192 +pt_ok eq sched_admitr 610050 0 0 0 neg long 2 192 +pt_ok eq sched_stat 30 2 192 +pt_ok eq sched_review 0 long add get sjid 0 1 193 +pt_ok eq sched_admitr 610050 0 0 0 neg long 2 193 +pt_ok ge sched_admitr 600050 0 0 0 0 194 +n = pt_review 194 +pt_ok ge sched_admitr 610050 0 0 0 0 194 +pt_drain c 2 3000 194 +pt_down c 194 +end + +note Phase Z: reserved progress needs review progress. Review limit 1, two +note workers, 2 CPU, bypass budget 1. p finishes and waits in review, +note unreviewed. a (1 CPU) and x (1 CPU) run past b (2 CPU), so b is +note reserved (196). a and x finish; their workers keep the results, since +note review is full, so for 600 ms b stays ready with all CPU free (197, +note 198). Reviewing p lets a into review, frees its worker, and b runs +note (199). +fn pt_live to void +c = pt_setup 2 8 1 pt_req 2 1024 1 8 195 +pt_ok eq sched_policy sched_stat 24 64 64 1 1000 0 195 +p = pt_admit 470050 0 pt_req 1 0 0 0 195 +pt_ok pt_until c p 4 4 2000 195 195 +k = sched_pause c true +a = pt_admit 480050 0 pt_req 1 0 0 0 195 +b = pt_admit 490050 0 pt_req 2 0 0 0 195 +x = pt_admit 510050 0 pt_req 1 0 0 0 195 +k = sched_pause c false +pt_ok eq sched_stat 29 add b 1 196 +dl = add ulong monons 600000000 +for t ulong 1000000 +if ge ulong monons dl +break +end +pt_step c 197 +end +pt_ok eq get sjst b 2 197 +pt_ok eq get suse 0 0 198 +pt_ok eq sched_review p long add get sjid p 1 199 +pt_ok pt_until c b 3 4 2000 199 199 +pt_drain c 3 3000 199 +pt_down c 199 +end + fn pt_mode to void a = new uchar 16 0 if ne argcnt 2 @@ -2515,6 +2630,9 @@ pt_tickets pt_lease pt_rcancel pt_window +pt_torder +pt_slots +pt_live if ne write 1 pok 0 len pok long len pok ret 100 end diff --git a/seed/node/schedpol-test.om b/seed/node/schedpol-test.om index 16378522e..3a7c862c0 100644 --- a/seed/node/schedpol-test.om +++ b/seed/node/schedpol-test.om @@ -171,11 +171,16 @@ end end note One creator step of up to 10 ms, then the invariant and the scan -note budget: no dispatch event examined more than budget x window slots -note (FIFO, policy 0, scans all 64 per pick). 9 when exceeded. +note bounds since the last step: candidate reads at most events x budget x +note (window + 1), the reserved probe included (FIFO, policy 0, reads at +note most 64 per pick), 9; maintenance reads at most 64 per event, 14; the +note cursor moves only in events that scanned a window, 15. fn pt_step c long code int to void e0 = sched_stat 2 x0 = sched_stat 3 +m0 = sched_stat 13 +s0 = sched_stat 14 +u0 = sched_stat 28 r = sched_step c 10000000 pt_ok ge r 0 code pt_inv code @@ -183,8 +188,13 @@ w = sched_stat 25 if eq sched_stat 24 0 w = ulong 64 end -lim = mul mul sub sched_stat 2 e0 sched_stat 26 w +ev = sub sched_stat 2 e0 +lim = mul mul ev sched_stat 26 add w 1 pt_ok le sub sched_stat 3 x0 lim 9 +pt_ok le sub sched_stat 13 m0 mul ev 64 14 +if eq sched_stat 14 s0 +pt_ok eq sched_stat 28 u0 15 +end end note Step until job j is in a state in lo..hi, up to ms. True when reached. @@ -524,20 +534,23 @@ ret 64 end note Phase L: lease expiry. h (2 of 2 CPU, 3 s, not safe to rerun) has a -note 200 ms lease: sched_overdue reports it once, not before the lease; -note the creator kills its worker; h becomes UNKNOWN and its CPU is free. +note 200 ms lease: its deadline is at least 200 ms after h was admitted, and +note sched_overdue reports it once, at or after that deadline (83); the +note creator kills its worker; h becomes UNKNOWN and its CPU is free. note h2 (2 CPU, 400 ms, safe to rerun, 100 ms lease) is killed the same note way: it is ready or running again with its admission age kept, and note completes. Then a new 2-CPU job runs. fn pt_lease to void c = pt_setup 3 8 8 pt_req 2 1024 1 8 81 +t0 = ulong monons h = pt_admit 173000 0 pt_req 2 0 0 0 81 pt_ok eq sched_lease h 200000000 0 81 pt_ok pt_until c h 3 3 2000 81 81 -t0 = ulong monons +due = get sjdue h +pt_ok ge due add t0 200000000 83 o = pt_waitod c 82 pt_ok eq o h 82 -pt_ok ge sub ulong monons t0 150000000 83 +pt_ok ge ulong monons due 83 pt_ok eq sched_overdue 64 84 r = killpid int get swpid get sjw h 9 pt_ok pt_until c h 6 6 2000 85 85 @@ -603,6 +616,100 @@ pt_ok eq sched_stat 4 12 102 pt_down c 103 end +note Phase T: ticket order with several openings. Limit 3 held by p1, p2 +note (400 ms) and p3 (900 ms); X, Y, Z are refused in that order and hold +note tickets (104). With two openings, Y asking first is refused (105), and +note so is a new caller W, who takes a ticket behind Z (106); X enters +note (107), then Y (108). With three openings, W asking first is refused, +note then Z and W enter (109). +fn pt_torder to void +c = pt_setup 3 3 8 pt_req 4 1024 1 8 104 +p = pt_admit 400400 0 0 104 +p = pt_admit 410400 0 0 104 +p = pt_admit 420900 0 0 104 +pt_ok eq sched_admitr 430050 0 0 0 neg long 2 104 +pt_ok eq sched_admitr 440050 0 0 0 neg long 2 104 +pt_ok eq sched_admitr 450050 0 0 0 neg long 2 104 +pt_ok eq sched_stat 30 3 104 +pt_drain c 2 3000 104 +pt_ok eq sched_admitr 440050 0 0 0 neg long 2 105 +pt_ok eq sched_admitr 460050 0 0 0 neg long 2 106 +pt_ok eq sched_stat 30 4 106 +pt_ok ge sched_admitr 430050 0 0 0 0 107 +pt_ok ge sched_admitr 440050 0 0 0 0 108 +pt_drain c 3 3000 108 +pt_ok eq sched_admitr 460050 0 0 0 neg long 2 109 +pt_ok ge sched_admitr 450050 0 0 0 0 109 +pt_ok ge sched_admitr 460050 0 0 0 0 109 +pt_drain c 2 3000 109 +pt_down c 109 +end + +note Phase X: the table, not the admission limit, is full. Admission limit +note and review limit 64; 64 jobs finish and wait in review, so none is +note admitted, waiting, ready or running. A new caller is refused and takes +note a ticket (190, 191), as is a second (192). One review frees one slot: +note the second holder is refused, the first enters (193, 194). +fn pt_slots to void +c = pt_setup 3 64 64 pt_req 4 1024 1 8 190 +for i ulong 64 +j = pt_admit add 500001 mul i 10000 0 0 190 +end +dl = add ulong monons 5000000000 +for t ulong 1000000 +if eq sched_count 4 4 64 +break +end +pt_ok lt ulong monons dl 190 +pt_step c 190 +end +pt_ok not sched_room 600050 191 +pt_ok eq sched_stat 30 1 191 +pt_ok eq sched_admitr 600050 0 0 0 neg long 2 192 +pt_ok eq sched_admitr 610050 0 0 0 neg long 2 192 +pt_ok eq sched_stat 30 2 192 +pt_ok eq sched_review 0 long add get sjid 0 1 193 +pt_ok eq sched_admitr 610050 0 0 0 neg long 2 193 +pt_ok ge sched_admitr 600050 0 0 0 0 194 +n = pt_review 194 +pt_ok ge sched_admitr 610050 0 0 0 0 194 +pt_drain c 2 3000 194 +pt_down c 194 +end + +note Phase Z: reserved progress needs review progress. Review limit 1, two +note workers, 2 CPU, bypass budget 1. p finishes and waits in review, +note unreviewed. a (1 CPU) and x (1 CPU) run past b (2 CPU), so b is +note reserved (196). a and x finish; their workers keep the results, since +note review is full, so for 600 ms b stays ready with all CPU free (197, +note 198). Reviewing p lets a into review, frees its worker, and b runs +note (199). +fn pt_live to void +c = pt_setup 2 8 1 pt_req 2 1024 1 8 195 +pt_ok eq sched_policy sched_stat 24 64 64 1 1000 0 195 +p = pt_admit 470050 0 pt_req 1 0 0 0 195 +pt_ok pt_until c p 4 4 2000 195 195 +k = sched_pause c true +a = pt_admit 480050 0 pt_req 1 0 0 0 195 +b = pt_admit 490050 0 pt_req 2 0 0 0 195 +x = pt_admit 510050 0 pt_req 1 0 0 0 195 +k = sched_pause c false +pt_ok eq sched_stat 29 add b 1 196 +dl = add ulong monons 600000000 +for t ulong 1000000 +if ge ulong monons dl +break +end +pt_step c 197 +end +pt_ok eq get sjst b 2 197 +pt_ok eq get suse 0 0 198 +pt_ok eq sched_review p long add get sjid p 1 199 +pt_ok pt_until c b 3 4 2000 199 199 +pt_drain c 3 3000 199 +pt_down c 199 +end + fn pt_mode to void a = new uchar 16 0 if ne argcnt 2 @@ -654,6 +761,9 @@ pt_tickets pt_lease pt_rcancel pt_window +pt_torder +pt_slots +pt_live if ne write 1 pok 0 len pok long len pok ret 100 end From f40f47c5f60c545b01d4312b3995c2c693883e32 Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Sat, 7 Nov 2026 00:02:07 -0600 Subject: [PATCH 09/20] chore(crumb): recompile --- .crumb | 8 ++++---- seed/node/.crumb | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.crumb b/.crumb index dbfe33612..2f36766a8 100644 --- a/.crumb +++ b/.crumb @@ -108,14 +108,14 @@ } ], "children_root": "sha256:966bedb54caa4209f9ab84526da66f6b13ce72e8831470170364eb5881355748", - "compiled_at": "2026-11-07T05:50:29Z", + "compiled_at": "2026-11-07T06:02:06Z", "compiler": "crumb-compile/1", - "digest": "sha256:3b0d54980411c3bb00b54640b30ca7b129c9fdf3a3ebf60abc491c2c6413ef14", + "digest": "sha256:8c3ff8a07fa8caf8b367ef04a1df727a9b5357dadaacae877cd416b3d1e35ca1", "evidence_files": 15703, "evidence_root": "sha256:18f1108fa7f81636aa11261cb78b2cc65226094a10ae5967455fcacdd2aaed36", "files": 24264, - "generated_at_commit": "9e09bdab2e0414a5f9085327110ab69b93f8f8fc", - "source_tree": "sha256:ac5aae5ad3c69904f4c4d294b5684223cb9a6bed02e21921c421996db5cf620b" + "generated_at_commit": "b0dcba4ca1c7b0b01ba54120a71939967ad6c7ff", + "source_tree": "sha256:0b92d251976960f616cc43aec77b41330124e32ef072e64a986a3106c0db1d37" }, "owner_lane": "", "provenance": { diff --git a/seed/node/.crumb b/seed/node/.crumb index ed551b6f4..026d9a697 100644 --- a/seed/node/.crumb +++ b/seed/node/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-11-07T05:35:46Z", + "compiled_at": "2026-11-07T06:02:06Z", "compiler": "crumb-compile/1", - "digest": "sha256:fd0e1019171b9db7cbe9e91ad1d0113b339c40a80e5be79bbff83f91047a286d", + "digest": "sha256:e945486a110e0d7d6422e47439d68b3db923428233f442292ed6c54f6d8ba148", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 26, - "generated_at_commit": "fc5ca9fbc49df5bb32774b4beaab99379d0b513f", - "source_tree": "sha256:e7cddbfc8fcc31e570a944c1e2e576f5caa598eb42127e1f8c59aa534cd1627f" + "generated_at_commit": "b0dcba4ca1c7b0b01ba54120a71939967ad6c7ff", + "source_tree": "sha256:a43ce172d7e74defef932759eb4c01ea82a82083ca8c008914f4daeeee4e536e" }, "owner_lane": "", "seed": { From 988c78fa73fc9448d747733ff17196800718573e Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Sat, 7 Nov 2026 00:06:56 -0600 Subject: [PATCH 10/20] evidence(node-schedpol): DRA-396 receipt 3dc250b0 at f40f47c5 (review r1 fixes), 36 PASS / 0 FAIL --- ...4f523bf4a251ff5e816c2da03cbefddb32d4d.json | 1362 +++++++++++++++++ 1 file changed, 1362 insertions(+) create mode 100644 evidence/node-schedpol/receipt.3dc250b0969aadaa5b9a4c61daa4f523bf4a251ff5e816c2da03cbefddb32d4d.json diff --git a/evidence/node-schedpol/receipt.3dc250b0969aadaa5b9a4c61daa4f523bf4a251ff5e816c2da03cbefddb32d4d.json b/evidence/node-schedpol/receipt.3dc250b0969aadaa5b9a4c61daa4f523bf4a251ff5e816c2da03cbefddb32d4d.json new file mode 100644 index 000000000..db6746bfe --- /dev/null +++ b/evidence/node-schedpol/receipt.3dc250b0969aadaa5b9a4c61daa4f523bf4a251ff5e816c2da03cbefddb32d4d.json @@ -0,0 +1,1362 @@ +{ + "checks": [ + { + "binary_sha256": "6531d3ed8e9451054fc5534ea7c3a21953386abc70709e0fbeb6048a0218faa1", + "case": "schedpol-gate", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-395", + "repeat": { + "outcomes": { + "0": 10 + }, + "runs": 10 + }, + "run_exit": 0, + "source_sha256": "a8166b571093a22bec49d5715d6de91dba383b287582fefb1c19e5216b2f71ec", + "stderr": "", + "stdout": "schedpol events=109 examined=4566 assigned=10 hol_stops=0 bypasses=4 reservations=1\nPASS node schedpol\n", + "stdout_has": [ + "PASS node schedpol" + ], + "verdict": "PASS", + "wall_ms": 94603 + }, + { + "binary_sha256": "6531d3ed8e9451054fc5534ea7c3a21953386abc70709e0fbeb6048a0218faa1", + "case": "schedpol-gate-fifo", + "compile_exit": 0, + "expected_exit": 11, + "issue": "DRA-396", + "repeat": { + "outcomes": { + "11": 5 + }, + "runs": 5 + }, + "run_exit": 11, + "source_sha256": "a8166b571093a22bec49d5715d6de91dba383b287582fefb1c19e5216b2f71ec", + "stderr": "", + "stdout": "schedpol hol witness head=20050 fits_behind=30050 free_cpu=1 idle_worker=1 hol_stops=40\nschedpol hol witness head=20050 fits_behind=50050 free_cpu=1 idle_worker=1 hol_stops=40\n", + "stdout_has": [ + "schedpol hol witness head=20050 fits_behind=30050 free_cpu=1 idle_worker=1", + "schedpol hol witness head=20050 fits_behind=50050 free_cpu=1 idle_worker=1" + ], + "verdict": "PASS", + "wall_ms": 14566 + }, + { + "binary_sha256": "6531d3ed8e9451054fc5534ea7c3a21953386abc70709e0fbeb6048a0218faa1", + "case": "schedpol-gate-noreserve", + "compile_exit": 0, + "expected_exit": 61, + "issue": "DRA-396", + "repeat": { + "outcomes": { + "61": 5 + }, + "runs": 5 + }, + "run_exit": 61, + "source_sha256": "a8166b571093a22bec49d5715d6de91dba383b287582fefb1c19e5216b2f71ec", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 34128 + }, + { + "binary_sha256": "ce73f423b863312dc2fe7a059c471151d4e8c7029949f85b19c73d19403f546d", + "case": "sched-gate", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-287", + "run_exit": 0, + "source_sha256": "9a242d700c3c7762a278578da14383f567df287c05c5c2dbf1f39b68fef98eb8", + "stderr": "", + "stdout": "idle ticks workers=0 creator=0 wake rounds=200 mean_us=44 max_us=1535\nPASS node sched\n", + "verdict": "PASS", + "wall_ms": 8030 + }, + { + "binary_sha256": "afc1b1f7aa4c41a0fa217ae45695f8c8a44d85e9cd4ab72a65b64aa132b4a7f4", + "case": "auth-gate", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-288", + "run_exit": 0, + "source_sha256": "030a69587805495553cb42cb00108ecb7240e8cd4c287711789c44d56d8a83ee", + "stderr": "", + "stdout": "PASS node authority\n", + "verdict": "PASS", + "wall_ms": 750 + }, + { + "binary_sha256": "eefd6af684a995a76551894dfeb4512e4c8fc27e139c135f0464781a7781e85b", + "case": "journal-gate", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-289", + "run_exit": 0, + "source_sha256": "08ac4586e2b2c36939e2f15113ca792ff7bd57b6c49cc64033853fdc4b89d570", + "stderr": "", + "stdout": "PASS node journal\n", + "verdict": "PASS", + "wall_ms": 3244 + }, + { + "binary_sha256": "59b7177fc1b84e7e152f160ed13a41681c7f46c1110749079ec029a8d92eafc4", + "case": "code-test-unit", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-290", + "run_exit": 0, + "source_sha256": "1775c1c65630e7513706c17d6594ca125cd9daa89af80c9f507f306f1e839b58", + "stderr": "", + "stdout": "CWR 0 0 2\n\n\n\nCWE 0 0 2 1\nCWE 0 1002 1 2\nCWR 0 0 2\n\n\n\nCWE 0 0 2 1\nCWO 0 FAIL 11 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 2\nCWO 0 FAIL 10 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 9\nCWO 0 FAIL 10 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 10 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 2\nCWE 0 1013 1 3\nCWR 0 0 2\n\n\n\nCWE 0 0 2 2\nCWE 0 1023 1 3\nCWR 0 0 2\n\n\n\nCWE 0 0 2 2\nCWO 0 FAIL 10 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 13 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 13 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 13 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 13 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 11 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWE 0 1034 1 4\nCWR 0 0 13\nTests passed.\nCWE 0 0 2 4\nCWO 0 FAIL 14 0\nCWR 0 0 13\nTests passed.\nCWE 0 0 2 4\nCWO 0 FAIL 14 0\nCWR 0 0 13\nTests passed.\nCWE 0 0 2 4\nCWE 0 1045 1 5\nCWR 0 0 15\nFile not found.\nCWE 0 0 2 5\nCWO 0 FAIL 10 0\nCWR 0 0 15\nFile not found.\nCWE 0 0 2 5\nCWO 0 PASS 1 0\nCWO 0 FAIL 18 0\nCWO 0 FAIL 18 0\nCWO 0 FAIL 18 0\nCWE 0 0 3 0\nCWE 0 0 3 1\nCWE 0 0 3 2\nCWO 0 FAIL 17 0\nCWE 0 0 3 6\nCWE 0 0 3 6\nCWO 0 FAIL 15 0\nCWE 0 0 3 0\nCWE 0 0 3 4\nCWO 0 FAIL 17 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWE 0 1054 1 4\nCWE 0 0 3 0\nCWE 0 0 3 0\nCWO 0 FAIL 15 0\nCWE 0 0 3 5\nCWO 0 FAIL 13 0\nCWE 0 0 3 0\nCWO 0 PASS 1 0\nCWE 0 0 3 6\nCWO 0 FAIL 15 0\nCWE 0 0 3 0\nCWO 0 FAIL 15 0\nCWO 0 FAIL 12 7\nCWO 0 FAIL 20 0\nCWE 0 1061 1 1\nCWP 0 1 193\nTask: Fix the error in this file and confirm its goal.\nFile: jobs/item76666.om\nGoal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.\nState: unread\nAnswer:\n\ncode checks=54 fail=0\n", + "verdict": "PASS", + "wall_ms": 34 + }, + { + "binary_sha256": "605585f96ff748bbe5742e4467ae776c2982f57917e255231821dc2daec798d7", + "case": "mut-impossible-admitted", + "compile_exit": 0, + "expected_exit": 31, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "if not sp_feas req\n", + "to": "if false\n" + }, + "run_exit": 31, + "source_sha256": "71a134953adb1f0278c6288e24b62d505905f698542a1c345b01b40fbe8a1cc5", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 2 + }, + { + "binary_sha256": "1974ec298e60ca468bb7d2a86aee656b7ba948e052ca68400372fec4e6d87f50", + "case": "mut-collect-no-release", + "compile_exit": 0, + "expected_exit": 133, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "j = sub b 1\nsp_give j\n", + "to": "j = sub b 1\n" + }, + "run_exit": 133, + "source_sha256": "2b25c19222cb66c4e677f8881fe91ff229baf5dcfc574edf4a5876b6a5f25cf2", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 412 + }, + { + "binary_sha256": "9fbfadcf8cda8c4612cb247a1c4b9af0d09722d70a83d8bcee3eb4c48969162d", + "case": "mut-capacity-ignored", + "compile_exit": 0, + "expected_exit": 44, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "if gt sp_need req k a\n", + "to": "if false\n" + }, + "run_exit": 44, + "source_sha256": "fd77da4a47ed0d79ffd7ff80df730a38f3f67019a58e9e623fc306e3b64f925d", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 435 + }, + { + "binary_sha256": "e7b75e6ae68df23fa4e18ae093e46183a0b8f32f6de3795db3a04785b318a9b9", + "case": "mut-ready-unstamped", + "compile_exit": 0, + "expected_exit": 54, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ne and get sjdep j topics 0\nsp_ready j\n", + "to": "if ne and get sjdep j topics 0\nput sjst j 2\n" + }, + "run_exit": 54, + "source_sha256": "d9bbbb8321fc7862529271148792f4bf93c476c46ad64e6bcfe837cd59b5b118", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 1012 + }, + { + "binary_sha256": "9c2cc76740f7d07a229debcfddbb3d324d59881f0fe58c5eff87b7929bbd20c1", + "case": "mut-give-after-review", + "compile_exit": 0, + "expected_exit": 122, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "j = sub b 1\nsp_give j\nif ge sched_count 4 4 get sclim 1\ncontinue\nend\n", + "to": "j = sub b 1\nif ge sched_count 4 4 get sclim 1\ncontinue\nend\nsp_give j\n" + }, + "run_exit": 122, + "source_sha256": "449e95959de8378e511306f4bd24eeb66810cac587b52fcf74a90c476f22acbf", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 894 + }, + { + "binary_sha256": "4fe022ac3e7783176863c367c9c04450a084beff766838e7a103f80e5a00f5dd", + "case": "mut-no-take", + "compile_exit": 0, + "expected_exit": 130, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "end\nsp_take j\nif eq get scpol 5 add j 1\n", + "to": "end\nif eq get scpol 5 add j 1\n" + }, + "run_exit": 130, + "source_sha256": "f7ccfc66501dff5ed5ebedda73485cd9daddb54fe861b3375f7c19e04f5dda78", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 11 + }, + { + "binary_sha256": "4c12a23c3d7eb8501199d48a3cc3d9f5e63a05313aabcaaabdc03eacae2cefc9", + "case": "mut-cap-below-use", + "compile_exit": 0, + "expected_exit": 131, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "if lt sp_need caps k get suse k\n", + "to": "if false\n" + }, + "run_exit": 131, + "source_sha256": "faab6a726aefb99d8b45067b6f42dcaa5983dded6e3613e7562f1df262d973c5", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 11 + }, + { + "binary_sha256": "02f2d4aca319e16a7dcf835fafe3e5ee05bf51f2095c1ae40d20a3b73cf26e41", + "case": "mut287-wake-all", + "compile_exit": 0, + "expected_exit": 16, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ne and sc_cell w 32 topics 0\n", + "to": "if true\n" + }, + "run_exit": 16, + "source_sha256": "6e7ff86b67cf8a232b41b7386d037fbf7d374d71fe6b0a843d9f896380dc75db", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 601 + }, + { + "binary_sha256": "a07c19b7c3eaddc1b75c51a8ebceb13a3f360f85d282b1e27d2a24e4b4f5b6aa", + "case": "mut287-no-wake", + "compile_exit": 0, + "expected_exit": 34, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "sc_set w 0 q\nsc_wake w\n", + "to": "sc_set w 0 q\n" + }, + "run_exit": 34, + "source_sha256": "ed7d7fbff1a90351a35d948cec41771d12d634047f2b2fe70cfbbce5fc295a43", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 6321 + }, + { + "binary_sha256": "ef04245eae57250d06cadc3b48d2fcff33cf602aa9612cb678fe4617c3ca572e", + "case": "mut287-review-unbounded", + "compile_exit": 0, + "expected_exit": 50, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ge sched_count 4 4 get sclim 1\n", + "to": "if false\n" + }, + "run_exit": 50, + "source_sha256": "f46bacf7b87642eaef755462568b7a205a80fb396769e3eb2b5e0d341dc3fbe0", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 3380 + }, + { + "binary_sha256": "8dfd67d5051aa8ccfeed1edd5b88d23b4ca7d39c4e1de4d0e0d9702129d2324e", + "case": "mut287-admit-unbounded", + "compile_exit": 0, + "expected_exit": 48, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "room = ulong 0\nif lt sched_count 1 3 get sclim 0\nroom = sub get sclim 0 sched_count 1 3\nend\n", + "to": "room = ulong 64\n" + }, + "run_exit": 48, + "source_sha256": "7d286b4a3a04115dfcf4061d50034aa412f00a8945f04e6201be7a12361a3bcd", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 2842 + }, + { + "binary_sha256": "99ffeaa26433a14346c9d71b9e9fac949d8c6bad66bf5c40f6eaca8ba8c05c34", + "case": "mut287-unknown-rerun", + "compile_exit": 0, + "expected_exit": 83, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "put sjst j 6\n", + "to": "put sjst j 2\n" + }, + "run_exit": 83, + "source_sha256": "3198e95385e72ad99853933e448c1a97ddf91d18dedeaab3efbaeaf492d1e68f", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 6769 + }, + { + "binary_sha256": "6a8502cb3fb762d63263aad50c3e06e5974c3770bb7714bdaa14063f29c0d0bc", + "case": "mut287-lost-no-ack", + "compile_exit": 0, + "expected_exit": 92, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "sc_set w 64 get scseq w\n", + "to": "" + }, + "run_exit": 92, + "source_sha256": "5d218fb5fb3c3fd45898fce24c1e2e521899b47fbc21ade0f6b2d70b8f590913", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 5279 + }, + { + "binary_sha256": "df27617334421ae30fae66831bdcf677d537b300eab5cf60c91c620d85436fe9", + "case": "mut287-deps-ignored", + "compile_exit": 0, + "expected_exit": 68, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "put sjst j 1\n", + "to": "put sjst j 2\n" + }, + "run_exit": 68, + "source_sha256": "fb499037739fc137d873d22490bda720a510ae9274404f7dabd9b654562aba09", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 3415 + }, + { + "binary_sha256": "8c0d3b6440e708be9cf1fcdfb56f9616c1107be935547d4ab280ce98276cdd66", + "case": "mut287-super-spin", + "compile_exit": 0, + "expected_exit": 138, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/super.om", + "from": "iv = interval\n", + "to": "iv = long 0\n" + }, + "run_exit": 138, + "source_sha256": "08313f2ab9e36ea349992dee2b059522b2965bd7ec2bb2bb3ff4d25b1c21b01f", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 2215 + }, + { + "binary_sha256": "813fc4d44ec646d48fc2aec071a278374b858f3cad4a3216520c2f6f1ae46c46", + "case": "mut288-pause-ignored", + "compile_exit": 0, + "expected_exit": 121, + "issue": "DRA-288", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ne get scpause 0 0\n", + "to": "if false\n" + }, + "run_exit": 121, + "source_sha256": "df6dbe425fa98c5cfe5ac1e716fee188be50fbb9b40643304cbfea240bd982c6", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 689 + }, + { + "binary_sha256": "6ed0ef92dd342fc75c03efe5475628b104b7444a6163a195e83f93e7908a6885", + "case": "mut396-cursor-stuck", + "compile_exit": 0, + "expected_exit": 101, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "put scpol 4 rem add get scpol 4 get scpol 1 64\n", + "to": "" + }, + "run_exit": 101, + "source_sha256": "19ad39819689e22eb799997dcd7d289b3b98565fbef8a0315096a4c3c8aa5d63", + "stderr": "", + "stdout": "schedpol events=110 examined=4631 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 12197 + }, + { + "binary_sha256": "1bec28869b6a9d7f0808999d624519c4098d2ab35bc671ce3b6a3e01e534aacd", + "case": "mut396-tickets-ignored", + "compile_exit": 0, + "expected_exit": 75, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if eq get scpol 6 0\nret true\n", + "to": "if true\nret true\n" + }, + "run_exit": 75, + "source_sha256": "49857fc996753f774a58ab8693e177bbef110abaf792e68e3cc9b7c6b351b8ee", + "stderr": "", + "stdout": "schedpol events=110 examined=4567 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 4322 + }, + { + "binary_sha256": "96c91324ab53ea6b650c020904c8135c9b691ad7076bd3583e9d8d93508511e9", + "case": "mut396-no-holdback", + "compile_exit": 0, + "expected_exit": 61, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "rq = get sjneed rj\n", + "to": "rq = ulong 0\n" + }, + "run_exit": 61, + "source_sha256": "10df28bcc8e9a6dcb1edd3be8ce965d9082dbc2f6d2126aced19e7072d185039", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 6827 + }, + { + "binary_sha256": "eeac34b66a35c62271dd72cc6e50d9bd57ba70d30eee62794312d878322e3a15", + "case": "mut396-never-reserve", + "compile_exit": 0, + "expected_exit": 61, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "put scpol 5 add o 1\n", + "to": "" + }, + "run_exit": 61, + "source_sha256": "b2fe074bc0d48adc457ff48ecc8c90ee4068f128ea816ab018dcaa8f85c47b58", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 6820 + }, + { + "binary_sha256": "c492e3695ce3bfe43c169611f909292ac830894382b92c87e05bf4c6d6cfd1a7", + "case": "mut396-lease-never", + "compile_exit": 0, + "expected_exit": 82, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ge now d\n", + "to": "if false\n" + }, + "run_exit": 82, + "source_sha256": "7ffe0118aa55f6d0f502fc3beab9d874e768d60e53a97c7c927d5783f8bdeb27", + "stderr": "", + "stdout": "schedpol events=109 examined=4566 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 7812 + }, + { + "binary_sha256": "094fd29ba1f0f56bbad0a1d8029b90b60dc76f4bbeb066be79629b6389386494", + "case": "mut396-cancel-keeps-reserve", + "compile_exit": 0, + "expected_exit": 94, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "put sjst j 0\nif eq get scpol 5 add j 1\nput scpol 5 0\nend\n", + "to": "put sjst j 0\n" + }, + "run_exit": 94, + "source_sha256": "5ab8692d377c53e1081569ecf3c29f46e92503f37161fa15555c669fb0012278", + "stderr": "", + "stdout": "schedpol events=109 examined=4501 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 6556 + }, + { + "binary_sha256": "1692fa69c55b715d69d4311ca51341b6ca8a89833d8e0c6ae304996cb9db5e21", + "case": "mut396-window-ignored", + "compile_exit": 0, + "expected_exit": 9, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "for i ulong win bound 64\n", + "to": "for i ulong 64 bound 64\n" + }, + "run_exit": 9, + "source_sha256": "befc0f7872ab29f5f753611064cd57f824a0fc433bf581fafc793c48dc9f0dec", + "stderr": "", + "stdout": "schedpol events=111 examined=4631 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 7201 + }, + { + "binary_sha256": "c3997d73b6cefced2e37529245909284c98f5288719184ac497b8f7f1827e389", + "case": "mut396-tickets-never-lapse", + "compile_exit": 0, + "expected_exit": 80, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if lt add get stts t get scpol 7 get scst 2\n", + "to": "if false\n" + }, + "run_exit": 80, + "source_sha256": "daf2690b6af73fc80cf611c6f0127338726429d6f9d9ed1b7ba2d808a63f03c9", + "stderr": "", + "stdout": "schedpol events=110 examined=4567 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 5053 + }, + { + "binary_sha256": "f7204cc0b61f55d7e58cc7330cc6418db7214af8409090e359093b8aa0985221", + "case": "mut396-cursor-every-event", + "compile_exit": 0, + "expected_exit": 15, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if sc\nput scpol 4", + "to": "if true\nput scpol 4" + }, + "run_exit": 15, + "source_sha256": "1be501b599a1585e60fbf1f49c8a7a9f5248bf1286458b383eff58bbdb1cd09e", + "stderr": "", + "stdout": "schedpol events=110 examined=4567 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 7202 + }, + { + "binary_sha256": "1484876ad5e072706397e105ac111d243d10095353b0d309c876247c26c97db4", + "case": "mut396-holders-by-room", + "compile_exit": 0, + "expected_exit": 105, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if eq t 0\nret true", + "to": "if lt t room\nret true" + }, + "run_exit": 105, + "source_sha256": "b399a5ece13f373e915d927b3cea3ba11742f8895c3358b65792c85f14538529", + "stderr": "", + "stdout": "schedpol events=109 examined=4567 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 8201 + }, + { + "binary_sha256": "4dec7242e948c07b286753e063edd008df86dffe8e45acb51ffe3843df5fed33", + "case": "mut396-room-ignores-slots", + "compile_exit": 0, + "expected_exit": 191, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "fs = sched_count 0 0\n", + "to": "fs = ulong 64\n" + }, + "run_exit": 191, + "source_sha256": "c4509372e9682c454f231387890555d6063719f24984cc73f77d2c5bf15d5fae", + "stderr": "", + "stdout": "schedpol events=111 examined=4631 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 8791 + }, + { + "binary_sha256": "16fffcd4e2cd8f085d13a26a93901005366aacc661dc420998ee1f310d67d764", + "case": "mut396-lease-early", + "compile_exit": 0, + "expected_exit": 83, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ge now d\n", + "to": "if ge add now 100000000 d\n" + }, + "run_exit": 83, + "source_sha256": "bf95316095b7a2548e4593f76227a786dd1e56838d2e5230376f9d26394ce581", + "stderr": "", + "stdout": "schedpol events=109 examined=4566 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 5881 + }, + { + "binary_sha256": "c0b2b29ce1ceb883315553a1003ad9e00436396d9d992bce9c929b57271dde6b", + "case": "mut396-jn-room-before-dup", + "compile_exit": 0, + "expected_exit": 170, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/journal.om", + "from": "if ge jn_jfind id 0\nret neg long 4\nend\nif not sched_room id\nret neg long 2\nend\n", + "to": "if not sched_room id\nret neg long 2\nend\nif ge jn_jfind id 0\nret neg long 4\nend\n" + }, + "run_exit": 170, + "source_sha256": "ec3fdb593fd1f2dea06f26df3810b914b41fe2757a170a1551f30776c2346265", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 3262 + } + ], + "compiler": { + "path": "seed/out/omc", + "sha256": "5f90edea61bac241398df5036990d899361a5acd9decb37954ce088ec0f6f6df" + }, + "cpu_affinity": [ + 10, + 11 + ], + "execution": "NATIVE Linux AArch64 host CPU (DGX Spark host, no GPU opened)", + "hashes": { + "seed/authority/action.om": "59cb9c3dfdcd9193bc4a272deda4fcd256a0d7693f3bcb58bc4e30ed78faab2b", + "seed/node/auth-gate.om": "030a69587805495553cb42cb00108ecb7240e8cd4c287711789c44d56d8a83ee", + "seed/node/auth-test.om": "af66c87f83d73a5bdbaf181378eb69bb0645a86fe9b39de2f1b714041fbc20b8", + "seed/node/auth.om": "edf2f075d3751a8025363bc658252537f865dfc29f975fcf5d93c353b3282b30", + "seed/node/code-test.om": "df87a21e31f38d85ab9145af3fb18bafc52144a20aed0d9fbad60f6059ddacd0", + "seed/node/code.om": "aa9f8463fbe9534626c205e991e3a2170a25cbf91a106932ec399353583c0bf7", + "seed/node/gram.om": "ebba1f4c693f218969dc2f17eb680760977d38d694ac76db477853aefa64b291", + "seed/node/journal-gate.om": "08ac4586e2b2c36939e2f15113ca792ff7bd57b6c49cc64033853fdc4b89d570", + "seed/node/journal-test.om": "e875db636a5fec65ceb94d5924903967ef015a442ad46c70494eea71732f9123", + "seed/node/journal.om": "b8f970d02b3f752d217f61b601817d5abc5a8c22fd2288544af15a18f628feac", + "seed/node/pool.om": "e7fba928bdc5c4194e7aee42109265de4f172d2b197946133d788b2dbcb30ccc", + "seed/node/sched-gate.om": "9a242d700c3c7762a278578da14383f567df287c05c5c2dbf1f39b68fef98eb8", + "seed/node/sched-test.om": "29a3587d35a217403c63395eb2b11b4992727812af66512be3e452ea6381a545", + "seed/node/sched.om": "087ac24f2b9a843dc9131f732da70455f3fcae7087b12f71651f910353121872", + "seed/node/schedpol-gate.om": "a8166b571093a22bec49d5715d6de91dba383b287582fefb1c19e5216b2f71ec", + "seed/node/schedpol-test.om": "0199131607a95bde74f37629f61115e266fdf64ac0a72c154ccadfcb0c5789ff", + "seed/node/super.om": "d104ac8116c6df57fdc93f03791d7315e5b60875d8d6177480ef9967b6f53d5a", + "seed/node/transport.om": "d0dd69ef5e0b71294a2390b3526865d62ca07accd269b9ce57a028339e34f6da" + }, + "issue": "DRA-396", + "platform": "Linux 7.0.0-1019-nvidia aarch64 spark-b87b", + "project": "P-DRA-14", + "script": { + "cases": { + "cases": [ + { + "case": "schedpol-gate", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "expect": 0, + "gate": "seed/node/schedpol-gate.om", + "issue": "DRA-395", + "repeat": 10, + "stdout_has": [ + "PASS node schedpol" + ], + "timeout": 120 + }, + { + "args": [ + "fifo" + ], + "case": "schedpol-gate-fifo", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "expect": 11, + "gate": "seed/node/schedpol-gate.om", + "issue": "DRA-396", + "repeat": 5, + "stdout_has": [ + "schedpol hol witness head=20050 fits_behind=30050 free_cpu=1 idle_worker=1", + "schedpol hol witness head=20050 fits_behind=50050 free_cpu=1 idle_worker=1" + ], + "timeout": 120 + }, + { + "args": [ + "noreserve" + ], + "case": "schedpol-gate-noreserve", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "expect": 61, + "gate": "seed/node/schedpol-gate.om", + "issue": "DRA-396", + "repeat": 5, + "timeout": 120 + }, + { + "case": "sched-gate", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "expect": 0, + "gate": "seed/node/sched-gate.om", + "issue": "DRA-287" + }, + { + "case": "auth-gate", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/auth-test.om" + ], + "expect": 0, + "gate": "seed/node/auth-gate.om", + "issue": "DRA-288" + }, + { + "case": "journal-gate", + "clean": [ + "build/node/jt" + ], + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/journal-test.om" + ], + "expect": 0, + "gate": "seed/node/journal-gate.om", + "issue": "DRA-289" + }, + { + "args": [ + "unit", + "build/node/cu" + ], + "case": "code-test-unit", + "clean": [ + "build/node/cu" + ], + "expect": 0, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/gram.om", + "seed/node/code.om", + "seed/node/code-test.om" + ], + "issue": "DRA-290", + "om2": true + }, + { + "case": "mut-impossible-admitted", + "expect": 31, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "if not sp_feas req\n", + "if false\n" + ], + "why": "C: impossible request admitted; check sched_admitr == -8 code 31" + }, + { + "case": "mut-collect-no-release", + "expect": 133, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "j = sub b 1\nsp_give j\n", + "j = sub b 1\n" + ], + "why": "C: jobs reviewed still hold; pt_inv in pt_drain code 133" + }, + { + "case": "mut-capacity-ignored", + "expect": 44, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "if gt sp_need req k a\n", + "if false\n" + ], + "why": "D: use exceeds capacity; pt_inv in pt_drain code 44" + }, + { + "args": [ + "fifo" + ], + "case": "mut-ready-unstamped", + "expect": 54, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "if ne and get sjdep j topics 0\nsp_ready j\n", + "if ne and get sjdep j topics 0\nput sjst j 2\n" + ], + "why": "F under fifo: ready order wrong, y not first; code 54" + }, + { + "case": "mut-give-after-review", + "expect": 122, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "j = sub b 1\nsp_give j\nif ge sched_count 4 4 get sclim 1\ncontinue\nend\n", + "j = sub b 1\nif ge sched_count 4 4 get sclim 1\ncontinue\nend\nsp_give j\n" + ], + "why": "V: second CPU not released while review full; suse==0 code 122" + }, + { + "case": "mut-no-take", + "expect": 130, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "end\nsp_take j\nif eq get scpol 5 add j 1\n", + "end\nif eq get scpol 5 add j 1\n" + ], + "why": "C: running unfinished job holds nothing; pt_inv in pt_until code 130" + }, + { + "case": "mut-cap-below-use", + "expect": 131, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "if lt sp_need caps k get suse k\n", + "if false\n" + ], + "why": "C: sched_cap below use accepted; == -8 code 131" + }, + { + "case": "mut287-wake-all", + "expect": 16, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "if ne and sc_cell w 32 topics 0\n", + "if true\n" + ] + }, + { + "case": "mut287-no-wake", + "expect": 34, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "sc_set w 0 q\nsc_wake w\n", + "sc_set w 0 q\n" + ] + }, + { + "case": "mut287-review-unbounded", + "expect": 50, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "if ge sched_count 4 4 get sclim 1\n", + "if false\n" + ] + }, + { + "case": "mut287-admit-unbounded", + "expect": 48, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "room = ulong 0\nif lt sched_count 1 3 get sclim 0\nroom = sub get sclim 0 sched_count 1 3\nend\n", + "room = ulong 64\n" + ], + "why": "DRA-287 sched-gate admission-limit check: headroom ignored, admissions beyond the limit; 48 (pattern moved with the DRA-396 room rewrite)" + }, + { + "case": "mut287-unknown-rerun", + "expect": 83, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "put sjst j 6\n", + "put sjst j 2\n" + ] + }, + { + "case": "mut287-lost-no-ack", + "expect": 92, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "sc_set w 64 get scseq w\n", + "" + ] + }, + { + "case": "mut287-deps-ignored", + "expect": 68, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "put sjst j 1\n", + "put sjst j 2\n" + ] + }, + { + "args": [ + "idle" + ], + "case": "mut287-super-spin", + "expect": 138, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/super.om", + "iv = interval\n", + "iv = long 0\n" + ] + }, + { + "case": "mut288-pause-ignored", + "expect": 121, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/auth-test.om" + ], + "issue": "DRA-288", + "mutate": [ + "seed/node/sched.om", + "if ne get scpause 0 0\n", + "if false\n" + ] + }, + { + "case": "mut396-cursor-stuck", + "expect": 101, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "put scpol 4 rem add get scpol 4 get scpol 1 64\n", + "" + ], + "why": "W: only slots 0..3 ever read; jobs in 4..11 never run; pt_drain 101" + }, + { + "case": "mut396-tickets-ignored", + "expect": 75, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if eq get scpol 6 0\nret true\n", + "if true\nret true\n" + ], + "why": "Q: with room, Y asking before ticket holder X is admitted; code 75" + }, + { + "case": "mut396-no-holdback", + "expect": 61, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "rq = get sjneed rj\n", + "rq = ulong 0\n" + ], + "why": "S: smalls refill freed CPU, big never runs; first check code 61" + }, + { + "case": "mut396-never-reserve", + "expect": 61, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "put scpol 5 add o 1\n", + "" + ], + "why": "S: no reservation, big never runs; first check code 61" + }, + { + "case": "mut396-lease-never", + "expect": 82, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if ge now d\n", + "if false\n" + ], + "why": "L: sched_overdue never reports; eq o h code 82" + }, + { + "case": "mut396-cancel-keeps-reserve", + "expect": 94, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "put sjst j 0\nif eq get scpol 5 add j 1\nput scpol 5 0\nend\n", + "put sjst j 0\n" + ], + "why": "R: reservation survives cancel; sched_stat 29 == 0 code 94" + }, + { + "case": "mut396-window-ignored", + "expect": 9, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "for i ulong win bound 64\n", + "for i ulong 64 bound 64\n" + ], + "why": "pt_step scan bound: slots read > events*db*win; exit 9" + }, + { + "case": "mut396-tickets-never-lapse", + "expect": 80, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if lt add get stts t get scpol 7 get scst 2\n", + "if false\n" + ], + "why": "Q: stale ticket of 150050 blocks new caller 160050; ge 0 code 80" + }, + { + "case": "mut396-cursor-every-event", + "expect": 15, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if sc\nput scpol 4", + "if true\nput scpol 4" + ], + "why": "pt_step: cursor moved in an event that scanned no window (busy workers); 15" + }, + { + "case": "mut396-holders-by-room", + "expect": 105, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if eq t 0\nret true", + "if lt t room\nret true" + ], + "why": "T: second holder Y enters with two openings; 105" + }, + { + "case": "mut396-room-ignores-slots", + "expect": 191, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "fs = sched_count 0 0\n", + "fs = ulong 64\n" + ], + "why": "X: table full of review results, sched_room true; 191" + }, + { + "case": "mut396-lease-early", + "expect": 83, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if ge now d\n", + "if ge add now 100000000 d\n" + ], + "why": "L: overdue reported before the stored deadline; 83" + }, + { + "case": "mut396-jn-room-before-dup", + "clean": [ + "build/node/jt" + ], + "expect": 170, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/journal-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/journal.om", + "if ge jn_jfind id 0\nret neg long 4\nend\nif not sched_room id\nret neg long 2\nend\n", + "if not sched_room id\nret neg long 2\nend\nif ge jn_jfind id 0\nret neg long 4\nend\n" + ], + "why": "journal case 16: duplicate at the limit gets -2 and a ticket, not -4; 170" + } + ], + "issue": "DRA-396", + "statuses": { + "DRA-396": "IMPLEMENTED, EXERCISED on native host; not QUALIFIED; not MERGED; not DEPLOYED", + "expected_exits": "derived from the check site each mutant targets (field why), before the run; DRA-287/288 mutants carry their original derivations from those PRs", + "gpu": "NOT_RUN (not involved)" + } + }, + "cases_sha256": "58ba232702583e5f7b4a8d5b6cbad9e913f96e9b567bb0b664beea0f26c2d474", + "path": "~/handoffs/hive/sched/bin/receipt.py", + "sha256": "350fbf0733c51486123c2854d1cd8ec4578622842da645769a653182b1d35cfa", + "source": "#!/usr/bin/env python3\n\"\"\"Run a scheduler-policy case list against a clean omega-mv checkout and\nwrite a content-addressed receipt (evidence//receipt..json).\n\nUsage: receipt.py CASES.json REPO OUTDIR_REL [--write]\nRun it under the queen pool lock, e.g.\n flock -o ~/handoffs/hive/queen/pool-8-9.lock taskset -c 8-9 nice -n 10 receipt.py ...\n\nA case: {\"case\", \"issue\", \"fragments\": [paths] | \"gate\": path, \"om2\": bool,\n \"mutate\": [path, old, new] (optional; old must occur exactly once),\n \"args\": [..], \"expect\": int, \"timeout\": s, \"clean\": [rel dirs removed first],\n \"stdout_has\": [substrings every run must print] (optional),\n \"repeat\": N runs, each must pass (optional, default 1)}.\nThe receipt embeds this script's source and the case list for replay.\nMutants are applied to a disposable copy of the fragment; the checkout is\nnever modified. Verification tooling only: the implementation is the .om.\n\"\"\"\nimport hashlib, json, os, platform, shutil, subprocess, sys, tempfile, time, datetime\n\ndef sh(cmd, cwd, **kw):\n return subprocess.run(cmd, cwd=cwd, capture_output=True, **kw)\n\ndef sha(path):\n h = hashlib.sha256()\n with open(path, 'rb') as f:\n h.update(f.read())\n return h.hexdigest()\n\ndef main():\n cases_path, repo, outrel = sys.argv[1], os.path.abspath(sys.argv[2]), sys.argv[3]\n write = '--write' in sys.argv\n spec = json.load(open(cases_path))\n dirty = sh(['git', 'status', '--porcelain', '--untracked-files=normal'], repo).stdout.decode()\n dirty = [l for l in dirty.splitlines() if not l[3:].startswith('build/')]\n if dirty:\n print('REFUSED: dirty tree\\n' + '\\n'.join(dirty), file=sys.stderr)\n sys.exit(3)\n head = sh(['git', 'rev-parse', 'HEAD'], repo).stdout.decode().strip()\n tree = sh(['git', 'rev-parse', 'HEAD^{tree}'], repo).stdout.decode().strip()\n omc = os.path.join(repo, 'seed/out/omc')\n work = tempfile.mkdtemp(prefix='schedrcpt-')\n files = set()\n results = []\n for c in spec['cases']:\n frags = c.get('fragments') or [c['gate']]\n src = b'om2\\n' if c.get('om2') else b''\n mut = c.get('mutate')\n if mut and mut[0] not in frags:\n print(f'REFUSED: mutant {c[\"case\"]}: {mut[0]} is not one of its fragments', file=sys.stderr)\n sys.exit(4)\n for fr in frags:\n files.add(fr)\n data = open(os.path.join(repo, fr), 'rb').read()\n if mut and mut[0] == fr:\n old, new = mut[1].encode(), mut[2].encode()\n n = data.count(old)\n if n != 1:\n print(f'REFUSED: mutant {c[\"case\"]}: pattern occurs {n} times', file=sys.stderr)\n sys.exit(4)\n data = data.replace(old, new)\n src += data\n if c.get('gate') and not mut and c.get('compose'):\n composed = b''.join(open(os.path.join(repo, f), 'rb').read() for f in c['compose'])\n if composed != src:\n print(f'REFUSED: {c[\"gate\"]} is not the concatenation', file=sys.stderr)\n sys.exit(5)\n binp = os.path.join(work, c['case'])\n p = subprocess.run([omc], input=src, capture_output=True)\n with open(binp, 'wb') as f:\n f.write(p.stdout)\n os.chmod(binp, 0o755)\n r = {'case': c['case'], 'issue': c.get('issue'), 'compile_exit': p.returncode,\n 'expected_exit': c['expect'], 'source_sha256': hashlib.sha256(src).hexdigest()}\n if mut:\n r['mutation'] = {'file': mut[0], 'from': mut[1], 'to': mut[2]}\n if p.returncode != 0:\n r.update(run_exit=None, verdict='FAIL', stderr=p.stderr.decode(errors='replace'))\n results.append(r)\n continue\n runs, code, out, err = [], None, b'', b''\n t0 = time.monotonic()\n for n in range(c.get('repeat', 1)):\n for d in c.get('clean', []):\n shutil.rmtree(os.path.join(repo, d), ignore_errors=True)\n try:\n q = subprocess.run([binp] + c.get('args', []), cwd=repo, capture_output=True,\n timeout=c.get('timeout', 120))\n code, out, err = q.returncode, q.stdout, q.stderr\n except subprocess.TimeoutExpired as e:\n code, out, err = 'timeout', e.stdout or b'', e.stderr or b''\n text = out.decode(errors='replace')\n miss = [s for s in c.get('stdout_has', []) if s not in text]\n runs.append({'exit': code, 'missing_stdout': miss})\n ok = all(x['exit'] == c['expect'] and not x['missing_stdout'] for x in runs)\n r.update(run_exit=code, wall_ms=int((time.monotonic() - t0) * 1000),\n stdout=out.decode(errors='replace')[-4000:],\n stderr=err.decode(errors='replace')[-2000:],\n binary_sha256=sha(binp),\n verdict='PASS' if ok else 'FAIL')\n if c.get('stdout_has'):\n r['stdout_has'] = c['stdout_has']\n if len(runs) > 1:\n hist = {}\n for x in runs:\n k = f\"{x['exit']}{'' if not x['missing_stdout'] else ' missing-stdout'}\"\n hist[k] = hist.get(k, 0) + 1\n r['repeat'] = {'runs': len(runs), 'outcomes': hist}\n results.append(r)\n print(f\"{r['verdict']} {c['case']} expect={c['expect']} got={code}\"\n + (f\" runs={r['repeat']['outcomes']}\" if len(runs) > 1 else ''), flush=True)\n shutil.rmtree(work, ignore_errors=True)\n rec = {\n 'project': 'P-DRA-14', 'issue': spec['issue'], 'source_commit': head, 'source_tree': tree,\n 'platform': ' '.join([platform.system(), platform.release(), platform.machine(), platform.node()]),\n 'cpu_affinity': sorted(os.sched_getaffinity(0)),\n 'execution': 'NATIVE Linux AArch64 host CPU (DGX Spark host, no GPU opened)',\n 'timestamp_utc': datetime.datetime.now(datetime.timezone.utc).isoformat(),\n 'compiler': {'path': 'seed/out/omc', 'sha256': sha(omc)},\n 'hashes': {f: sha(os.path.join(repo, f)) for f in sorted(files)},\n 'script': {'path': '~/handoffs/hive/sched/bin/receipt.py', 'sha256': sha(__file__),\n 'source': open(__file__).read(),\n 'cases_sha256': sha(cases_path), 'cases': spec},\n 'statuses': spec.get('statuses', {}),\n 'checks': results,\n 'summary': {'pass': sum(r['verdict'] == 'PASS' for r in results),\n 'fail': sum(r['verdict'] != 'PASS' for r in results)},\n }\n body = (json.dumps(rec, indent=2, sort_keys=True) + '\\n').encode()\n digest = hashlib.sha256(body).hexdigest()\n print(f\"summary pass={rec['summary']['pass']} fail={rec['summary']['fail']} receipt_sha256={digest}\")\n if write:\n d = os.path.join(repo, outrel)\n os.makedirs(d, exist_ok=True)\n path = os.path.join(d, f'receipt.{digest}.json')\n with open(path, 'wb') as f:\n f.write(body)\n print(path)\n else:\n with open(os.path.join(tempfile.gettempdir(), f'sched-receipt-{digest}.json'), 'wb') as f:\n f.write(body)\n sys.exit(0 if rec['summary']['fail'] == 0 else 1)\n\nmain()\n" + }, + "source_commit": "f40f47c5f60c545b01d4312b3995c2c693883e32", + "source_tree": "4db307a29a532d950f6dd364d4655028fcb2f36c", + "statuses": { + "DRA-396": "IMPLEMENTED, EXERCISED on native host; not QUALIFIED; not MERGED; not DEPLOYED", + "expected_exits": "derived from the check site each mutant targets (field why), before the run; DRA-287/288 mutants carry their original derivations from those PRs", + "gpu": "NOT_RUN (not involved)" + }, + "summary": { + "fail": 0, + "pass": 36 + }, + "timestamp_utc": "2026-11-07T06:06:50.028883+00:00" +} From 184fe79e86e096b870e844fb96e59be494891444 Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Sat, 7 Nov 2026 00:06:59 -0600 Subject: [PATCH 11/20] chore(crumb): recompile after DRA-396 receipt --- .crumb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.crumb b/.crumb index 2f36766a8..4837cd4b6 100644 --- a/.crumb +++ b/.crumb @@ -108,14 +108,14 @@ } ], "children_root": "sha256:966bedb54caa4209f9ab84526da66f6b13ce72e8831470170364eb5881355748", - "compiled_at": "2026-11-07T06:02:06Z", + "compiled_at": "2026-11-07T06:06:57Z", "compiler": "crumb-compile/1", - "digest": "sha256:8c3ff8a07fa8caf8b367ef04a1df727a9b5357dadaacae877cd416b3d1e35ca1", - "evidence_files": 15703, - "evidence_root": "sha256:18f1108fa7f81636aa11261cb78b2cc65226094a10ae5967455fcacdd2aaed36", - "files": 24264, - "generated_at_commit": "b0dcba4ca1c7b0b01ba54120a71939967ad6c7ff", - "source_tree": "sha256:0b92d251976960f616cc43aec77b41330124e32ef072e64a986a3106c0db1d37" + "digest": "sha256:60685a27979b1467f152c24df2db459acb4ff7e9b1a4c7c5bca9baa1e93922d5", + "evidence_files": 15704, + "evidence_root": "sha256:2763ebcac18e411fa98a5a29d4cf723991ccf3d400da431ea6e1af169640aa69", + "files": 24265, + "generated_at_commit": "988c78fa73fc9448d747733ff17196800718573e", + "source_tree": "sha256:f36f07fded849ce7aec1f7b372137d4b5d44432c92bf3c4080cc25d3d6017512" }, "owner_lane": "", "provenance": { From ea20838fe67c77d7d811016afaaba1cbb988314f Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Sat, 7 Nov 2026 00:15:18 -0600 Subject: [PATCH 12/20] node(sched): DRA-396 review r2: cursor moves on per window scan with a per-step traversal witness, journal case 17 (full table below the limit, no ADMIT journaled, same id admitted later), FIFO bound 64, phase T without timing race, single-pass sched_room, ticket lapse boundary and absent-head block documented --- CONTRIBUTORS.md | 2 +- seed/node/README.md | 50 ++++++++++------- seed/node/auth-gate.om | 61 +++++++++++--------- seed/node/journal-gate.om | 99 +++++++++++++++++++++++--------- seed/node/journal-test.om | 38 +++++++++++++ seed/node/sched-gate.om | 61 +++++++++++--------- seed/node/sched.om | 61 +++++++++++--------- seed/node/schedpol-gate.om | 112 ++++++++++++++++++++++--------------- seed/node/schedpol-test.om | 51 ++++++++++------- 9 files changed, 347 insertions(+), 188 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index ae3004877..47bc5fc53 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -14,7 +14,7 @@ The current development method is [Human-Directed Agentic Engineering (HDAE)](RE | Claude Opus 5.5 (via omp) | DRA-289 for `seed/node`: `journal.om`, a checksummed append-only journal of every authority transition (OPEN, ADMIT, START, DONE, RELEASE, REVOKE, PAUSE, CANCEL), each checked by the recovery tables, written and fdatasync'd before anything acts on it or publishes it; a failed write or sync stops all later appends. `flock` fencing that forked workers also hold, fence numbers per creator incarnation, torn-tail cutting, refusal of corrupt records, other format versions and other objectives. Restart recovery settles operations left in flight (idempotent class 3 by its key, class 1 UNKNOWN and never rerun), releases or readmits each job, and restores authority generation and pause. `auth.om` journals through it and accepts class 3. `journal-gate.om` crashes real creators at every boundary, SIGKILLs them mid-tool and checks the result with its own reader; ten negative controls. Native AArch64 host evidence only; not QUALIFIED on the Spark gate. | | Claude Opus 5.5 (via omp) | DRA-290 for `seed/node`: `code.om`, the coding workflow driving the own Omega model (round40 checkpoint, served by aien-train `ollm serve` `/v1/completions`, aien-train #76) through the Node's scheduler, authority and journal: one inference at a time, typed read/check/replace jobs and a review check, each a cancellable child process group, the round40 repair policy enforced by the creator before every grant, explicit failure reasons and no fallback provider. `infer.om`, a bounded loopback-only completion client returning a versioned record; `tool.om`, the read/check/replace tools inside one root with omagent's path rule (moved to `seed/agent/path.om`), durable replace and sandboxed tests; `gram.om`, the repair grammar. `code-test.om` (54 checks, 15 mutants), `tests/tool-replay.py` (all 108 recorded round40 runs) and live own-model runs with cancellation and crash restart. `seed/agent/agent.om` now kills the tool's whole process group; `seed/authority/action.om` renames a local so the node composes as OM-2. Native AArch64 host evidence only; not QUALIFIED on the Spark gate. | | Claude Opus 5.5 (via omp, sched lane) | P-DRA-14 DRA-395 for `seed/node`: reconciled scheduler ownership (the spark-harness `Core::pump` at aien-sovereign-core-mv `dffdbd19` is reference-only and not deployed) and reproduced its head-of-line block in Rust and natively. `sched.om` gains four-kind resource requests packed in one word, capacity admission that refuses impossible requests and capacities below use, atomic take and release (also while a result waits for review room), and policy 0 (FIFO with the pump's head-of-line stop rule) behind one `sched_dispatch`. `schedpol-test.om` checks the capacity invariant after every creator step; its blocked-head phases print a checked witness and fail (exit 11) until fair fitting lands (DRA-396). Seven negative controls; independent review by openai-codex/gpt-6-astra. Native AArch64 host evidence only. | -| Claude Opus 5.5 (via omp, sched lane) | P-DRA-14 DRA-396 for `seed/node`: policy 1 in `sched.om`, now the default: fair fitting over a bounded window from a persistent cursor that advances only after a window was scanned, oldest admitted first, a bypass budget that reserves the oldest bypassed job and holds back the capacity it still lacks, admission tickets in strict order with room bounded by free table slots (`sched_room`, also asked by `jn_admit` after its duplicate check), and leases reported once by `sched_overdue`. Candidate and maintenance reads are counted and checked at every step. `schedpol-test.om` adds starvation, ticket, lease, reserved-cancel, window, ticket-order, full-table and review-liveness phases, with `fifo` and `noreserve` controls (exits 11 and 61); `journal-test.om` case 16; thirteen DRA-396 mutants. Independent review by openai-codex/gpt-6-astra. Native AArch64 host evidence only. | +| Claude Opus 5.5 (via omp, sched lane) | P-DRA-14 DRA-396 for `seed/node`: policy 1 in `sched.om`, now the default: fair fitting over a bounded window from a persistent cursor that moves on by the window after every window scan, oldest admitted first, a bypass budget that reserves the oldest bypassed job and holds back the capacity it still lacks, admission tickets in strict order with room bounded by free table slots (`sched_room`, also asked by `jn_admit` after its duplicate check), and leases reported once by `sched_overdue`. Candidate reads, maintenance reads and the cursor's movement per window scan are checked at every step. `schedpol-test.om` adds starvation, ticket, lease, reserved-cancel, window, ticket-order, full-table and review-liveness phases, with `fifo` and `noreserve` controls (exits 11 and 61); `journal-test.om` cases 16 and 17; fourteen DRA-396 mutants. Independent reviews r1 and r2 by openai-codex/gpt-6-astra. Native AArch64 host evidence only. | | Grok 4.7 (via Cursor Agent) | Merged main `fd3751b31` (#1020, carrying #1045 and #1050) into #1052. The only conflict was the generated root `.crumb` (child `last_commit` stamps, the `tests` digest, and the root digest). Recompiled with the crumb.lock tool (`d0f0b95d`); `crumb verify .` current. The #525/#962 pins were left as committed: `src/checker2/c2_check.c`, `src/compiler/osc_ir.c` and `src/compiler/osc_ir.h` still hash to the SHA-256s in `ACCEPTED`. | | Claude Opus 5.5 (via omp) | #1020 (actions/cache-4.3.0 ->6.1.0): merged main `d3d1b1bc` and recompiled the root crumb with the crumb.lock tool (`d0f0b95d`). The root crumb's source tree covers `.github/workflows/`, so the bump alone left it stale and `AIEN Checks` failed at `crumb verify .` (`1 of 188 crumbs stale`). | | Claude Opus 5.5 (via omp) | #1018 (actions/upload-artifact-4 ->7): merged main `d3d1b1bc` and recompiled the root crumb with the crumb.lock tool (`d0f0b95d`). The root crumb's source tree covers `.github/workflows/`, so the bump alone left it stale and `AIEN Checks` failed at `crumb verify .` (`1 of 188 crumbs stale`). | diff --git a/seed/node/README.md b/seed/node/README.md index 1628d0e07..737b1aade 100644 --- a/seed/node/README.md +++ b/seed/node/README.md @@ -505,11 +505,12 @@ command, output) is kept in `evidence/node-schedpol/rust-reference.*.json`. Policy 1 is the default; policy 0 stays as the FIFO baseline for the DRA-399 comparison. Both are arms of one `sched_dispatch`. -Each pick reads the reserved slot, if any, and at most `win` slots (default -64) starting at a cursor that persists across dispatch events. The cursor -moves on by `win` after each event in which a window was scanned (none is -scanned when no worker is idle, or when the reserved job took the only -pick), so every slot is examined within ceil(64/`win`) window scans. Among +Each pick reads the reserved slot, if any, and otherwise scans at most +`win` slots (default 64) from a cursor that persists across picks and +dispatch events. After every window scan the cursor moves on by `win`, so +consecutive scans cover consecutive windows, also when one event picks +several times, and every slot is examined within ceil(64/`win`) window +scans. A pick that takes the reserved job scans no window. Among the examined ready jobs the pick takes the one admitted first (`sjarr`: unique, so no ties) that fits. At most `db` jobs are assigned per event. After each event one pass over the table counts bypasses and picks a @@ -549,10 +550,13 @@ refuses without room and gives the refused caller a ticket. While tickets are held only the first holder may enter, whatever the room; a new caller takes a ticket behind them. `sched_admitr` asks it; so does `jn_admit`, after its duplicate check and before it journals ADMIT, and a true answer -guarantees the slot (one creator). A ticket not asked about for `ttl` -dispatch events (default 1000) lapses, so a caller that went away holds the -line for at most that long; at most 64 tickets are held, and a caller -refused with the line full holds none. +guarantees the slot (one creator, no other admission in between). A ticket +not asked about for more than `ttl` dispatch events (default 1000) lapses: +asked at event e, it survives while e + `ttl` is at least the current event +count. A caller that went away therefore blocks later holders for at most +`ttl` events; a paused dispatch counts no events, so that block lasts until +dispatch resumes. At most 64 tickets are held, and a caller refused with +the line full holds none. Leases. `sched_lease j ns` gives a job a lease counted from its assignment; `sched_overdue` reports a running job past its lease whose worker has not @@ -569,10 +573,11 @@ used for reporting only; selection reads logical counters. `schedpol-gate` takes one optional argument: `fifo` runs every phase under policy 0, `noreserve` sets the bypass budget to 65535 (no reservation in practice). Each step also checks the bounds since the last step: candidate -reads at most events × `db` × (`win` + 1), the reserved probe included (64 -per pick under policy 0), exit 9; maintenance reads at most 64 per event, -exit 14; the cursor unchanged unless a window was scanned, exit 15. These -checks read the scheduler's own counters, so they bound the work the +reads at most events × `db` × (`win` + 1), the reserved probe included, or +64 per pick under policy 0, exit 9; maintenance reads at most 64 per event, +exit 14; the cursor moved by exactly `win` per window scan (mod 64), exit 15. +The last is the traversal witness, checked at every step of every phase. +These checks read the scheduler's own counters, so they bound the work the counters record; they are not an independent trace of memory reads. | Phase | Scenario | Exit when it fails | @@ -581,22 +586,26 @@ counters record; they are not an independent trace of memory reads. | Q | admission limit 2: X then Y refused hold tickets; with room for one, Y is refused and X admitted; Y enters later; a ticket not asked about lapses, so a new caller enters | 70..80 | | L | 200 ms lease on a 3 s job not safe to rerun: the deadline is at least 200 ms after admission and the report comes at or after it, once; worker killed, job UNKNOWN, CPU free. A rerunnable job killed the same way keeps its admission age and completes | 81..89, 140..145 | | R | the reserved job is cancelled: freed with no effect, reservation cleared | 90..97 | -| W | window 4, budget 2, 12 ready jobs in slots 0..11: every pick reads at most 5 slots and all 12 run | 9, 101..103 | -| T | limit 3 and three ticket holders; with two openings the second holder and a new caller are refused, the first two holders enter in order; with three, the new caller (now a holder) waits for the holder ahead | 104..109 | +| W | window 4, budget 2, two workers (an event may pick twice), 12 ready jobs in slots 0..11: every pick reads at most 5 slots, every scan moves the cursor on by 4, and all 12 run | 9, 15, 101..103 | +| T | limit 3 held by two short jobs and one waiting on a topic nobody publishes, three ticket holders; with exactly two openings the second holder and a new caller are refused, the first two holders enter in order; the waiting job is cancelled, and with three openings the new caller (now a holder) waits for the holder ahead | 104..109 | | X | every slot holds a job in review, admission limit not reached: a new caller is refused and holds a ticket; one review frees one slot, which goes to the first holder | 190..194 | -| Z | review limit 1 and full; a reserved job stays ready with all CPU free while the workers hold finished results; reviewing lets it run | 195..199 | +| Z | review limit 1 and full; a reserved job is ready at every step for 600 ms while the workers hold finished results, and all CPU is free at the end of that interval; reviewing lets it run | 195..199 | Phases S to Z run after A and B, so under `fifo` the gate stops at 11. `journal-gate` case 16 checks `jn_admit` at the admission limit: a duplicate -id is refused as a duplicate and takes no ticket (170..173). +id is refused as a duplicate and takes no ticket (170..173). Case 17 checks +a full table below the limit: 64 jobs left UNKNOWN (as recovery leaves +them; set directly, nothing is spawned), a new id is refused with a ticket, +the independent journal reader finds no ADMIT for it, and after one slot is +settled the same id is admitted and journaled once (174..177). | Change | Expected exit (derived from the check it trips) | | --- | --- | -| cursor never moves (`put scpol 4 …` deleted from `sp_after`) | 101: slots beyond the first window never run in W | -| cursor moves in every event (`if sc` to `if true` in `sp_after`) | 15 | +| cursor never moves (`put scpol 4 …` deleted from `sp_fair`) | 15: the first window scan in W leaves the cursor where it was | +| cursor moves by 1 instead of `win` (`rem add cur win 64` to `rem add cur 1 64`) | 15 | | tickets ignored (`if eq get scpol 6 0` to `if true` in `sched_room`) | 75 | | holders below the room may enter (`if eq t 0` to `if lt t room`) | 105 | -| room ignores free slots (`fs = sched_count 0 0` to `fs = ulong 64`) | 191 | +| room ignores free slots (`if lt fs room` to `if false`) | 191 | | no hold-back for the reserved job (`rq = get sjneed rj` to `rq = ulong 0`) | 61 | | never reserve (`put scpol 5 add o 1` deleted) | 61 | | lease never reported (`if ge now d` to `if false`) | 82 | @@ -605,6 +614,7 @@ id is refused as a duplicate and takes no ticket (170..173). | window ignored (`for i ulong win` to `for i ulong 64` in `sp_fair`) | 9 | | tickets never lapse | 80 | | `jn_admit` asks for room before the duplicate check (`journal.om`) | 170 (`journal-gate`) | +| `jn_admit` skips the room check (`journal.om`) | 173 (`journal-gate`): case 16 journals ADMIT for the refused id, so its later admission is refused as a duplicate; case 17 would stop at 175 | ## Proposals, authority and cancellation (DRA-288) diff --git a/seed/node/auth-gate.om b/seed/node/auth-gate.om index 1b4658e7e..8a655a990 100644 --- a/seed/node/auth-gate.om +++ b/seed/node/auth-gate.om @@ -949,23 +949,28 @@ note never in part. Every job also needs one idle live worker. note sjarr: admission order (waiting age; kept across reruns). sjrdy: order note in which the job last became ready. sjbyp: times it was bypassed. note Decisions read only these logical counters, never the clock. -note -note Policy 1, fair fitting (DRA-396): each pick examines at most win slots -note from a persistent cursor (which moves on by win per dispatch event, so -note every slot is examined within ceil(64/win) events) and takes the oldest -note admitted ready job that fits. A ready job older than a job assigned in +note Policy 1, fair fitting (DRA-396): a pick first probes the reserved job; +note otherwise it scans a window of win slots from a persistent cursor and +note takes the oldest admitted ready job that fits. The cursor moves on by +note win after every window scan, so every slot is examined within +note ceil(64/win) window scans. A ready job older than a job assigned in note the same event was bypassed; once the oldest such job reaches the note bypass budget it is reserved: it is offered first, and no other job may note use, of any kind, the capacity it still lacks (others may use only note free capacity beyond its need). Neither the free capacity it can reach note nor its age ever shrinks, so it runs once running work releases enough note (liveness assumes: every running job ends, by completion or by its -note lease, at least one worker stays live, and dispatch runs after -note releases). Requests over capacity are refused at admission. -note Admission tickets: a caller refused at the admission limit holds a -note ticket; when room returns, ticket holders enter in ticket order before -note anyone new, so a full table cannot exclude a caller that keeps asking. -note A ticket not asked about for ttl dispatch events lapses. +note lease, at least one worker stays live, results in review are reviewed, +note and dispatch is not paused). Requests over capacity are refused at +note admission. +note Admission: room is the smaller of the admission headroom and the free +note table slots. A refused caller holds a ticket; while tickets are held +note only the first holder may enter, so holders enter in ticket order +note before anyone new. A ticket not asked about for more than ttl dispatch +note events lapses (asked at event e, it survives while e + ttl is at least +note the current event count). An absent head blocks later holders until +note its ticket lapses; a paused dispatch counts no events, so the block +note lasts until dispatch resumes. note Leases: a running job with a lease is reported once by sched_overdue note after its lease passes; the authority then cancels or kills it, which note releases its resources. @@ -1281,11 +1286,21 @@ note caller may ask before journaling (as jn_admit does). fn sched_room id ulong to bool sp_tkpack 64 t = sp_tkpos id +a = ulong 0 +fs = ulong 0 +for j ulong 64 +s = get sjst j +if eq s 0 +fs = add fs 1 +end +if and ge s 1 le s 3 +a = add a 1 +end +end room = ulong 0 -if lt sched_count 1 3 get sclim 0 -room = sub get sclim 0 sched_count 1 3 +if lt a get sclim 0 +room = sub get sclim 0 a end -fs = sched_count 0 0 if lt fs room room = fs end @@ -1479,9 +1494,10 @@ end note Policy 1, fair fitting: the reserved job first when it fits; else the note oldest admitted ready job, among win slots from the cursor, that fits -note without the capacity the reserved job still lacks. Returns the slot or -note 64. Every slot read counts (counter 3: the reserved probe and the -note window), at most win + 1 per pick; counter 14 counts window scans. +note without the capacity the reserved job still lacks; the cursor then +note moves on by win. Returns the slot or 64. Every slot read counts +note (counter 3: the reserved probe and the window), at most win + 1 per +note pick; counter 14 counts window scans. fn sp_fair to ulong rq = ulong 0 r = get scpol 5 @@ -1516,6 +1532,7 @@ end end end end +put scpol 4 rem add cur win 64 ret b end @@ -1523,9 +1540,7 @@ note After a fair dispatch event in which ya - 1 was the youngest admission note assigned (ya 0: none): every ready job admitted before it was bypassed note once; with no reservation, the oldest job at the bypass budget is note reserved. One pass over the table (64 maintenance reads, counter 13). -note The cursor moves on by the window only when a window was scanned in -note the event (sc), so no window is skipped unexamined. -fn sp_after ya ulong sc bool to void +fn sp_after ya ulong to void o = ulong 64 nores = eq get scpol 5 0 for j ulong 64 @@ -1554,9 +1569,6 @@ if lt o 64 put scpol 5 add o 1 put scst 6 add get scst 6 1 end -if sc -put scpol 4 rem add get scpol 4 get scpol 1 64 -end end note Creator: assign ready jobs to idle live workers under the policy, at @@ -1570,7 +1582,6 @@ k = ulong 0 ya = ulong 0 fair = eq get scpol 0 1 put scst 2 add get scst 2 1 -s0 = get scst 14 for i ulong get scpol 2 bound 64 w = sp_idle n if ge w 64 @@ -1592,7 +1603,7 @@ sp_start c j w k = add k 1 end if fair -sp_after ya gt get scst 14 s0 +sp_after ya end ret k end diff --git a/seed/node/journal-gate.om b/seed/node/journal-gate.om index 0fd5e2c33..5532efa80 100644 --- a/seed/node/journal-gate.om +++ b/seed/node/journal-gate.om @@ -949,23 +949,28 @@ note never in part. Every job also needs one idle live worker. note sjarr: admission order (waiting age; kept across reruns). sjrdy: order note in which the job last became ready. sjbyp: times it was bypassed. note Decisions read only these logical counters, never the clock. -note -note Policy 1, fair fitting (DRA-396): each pick examines at most win slots -note from a persistent cursor (which moves on by win per dispatch event, so -note every slot is examined within ceil(64/win) events) and takes the oldest -note admitted ready job that fits. A ready job older than a job assigned in +note Policy 1, fair fitting (DRA-396): a pick first probes the reserved job; +note otherwise it scans a window of win slots from a persistent cursor and +note takes the oldest admitted ready job that fits. The cursor moves on by +note win after every window scan, so every slot is examined within +note ceil(64/win) window scans. A ready job older than a job assigned in note the same event was bypassed; once the oldest such job reaches the note bypass budget it is reserved: it is offered first, and no other job may note use, of any kind, the capacity it still lacks (others may use only note free capacity beyond its need). Neither the free capacity it can reach note nor its age ever shrinks, so it runs once running work releases enough note (liveness assumes: every running job ends, by completion or by its -note lease, at least one worker stays live, and dispatch runs after -note releases). Requests over capacity are refused at admission. -note Admission tickets: a caller refused at the admission limit holds a -note ticket; when room returns, ticket holders enter in ticket order before -note anyone new, so a full table cannot exclude a caller that keeps asking. -note A ticket not asked about for ttl dispatch events lapses. +note lease, at least one worker stays live, results in review are reviewed, +note and dispatch is not paused). Requests over capacity are refused at +note admission. +note Admission: room is the smaller of the admission headroom and the free +note table slots. A refused caller holds a ticket; while tickets are held +note only the first holder may enter, so holders enter in ticket order +note before anyone new. A ticket not asked about for more than ttl dispatch +note events lapses (asked at event e, it survives while e + ttl is at least +note the current event count). An absent head blocks later holders until +note its ticket lapses; a paused dispatch counts no events, so the block +note lasts until dispatch resumes. note Leases: a running job with a lease is reported once by sched_overdue note after its lease passes; the authority then cancels or kills it, which note releases its resources. @@ -1281,11 +1286,21 @@ note caller may ask before journaling (as jn_admit does). fn sched_room id ulong to bool sp_tkpack 64 t = sp_tkpos id +a = ulong 0 +fs = ulong 0 +for j ulong 64 +s = get sjst j +if eq s 0 +fs = add fs 1 +end +if and ge s 1 le s 3 +a = add a 1 +end +end room = ulong 0 -if lt sched_count 1 3 get sclim 0 -room = sub get sclim 0 sched_count 1 3 +if lt a get sclim 0 +room = sub get sclim 0 a end -fs = sched_count 0 0 if lt fs room room = fs end @@ -1479,9 +1494,10 @@ end note Policy 1, fair fitting: the reserved job first when it fits; else the note oldest admitted ready job, among win slots from the cursor, that fits -note without the capacity the reserved job still lacks. Returns the slot or -note 64. Every slot read counts (counter 3: the reserved probe and the -note window), at most win + 1 per pick; counter 14 counts window scans. +note without the capacity the reserved job still lacks; the cursor then +note moves on by win. Returns the slot or 64. Every slot read counts +note (counter 3: the reserved probe and the window), at most win + 1 per +note pick; counter 14 counts window scans. fn sp_fair to ulong rq = ulong 0 r = get scpol 5 @@ -1516,6 +1532,7 @@ end end end end +put scpol 4 rem add cur win 64 ret b end @@ -1523,9 +1540,7 @@ note After a fair dispatch event in which ya - 1 was the youngest admission note assigned (ya 0: none): every ready job admitted before it was bypassed note once; with no reservation, the oldest job at the bypass budget is note reserved. One pass over the table (64 maintenance reads, counter 13). -note The cursor moves on by the window only when a window was scanned in -note the event (sc), so no window is skipped unexamined. -fn sp_after ya ulong sc bool to void +fn sp_after ya ulong to void o = ulong 64 nores = eq get scpol 5 0 for j ulong 64 @@ -1554,9 +1569,6 @@ if lt o 64 put scpol 5 add o 1 put scst 6 add get scst 6 1 end -if sc -put scpol 4 rem add get scpol 4 get scpol 1 64 -end end note Creator: assign ready jobs to idle live workers under the policy, at @@ -1570,7 +1582,6 @@ k = ulong 0 ya = ulong 0 fair = eq get scpol 0 1 put scst 2 add get scst 2 1 -s0 = get scst 14 for i ulong get scpol 2 bound 64 w = sp_idle n if ge w 64 @@ -1592,7 +1603,7 @@ sp_start c j w k = add k 1 end if fair -sp_after ya gt get scst 14 s0 +sp_after ya end ret k end @@ -4525,6 +4536,43 @@ jn_close jt_clean end +note Case 17, a full table below the admission limit (P-DRA-14, DRA-396): +note limit 64, 64 jobs admitted and all left UNKNOWN as a crash recovery +note leaves them (set here directly; nothing is spawned), so no job is +note active and no slot is free. A new id is refused with a ticket and no +note ADMIT reaches the journal (174, 175, checked by the independent +note reader). Settling one job frees its slot and the same id is admitted +note and journaled once (176, 177). +fn jt_c17 to void +jt_clean +c = pool_new 2 2 +jt_ok gt c 0 174 +jt_ok eq sup_init c 0 174 +jt_ok eq sched_new c 64 64 0 174 +jt_ok eq jt_open 1 3000 0 174 +for i ulong 64 +jt_ok ge jn_admit add 8001 i 0 0 0 174 +end +for j ulong 64 +put sjst j 6 +end +jt_ok eq sched_count 0 0 0 174 +jt_ok eq jn_admit 9001 0 0 neg long 2 174 +jt_ok eq sched_stat 30 1 174 +jt_ok not jn_known 9001 175 +jt_ok jt_load 1 175 +jt_ok eq jt_cnt 2 0 64 175 +jt_ok eq jt_cnt 2 9001 0 175 +jt_ok eq sched_settle 5 0 176 +jt_ok ge jn_admit 9001 0 0 0 176 +jt_ok jn_known 9001 177 +jt_ok jt_load 1 177 +jt_ok eq jt_cnt 2 9001 1 177 +jt_ok eq jt_cnt 2 0 65 177 +jn_close +jt_clean +end + fn main to int m = mapnew neg int 1 0 4096 3 33 jt_ok gt m 0 9 @@ -4544,6 +4592,7 @@ jt_c11 jt_c12 jt_c15 jt_c16 +jt_c17 if ne write 1 jtok 0 len jtok long len jtok ret 100 end diff --git a/seed/node/journal-test.om b/seed/node/journal-test.om index e5a4cd961..780f1a4df 100644 --- a/seed/node/journal-test.om +++ b/seed/node/journal-test.om @@ -853,6 +853,43 @@ jn_close jt_clean end +note Case 17, a full table below the admission limit (P-DRA-14, DRA-396): +note limit 64, 64 jobs admitted and all left UNKNOWN as a crash recovery +note leaves them (set here directly; nothing is spawned), so no job is +note active and no slot is free. A new id is refused with a ticket and no +note ADMIT reaches the journal (174, 175, checked by the independent +note reader). Settling one job frees its slot and the same id is admitted +note and journaled once (176, 177). +fn jt_c17 to void +jt_clean +c = pool_new 2 2 +jt_ok gt c 0 174 +jt_ok eq sup_init c 0 174 +jt_ok eq sched_new c 64 64 0 174 +jt_ok eq jt_open 1 3000 0 174 +for i ulong 64 +jt_ok ge jn_admit add 8001 i 0 0 0 174 +end +for j ulong 64 +put sjst j 6 +end +jt_ok eq sched_count 0 0 0 174 +jt_ok eq jn_admit 9001 0 0 neg long 2 174 +jt_ok eq sched_stat 30 1 174 +jt_ok not jn_known 9001 175 +jt_ok jt_load 1 175 +jt_ok eq jt_cnt 2 0 64 175 +jt_ok eq jt_cnt 2 9001 0 175 +jt_ok eq sched_settle 5 0 176 +jt_ok ge jn_admit 9001 0 0 0 176 +jt_ok jn_known 9001 177 +jt_ok jt_load 1 177 +jt_ok eq jt_cnt 2 9001 1 177 +jt_ok eq jt_cnt 2 0 65 177 +jn_close +jt_clean +end + fn main to int m = mapnew neg int 1 0 4096 3 33 jt_ok gt m 0 9 @@ -872,6 +909,7 @@ jt_c11 jt_c12 jt_c15 jt_c16 +jt_c17 if ne write 1 jtok 0 len jtok long len jtok ret 100 end diff --git a/seed/node/sched-gate.om b/seed/node/sched-gate.om index 7752da795..18b014d66 100644 --- a/seed/node/sched-gate.om +++ b/seed/node/sched-gate.om @@ -949,23 +949,28 @@ note never in part. Every job also needs one idle live worker. note sjarr: admission order (waiting age; kept across reruns). sjrdy: order note in which the job last became ready. sjbyp: times it was bypassed. note Decisions read only these logical counters, never the clock. -note -note Policy 1, fair fitting (DRA-396): each pick examines at most win slots -note from a persistent cursor (which moves on by win per dispatch event, so -note every slot is examined within ceil(64/win) events) and takes the oldest -note admitted ready job that fits. A ready job older than a job assigned in +note Policy 1, fair fitting (DRA-396): a pick first probes the reserved job; +note otherwise it scans a window of win slots from a persistent cursor and +note takes the oldest admitted ready job that fits. The cursor moves on by +note win after every window scan, so every slot is examined within +note ceil(64/win) window scans. A ready job older than a job assigned in note the same event was bypassed; once the oldest such job reaches the note bypass budget it is reserved: it is offered first, and no other job may note use, of any kind, the capacity it still lacks (others may use only note free capacity beyond its need). Neither the free capacity it can reach note nor its age ever shrinks, so it runs once running work releases enough note (liveness assumes: every running job ends, by completion or by its -note lease, at least one worker stays live, and dispatch runs after -note releases). Requests over capacity are refused at admission. -note Admission tickets: a caller refused at the admission limit holds a -note ticket; when room returns, ticket holders enter in ticket order before -note anyone new, so a full table cannot exclude a caller that keeps asking. -note A ticket not asked about for ttl dispatch events lapses. +note lease, at least one worker stays live, results in review are reviewed, +note and dispatch is not paused). Requests over capacity are refused at +note admission. +note Admission: room is the smaller of the admission headroom and the free +note table slots. A refused caller holds a ticket; while tickets are held +note only the first holder may enter, so holders enter in ticket order +note before anyone new. A ticket not asked about for more than ttl dispatch +note events lapses (asked at event e, it survives while e + ttl is at least +note the current event count). An absent head blocks later holders until +note its ticket lapses; a paused dispatch counts no events, so the block +note lasts until dispatch resumes. note Leases: a running job with a lease is reported once by sched_overdue note after its lease passes; the authority then cancels or kills it, which note releases its resources. @@ -1281,11 +1286,21 @@ note caller may ask before journaling (as jn_admit does). fn sched_room id ulong to bool sp_tkpack 64 t = sp_tkpos id +a = ulong 0 +fs = ulong 0 +for j ulong 64 +s = get sjst j +if eq s 0 +fs = add fs 1 +end +if and ge s 1 le s 3 +a = add a 1 +end +end room = ulong 0 -if lt sched_count 1 3 get sclim 0 -room = sub get sclim 0 sched_count 1 3 +if lt a get sclim 0 +room = sub get sclim 0 a end -fs = sched_count 0 0 if lt fs room room = fs end @@ -1479,9 +1494,10 @@ end note Policy 1, fair fitting: the reserved job first when it fits; else the note oldest admitted ready job, among win slots from the cursor, that fits -note without the capacity the reserved job still lacks. Returns the slot or -note 64. Every slot read counts (counter 3: the reserved probe and the -note window), at most win + 1 per pick; counter 14 counts window scans. +note without the capacity the reserved job still lacks; the cursor then +note moves on by win. Returns the slot or 64. Every slot read counts +note (counter 3: the reserved probe and the window), at most win + 1 per +note pick; counter 14 counts window scans. fn sp_fair to ulong rq = ulong 0 r = get scpol 5 @@ -1516,6 +1532,7 @@ end end end end +put scpol 4 rem add cur win 64 ret b end @@ -1523,9 +1540,7 @@ note After a fair dispatch event in which ya - 1 was the youngest admission note assigned (ya 0: none): every ready job admitted before it was bypassed note once; with no reservation, the oldest job at the bypass budget is note reserved. One pass over the table (64 maintenance reads, counter 13). -note The cursor moves on by the window only when a window was scanned in -note the event (sc), so no window is skipped unexamined. -fn sp_after ya ulong sc bool to void +fn sp_after ya ulong to void o = ulong 64 nores = eq get scpol 5 0 for j ulong 64 @@ -1554,9 +1569,6 @@ if lt o 64 put scpol 5 add o 1 put scst 6 add get scst 6 1 end -if sc -put scpol 4 rem add get scpol 4 get scpol 1 64 -end end note Creator: assign ready jobs to idle live workers under the policy, at @@ -1570,7 +1582,6 @@ k = ulong 0 ya = ulong 0 fair = eq get scpol 0 1 put scst 2 add get scst 2 1 -s0 = get scst 14 for i ulong get scpol 2 bound 64 w = sp_idle n if ge w 64 @@ -1592,7 +1603,7 @@ sp_start c j w k = add k 1 end if fair -sp_after ya gt get scst 14 s0 +sp_after ya end ret k end diff --git a/seed/node/sched.om b/seed/node/sched.om index be2590ebb..ba0111df8 100644 --- a/seed/node/sched.om +++ b/seed/node/sched.om @@ -23,23 +23,28 @@ note never in part. Every job also needs one idle live worker. note sjarr: admission order (waiting age; kept across reruns). sjrdy: order note in which the job last became ready. sjbyp: times it was bypassed. note Decisions read only these logical counters, never the clock. -note -note Policy 1, fair fitting (DRA-396): each pick examines at most win slots -note from a persistent cursor (which moves on by win per dispatch event, so -note every slot is examined within ceil(64/win) events) and takes the oldest -note admitted ready job that fits. A ready job older than a job assigned in +note Policy 1, fair fitting (DRA-396): a pick first probes the reserved job; +note otherwise it scans a window of win slots from a persistent cursor and +note takes the oldest admitted ready job that fits. The cursor moves on by +note win after every window scan, so every slot is examined within +note ceil(64/win) window scans. A ready job older than a job assigned in note the same event was bypassed; once the oldest such job reaches the note bypass budget it is reserved: it is offered first, and no other job may note use, of any kind, the capacity it still lacks (others may use only note free capacity beyond its need). Neither the free capacity it can reach note nor its age ever shrinks, so it runs once running work releases enough note (liveness assumes: every running job ends, by completion or by its -note lease, at least one worker stays live, and dispatch runs after -note releases). Requests over capacity are refused at admission. -note Admission tickets: a caller refused at the admission limit holds a -note ticket; when room returns, ticket holders enter in ticket order before -note anyone new, so a full table cannot exclude a caller that keeps asking. -note A ticket not asked about for ttl dispatch events lapses. +note lease, at least one worker stays live, results in review are reviewed, +note and dispatch is not paused). Requests over capacity are refused at +note admission. +note Admission: room is the smaller of the admission headroom and the free +note table slots. A refused caller holds a ticket; while tickets are held +note only the first holder may enter, so holders enter in ticket order +note before anyone new. A ticket not asked about for more than ttl dispatch +note events lapses (asked at event e, it survives while e + ttl is at least +note the current event count). An absent head blocks later holders until +note its ticket lapses; a paused dispatch counts no events, so the block +note lasts until dispatch resumes. note Leases: a running job with a lease is reported once by sched_overdue note after its lease passes; the authority then cancels or kills it, which note releases its resources. @@ -355,11 +360,21 @@ note caller may ask before journaling (as jn_admit does). fn sched_room id ulong to bool sp_tkpack 64 t = sp_tkpos id +a = ulong 0 +fs = ulong 0 +for j ulong 64 +s = get sjst j +if eq s 0 +fs = add fs 1 +end +if and ge s 1 le s 3 +a = add a 1 +end +end room = ulong 0 -if lt sched_count 1 3 get sclim 0 -room = sub get sclim 0 sched_count 1 3 +if lt a get sclim 0 +room = sub get sclim 0 a end -fs = sched_count 0 0 if lt fs room room = fs end @@ -553,9 +568,10 @@ end note Policy 1, fair fitting: the reserved job first when it fits; else the note oldest admitted ready job, among win slots from the cursor, that fits -note without the capacity the reserved job still lacks. Returns the slot or -note 64. Every slot read counts (counter 3: the reserved probe and the -note window), at most win + 1 per pick; counter 14 counts window scans. +note without the capacity the reserved job still lacks; the cursor then +note moves on by win. Returns the slot or 64. Every slot read counts +note (counter 3: the reserved probe and the window), at most win + 1 per +note pick; counter 14 counts window scans. fn sp_fair to ulong rq = ulong 0 r = get scpol 5 @@ -590,6 +606,7 @@ end end end end +put scpol 4 rem add cur win 64 ret b end @@ -597,9 +614,7 @@ note After a fair dispatch event in which ya - 1 was the youngest admission note assigned (ya 0: none): every ready job admitted before it was bypassed note once; with no reservation, the oldest job at the bypass budget is note reserved. One pass over the table (64 maintenance reads, counter 13). -note The cursor moves on by the window only when a window was scanned in -note the event (sc), so no window is skipped unexamined. -fn sp_after ya ulong sc bool to void +fn sp_after ya ulong to void o = ulong 64 nores = eq get scpol 5 0 for j ulong 64 @@ -628,9 +643,6 @@ if lt o 64 put scpol 5 add o 1 put scst 6 add get scst 6 1 end -if sc -put scpol 4 rem add get scpol 4 get scpol 1 64 -end end note Creator: assign ready jobs to idle live workers under the policy, at @@ -644,7 +656,6 @@ k = ulong 0 ya = ulong 0 fair = eq get scpol 0 1 put scst 2 add get scst 2 1 -s0 = get scst 14 for i ulong get scpol 2 bound 64 w = sp_idle n if ge w 64 @@ -666,7 +677,7 @@ sp_start c j w k = add k 1 end if fair -sp_after ya gt get scst 14 s0 +sp_after ya end ret k end diff --git a/seed/node/schedpol-gate.om b/seed/node/schedpol-gate.om index 43d8c4ef4..14ea23cce 100644 --- a/seed/node/schedpol-gate.om +++ b/seed/node/schedpol-gate.om @@ -949,23 +949,28 @@ note never in part. Every job also needs one idle live worker. note sjarr: admission order (waiting age; kept across reruns). sjrdy: order note in which the job last became ready. sjbyp: times it was bypassed. note Decisions read only these logical counters, never the clock. -note -note Policy 1, fair fitting (DRA-396): each pick examines at most win slots -note from a persistent cursor (which moves on by win per dispatch event, so -note every slot is examined within ceil(64/win) events) and takes the oldest -note admitted ready job that fits. A ready job older than a job assigned in +note Policy 1, fair fitting (DRA-396): a pick first probes the reserved job; +note otherwise it scans a window of win slots from a persistent cursor and +note takes the oldest admitted ready job that fits. The cursor moves on by +note win after every window scan, so every slot is examined within +note ceil(64/win) window scans. A ready job older than a job assigned in note the same event was bypassed; once the oldest such job reaches the note bypass budget it is reserved: it is offered first, and no other job may note use, of any kind, the capacity it still lacks (others may use only note free capacity beyond its need). Neither the free capacity it can reach note nor its age ever shrinks, so it runs once running work releases enough note (liveness assumes: every running job ends, by completion or by its -note lease, at least one worker stays live, and dispatch runs after -note releases). Requests over capacity are refused at admission. -note Admission tickets: a caller refused at the admission limit holds a -note ticket; when room returns, ticket holders enter in ticket order before -note anyone new, so a full table cannot exclude a caller that keeps asking. -note A ticket not asked about for ttl dispatch events lapses. +note lease, at least one worker stays live, results in review are reviewed, +note and dispatch is not paused). Requests over capacity are refused at +note admission. +note Admission: room is the smaller of the admission headroom and the free +note table slots. A refused caller holds a ticket; while tickets are held +note only the first holder may enter, so holders enter in ticket order +note before anyone new. A ticket not asked about for more than ttl dispatch +note events lapses (asked at event e, it survives while e + ttl is at least +note the current event count). An absent head blocks later holders until +note its ticket lapses; a paused dispatch counts no events, so the block +note lasts until dispatch resumes. note Leases: a running job with a lease is reported once by sched_overdue note after its lease passes; the authority then cancels or kills it, which note releases its resources. @@ -1281,11 +1286,21 @@ note caller may ask before journaling (as jn_admit does). fn sched_room id ulong to bool sp_tkpack 64 t = sp_tkpos id +a = ulong 0 +fs = ulong 0 +for j ulong 64 +s = get sjst j +if eq s 0 +fs = add fs 1 +end +if and ge s 1 le s 3 +a = add a 1 +end +end room = ulong 0 -if lt sched_count 1 3 get sclim 0 -room = sub get sclim 0 sched_count 1 3 +if lt a get sclim 0 +room = sub get sclim 0 a end -fs = sched_count 0 0 if lt fs room room = fs end @@ -1479,9 +1494,10 @@ end note Policy 1, fair fitting: the reserved job first when it fits; else the note oldest admitted ready job, among win slots from the cursor, that fits -note without the capacity the reserved job still lacks. Returns the slot or -note 64. Every slot read counts (counter 3: the reserved probe and the -note window), at most win + 1 per pick; counter 14 counts window scans. +note without the capacity the reserved job still lacks; the cursor then +note moves on by win. Returns the slot or 64. Every slot read counts +note (counter 3: the reserved probe and the window), at most win + 1 per +note pick; counter 14 counts window scans. fn sp_fair to ulong rq = ulong 0 r = get scpol 5 @@ -1516,6 +1532,7 @@ end end end end +put scpol 4 rem add cur win 64 ret b end @@ -1523,9 +1540,7 @@ note After a fair dispatch event in which ya - 1 was the youngest admission note assigned (ya 0: none): every ready job admitted before it was bypassed note once; with no reservation, the oldest job at the bypass budget is note reserved. One pass over the table (64 maintenance reads, counter 13). -note The cursor moves on by the window only when a window was scanned in -note the event (sc), so no window is skipped unexamined. -fn sp_after ya ulong sc bool to void +fn sp_after ya ulong to void o = ulong 64 nores = eq get scpol 5 0 for j ulong 64 @@ -1554,9 +1569,6 @@ if lt o 64 put scpol 5 add o 1 put scst 6 add get scst 6 1 end -if sc -put scpol 4 rem add get scpol 4 get scpol 1 64 -end end note Creator: assign ready jobs to idle live workers under the policy, at @@ -1570,7 +1582,6 @@ k = ulong 0 ya = ulong 0 fair = eq get scpol 0 1 put scst 2 add get scst 2 1 -s0 = get scst 14 for i ulong get scpol 2 bound 64 w = sp_idle n if ge w 64 @@ -1592,7 +1603,7 @@ sp_start c j w k = add k 1 end if fair -sp_after ya gt get scst 14 s0 +sp_after ya end ret k end @@ -2041,9 +2052,11 @@ end note One creator step of up to 10 ms, then the invariant and the scan note bounds since the last step: candidate reads at most events x budget x -note (window + 1), the reserved probe included (FIFO, policy 0, reads at -note most 64 per pick), 9; maintenance reads at most 64 per event, 14; the -note cursor moves only in events that scanned a window, 15. +note (window + 1), the reserved probe included, or 64 per pick under FIFO +note (policy 0), 9; maintenance reads at most 64 per event, 14; the cursor +note moved by exactly the window per window scan, mod 64, 15. The last is +note the traversal witness: window scans cover consecutive windows, so +note ceil(64/win) of them examine every slot. fn pt_step c long code int to void e0 = sched_stat 2 x0 = sched_stat 3 @@ -2053,17 +2066,21 @@ u0 = sched_stat 28 r = sched_step c 10000000 pt_ok ge r 0 code pt_inv code -w = sched_stat 25 +w = add sched_stat 25 1 if eq sched_stat 24 0 w = ulong 64 end ev = sub sched_stat 2 e0 -lim = mul mul ev sched_stat 26 add w 1 +lim = mul mul ev sched_stat 26 w pt_ok le sub sched_stat 3 x0 lim 9 pt_ok le sub sched_stat 13 m0 mul ev 64 14 -if eq sched_stat 14 s0 -pt_ok eq sched_stat 28 u0 15 +pt_cursor u0 s0 end + +note The cursor moved by the window once per window scan since (u0, s0). +fn pt_cursor u0 ulong s0 ulong to void +d = mul sched_stat 25 sub sched_stat 14 s0 +pt_ok eq sched_stat 28 rem add u0 d 64 15 end note Step until job j is in a state in lo..hi, up to ms. True when reached. @@ -2470,10 +2487,11 @@ pt_ok eq get suse 0 0 96 pt_down c 97 end -note Phase W: bounded candidate work. Window 4 slots, dispatch budget 2: -note 12 ready jobs fill slots 0..11, beyond any one window. Each pick reads -note at most 4 slots (checked at every step, exit 9) and the cursor still -note reaches every slot, so all 12 run. 101 means some never did. +note Phase W: bounded candidate work. Window 4 slots, dispatch budget 2, +note two workers, so an event may pick twice: 12 ready jobs fill slots +note 0..11, beyond any one window. Each pick reads at most 5 slots (the +note reserved probe and the window, exit 9), every window scan moves the +note cursor on by 4 (15), and all 12 run. 101 means some never did. fn pt_window to void c = pt_setup 2 16 16 pt_req 4 1024 1 8 101 pt_ok eq sched_policy sched_stat 24 4 2 sched_stat 27 1000 0 101 @@ -2486,16 +2504,17 @@ pt_down c 103 end note Phase T: ticket order with several openings. Limit 3 held by p1, p2 -note (400 ms) and p3 (900 ms); X, Y, Z are refused in that order and hold -note tickets (104). With two openings, Y asking first is refused (105), and +note (400 ms) and p3, which waits on a topic nobody publishes; X, Y, Z are +note refused in that order and hold tickets (104). p1 and p2 are reviewed, +note so there are exactly two openings: Y asking first is refused (105), and note so is a new caller W, who takes a ticket behind Z (106); X enters -note (107), then Y (108). With three openings, W asking first is refused, -note then Z and W enter (109). +note (107), then Y (108). p3 is cancelled and X and Y are reviewed, so there +note are three openings: W asking first is refused, then Z and W enter (109). fn pt_torder to void c = pt_setup 3 3 8 pt_req 4 1024 1 8 104 p = pt_admit 400400 0 0 104 p = pt_admit 410400 0 0 104 -p = pt_admit 420900 0 0 104 +p3 = pt_admit 420050 4096 0 104 pt_ok eq sched_admitr 430050 0 0 0 neg long 2 104 pt_ok eq sched_admitr 440050 0 0 0 neg long 2 104 pt_ok eq sched_admitr 450050 0 0 0 neg long 2 104 @@ -2506,7 +2525,8 @@ pt_ok eq sched_admitr 460050 0 0 0 neg long 2 106 pt_ok eq sched_stat 30 4 106 pt_ok ge sched_admitr 430050 0 0 0 0 107 pt_ok ge sched_admitr 440050 0 0 0 0 108 -pt_drain c 3 3000 108 +pt_ok eq sched_cancel p3 1 108 +pt_drain c 2 3000 108 pt_ok eq sched_admitr 460050 0 0 0 neg long 2 109 pt_ok ge sched_admitr 450050 0 0 0 0 109 pt_ok ge sched_admitr 460050 0 0 0 0 109 @@ -2550,9 +2570,9 @@ note Phase Z: reserved progress needs review progress. Review limit 1, two note workers, 2 CPU, bypass budget 1. p finishes and waits in review, note unreviewed. a (1 CPU) and x (1 CPU) run past b (2 CPU), so b is note reserved (196). a and x finish; their workers keep the results, since -note review is full, so for 600 ms b stays ready with all CPU free (197, -note 198). Reviewing p lets a into review, frees its worker, and b runs -note (199). +note review is full, so b is ready at every step for 600 ms (197) and all +note CPU is free at the end of that interval (198). Reviewing p lets a into +note review, frees its worker, and b runs (199). fn pt_live to void c = pt_setup 2 8 1 pt_req 2 1024 1 8 195 pt_ok eq sched_policy sched_stat 24 64 64 1 1000 0 195 @@ -2570,8 +2590,8 @@ if ge ulong monons dl break end pt_step c 197 -end pt_ok eq get sjst b 2 197 +end pt_ok eq get suse 0 0 198 pt_ok eq sched_review p long add get sjid p 1 199 pt_ok pt_until c b 3 4 2000 199 199 diff --git a/seed/node/schedpol-test.om b/seed/node/schedpol-test.om index 3a7c862c0..7adf7ddeb 100644 --- a/seed/node/schedpol-test.om +++ b/seed/node/schedpol-test.om @@ -172,9 +172,11 @@ end note One creator step of up to 10 ms, then the invariant and the scan note bounds since the last step: candidate reads at most events x budget x -note (window + 1), the reserved probe included (FIFO, policy 0, reads at -note most 64 per pick), 9; maintenance reads at most 64 per event, 14; the -note cursor moves only in events that scanned a window, 15. +note (window + 1), the reserved probe included, or 64 per pick under FIFO +note (policy 0), 9; maintenance reads at most 64 per event, 14; the cursor +note moved by exactly the window per window scan, mod 64, 15. The last is +note the traversal witness: window scans cover consecutive windows, so +note ceil(64/win) of them examine every slot. fn pt_step c long code int to void e0 = sched_stat 2 x0 = sched_stat 3 @@ -184,17 +186,21 @@ u0 = sched_stat 28 r = sched_step c 10000000 pt_ok ge r 0 code pt_inv code -w = sched_stat 25 +w = add sched_stat 25 1 if eq sched_stat 24 0 w = ulong 64 end ev = sub sched_stat 2 e0 -lim = mul mul ev sched_stat 26 add w 1 +lim = mul mul ev sched_stat 26 w pt_ok le sub sched_stat 3 x0 lim 9 pt_ok le sub sched_stat 13 m0 mul ev 64 14 -if eq sched_stat 14 s0 -pt_ok eq sched_stat 28 u0 15 +pt_cursor u0 s0 end + +note The cursor moved by the window once per window scan since (u0, s0). +fn pt_cursor u0 ulong s0 ulong to void +d = mul sched_stat 25 sub sched_stat 14 s0 +pt_ok eq sched_stat 28 rem add u0 d 64 15 end note Step until job j is in a state in lo..hi, up to ms. True when reached. @@ -601,10 +607,11 @@ pt_ok eq get suse 0 0 96 pt_down c 97 end -note Phase W: bounded candidate work. Window 4 slots, dispatch budget 2: -note 12 ready jobs fill slots 0..11, beyond any one window. Each pick reads -note at most 4 slots (checked at every step, exit 9) and the cursor still -note reaches every slot, so all 12 run. 101 means some never did. +note Phase W: bounded candidate work. Window 4 slots, dispatch budget 2, +note two workers, so an event may pick twice: 12 ready jobs fill slots +note 0..11, beyond any one window. Each pick reads at most 5 slots (the +note reserved probe and the window, exit 9), every window scan moves the +note cursor on by 4 (15), and all 12 run. 101 means some never did. fn pt_window to void c = pt_setup 2 16 16 pt_req 4 1024 1 8 101 pt_ok eq sched_policy sched_stat 24 4 2 sched_stat 27 1000 0 101 @@ -617,16 +624,17 @@ pt_down c 103 end note Phase T: ticket order with several openings. Limit 3 held by p1, p2 -note (400 ms) and p3 (900 ms); X, Y, Z are refused in that order and hold -note tickets (104). With two openings, Y asking first is refused (105), and +note (400 ms) and p3, which waits on a topic nobody publishes; X, Y, Z are +note refused in that order and hold tickets (104). p1 and p2 are reviewed, +note so there are exactly two openings: Y asking first is refused (105), and note so is a new caller W, who takes a ticket behind Z (106); X enters -note (107), then Y (108). With three openings, W asking first is refused, -note then Z and W enter (109). +note (107), then Y (108). p3 is cancelled and X and Y are reviewed, so there +note are three openings: W asking first is refused, then Z and W enter (109). fn pt_torder to void c = pt_setup 3 3 8 pt_req 4 1024 1 8 104 p = pt_admit 400400 0 0 104 p = pt_admit 410400 0 0 104 -p = pt_admit 420900 0 0 104 +p3 = pt_admit 420050 4096 0 104 pt_ok eq sched_admitr 430050 0 0 0 neg long 2 104 pt_ok eq sched_admitr 440050 0 0 0 neg long 2 104 pt_ok eq sched_admitr 450050 0 0 0 neg long 2 104 @@ -637,7 +645,8 @@ pt_ok eq sched_admitr 460050 0 0 0 neg long 2 106 pt_ok eq sched_stat 30 4 106 pt_ok ge sched_admitr 430050 0 0 0 0 107 pt_ok ge sched_admitr 440050 0 0 0 0 108 -pt_drain c 3 3000 108 +pt_ok eq sched_cancel p3 1 108 +pt_drain c 2 3000 108 pt_ok eq sched_admitr 460050 0 0 0 neg long 2 109 pt_ok ge sched_admitr 450050 0 0 0 0 109 pt_ok ge sched_admitr 460050 0 0 0 0 109 @@ -681,9 +690,9 @@ note Phase Z: reserved progress needs review progress. Review limit 1, two note workers, 2 CPU, bypass budget 1. p finishes and waits in review, note unreviewed. a (1 CPU) and x (1 CPU) run past b (2 CPU), so b is note reserved (196). a and x finish; their workers keep the results, since -note review is full, so for 600 ms b stays ready with all CPU free (197, -note 198). Reviewing p lets a into review, frees its worker, and b runs -note (199). +note review is full, so b is ready at every step for 600 ms (197) and all +note CPU is free at the end of that interval (198). Reviewing p lets a into +note review, frees its worker, and b runs (199). fn pt_live to void c = pt_setup 2 8 1 pt_req 2 1024 1 8 195 pt_ok eq sched_policy sched_stat 24 64 64 1 1000 0 195 @@ -701,8 +710,8 @@ if ge ulong monons dl break end pt_step c 197 -end pt_ok eq get sjst b 2 197 +end pt_ok eq get suse 0 0 198 pt_ok eq sched_review p long add get sjid p 1 199 pt_ok pt_until c b 3 4 2000 199 199 From 830998e6f26a7b3faa6a502880c395ebd3d22d99 Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Sat, 7 Nov 2026 00:15:23 -0600 Subject: [PATCH 13/20] chore(crumb): recompile --- .crumb | 8 ++++---- seed/node/.crumb | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.crumb b/.crumb index 4837cd4b6..914b5f1f3 100644 --- a/.crumb +++ b/.crumb @@ -108,14 +108,14 @@ } ], "children_root": "sha256:966bedb54caa4209f9ab84526da66f6b13ce72e8831470170364eb5881355748", - "compiled_at": "2026-11-07T06:06:57Z", + "compiled_at": "2026-11-07T06:15:21Z", "compiler": "crumb-compile/1", - "digest": "sha256:60685a27979b1467f152c24df2db459acb4ff7e9b1a4c7c5bca9baa1e93922d5", + "digest": "sha256:e9ff35ed9f79ac1b130af98eb052ca575906e1d1cf1fcbdb7d5430c4e2788d35", "evidence_files": 15704, "evidence_root": "sha256:2763ebcac18e411fa98a5a29d4cf723991ccf3d400da431ea6e1af169640aa69", "files": 24265, - "generated_at_commit": "988c78fa73fc9448d747733ff17196800718573e", - "source_tree": "sha256:f36f07fded849ce7aec1f7b372137d4b5d44432c92bf3c4080cc25d3d6017512" + "generated_at_commit": "ea20838fe67c77d7d811016afaaba1cbb988314f", + "source_tree": "sha256:d348c06c931e481031af8662a05827edeceef9609bf7108af93bf9dd6b98a438" }, "owner_lane": "", "provenance": { diff --git a/seed/node/.crumb b/seed/node/.crumb index 026d9a697..2374d2999 100644 --- a/seed/node/.crumb +++ b/seed/node/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-11-07T06:02:06Z", + "compiled_at": "2026-11-07T06:15:21Z", "compiler": "crumb-compile/1", - "digest": "sha256:e945486a110e0d7d6422e47439d68b3db923428233f442292ed6c54f6d8ba148", + "digest": "sha256:6a8e3f7f82f984af38535d7f605e83a713e8cf9b2d6bf6ef333275c40139b3f9", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 26, - "generated_at_commit": "b0dcba4ca1c7b0b01ba54120a71939967ad6c7ff", - "source_tree": "sha256:a43ce172d7e74defef932759eb4c01ea82a82083ca8c008914f4daeeee4e536e" + "generated_at_commit": "ea20838fe67c77d7d811016afaaba1cbb988314f", + "source_tree": "sha256:957ee16d5220163b81a8329644ec5bda9ba60e955b0f5a8a4cd6ec1eaa5432b8" }, "owner_lane": "", "seed": { From 455e92feedcfc15b216aa60117918ed326f407ad Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Sat, 7 Nov 2026 00:26:56 -0600 Subject: [PATCH 14/20] evidence(node-schedpol): DRA-396 receipt 9a3a88a7 at 830998e6 (review r2 fixes), 37 PASS / 0 FAIL --- ...26d27f6c531a7478f5789b0e20f3520bb049f.json | 1404 +++++++++++++++++ 1 file changed, 1404 insertions(+) create mode 100644 evidence/node-schedpol/receipt.9a3a88a7975bf4b804d5c994b8426d27f6c531a7478f5789b0e20f3520bb049f.json diff --git a/evidence/node-schedpol/receipt.9a3a88a7975bf4b804d5c994b8426d27f6c531a7478f5789b0e20f3520bb049f.json b/evidence/node-schedpol/receipt.9a3a88a7975bf4b804d5c994b8426d27f6c531a7478f5789b0e20f3520bb049f.json new file mode 100644 index 000000000..c36d062ac --- /dev/null +++ b/evidence/node-schedpol/receipt.9a3a88a7975bf4b804d5c994b8426d27f6c531a7478f5789b0e20f3520bb049f.json @@ -0,0 +1,1404 @@ +{ + "checks": [ + { + "binary_sha256": "7bbef96d81adab70940debff9ade19e02b2178e4310c91f330d0775710e46f96", + "case": "schedpol-gate", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-395", + "repeat": { + "outcomes": { + "0": 10 + }, + "runs": 10 + }, + "run_exit": 0, + "source_sha256": "7aed0a96c2610e77fdb195332725c0a59da5d0851ac43e2f072655a94600d293", + "stderr": "", + "stdout": "schedpol events=109 examined=4566 assigned=10 hol_stops=0 bypasses=4 reservations=1\nPASS node schedpol\n", + "stdout_has": [ + "PASS node schedpol" + ], + "verdict": "PASS", + "wall_ms": 91878 + }, + { + "binary_sha256": "7bbef96d81adab70940debff9ade19e02b2178e4310c91f330d0775710e46f96", + "case": "schedpol-gate-fifo", + "compile_exit": 0, + "expected_exit": 11, + "issue": "DRA-396", + "repeat": { + "outcomes": { + "11": 5 + }, + "runs": 5 + }, + "run_exit": 11, + "source_sha256": "7aed0a96c2610e77fdb195332725c0a59da5d0851ac43e2f072655a94600d293", + "stderr": "", + "stdout": "schedpol hol witness head=20050 fits_behind=30050 free_cpu=1 idle_worker=1 hol_stops=40\nschedpol hol witness head=20050 fits_behind=50050 free_cpu=1 idle_worker=1 hol_stops=40\n", + "stdout_has": [ + "schedpol hol witness head=20050 fits_behind=30050 free_cpu=1 idle_worker=1", + "schedpol hol witness head=20050 fits_behind=50050 free_cpu=1 idle_worker=1" + ], + "verdict": "PASS", + "wall_ms": 14638 + }, + { + "binary_sha256": "7bbef96d81adab70940debff9ade19e02b2178e4310c91f330d0775710e46f96", + "case": "schedpol-gate-noreserve", + "compile_exit": 0, + "expected_exit": 61, + "issue": "DRA-396", + "repeat": { + "outcomes": { + "61": 5 + }, + "runs": 5 + }, + "run_exit": 61, + "source_sha256": "7aed0a96c2610e77fdb195332725c0a59da5d0851ac43e2f072655a94600d293", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 34137 + }, + { + "binary_sha256": "d37f428c8615b94d886827541610659b3df933c36da252dae3b079941f557b5a", + "case": "sched-gate", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-287", + "run_exit": 0, + "source_sha256": "7299e23edf889403474b4d64a5ce6d52bb940a7e8fe87f66830419bb97e90b68", + "stderr": "", + "stdout": "idle ticks workers=0 creator=0 wake rounds=200 mean_us=58 max_us=2696\nPASS node sched\n", + "verdict": "PASS", + "wall_ms": 8007 + }, + { + "binary_sha256": "0ecf6e60c0dc73fa35e5a244daef1e62575ebfef89f5e63c76217d668ec2332b", + "case": "auth-gate", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-288", + "run_exit": 0, + "source_sha256": "e58fe99ff6245ccd5a552d540c901b2225c59ade9e3026071f05838419cf92b0", + "stderr": "", + "stdout": "PASS node authority\n", + "verdict": "PASS", + "wall_ms": 784 + }, + { + "binary_sha256": "1980825341a380b36854ce599ed49849cb19d65d1559a84ff828d414e907878a", + "case": "journal-gate", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-289", + "run_exit": 0, + "source_sha256": "ac4d42add3193d0f011674ed69775f933aa123644343651a24bd40234d051d8b", + "stderr": "", + "stdout": "PASS node journal\n", + "verdict": "PASS", + "wall_ms": 3542 + }, + { + "binary_sha256": "78eed3acffa5bc0d7602cd25cb970f4a00d6dc52170276fa4b868f55e67d5526", + "case": "code-test-unit", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-290", + "run_exit": 0, + "source_sha256": "29423a31d3eaa2bf56d6e7ff61ad255948944e9270fef02ae3cc5c0276f0e7e1", + "stderr": "", + "stdout": "CWR 0 0 2\n\n\n\nCWE 0 0 2 1\nCWE 0 1002 1 2\nCWR 0 0 2\n\n\n\nCWE 0 0 2 1\nCWO 0 FAIL 11 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 2\nCWO 0 FAIL 10 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 9\nCWO 0 FAIL 10 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 10 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 2\nCWE 0 1013 1 3\nCWR 0 0 2\n\n\n\nCWE 0 0 2 2\nCWE 0 1023 1 3\nCWR 0 0 2\n\n\n\nCWE 0 0 2 2\nCWO 0 FAIL 10 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 13 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 13 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 13 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 13 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 11 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWE 0 1034 1 4\nCWR 0 0 13\nTests passed.\nCWE 0 0 2 4\nCWO 0 FAIL 14 0\nCWR 0 0 13\nTests passed.\nCWE 0 0 2 4\nCWO 0 FAIL 14 0\nCWR 0 0 13\nTests passed.\nCWE 0 0 2 4\nCWE 0 1045 1 5\nCWR 0 0 15\nFile not found.\nCWE 0 0 2 5\nCWO 0 FAIL 10 0\nCWR 0 0 15\nFile not found.\nCWE 0 0 2 5\nCWO 0 PASS 1 0\nCWO 0 FAIL 18 0\nCWO 0 FAIL 18 0\nCWO 0 FAIL 18 0\nCWE 0 0 3 0\nCWE 0 0 3 1\nCWE 0 0 3 2\nCWO 0 FAIL 17 0\nCWE 0 0 3 6\nCWE 0 0 3 6\nCWO 0 FAIL 15 0\nCWE 0 0 3 0\nCWE 0 0 3 4\nCWO 0 FAIL 17 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWE 0 1054 1 4\nCWE 0 0 3 0\nCWE 0 0 3 0\nCWO 0 FAIL 15 0\nCWE 0 0 3 5\nCWO 0 FAIL 13 0\nCWE 0 0 3 0\nCWO 0 PASS 1 0\nCWE 0 0 3 6\nCWO 0 FAIL 15 0\nCWE 0 0 3 0\nCWO 0 FAIL 15 0\nCWO 0 FAIL 12 7\nCWO 0 FAIL 20 0\nCWE 0 1061 1 1\nCWP 0 1 193\nTask: Fix the error in this file and confirm its goal.\nFile: jobs/item76666.om\nGoal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.\nState: unread\nAnswer:\n\ncode checks=54 fail=0\n", + "verdict": "PASS", + "wall_ms": 33 + }, + { + "binary_sha256": "d9e12bfdbfe3c56d8efe933981756588c3f3a5938e42a2f43734e9d3e86adff4", + "case": "mut-impossible-admitted", + "compile_exit": 0, + "expected_exit": 31, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "if not sp_feas req\n", + "to": "if false\n" + }, + "run_exit": 31, + "source_sha256": "fc8b18fb77737f94079f18085d277004a8e15537a09f92b8456b24dd85642b3c", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 2 + }, + { + "binary_sha256": "8e45b71a46740590045f6d063f47f887d9f3728ee70afe54262d459139768b20", + "case": "mut-collect-no-release", + "compile_exit": 0, + "expected_exit": 133, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "j = sub b 1\nsp_give j\n", + "to": "j = sub b 1\n" + }, + "run_exit": 133, + "source_sha256": "edcc63ccb6f8357cfd6a74a4848ebb1b04caee5307daa38606951f1198e727e0", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 415 + }, + { + "binary_sha256": "9a1a7846f0749a2852cd986b4c1dcf55c2acab65fbb15a1b0782205c04785dd2", + "case": "mut-capacity-ignored", + "compile_exit": 0, + "expected_exit": 44, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "if gt sp_need req k a\n", + "to": "if false\n" + }, + "run_exit": 44, + "source_sha256": "31ed4dbf1bea3f76918a4ba252df0ece000b85a8b9e9772769cab49f8a98e7ea", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 435 + }, + { + "binary_sha256": "f500841de4e4e92ebec28939e042a3a8436bb3c4022e2eae469d4433968b53b6", + "case": "mut-ready-unstamped", + "compile_exit": 0, + "expected_exit": 54, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ne and get sjdep j topics 0\nsp_ready j\n", + "to": "if ne and get sjdep j topics 0\nput sjst j 2\n" + }, + "run_exit": 54, + "source_sha256": "2d0d8af8a9895573e7ce51f59f8429c7fd2e393b49bdc26d84c7c8476d5418bb", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 1014 + }, + { + "binary_sha256": "e8ac2eeddd941bc2f213fd5e10c4f670d9a53b2405e439751bf549885afeb29e", + "case": "mut-give-after-review", + "compile_exit": 0, + "expected_exit": 122, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "j = sub b 1\nsp_give j\nif ge sched_count 4 4 get sclim 1\ncontinue\nend\n", + "to": "j = sub b 1\nif ge sched_count 4 4 get sclim 1\ncontinue\nend\nsp_give j\n" + }, + "run_exit": 122, + "source_sha256": "341d60bbead0d9477deddbbb182ce3957fe23cce7607b132f5c7f266ff44fd92", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 896 + }, + { + "binary_sha256": "0e055bfb0282db95142a22a68aab8106ca71f11e679e3b9286f4c2047e5ce2b9", + "case": "mut-no-take", + "compile_exit": 0, + "expected_exit": 130, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "end\nsp_take j\nif eq get scpol 5 add j 1\n", + "to": "end\nif eq get scpol 5 add j 1\n" + }, + "run_exit": 130, + "source_sha256": "07f213dbb9e2a92c673ee394fca8df95ac4042be0f33bbe2b9f0861f8c05c0ce", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 11 + }, + { + "binary_sha256": "c5208033de0717da9ae0d4bb52e829aa9924dd1e3cca411e5abecdc8539fdf0a", + "case": "mut-cap-below-use", + "compile_exit": 0, + "expected_exit": 131, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "if lt sp_need caps k get suse k\n", + "to": "if false\n" + }, + "run_exit": 131, + "source_sha256": "84a237a0eda6a6fc760949fffde54342e774c9ffb399b5396adbb3ad3428dacb", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 12 + }, + { + "binary_sha256": "343355f0dbe01e7227f44ace7ae0a442017037fce6fa77d366638ed3db3b747a", + "case": "mut287-wake-all", + "compile_exit": 0, + "expected_exit": 16, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ne and sc_cell w 32 topics 0\n", + "to": "if true\n" + }, + "run_exit": 16, + "source_sha256": "fe7f919e40bd62c6660098cc0381d667d1d864011cff3500af5ab044e0d56d7f", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 603 + }, + { + "binary_sha256": "a517eafcb92bf1173c6d34f6647fd209a2b1ddbc781bf556f9ceda44bfad99db", + "case": "mut287-no-wake", + "compile_exit": 0, + "expected_exit": 34, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "sc_set w 0 q\nsc_wake w\n", + "to": "sc_set w 0 q\n" + }, + "run_exit": 34, + "source_sha256": "44c1b3ff07b268c4d652e0c631b0c40c4b3fa26567652f9d985bb6f7aac42ceb", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 6324 + }, + { + "binary_sha256": "c88c67e4f53603660e77a6ec1ec7da649a249b568115188f74e154eba1b8803b", + "case": "mut287-review-unbounded", + "compile_exit": 0, + "expected_exit": 50, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ge sched_count 4 4 get sclim 1\n", + "to": "if false\n" + }, + "run_exit": 50, + "source_sha256": "737336f80ef6f120cfa8b0ef986b375dcd6ac6921a4075cd1e2e33348c37e2f2", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 3365 + }, + { + "binary_sha256": "76607b85dc37469da5daa894d85bc42a1ea94b68d045e5e2f47999ae008e2624", + "case": "mut287-admit-unbounded", + "compile_exit": 0, + "expected_exit": 48, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "room = ulong 0\nif lt a get sclim 0\nroom = sub get sclim 0 a\nend\n", + "to": "room = ulong 64\n" + }, + "run_exit": 48, + "source_sha256": "3fb3e43dc87ed17382994301a4421ab0f49b75d07de1d709a1251dd91157dff9", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 2842 + }, + { + "binary_sha256": "cea3dffe61dc049f2f6684e825140a6b1fd9be4eac54ad6d30062f57bf810013", + "case": "mut287-unknown-rerun", + "compile_exit": 0, + "expected_exit": 83, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "put sjst j 6\n", + "to": "put sjst j 2\n" + }, + "run_exit": 83, + "source_sha256": "63c96332b2f3144c2b41ba7593496c51a7c623577c7601e48627cb45cab6b573", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 6777 + }, + { + "binary_sha256": "4f584ab26c34690b4541ea3882addff5235bb87b34d9e3dad141a06dbff70901", + "case": "mut287-lost-no-ack", + "compile_exit": 0, + "expected_exit": 92, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "sc_set w 64 get scseq w\n", + "to": "" + }, + "run_exit": 92, + "source_sha256": "233c4f6d41c93a64244d0b99227b6aca38da8a3338f0032fab785a01618c1a96", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 5289 + }, + { + "binary_sha256": "e31c05ebde372a7c71709d5bb0043ad7126cd0d188f1f91d140f0c1e912826ed", + "case": "mut287-deps-ignored", + "compile_exit": 0, + "expected_exit": 68, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "put sjst j 1\n", + "to": "put sjst j 2\n" + }, + "run_exit": 68, + "source_sha256": "1698266e3a78ce8ce85bda8a9bf71ec313142479d02f0782232059962c93712b", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 3422 + }, + { + "binary_sha256": "7d5cbc2c4e1b1cf6e52c7c619ecac317055c04b0079de815d57f1bb08b6372ca", + "case": "mut287-super-spin", + "compile_exit": 0, + "expected_exit": 138, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/super.om", + "from": "iv = interval\n", + "to": "iv = long 0\n" + }, + "run_exit": 138, + "source_sha256": "cb8b80d9d48250304ef46e0367d17cdcbf6f76a6eb938e27d91702a2100f7af5", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 2212 + }, + { + "binary_sha256": "b61aea9c8c594817df4adfa29cb7e6c67742606b30ca617f66ed463fd5b5dc56", + "case": "mut288-pause-ignored", + "compile_exit": 0, + "expected_exit": 121, + "issue": "DRA-288", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ne get scpause 0 0\n", + "to": "if false\n" + }, + "run_exit": 121, + "source_sha256": "b6d4ed33ef7560b4f56213c2639d344af7770c67f8597772e5644d97d3d506c0", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 746 + }, + { + "binary_sha256": "df916a4a6862bcd454848b00c39d58809801cdb9dbeaa827b7b075c6d3f73c0a", + "case": "mut396-cursor-stuck", + "compile_exit": 0, + "expected_exit": 15, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "put scpol 4 rem add cur win 64\n", + "to": "" + }, + "run_exit": 15, + "source_sha256": "48c72496bdd3dededdef2b7f2f7bae13a62a9891af727fc96fc46c7a33eedb7e", + "stderr": "", + "stdout": "schedpol events=109 examined=4566 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 7201 + }, + { + "binary_sha256": "37ba5f9fdc0a8d779ddb7f790a4216170eb9985210b0c180173b2c0c7f60b5d7", + "case": "mut396-tickets-ignored", + "compile_exit": 0, + "expected_exit": 75, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if eq get scpol 6 0\nret true\n", + "to": "if true\nret true\n" + }, + "run_exit": 75, + "source_sha256": "edbfd3a9d3e7d511854178818b065caea85889b63ff68b3a8886b74966a8bdf5", + "stderr": "", + "stdout": "schedpol events=109 examined=4566 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 4330 + }, + { + "binary_sha256": "d00e482a996a40967d33fbf790acd8a176004455f2e51942f162183f5f747d4f", + "case": "mut396-no-holdback", + "compile_exit": 0, + "expected_exit": 61, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "rq = get sjneed rj\n", + "to": "rq = ulong 0\n" + }, + "run_exit": 61, + "source_sha256": "1f86a3808fe67cb66c013e546636323f9a2ae2ae34cbf9dde56efd92806695ca", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 6825 + }, + { + "binary_sha256": "8858afb0cbfb31f0e41bdf9f9d21de65f5240c242ad769ef7d3a843b902d21b9", + "case": "mut396-never-reserve", + "compile_exit": 0, + "expected_exit": 61, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "put scpol 5 add o 1\n", + "to": "" + }, + "run_exit": 61, + "source_sha256": "759546473b5b2003d4f341338996c8237db54f994bff6920af036f726952b700", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 6843 + }, + { + "binary_sha256": "13a7dbbb80299b8af5cecb73e8595d6ab39aaec744b56e213ad41a4bab8bfc4e", + "case": "mut396-lease-never", + "compile_exit": 0, + "expected_exit": 82, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ge now d\n", + "to": "if false\n" + }, + "run_exit": 82, + "source_sha256": "fe4a13beef1cc59673770313b6ecfce60c485617183dbec1ccd8b4a8dcf35776", + "stderr": "", + "stdout": "schedpol events=111 examined=4631 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 7769 + }, + { + "binary_sha256": "5a553cc426ea5c151b6b17ea915c5c9d206922f8ec9c92840f850a826d8b374a", + "case": "mut396-cancel-keeps-reserve", + "compile_exit": 0, + "expected_exit": 94, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "put sjst j 0\nif eq get scpol 5 add j 1\nput scpol 5 0\nend\n", + "to": "put sjst j 0\n" + }, + "run_exit": 94, + "source_sha256": "0d855bfc3600c39bb77ea3254f1503c876f3a10ce05a6438ba1cbb4a01690d8b", + "stderr": "", + "stdout": "schedpol events=108 examined=4502 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 6603 + }, + { + "binary_sha256": "7cf4dde9ad2f6d44e02cfb9e7bb66a1bd3995eb5d57c3125674ec1cd41c4e829", + "case": "mut396-window-ignored", + "compile_exit": 0, + "expected_exit": 9, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "for i ulong win bound 64\n", + "to": "for i ulong 64 bound 64\n" + }, + "run_exit": 9, + "source_sha256": "26d931f66a62b4efedc01e930664378d25cdf0f7fb83462ba085e43d4075e483", + "stderr": "", + "stdout": "schedpol events=109 examined=4566 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 7220 + }, + { + "binary_sha256": "06e754229d41cdb15ea9d0bcf38389c00e42bb7234bf1c5977c8fc73a91e6365", + "case": "mut396-tickets-never-lapse", + "compile_exit": 0, + "expected_exit": 80, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if lt add get stts t get scpol 7 get scst 2\n", + "to": "if false\n" + }, + "run_exit": 80, + "source_sha256": "0bbe3c13e40204bd9cd317e3e2f597e034ead690dee705411e9f048f39faf3e1", + "stderr": "", + "stdout": "schedpol events=109 examined=4567 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 5059 + }, + { + "binary_sha256": "1e621b09a505bdc8e42f6edc921a649fb2d0ca0df01d95c9c9e7ada37858d5e9", + "case": "mut396-cursor-by-one", + "compile_exit": 0, + "expected_exit": 15, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "put scpol 4 rem add cur win 64\n", + "to": "put scpol 4 rem add cur 1 64\n" + }, + "run_exit": 15, + "source_sha256": "52cf5539d49893ec5af0dddd8d49861da8577eb10694e29934d6aff27b85a25d", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 12 + }, + { + "binary_sha256": "77ed633fb94921c848272c117f6a226d11adcb9ace82f7f9c6adcf403e2e4406", + "case": "mut396-holders-by-room", + "compile_exit": 0, + "expected_exit": 105, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if eq t 0\nret true", + "to": "if lt t room\nret true" + }, + "run_exit": 105, + "source_sha256": "1b12a01326c90e8b0bd3351b23f3ba344d495eb83b9808fc5df3538b46a1c0c8", + "stderr": "", + "stdout": "schedpol events=108 examined=4502 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 8194 + }, + { + "binary_sha256": "d937557f46b90382da3d43090366e249f69b5a251dac0f85571ac6d8b94e6782", + "case": "mut396-room-ignores-slots", + "compile_exit": 0, + "expected_exit": 191, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if lt fs room\nroom = fs\n", + "to": "if false\nroom = fs\n" + }, + "run_exit": 191, + "source_sha256": "173f1eec7e23133b82836c839b1c1ee647a62dd9a21409c2d34450a9b11a19b1", + "stderr": "", + "stdout": "schedpol events=109 examined=4566 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 8400 + }, + { + "binary_sha256": "672876bd57721a1e930506c5055a1b277b8c132d262bf7f15093288944918adb", + "case": "mut396-lease-early", + "compile_exit": 0, + "expected_exit": 83, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ge now d\n", + "to": "if ge add now 100000000 d\n" + }, + "run_exit": 83, + "source_sha256": "05461b76f43b13ec668463983082ad6733b34d059841cf64c353aba747d48d90", + "stderr": "", + "stdout": "schedpol events=108 examined=4502 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 5877 + }, + { + "binary_sha256": "9605ff8ee3087a00da049242f0bb1f8f76ee11b0f4e47df0a61d00513d591d19", + "case": "mut396-jn-room-before-dup", + "compile_exit": 0, + "expected_exit": 170, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/journal.om", + "from": "if ge jn_jfind id 0\nret neg long 4\nend\nif not sched_room id\nret neg long 2\nend\n", + "to": "if not sched_room id\nret neg long 2\nend\nif ge jn_jfind id 0\nret neg long 4\nend\n" + }, + "run_exit": 170, + "source_sha256": "e1dc14bc7a8d49331e159501ca30f9af42ff4a4af6522b130647a5cd68d0d110", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 3348 + }, + { + "binary_sha256": "cb49d3a5ebe7318620189d5de74a6c8880905bba0bcd948bf0a694894fb57355", + "case": "mut396-jn-no-room-check", + "compile_exit": 0, + "expected_exit": 173, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/journal.om", + "from": "if not sched_room id\nret neg long 2\nend\nif ne jn_rec 2 id deps flags 0\n", + "to": "if ne jn_rec 2 id deps flags 0\n" + }, + "run_exit": 173, + "source_sha256": "19ef1e174911c83175856430e04986276f2529a73827594ae1aef4b45303eeb7", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 3340 + } + ], + "compiler": { + "path": "seed/out/omc", + "sha256": "5f90edea61bac241398df5036990d899361a5acd9decb37954ce088ec0f6f6df" + }, + "cpu_affinity": [ + 10, + 11 + ], + "execution": "NATIVE Linux AArch64 host CPU (DGX Spark host, no GPU opened)", + "hashes": { + "seed/authority/action.om": "59cb9c3dfdcd9193bc4a272deda4fcd256a0d7693f3bcb58bc4e30ed78faab2b", + "seed/node/auth-gate.om": "e58fe99ff6245ccd5a552d540c901b2225c59ade9e3026071f05838419cf92b0", + "seed/node/auth-test.om": "af66c87f83d73a5bdbaf181378eb69bb0645a86fe9b39de2f1b714041fbc20b8", + "seed/node/auth.om": "edf2f075d3751a8025363bc658252537f865dfc29f975fcf5d93c353b3282b30", + "seed/node/code-test.om": "df87a21e31f38d85ab9145af3fb18bafc52144a20aed0d9fbad60f6059ddacd0", + "seed/node/code.om": "aa9f8463fbe9534626c205e991e3a2170a25cbf91a106932ec399353583c0bf7", + "seed/node/gram.om": "ebba1f4c693f218969dc2f17eb680760977d38d694ac76db477853aefa64b291", + "seed/node/journal-gate.om": "ac4d42add3193d0f011674ed69775f933aa123644343651a24bd40234d051d8b", + "seed/node/journal-test.om": "2dfd1c1604503116c45f562d70f7f78f90223d9cf0ec92b2de756834ee5921ba", + "seed/node/journal.om": "b8f970d02b3f752d217f61b601817d5abc5a8c22fd2288544af15a18f628feac", + "seed/node/pool.om": "e7fba928bdc5c4194e7aee42109265de4f172d2b197946133d788b2dbcb30ccc", + "seed/node/sched-gate.om": "7299e23edf889403474b4d64a5ce6d52bb940a7e8fe87f66830419bb97e90b68", + "seed/node/sched-test.om": "29a3587d35a217403c63395eb2b11b4992727812af66512be3e452ea6381a545", + "seed/node/sched.om": "2621d47aa45b1d20878cdbb7bab28f0d81166e2a5d75f5a9d7aac52a46fc8774", + "seed/node/schedpol-gate.om": "7aed0a96c2610e77fdb195332725c0a59da5d0851ac43e2f072655a94600d293", + "seed/node/schedpol-test.om": "d2b25195fc3b839168be21bcccf2a429edd8c5cc86fc797647774de36db6de79", + "seed/node/super.om": "d104ac8116c6df57fdc93f03791d7315e5b60875d8d6177480ef9967b6f53d5a", + "seed/node/transport.om": "d0dd69ef5e0b71294a2390b3526865d62ca07accd269b9ce57a028339e34f6da" + }, + "issue": "DRA-396", + "platform": "Linux 7.0.0-1019-nvidia aarch64 spark-b87b", + "project": "P-DRA-14", + "script": { + "cases": { + "cases": [ + { + "case": "schedpol-gate", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "expect": 0, + "gate": "seed/node/schedpol-gate.om", + "issue": "DRA-395", + "repeat": 10, + "stdout_has": [ + "PASS node schedpol" + ], + "timeout": 120 + }, + { + "args": [ + "fifo" + ], + "case": "schedpol-gate-fifo", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "expect": 11, + "gate": "seed/node/schedpol-gate.om", + "issue": "DRA-396", + "repeat": 5, + "stdout_has": [ + "schedpol hol witness head=20050 fits_behind=30050 free_cpu=1 idle_worker=1", + "schedpol hol witness head=20050 fits_behind=50050 free_cpu=1 idle_worker=1" + ], + "timeout": 120 + }, + { + "args": [ + "noreserve" + ], + "case": "schedpol-gate-noreserve", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "expect": 61, + "gate": "seed/node/schedpol-gate.om", + "issue": "DRA-396", + "repeat": 5, + "timeout": 120 + }, + { + "case": "sched-gate", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "expect": 0, + "gate": "seed/node/sched-gate.om", + "issue": "DRA-287" + }, + { + "case": "auth-gate", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/auth-test.om" + ], + "expect": 0, + "gate": "seed/node/auth-gate.om", + "issue": "DRA-288" + }, + { + "case": "journal-gate", + "clean": [ + "build/node/jt" + ], + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/journal-test.om" + ], + "expect": 0, + "gate": "seed/node/journal-gate.om", + "issue": "DRA-289" + }, + { + "args": [ + "unit", + "build/node/cu" + ], + "case": "code-test-unit", + "clean": [ + "build/node/cu" + ], + "expect": 0, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/gram.om", + "seed/node/code.om", + "seed/node/code-test.om" + ], + "issue": "DRA-290", + "om2": true + }, + { + "case": "mut-impossible-admitted", + "expect": 31, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "if not sp_feas req\n", + "if false\n" + ], + "why": "C: impossible request admitted; check sched_admitr == -8 code 31" + }, + { + "case": "mut-collect-no-release", + "expect": 133, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "j = sub b 1\nsp_give j\n", + "j = sub b 1\n" + ], + "why": "C: jobs reviewed still hold; pt_inv in pt_drain code 133" + }, + { + "case": "mut-capacity-ignored", + "expect": 44, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "if gt sp_need req k a\n", + "if false\n" + ], + "why": "D: use exceeds capacity; pt_inv in pt_drain code 44" + }, + { + "args": [ + "fifo" + ], + "case": "mut-ready-unstamped", + "expect": 54, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "if ne and get sjdep j topics 0\nsp_ready j\n", + "if ne and get sjdep j topics 0\nput sjst j 2\n" + ], + "why": "F under fifo: ready order wrong, y not first; code 54" + }, + { + "case": "mut-give-after-review", + "expect": 122, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "j = sub b 1\nsp_give j\nif ge sched_count 4 4 get sclim 1\ncontinue\nend\n", + "j = sub b 1\nif ge sched_count 4 4 get sclim 1\ncontinue\nend\nsp_give j\n" + ], + "why": "V: second CPU not released while review full; suse==0 code 122" + }, + { + "case": "mut-no-take", + "expect": 130, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "end\nsp_take j\nif eq get scpol 5 add j 1\n", + "end\nif eq get scpol 5 add j 1\n" + ], + "why": "C: running unfinished job holds nothing; pt_inv in pt_until code 130" + }, + { + "case": "mut-cap-below-use", + "expect": 131, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "if lt sp_need caps k get suse k\n", + "if false\n" + ], + "why": "C: sched_cap below use accepted; == -8 code 131" + }, + { + "case": "mut287-wake-all", + "expect": 16, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "if ne and sc_cell w 32 topics 0\n", + "if true\n" + ] + }, + { + "case": "mut287-no-wake", + "expect": 34, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "sc_set w 0 q\nsc_wake w\n", + "sc_set w 0 q\n" + ] + }, + { + "case": "mut287-review-unbounded", + "expect": 50, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "if ge sched_count 4 4 get sclim 1\n", + "if false\n" + ] + }, + { + "case": "mut287-admit-unbounded", + "expect": 48, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "room = ulong 0\nif lt a get sclim 0\nroom = sub get sclim 0 a\nend\n", + "room = ulong 64\n" + ], + "why": "DRA-287 sched-gate admission-limit check: headroom ignored, admissions beyond the limit; 48 (pattern moved with the DRA-396 room rewrite)" + }, + { + "case": "mut287-unknown-rerun", + "expect": 83, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "put sjst j 6\n", + "put sjst j 2\n" + ] + }, + { + "case": "mut287-lost-no-ack", + "expect": 92, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "sc_set w 64 get scseq w\n", + "" + ] + }, + { + "case": "mut287-deps-ignored", + "expect": 68, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "put sjst j 1\n", + "put sjst j 2\n" + ] + }, + { + "args": [ + "idle" + ], + "case": "mut287-super-spin", + "expect": 138, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/super.om", + "iv = interval\n", + "iv = long 0\n" + ] + }, + { + "case": "mut288-pause-ignored", + "expect": 121, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/auth-test.om" + ], + "issue": "DRA-288", + "mutate": [ + "seed/node/sched.om", + "if ne get scpause 0 0\n", + "if false\n" + ] + }, + { + "case": "mut396-cursor-stuck", + "expect": 15, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "put scpol 4 rem add cur win 64\n", + "" + ], + "why": "pt_cursor (exit 15) checks after every step that the cursor moved by win per window scan mod 64; with win 64 that is no move, so phases before W pass; the first scan in W (win 4) leaves the cursor in place where 4 slots were expected: 15" + }, + { + "case": "mut396-tickets-ignored", + "expect": 75, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if eq get scpol 6 0\nret true\n", + "if true\nret true\n" + ], + "why": "Q: with room, Y asking before ticket holder X is admitted; code 75" + }, + { + "case": "mut396-no-holdback", + "expect": 61, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "rq = get sjneed rj\n", + "rq = ulong 0\n" + ], + "why": "S: smalls refill freed CPU, big never runs; first check code 61" + }, + { + "case": "mut396-never-reserve", + "expect": 61, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "put scpol 5 add o 1\n", + "" + ], + "why": "S: no reservation, big never runs; first check code 61" + }, + { + "case": "mut396-lease-never", + "expect": 82, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if ge now d\n", + "if false\n" + ], + "why": "L: sched_overdue never reports; eq o h code 82" + }, + { + "case": "mut396-cancel-keeps-reserve", + "expect": 94, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "put sjst j 0\nif eq get scpol 5 add j 1\nput scpol 5 0\nend\n", + "put sjst j 0\n" + ], + "why": "R: reservation survives cancel; sched_stat 29 == 0 code 94" + }, + { + "case": "mut396-window-ignored", + "expect": 9, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "for i ulong win bound 64\n", + "for i ulong 64 bound 64\n" + ], + "why": "pt_step bound (exit 9): candidate reads <= events x db x (win+1); in W (win 4, db 2) one pick scanning 64 slots reads 65 > 2 x 5 = 10 per event: 9" + }, + { + "case": "mut396-tickets-never-lapse", + "expect": 80, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if lt add get stts t get scpol 7 get scst 2\n", + "if false\n" + ], + "why": "Q: stale ticket of 150050 blocks new caller 160050; ge 0 code 80" + }, + { + "case": "mut396-cursor-by-one", + "expect": 15, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "put scpol 4 rem add cur win 64\n", + "put scpol 4 rem add cur 1 64\n" + ], + "why": "pt_cursor (exit 15): in W (win 4) a scan moves the cursor by 1 instead of 4, so cursor != u0 + 4 x scans mod 64 at the first step that scans: 15 (with win 64, 1 vs 0 mod 64 also differs, so it may trip in phase A already; same exit)" + }, + { + "case": "mut396-holders-by-room", + "expect": 105, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if eq t 0\nret true", + "if lt t room\nret true" + ], + "why": "T: second holder Y enters with two openings; 105" + }, + { + "case": "mut396-room-ignores-slots", + "expect": 191, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if lt fs room\nroom = fs\n", + "if false\nroom = fs\n" + ], + "why": "X: table full of review results, sched_room true; 191" + }, + { + "case": "mut396-lease-early", + "expect": 83, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if ge now d\n", + "if ge add now 100000000 d\n" + ], + "why": "L: overdue reported before the stored deadline; 83" + }, + { + "case": "mut396-jn-room-before-dup", + "clean": [ + "build/node/jt" + ], + "expect": 170, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/journal-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/journal.om", + "if ge jn_jfind id 0\nret neg long 4\nend\nif not sched_room id\nret neg long 2\nend\n", + "if not sched_room id\nret neg long 2\nend\nif ge jn_jfind id 0\nret neg long 4\nend\n" + ], + "why": "journal case 16: duplicate at the limit gets -2 and a ticket, not -4; 170" + }, + { + "case": "mut396-jn-no-room-check", + "clean": [ + "build/node/jt" + ], + "expect": 173, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/journal-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/journal.om", + "if not sched_room id\nret neg long 2\nend\nif ne jn_rec 2 id deps flags 0\n", + "if ne jn_rec 2 id deps flags 0\n" + ], + "why": "journal-gate case 16 runs before 17: jn_admit 7003 at the limit now journals ADMIT and sched_admit refuses (-2, 172 holds, ticket count 1 holds); after the cancel, jn_admit 7003 finds 7003 in the journal and returns -4, so jt_ok ge ... 173 fails: 173" + } + ], + "issue": "DRA-396", + "statuses": { + "DRA-396": "IMPLEMENTED, EXERCISED on native host; not QUALIFIED; not MERGED; not DEPLOYED", + "expected_exits": "derived from the check site each mutant targets (field why), before the run; DRA-287/288 mutants carry their original derivations from those PRs", + "gpu": "NOT_RUN (not involved)" + } + }, + "cases_sha256": "e03002124b2165cb3606d1c0c7fd0a8c923d49cb9a3c998a540ea0eaa40f7797", + "path": "~/handoffs/hive/sched/bin/receipt.py", + "sha256": "350fbf0733c51486123c2854d1cd8ec4578622842da645769a653182b1d35cfa", + "source": "#!/usr/bin/env python3\n\"\"\"Run a scheduler-policy case list against a clean omega-mv checkout and\nwrite a content-addressed receipt (evidence//receipt..json).\n\nUsage: receipt.py CASES.json REPO OUTDIR_REL [--write]\nRun it under the queen pool lock, e.g.\n flock -o ~/handoffs/hive/queen/pool-8-9.lock taskset -c 8-9 nice -n 10 receipt.py ...\n\nA case: {\"case\", \"issue\", \"fragments\": [paths] | \"gate\": path, \"om2\": bool,\n \"mutate\": [path, old, new] (optional; old must occur exactly once),\n \"args\": [..], \"expect\": int, \"timeout\": s, \"clean\": [rel dirs removed first],\n \"stdout_has\": [substrings every run must print] (optional),\n \"repeat\": N runs, each must pass (optional, default 1)}.\nThe receipt embeds this script's source and the case list for replay.\nMutants are applied to a disposable copy of the fragment; the checkout is\nnever modified. Verification tooling only: the implementation is the .om.\n\"\"\"\nimport hashlib, json, os, platform, shutil, subprocess, sys, tempfile, time, datetime\n\ndef sh(cmd, cwd, **kw):\n return subprocess.run(cmd, cwd=cwd, capture_output=True, **kw)\n\ndef sha(path):\n h = hashlib.sha256()\n with open(path, 'rb') as f:\n h.update(f.read())\n return h.hexdigest()\n\ndef main():\n cases_path, repo, outrel = sys.argv[1], os.path.abspath(sys.argv[2]), sys.argv[3]\n write = '--write' in sys.argv\n spec = json.load(open(cases_path))\n dirty = sh(['git', 'status', '--porcelain', '--untracked-files=normal'], repo).stdout.decode()\n dirty = [l for l in dirty.splitlines() if not l[3:].startswith('build/')]\n if dirty:\n print('REFUSED: dirty tree\\n' + '\\n'.join(dirty), file=sys.stderr)\n sys.exit(3)\n head = sh(['git', 'rev-parse', 'HEAD'], repo).stdout.decode().strip()\n tree = sh(['git', 'rev-parse', 'HEAD^{tree}'], repo).stdout.decode().strip()\n omc = os.path.join(repo, 'seed/out/omc')\n work = tempfile.mkdtemp(prefix='schedrcpt-')\n files = set()\n results = []\n for c in spec['cases']:\n frags = c.get('fragments') or [c['gate']]\n src = b'om2\\n' if c.get('om2') else b''\n mut = c.get('mutate')\n if mut and mut[0] not in frags:\n print(f'REFUSED: mutant {c[\"case\"]}: {mut[0]} is not one of its fragments', file=sys.stderr)\n sys.exit(4)\n for fr in frags:\n files.add(fr)\n data = open(os.path.join(repo, fr), 'rb').read()\n if mut and mut[0] == fr:\n old, new = mut[1].encode(), mut[2].encode()\n n = data.count(old)\n if n != 1:\n print(f'REFUSED: mutant {c[\"case\"]}: pattern occurs {n} times', file=sys.stderr)\n sys.exit(4)\n data = data.replace(old, new)\n src += data\n if c.get('gate') and not mut and c.get('compose'):\n composed = b''.join(open(os.path.join(repo, f), 'rb').read() for f in c['compose'])\n if composed != src:\n print(f'REFUSED: {c[\"gate\"]} is not the concatenation', file=sys.stderr)\n sys.exit(5)\n binp = os.path.join(work, c['case'])\n p = subprocess.run([omc], input=src, capture_output=True)\n with open(binp, 'wb') as f:\n f.write(p.stdout)\n os.chmod(binp, 0o755)\n r = {'case': c['case'], 'issue': c.get('issue'), 'compile_exit': p.returncode,\n 'expected_exit': c['expect'], 'source_sha256': hashlib.sha256(src).hexdigest()}\n if mut:\n r['mutation'] = {'file': mut[0], 'from': mut[1], 'to': mut[2]}\n if p.returncode != 0:\n r.update(run_exit=None, verdict='FAIL', stderr=p.stderr.decode(errors='replace'))\n results.append(r)\n continue\n runs, code, out, err = [], None, b'', b''\n t0 = time.monotonic()\n for n in range(c.get('repeat', 1)):\n for d in c.get('clean', []):\n shutil.rmtree(os.path.join(repo, d), ignore_errors=True)\n try:\n q = subprocess.run([binp] + c.get('args', []), cwd=repo, capture_output=True,\n timeout=c.get('timeout', 120))\n code, out, err = q.returncode, q.stdout, q.stderr\n except subprocess.TimeoutExpired as e:\n code, out, err = 'timeout', e.stdout or b'', e.stderr or b''\n text = out.decode(errors='replace')\n miss = [s for s in c.get('stdout_has', []) if s not in text]\n runs.append({'exit': code, 'missing_stdout': miss})\n ok = all(x['exit'] == c['expect'] and not x['missing_stdout'] for x in runs)\n r.update(run_exit=code, wall_ms=int((time.monotonic() - t0) * 1000),\n stdout=out.decode(errors='replace')[-4000:],\n stderr=err.decode(errors='replace')[-2000:],\n binary_sha256=sha(binp),\n verdict='PASS' if ok else 'FAIL')\n if c.get('stdout_has'):\n r['stdout_has'] = c['stdout_has']\n if len(runs) > 1:\n hist = {}\n for x in runs:\n k = f\"{x['exit']}{'' if not x['missing_stdout'] else ' missing-stdout'}\"\n hist[k] = hist.get(k, 0) + 1\n r['repeat'] = {'runs': len(runs), 'outcomes': hist}\n results.append(r)\n print(f\"{r['verdict']} {c['case']} expect={c['expect']} got={code}\"\n + (f\" runs={r['repeat']['outcomes']}\" if len(runs) > 1 else ''), flush=True)\n shutil.rmtree(work, ignore_errors=True)\n rec = {\n 'project': 'P-DRA-14', 'issue': spec['issue'], 'source_commit': head, 'source_tree': tree,\n 'platform': ' '.join([platform.system(), platform.release(), platform.machine(), platform.node()]),\n 'cpu_affinity': sorted(os.sched_getaffinity(0)),\n 'execution': 'NATIVE Linux AArch64 host CPU (DGX Spark host, no GPU opened)',\n 'timestamp_utc': datetime.datetime.now(datetime.timezone.utc).isoformat(),\n 'compiler': {'path': 'seed/out/omc', 'sha256': sha(omc)},\n 'hashes': {f: sha(os.path.join(repo, f)) for f in sorted(files)},\n 'script': {'path': '~/handoffs/hive/sched/bin/receipt.py', 'sha256': sha(__file__),\n 'source': open(__file__).read(),\n 'cases_sha256': sha(cases_path), 'cases': spec},\n 'statuses': spec.get('statuses', {}),\n 'checks': results,\n 'summary': {'pass': sum(r['verdict'] == 'PASS' for r in results),\n 'fail': sum(r['verdict'] != 'PASS' for r in results)},\n }\n body = (json.dumps(rec, indent=2, sort_keys=True) + '\\n').encode()\n digest = hashlib.sha256(body).hexdigest()\n print(f\"summary pass={rec['summary']['pass']} fail={rec['summary']['fail']} receipt_sha256={digest}\")\n if write:\n d = os.path.join(repo, outrel)\n os.makedirs(d, exist_ok=True)\n path = os.path.join(d, f'receipt.{digest}.json')\n with open(path, 'wb') as f:\n f.write(body)\n print(path)\n else:\n with open(os.path.join(tempfile.gettempdir(), f'sched-receipt-{digest}.json'), 'wb') as f:\n f.write(body)\n sys.exit(0 if rec['summary']['fail'] == 0 else 1)\n\nmain()\n" + }, + "source_commit": "830998e6f26a7b3faa6a502880c395ebd3d22d99", + "source_tree": "07a3df0d54e6b370867ab1085aed689a8b9cebac", + "statuses": { + "DRA-396": "IMPLEMENTED, EXERCISED on native host; not QUALIFIED; not MERGED; not DEPLOYED", + "expected_exits": "derived from the check site each mutant targets (field why), before the run; DRA-287/288 mutants carry their original derivations from those PRs", + "gpu": "NOT_RUN (not involved)" + }, + "summary": { + "fail": 0, + "pass": 37 + }, + "timestamp_utc": "2026-11-07T06:20:00.391098+00:00" +} From 9f5ebd35e2a8d1b967ddd4b68961b239278056a2 Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Sat, 7 Nov 2026 00:26:58 -0600 Subject: [PATCH 15/20] chore(crumb): recompile after DRA-396 receipt --- .crumb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.crumb b/.crumb index 914b5f1f3..7a9888b75 100644 --- a/.crumb +++ b/.crumb @@ -108,14 +108,14 @@ } ], "children_root": "sha256:966bedb54caa4209f9ab84526da66f6b13ce72e8831470170364eb5881355748", - "compiled_at": "2026-11-07T06:15:21Z", + "compiled_at": "2026-11-07T06:26:56Z", "compiler": "crumb-compile/1", - "digest": "sha256:e9ff35ed9f79ac1b130af98eb052ca575906e1d1cf1fcbdb7d5430c4e2788d35", - "evidence_files": 15704, - "evidence_root": "sha256:2763ebcac18e411fa98a5a29d4cf723991ccf3d400da431ea6e1af169640aa69", - "files": 24265, - "generated_at_commit": "ea20838fe67c77d7d811016afaaba1cbb988314f", - "source_tree": "sha256:d348c06c931e481031af8662a05827edeceef9609bf7108af93bf9dd6b98a438" + "digest": "sha256:7a605b611bb13c629e8888959da5cc3e52bca68a8a72410164a06c42f1f7a856", + "evidence_files": 15705, + "evidence_root": "sha256:4a6b72b3f73e2fbe644e4894a957d3573ca27eade0821ec6cb76b30904497b2c", + "files": 24266, + "generated_at_commit": "455e92feedcfc15b216aa60117918ed326f407ad", + "source_tree": "sha256:9ad06b1292bda45edeeff328a27395ffb358588b7d0d7fa855beae7730536797" }, "owner_lane": "", "provenance": { From d2bb69bc148eda7320f518319510b461775c7950 Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Sat, 7 Nov 2026 00:35:32 -0600 Subject: [PATCH 16/20] node(sched): DRA-396 review r3 nits: candidate-read bound by actual picks (assigned + events), cursor witness around publish and resume dispatch, case 17 journal length unchanged on refusal and synthetic-occupancy wording, FIFO overcount and isolated case-17 controls --- seed/node/README.md | 31 +++++++++++++++++++------------ seed/node/journal-gate.om | 15 +++++++++------ seed/node/journal-test.om | 15 +++++++++------ seed/node/schedpol-gate.om | 37 ++++++++++++++++++++++++------------- seed/node/schedpol-test.om | 37 ++++++++++++++++++++++++------------- 5 files changed, 85 insertions(+), 50 deletions(-) diff --git a/seed/node/README.md b/seed/node/README.md index 737b1aade..552246c72 100644 --- a/seed/node/README.md +++ b/seed/node/README.md @@ -572,13 +572,16 @@ used for reporting only; selection reads logical counters. `schedpol-gate` takes one optional argument: `fifo` runs every phase under policy 0, `noreserve` sets the bypass budget to 65535 (no reservation in -practice). Each step also checks the bounds since the last step: candidate -reads at most events × `db` × (`win` + 1), the reserved probe included, or -64 per pick under policy 0, exit 9; maintenance reads at most 64 per event, -exit 14; the cursor moved by exactly `win` per window scan (mod 64), exit 15. -The last is the traversal witness, checked at every step of every phase. -These checks read the scheduler's own counters, so they bound the work the -counters record; they are not an independent trace of memory reads. +practice). Each step also checks the bounds since the last step. An event +makes at most one pick more than it assigns, so candidate reads are at most +(assigned + events) × (`win` + 1), the reserved probe included, or × 64 +under policy 0, exit 9; maintenance reads at most 64 per event, exit 14; the +cursor moved by exactly `win` per window scan (mod 64), exit 15. The cursor +check is the traversal witness. It runs at every step of every phase and +around the dispatches that publication (phase F) and resume (phase Z) cause +outside a step. These checks read the scheduler's own counters, so they +bound the work the counters record; they are not an independent trace of +which slots were read. | Phase | Scenario | Exit when it fails | | --- | --- | --- | @@ -594,10 +597,12 @@ counters record; they are not an independent trace of memory reads. Phases S to Z run after A and B, so under `fifo` the gate stops at 11. `journal-gate` case 16 checks `jn_admit` at the admission limit: a duplicate id is refused as a duplicate and takes no ticket (170..173). Case 17 checks -a full table below the limit: 64 jobs left UNKNOWN (as recovery leaves -them; set directly, nothing is spawned), a new id is refused with a ticket, -the independent journal reader finds no ADMIT for it, and after one slot is -settled the same id is admitted and journaled once (174..177). +a full table below the limit: 64 jobs put in UNKNOWN directly (synthetic +occupancy, the state a worker loss leaves a job not safe to rerun in; +nothing is spawned and no recovery runs). A new id is refused with a +ticket, the journal does not grow, and the independent journal reader finds +no ADMIT for it; after one slot is settled the same id is admitted and +journaled once (174..177). | Change | Expected exit (derived from the check it trips) | | --- | --- | @@ -614,7 +619,9 @@ settled the same id is admitted and journaled once (174..177). | window ignored (`for i ulong win` to `for i ulong 64` in `sp_fair`) | 9 | | tickets never lapse | 80 | | `jn_admit` asks for room before the duplicate check (`journal.om`) | 170 (`journal-gate`) | -| `jn_admit` skips the room check (`journal.om`) | 173 (`journal-gate`): case 16 journals ADMIT for the refused id, so its later admission is refused as a duplicate; case 17 would stop at 175 | +| `jn_admit` skips the room check (`journal.om`) | 173 (`journal-gate`): case 16 journals ADMIT for the refused id, so its later admission is refused as a duplicate | +| the same, with case 16 not run | 175 (`journal-gate`): case 17's refused admission grows the journal | +| FIFO counts 3 per slot read (`sp_fifo`), run with `fifo` | 9: the first FIFO pick reads more than 64 per pick allows | ## Proposals, authority and cancellation (DRA-288) diff --git a/seed/node/journal-gate.om b/seed/node/journal-gate.om index 5532efa80..a8594a6a0 100644 --- a/seed/node/journal-gate.om +++ b/seed/node/journal-gate.om @@ -4537,12 +4537,13 @@ jt_clean end note Case 17, a full table below the admission limit (P-DRA-14, DRA-396): -note limit 64, 64 jobs admitted and all left UNKNOWN as a crash recovery -note leaves them (set here directly; nothing is spawned), so no job is -note active and no slot is free. A new id is refused with a ticket and no -note ADMIT reaches the journal (174, 175, checked by the independent -note reader). Settling one job frees its slot and the same id is admitted -note and journaled once (176, 177). +note limit 64, 64 jobs admitted and then put in UNKNOWN directly, the state +note a worker loss leaves a job not safe to rerun in (synthetic occupancy: +note nothing is spawned, no recovery runs), so no job is active and no slot +note is free. A new id is refused with a ticket, the journal does not grow +note and no ADMIT for it reaches the journal (174, 175, the last checked by +note the independent reader). Settling one job frees its slot and the same +note id is admitted and journaled once (176, 177). fn jt_c17 to void jt_clean c = pool_new 2 2 @@ -4557,8 +4558,10 @@ for j ulong 64 put sjst j 6 end jt_ok eq sched_count 0 0 0 174 +q = get jseq 0 jt_ok eq jn_admit 9001 0 0 neg long 2 174 jt_ok eq sched_stat 30 1 174 +jt_ok eq get jseq 0 q 175 jt_ok not jn_known 9001 175 jt_ok jt_load 1 175 jt_ok eq jt_cnt 2 0 64 175 diff --git a/seed/node/journal-test.om b/seed/node/journal-test.om index 780f1a4df..d87ed3e35 100644 --- a/seed/node/journal-test.om +++ b/seed/node/journal-test.om @@ -854,12 +854,13 @@ jt_clean end note Case 17, a full table below the admission limit (P-DRA-14, DRA-396): -note limit 64, 64 jobs admitted and all left UNKNOWN as a crash recovery -note leaves them (set here directly; nothing is spawned), so no job is -note active and no slot is free. A new id is refused with a ticket and no -note ADMIT reaches the journal (174, 175, checked by the independent -note reader). Settling one job frees its slot and the same id is admitted -note and journaled once (176, 177). +note limit 64, 64 jobs admitted and then put in UNKNOWN directly, the state +note a worker loss leaves a job not safe to rerun in (synthetic occupancy: +note nothing is spawned, no recovery runs), so no job is active and no slot +note is free. A new id is refused with a ticket, the journal does not grow +note and no ADMIT for it reaches the journal (174, 175, the last checked by +note the independent reader). Settling one job frees its slot and the same +note id is admitted and journaled once (176, 177). fn jt_c17 to void jt_clean c = pool_new 2 2 @@ -874,8 +875,10 @@ for j ulong 64 put sjst j 6 end jt_ok eq sched_count 0 0 0 174 +q = get jseq 0 jt_ok eq jn_admit 9001 0 0 neg long 2 174 jt_ok eq sched_stat 30 1 174 +jt_ok eq get jseq 0 q 175 jt_ok not jn_known 9001 175 jt_ok jt_load 1 175 jt_ok eq jt_cnt 2 0 64 175 diff --git a/seed/node/schedpol-gate.om b/seed/node/schedpol-gate.om index 14ea23cce..f924ba320 100644 --- a/seed/node/schedpol-gate.om +++ b/seed/node/schedpol-gate.om @@ -1904,6 +1904,9 @@ text pw4 " idle_worker=" global ptc long 1 note Mode: 0 default policy, 1 fifo, 2 noreserve. global ptm ulong 1 +note pt_step snapshot: event count, candidate reads, maintenance reads, +note assigned, before the step. +global ptb ulong 4 fn pt_ok ok bool code int to void if not ok @@ -2051,18 +2054,20 @@ end end note One creator step of up to 10 ms, then the invariant and the scan -note bounds since the last step: candidate reads at most events x budget x -note (window + 1), the reserved probe included, or 64 per pick under FIFO -note (policy 0), 9; maintenance reads at most 64 per event, 14; the cursor -note moved by exactly the window per window scan, mod 64, 15. The last is -note the traversal witness: window scans cover consecutive windows, so +note bounds since the last step. An event makes at most one pick more than +note it assigns, so candidate reads are at most (assigned + events) x +note (window + 1), the reserved probe included, or x 64 under FIFO (policy +note 0), 9; maintenance reads at most 64 per event, 14; the cursor moved by +note exactly the window per window scan, mod 64, 15. The last is the +note traversal witness: window scans cover consecutive windows, so note ceil(64/win) of them examine every slot. fn pt_step c long code int to void -e0 = sched_stat 2 -x0 = sched_stat 3 -m0 = sched_stat 13 -s0 = sched_stat 14 +put ptb 0 sched_stat 2 +put ptb 1 sched_stat 3 +put ptb 2 sched_stat 13 +put ptb 3 sched_stat 4 u0 = sched_stat 28 +s0 = sched_stat 14 r = sched_step c 10000000 pt_ok ge r 0 code pt_inv code @@ -2070,10 +2075,10 @@ w = add sched_stat 25 1 if eq sched_stat 24 0 w = ulong 64 end -ev = sub sched_stat 2 e0 -lim = mul mul ev sched_stat 26 w -pt_ok le sub sched_stat 3 x0 lim 9 -pt_ok le sub sched_stat 13 m0 mul ev 64 14 +ev = sub sched_stat 2 get ptb 0 +lim = mul add sub sched_stat 4 get ptb 3 ev w +pt_ok le sub sched_stat 3 get ptb 1 lim 9 +pt_ok le sub sched_stat 13 get ptb 2 mul ev 64 14 pt_cursor u0 s0 end @@ -2233,7 +2238,10 @@ buf = new uchar 4096 0 c = pt_setup 1 8 8 pt_req 4 1024 1 8 50 x = pt_admit 60050 8 0 51 y = pt_admit 70050 0 0 52 +u0 = sched_stat 28 +s0 = sched_stat 14 pt_ok gt sched_publish c 8 buf 16 0 53 +pt_cursor u0 s0 if eq sched_stat 24 0 pt_ok eq get sjst y 3 54 pt_ok eq get sjst x 2 55 @@ -2582,7 +2590,10 @@ k = sched_pause c true a = pt_admit 480050 0 pt_req 1 0 0 0 195 b = pt_admit 490050 0 pt_req 2 0 0 0 195 x = pt_admit 510050 0 pt_req 1 0 0 0 195 +u0 = sched_stat 28 +s0 = sched_stat 14 k = sched_pause c false +pt_cursor u0 s0 pt_ok eq sched_stat 29 add b 1 196 dl = add ulong monons 600000000 for t ulong 1000000 diff --git a/seed/node/schedpol-test.om b/seed/node/schedpol-test.om index 7adf7ddeb..afb20776d 100644 --- a/seed/node/schedpol-test.om +++ b/seed/node/schedpol-test.om @@ -24,6 +24,9 @@ text pw4 " idle_worker=" global ptc long 1 note Mode: 0 default policy, 1 fifo, 2 noreserve. global ptm ulong 1 +note pt_step snapshot: event count, candidate reads, maintenance reads, +note assigned, before the step. +global ptb ulong 4 fn pt_ok ok bool code int to void if not ok @@ -171,18 +174,20 @@ end end note One creator step of up to 10 ms, then the invariant and the scan -note bounds since the last step: candidate reads at most events x budget x -note (window + 1), the reserved probe included, or 64 per pick under FIFO -note (policy 0), 9; maintenance reads at most 64 per event, 14; the cursor -note moved by exactly the window per window scan, mod 64, 15. The last is -note the traversal witness: window scans cover consecutive windows, so +note bounds since the last step. An event makes at most one pick more than +note it assigns, so candidate reads are at most (assigned + events) x +note (window + 1), the reserved probe included, or x 64 under FIFO (policy +note 0), 9; maintenance reads at most 64 per event, 14; the cursor moved by +note exactly the window per window scan, mod 64, 15. The last is the +note traversal witness: window scans cover consecutive windows, so note ceil(64/win) of them examine every slot. fn pt_step c long code int to void -e0 = sched_stat 2 -x0 = sched_stat 3 -m0 = sched_stat 13 -s0 = sched_stat 14 +put ptb 0 sched_stat 2 +put ptb 1 sched_stat 3 +put ptb 2 sched_stat 13 +put ptb 3 sched_stat 4 u0 = sched_stat 28 +s0 = sched_stat 14 r = sched_step c 10000000 pt_ok ge r 0 code pt_inv code @@ -190,10 +195,10 @@ w = add sched_stat 25 1 if eq sched_stat 24 0 w = ulong 64 end -ev = sub sched_stat 2 e0 -lim = mul mul ev sched_stat 26 w -pt_ok le sub sched_stat 3 x0 lim 9 -pt_ok le sub sched_stat 13 m0 mul ev 64 14 +ev = sub sched_stat 2 get ptb 0 +lim = mul add sub sched_stat 4 get ptb 3 ev w +pt_ok le sub sched_stat 3 get ptb 1 lim 9 +pt_ok le sub sched_stat 13 get ptb 2 mul ev 64 14 pt_cursor u0 s0 end @@ -353,7 +358,10 @@ buf = new uchar 4096 0 c = pt_setup 1 8 8 pt_req 4 1024 1 8 50 x = pt_admit 60050 8 0 51 y = pt_admit 70050 0 0 52 +u0 = sched_stat 28 +s0 = sched_stat 14 pt_ok gt sched_publish c 8 buf 16 0 53 +pt_cursor u0 s0 if eq sched_stat 24 0 pt_ok eq get sjst y 3 54 pt_ok eq get sjst x 2 55 @@ -702,7 +710,10 @@ k = sched_pause c true a = pt_admit 480050 0 pt_req 1 0 0 0 195 b = pt_admit 490050 0 pt_req 2 0 0 0 195 x = pt_admit 510050 0 pt_req 1 0 0 0 195 +u0 = sched_stat 28 +s0 = sched_stat 14 k = sched_pause c false +pt_cursor u0 s0 pt_ok eq sched_stat 29 add b 1 196 dl = add ulong monons 600000000 for t ulong 1000000 From 44065b1929e9587b4aee09701e1805b5a9bbf3c7 Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Sat, 7 Nov 2026 00:35:35 -0600 Subject: [PATCH 17/20] chore(crumb): recompile --- .crumb | 8 ++++---- seed/node/.crumb | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.crumb b/.crumb index 7a9888b75..fbada92c5 100644 --- a/.crumb +++ b/.crumb @@ -108,14 +108,14 @@ } ], "children_root": "sha256:966bedb54caa4209f9ab84526da66f6b13ce72e8831470170364eb5881355748", - "compiled_at": "2026-11-07T06:26:56Z", + "compiled_at": "2026-11-07T06:35:33Z", "compiler": "crumb-compile/1", - "digest": "sha256:7a605b611bb13c629e8888959da5cc3e52bca68a8a72410164a06c42f1f7a856", + "digest": "sha256:12b655ae035f3a45c0a1817e480fd045d50f3d7bfd119f19ce4628864f09131b", "evidence_files": 15705, "evidence_root": "sha256:4a6b72b3f73e2fbe644e4894a957d3573ca27eade0821ec6cb76b30904497b2c", "files": 24266, - "generated_at_commit": "455e92feedcfc15b216aa60117918ed326f407ad", - "source_tree": "sha256:9ad06b1292bda45edeeff328a27395ffb358588b7d0d7fa855beae7730536797" + "generated_at_commit": "d2bb69bc148eda7320f518319510b461775c7950", + "source_tree": "sha256:80508c54d8044703321e7d09827834040ec107de6a4a807554aef46d563720be" }, "owner_lane": "", "provenance": { diff --git a/seed/node/.crumb b/seed/node/.crumb index 2374d2999..79b222bc3 100644 --- a/seed/node/.crumb +++ b/seed/node/.crumb @@ -3,14 +3,14 @@ "generated": { "children": [], "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", - "compiled_at": "2026-11-07T06:15:21Z", + "compiled_at": "2026-11-07T06:35:33Z", "compiler": "crumb-compile/1", - "digest": "sha256:6a8e3f7f82f984af38535d7f605e83a713e8cf9b2d6bf6ef333275c40139b3f9", + "digest": "sha256:7a1dd62e99bd31f0013830fd41e8994e34e5a575171d88b513381a3d498c6479", "evidence_files": 0, "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "files": 26, - "generated_at_commit": "ea20838fe67c77d7d811016afaaba1cbb988314f", - "source_tree": "sha256:957ee16d5220163b81a8329644ec5bda9ba60e955b0f5a8a4cd6ec1eaa5432b8" + "generated_at_commit": "d2bb69bc148eda7320f518319510b461775c7950", + "source_tree": "sha256:af5b39dc167a988522f90d1c8e33fbe25f536186b8849b6c7d5488b6e1d2d4ea" }, "owner_lane": "", "seed": { From ff320ecb1e13405cf6092f8651df7648d8cb656a Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Sat, 7 Nov 2026 00:40:16 -0600 Subject: [PATCH 18/20] evidence(node-schedpol): DRA-396 receipt 942c6275 at 44065b19 (review r3 nits), 39 PASS / 0 FAIL --- ...aa0a3d11613d746632dda832751efec4a63c0.json | 1501 +++++++++++++++++ 1 file changed, 1501 insertions(+) create mode 100644 evidence/node-schedpol/receipt.942c6275fa647560612dcd4d98aaa0a3d11613d746632dda832751efec4a63c0.json diff --git a/evidence/node-schedpol/receipt.942c6275fa647560612dcd4d98aaa0a3d11613d746632dda832751efec4a63c0.json b/evidence/node-schedpol/receipt.942c6275fa647560612dcd4d98aaa0a3d11613d746632dda832751efec4a63c0.json new file mode 100644 index 000000000..df8d4607a --- /dev/null +++ b/evidence/node-schedpol/receipt.942c6275fa647560612dcd4d98aaa0a3d11613d746632dda832751efec4a63c0.json @@ -0,0 +1,1501 @@ +{ + "checks": [ + { + "binary_sha256": "30cc7eb97e83b4de386426a6da15527201df11b83c0001329678914bf13aef74", + "case": "schedpol-gate", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-395", + "repeat": { + "outcomes": { + "0": 10 + }, + "runs": 10 + }, + "run_exit": 0, + "source_sha256": "7f42afc2358bd75ded665f6df7263fede547988b6ca43137864b834f624dbd9c", + "stderr": "", + "stdout": "schedpol events=109 examined=4566 assigned=10 hol_stops=0 bypasses=4 reservations=1\nPASS node schedpol\n", + "stdout_has": [ + "PASS node schedpol" + ], + "verdict": "PASS", + "wall_ms": 91390 + }, + { + "binary_sha256": "30cc7eb97e83b4de386426a6da15527201df11b83c0001329678914bf13aef74", + "case": "schedpol-gate-fifo", + "compile_exit": 0, + "expected_exit": 11, + "issue": "DRA-396", + "repeat": { + "outcomes": { + "11": 5 + }, + "runs": 5 + }, + "run_exit": 11, + "source_sha256": "7f42afc2358bd75ded665f6df7263fede547988b6ca43137864b834f624dbd9c", + "stderr": "", + "stdout": "schedpol hol witness head=20050 fits_behind=30050 free_cpu=1 idle_worker=1 hol_stops=40\nschedpol hol witness head=20050 fits_behind=50050 free_cpu=1 idle_worker=1 hol_stops=40\n", + "stdout_has": [ + "schedpol hol witness head=20050 fits_behind=30050 free_cpu=1 idle_worker=1", + "schedpol hol witness head=20050 fits_behind=50050 free_cpu=1 idle_worker=1" + ], + "verdict": "PASS", + "wall_ms": 14581 + }, + { + "binary_sha256": "30cc7eb97e83b4de386426a6da15527201df11b83c0001329678914bf13aef74", + "case": "schedpol-gate-noreserve", + "compile_exit": 0, + "expected_exit": 61, + "issue": "DRA-396", + "repeat": { + "outcomes": { + "61": 5 + }, + "runs": 5 + }, + "run_exit": 61, + "source_sha256": "7f42afc2358bd75ded665f6df7263fede547988b6ca43137864b834f624dbd9c", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 34140 + }, + { + "binary_sha256": "d37f428c8615b94d886827541610659b3df933c36da252dae3b079941f557b5a", + "case": "sched-gate", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-287", + "run_exit": 0, + "source_sha256": "7299e23edf889403474b4d64a5ce6d52bb940a7e8fe87f66830419bb97e90b68", + "stderr": "", + "stdout": "idle ticks workers=0 creator=0 wake rounds=200 mean_us=91 max_us=2811\nPASS node sched\n", + "verdict": "PASS", + "wall_ms": 8044 + }, + { + "binary_sha256": "0ecf6e60c0dc73fa35e5a244daef1e62575ebfef89f5e63c76217d668ec2332b", + "case": "auth-gate", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-288", + "run_exit": 0, + "source_sha256": "e58fe99ff6245ccd5a552d540c901b2225c59ade9e3026071f05838419cf92b0", + "stderr": "", + "stdout": "PASS node authority\n", + "verdict": "PASS", + "wall_ms": 765 + }, + { + "binary_sha256": "6ccf48e16522ad44363aefc9808e021e9646eb03a3a8d3d1d84c4f7652985b55", + "case": "journal-gate", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-289", + "run_exit": 0, + "source_sha256": "ae9418da6250c34475d99acae85830ef763394716a045737a56a27769b1d6173", + "stderr": "", + "stdout": "PASS node journal\n", + "verdict": "PASS", + "wall_ms": 3549 + }, + { + "binary_sha256": "78eed3acffa5bc0d7602cd25cb970f4a00d6dc52170276fa4b868f55e67d5526", + "case": "code-test-unit", + "compile_exit": 0, + "expected_exit": 0, + "issue": "DRA-290", + "run_exit": 0, + "source_sha256": "29423a31d3eaa2bf56d6e7ff61ad255948944e9270fef02ae3cc5c0276f0e7e1", + "stderr": "", + "stdout": "CWR 0 0 2\n\n\n\nCWE 0 0 2 1\nCWE 0 1002 1 2\nCWR 0 0 2\n\n\n\nCWE 0 0 2 1\nCWO 0 FAIL 11 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 2\nCWO 0 FAIL 10 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 9\nCWO 0 FAIL 10 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 10 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 2\nCWE 0 1013 1 3\nCWR 0 0 2\n\n\n\nCWE 0 0 2 2\nCWE 0 1023 1 3\nCWR 0 0 2\n\n\n\nCWE 0 0 2 2\nCWO 0 FAIL 10 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 13 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 13 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 13 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 13 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWO 0 FAIL 11 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWE 0 1034 1 4\nCWR 0 0 13\nTests passed.\nCWE 0 0 2 4\nCWO 0 FAIL 14 0\nCWR 0 0 13\nTests passed.\nCWE 0 0 2 4\nCWO 0 FAIL 14 0\nCWR 0 0 13\nTests passed.\nCWE 0 0 2 4\nCWE 0 1045 1 5\nCWR 0 0 15\nFile not found.\nCWE 0 0 2 5\nCWO 0 FAIL 10 0\nCWR 0 0 15\nFile not found.\nCWE 0 0 2 5\nCWO 0 PASS 1 0\nCWO 0 FAIL 18 0\nCWO 0 FAIL 18 0\nCWO 0 FAIL 18 0\nCWE 0 0 3 0\nCWE 0 0 3 1\nCWE 0 0 3 2\nCWO 0 FAIL 17 0\nCWE 0 0 3 6\nCWE 0 0 3 6\nCWO 0 FAIL 15 0\nCWE 0 0 3 0\nCWE 0 0 3 4\nCWO 0 FAIL 17 0\nCWR 0 0 2\n\n\n\nCWE 0 0 2 3\nCWE 0 1054 1 4\nCWE 0 0 3 0\nCWE 0 0 3 0\nCWO 0 FAIL 15 0\nCWE 0 0 3 5\nCWO 0 FAIL 13 0\nCWE 0 0 3 0\nCWO 0 PASS 1 0\nCWE 0 0 3 6\nCWO 0 FAIL 15 0\nCWE 0 0 3 0\nCWO 0 FAIL 15 0\nCWO 0 FAIL 12 7\nCWO 0 FAIL 20 0\nCWE 0 1061 1 1\nCWP 0 1 193\nTask: Fix the error in this file and confirm its goal.\nFile: jobs/item76666.om\nGoal: calc starts with x and adds 4 exactly 3 times in a for loop. main calls calc with 70.\nState: unread\nAnswer:\n\ncode checks=54 fail=0\n", + "verdict": "PASS", + "wall_ms": 40 + }, + { + "binary_sha256": "0a607f8f02c12ef01f59d423ea772469b9bf2c9642831753741878ce94d938c6", + "case": "mut-impossible-admitted", + "compile_exit": 0, + "expected_exit": 31, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "if not sp_feas req\n", + "to": "if false\n" + }, + "run_exit": 31, + "source_sha256": "5cad0be41be5fc8e62008612755fb766e0f85bc22a33243fd6ed629451502b1e", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 1 + }, + { + "binary_sha256": "8f737189c6b06fea341385695d8d0f12738df2c6f713881e31a430fc7b4d8373", + "case": "mut-collect-no-release", + "compile_exit": 0, + "expected_exit": 133, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "j = sub b 1\nsp_give j\n", + "to": "j = sub b 1\n" + }, + "run_exit": 133, + "source_sha256": "d63d68a60b66d17388ebeee4f9e7fb1d6f31edf202cc3de571842f30e6ef0eb1", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 414 + }, + { + "binary_sha256": "edab56b44908601a53fddc52cceb232e1185b91bb343924f7fff1e2cde6f561e", + "case": "mut-capacity-ignored", + "compile_exit": 0, + "expected_exit": 44, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "if gt sp_need req k a\n", + "to": "if false\n" + }, + "run_exit": 44, + "source_sha256": "b3c519b97edd80b59bffb4e6a327ffae9c95097ae1eba4955681ea11b6ec8588", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 434 + }, + { + "binary_sha256": "0a4ecba83d8d3b10a3f7dd7a426ef7a26d1131b918a2163a7ba121ee0be9873c", + "case": "mut-ready-unstamped", + "compile_exit": 0, + "expected_exit": 54, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ne and get sjdep j topics 0\nsp_ready j\n", + "to": "if ne and get sjdep j topics 0\nput sjst j 2\n" + }, + "run_exit": 54, + "source_sha256": "ab9ce3d596f71ae4612682d255f91ff2114d6ad6e642a450d22463706e19fa9c", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 994 + }, + { + "binary_sha256": "f1fc933db23801f8c68dee77e581d55348ad098f60967b74390c3ef9e48aedcf", + "case": "mut-give-after-review", + "compile_exit": 0, + "expected_exit": 122, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "j = sub b 1\nsp_give j\nif ge sched_count 4 4 get sclim 1\ncontinue\nend\n", + "to": "j = sub b 1\nif ge sched_count 4 4 get sclim 1\ncontinue\nend\nsp_give j\n" + }, + "run_exit": 122, + "source_sha256": "9aec9487ea9fb60a1fb5a2c3b5ca3af4895d0b88f0261264a505a6220ce4e20b", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 887 + }, + { + "binary_sha256": "57b80624393b048878524a529cab85bbfc0b59e6264b5b8b32369835a75b0a7b", + "case": "mut-no-take", + "compile_exit": 0, + "expected_exit": 130, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "end\nsp_take j\nif eq get scpol 5 add j 1\n", + "to": "end\nif eq get scpol 5 add j 1\n" + }, + "run_exit": 130, + "source_sha256": "583cab973283b3e8f923614bfc684e7eafaf18f38af45fe8f9c2abb55676e72b", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 12 + }, + { + "binary_sha256": "e0a506447f695c021f7bdc111f8cfb941a9d50ad49dbf63185f7445a312e0d45", + "case": "mut-cap-below-use", + "compile_exit": 0, + "expected_exit": 131, + "issue": "DRA-395", + "mutation": { + "file": "seed/node/sched.om", + "from": "if lt sp_need caps k get suse k\n", + "to": "if false\n" + }, + "run_exit": 131, + "source_sha256": "20b50ac76d9bd6d68588924a90d7f26ee6f0583dab88ceac6feab52e2d79645b", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 12 + }, + { + "binary_sha256": "343355f0dbe01e7227f44ace7ae0a442017037fce6fa77d366638ed3db3b747a", + "case": "mut287-wake-all", + "compile_exit": 0, + "expected_exit": 16, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ne and sc_cell w 32 topics 0\n", + "to": "if true\n" + }, + "run_exit": 16, + "source_sha256": "fe7f919e40bd62c6660098cc0381d667d1d864011cff3500af5ab044e0d56d7f", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 603 + }, + { + "binary_sha256": "a517eafcb92bf1173c6d34f6647fd209a2b1ddbc781bf556f9ceda44bfad99db", + "case": "mut287-no-wake", + "compile_exit": 0, + "expected_exit": 34, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "sc_set w 0 q\nsc_wake w\n", + "to": "sc_set w 0 q\n" + }, + "run_exit": 34, + "source_sha256": "44c1b3ff07b268c4d652e0c631b0c40c4b3fa26567652f9d985bb6f7aac42ceb", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 6324 + }, + { + "binary_sha256": "c88c67e4f53603660e77a6ec1ec7da649a249b568115188f74e154eba1b8803b", + "case": "mut287-review-unbounded", + "compile_exit": 0, + "expected_exit": 50, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ge sched_count 4 4 get sclim 1\n", + "to": "if false\n" + }, + "run_exit": 50, + "source_sha256": "737336f80ef6f120cfa8b0ef986b375dcd6ac6921a4075cd1e2e33348c37e2f2", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 3357 + }, + { + "binary_sha256": "76607b85dc37469da5daa894d85bc42a1ea94b68d045e5e2f47999ae008e2624", + "case": "mut287-admit-unbounded", + "compile_exit": 0, + "expected_exit": 48, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "room = ulong 0\nif lt a get sclim 0\nroom = sub get sclim 0 a\nend\n", + "to": "room = ulong 64\n" + }, + "run_exit": 48, + "source_sha256": "3fb3e43dc87ed17382994301a4421ab0f49b75d07de1d709a1251dd91157dff9", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 2841 + }, + { + "binary_sha256": "cea3dffe61dc049f2f6684e825140a6b1fd9be4eac54ad6d30062f57bf810013", + "case": "mut287-unknown-rerun", + "compile_exit": 0, + "expected_exit": 83, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "put sjst j 6\n", + "to": "put sjst j 2\n" + }, + "run_exit": 83, + "source_sha256": "63c96332b2f3144c2b41ba7593496c51a7c623577c7601e48627cb45cab6b573", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 6762 + }, + { + "binary_sha256": "4f584ab26c34690b4541ea3882addff5235bb87b34d9e3dad141a06dbff70901", + "case": "mut287-lost-no-ack", + "compile_exit": 0, + "expected_exit": 92, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "sc_set w 64 get scseq w\n", + "to": "" + }, + "run_exit": 92, + "source_sha256": "233c4f6d41c93a64244d0b99227b6aca38da8a3338f0032fab785a01618c1a96", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 5285 + }, + { + "binary_sha256": "e31c05ebde372a7c71709d5bb0043ad7126cd0d188f1f91d140f0c1e912826ed", + "case": "mut287-deps-ignored", + "compile_exit": 0, + "expected_exit": 68, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/sched.om", + "from": "put sjst j 1\n", + "to": "put sjst j 2\n" + }, + "run_exit": 68, + "source_sha256": "1698266e3a78ce8ce85bda8a9bf71ec313142479d02f0782232059962c93712b", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 3423 + }, + { + "binary_sha256": "7d5cbc2c4e1b1cf6e52c7c619ecac317055c04b0079de815d57f1bb08b6372ca", + "case": "mut287-super-spin", + "compile_exit": 0, + "expected_exit": 138, + "issue": "DRA-287", + "mutation": { + "file": "seed/node/super.om", + "from": "iv = interval\n", + "to": "iv = long 0\n" + }, + "run_exit": 138, + "source_sha256": "cb8b80d9d48250304ef46e0367d17cdcbf6f76a6eb938e27d91702a2100f7af5", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 2217 + }, + { + "binary_sha256": "b61aea9c8c594817df4adfa29cb7e6c67742606b30ca617f66ed463fd5b5dc56", + "case": "mut288-pause-ignored", + "compile_exit": 0, + "expected_exit": 121, + "issue": "DRA-288", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ne get scpause 0 0\n", + "to": "if false\n" + }, + "run_exit": 121, + "source_sha256": "b6d4ed33ef7560b4f56213c2639d344af7770c67f8597772e5644d97d3d506c0", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 743 + }, + { + "binary_sha256": "bcd7b61e22d40d2f55b12516e289e97a4863ed0a20ca85e80edf0a7a76e17570", + "case": "mut396-cursor-stuck", + "compile_exit": 0, + "expected_exit": 15, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "put scpol 4 rem add cur win 64\n", + "to": "" + }, + "run_exit": 15, + "source_sha256": "2525957b1d83ff39e1a3f6fc815330490869caee30ef93485d47155bcc40469f", + "stderr": "", + "stdout": "schedpol events=109 examined=4502 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 7176 + }, + { + "binary_sha256": "4a3568d55d8fea21e9942a04270e80bfc4429b21fc54f590e3ae84c83ab43972", + "case": "mut396-tickets-ignored", + "compile_exit": 0, + "expected_exit": 75, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if eq get scpol 6 0\nret true\n", + "to": "if true\nret true\n" + }, + "run_exit": 75, + "source_sha256": "a25c8538551b9cc55588d6d31b83dce8c778f3bd8e945cad9d711e48bc612719", + "stderr": "", + "stdout": "schedpol events=109 examined=4566 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 4336 + }, + { + "binary_sha256": "7ab84d50a9e22f417d4d76e628a26db713a91fce0f437e600ea9291a53f52d23", + "case": "mut396-no-holdback", + "compile_exit": 0, + "expected_exit": 61, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "rq = get sjneed rj\n", + "to": "rq = ulong 0\n" + }, + "run_exit": 61, + "source_sha256": "6ce7a80b09757e6b5fada250c41a844f194f530b6681fa81bbec188fc513e749", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 6808 + }, + { + "binary_sha256": "29889282c9c8c53a85177ee88fb50885ab015fc46ac9344242110d51fb9050ec", + "case": "mut396-never-reserve", + "compile_exit": 0, + "expected_exit": 61, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "put scpol 5 add o 1\n", + "to": "" + }, + "run_exit": 61, + "source_sha256": "9eba389b42def3e789cba6b12398c829c4e5b01eda38e668e74fe7ea9f989e7d", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 6812 + }, + { + "binary_sha256": "030f2340e9ab1fe8a0c22a34c02029a54b68a4abe98945312624e81ae8d8439a", + "case": "mut396-lease-never", + "compile_exit": 0, + "expected_exit": 82, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ge now d\n", + "to": "if false\n" + }, + "run_exit": 82, + "source_sha256": "f49f6764d470cc0d51390ba2a205bf99792f2c40e708143d0bee1753fcfd2012", + "stderr": "", + "stdout": "schedpol events=109 examined=4566 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 7782 + }, + { + "binary_sha256": "ab70ad111dc2423e9d157ddcef27dc9b1edc48e1e7efef52af0aacb60662df41", + "case": "mut396-cancel-keeps-reserve", + "compile_exit": 0, + "expected_exit": 94, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "put sjst j 0\nif eq get scpol 5 add j 1\nput scpol 5 0\nend\n", + "to": "put sjst j 0\n" + }, + "run_exit": 94, + "source_sha256": "cf934dbce9df6492fb330c3546a087d88a9baa241be73e04337ba6438f5bee72", + "stderr": "", + "stdout": "schedpol events=111 examined=4631 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 6636 + }, + { + "binary_sha256": "d1be75c009716f1b5c8ec05c620328df08c6e9b7d62363211f1f094ce187267e", + "case": "mut396-window-ignored", + "compile_exit": 0, + "expected_exit": 9, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "for i ulong win bound 64\n", + "to": "for i ulong 64 bound 64\n" + }, + "run_exit": 9, + "source_sha256": "49577dd283c7cf27ac722332ab303f4dbb0ba2cd21ba41e4aaca6e6d96170195", + "stderr": "", + "stdout": "schedpol events=109 examined=4566 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 7179 + }, + { + "binary_sha256": "cc841475803c0267c4c85f5f5e25fdd100aed2cdddb4cdab20900a3f69687a2a", + "case": "mut396-tickets-never-lapse", + "compile_exit": 0, + "expected_exit": 80, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if lt add get stts t get scpol 7 get scst 2\n", + "to": "if false\n" + }, + "run_exit": 80, + "source_sha256": "8272f29c79f738b1ab50d24b6671be638bc7bc5375df240f4953a1b931c2f10a", + "stderr": "", + "stdout": "schedpol events=110 examined=4631 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 5039 + }, + { + "binary_sha256": "15594ac4c3fd51618de33d8beb27593f6d5aff20585707aa6bff46e98618659f", + "case": "mut396-cursor-by-one", + "compile_exit": 0, + "expected_exit": 15, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "put scpol 4 rem add cur win 64\n", + "to": "put scpol 4 rem add cur 1 64\n" + }, + "run_exit": 15, + "source_sha256": "c56182c6b361c4a67927597117c5c770ea192d1f2eb187cdf6d44abd526da71a", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 12 + }, + { + "binary_sha256": "6aa8756ee1cc6d5bd57e9e089442a2d8cdaaecef2a4a6efdc636840b6531b9a3", + "case": "mut396-holders-by-room", + "compile_exit": 0, + "expected_exit": 105, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if eq t 0\nret true", + "to": "if lt t room\nret true" + }, + "run_exit": 105, + "source_sha256": "f16e9090daad0785db16a7ad70944006db3d43fd1db63bc8b272b13d5b752d91", + "stderr": "", + "stdout": "schedpol events=109 examined=4566 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 8179 + }, + { + "binary_sha256": "9d334c04e564656907f865bdc0127638c1edc8022bb4f2b8574a6f18a8ad23b6", + "case": "mut396-room-ignores-slots", + "compile_exit": 0, + "expected_exit": 191, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if lt fs room\nroom = fs\n", + "to": "if false\nroom = fs\n" + }, + "run_exit": 191, + "source_sha256": "22816fb04b7d79da831f478264099eee73aba95fcb9f21d154c513df42096a04", + "stderr": "", + "stdout": "schedpol events=109 examined=4567 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 8322 + }, + { + "binary_sha256": "fd04d971fd23ae033fce033c8254384ee2d6b0f715644172decc2f40e9680760", + "case": "mut396-lease-early", + "compile_exit": 0, + "expected_exit": 83, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "if ge now d\n", + "to": "if ge add now 100000000 d\n" + }, + "run_exit": 83, + "source_sha256": "021f0c9c21bec3f6c64663d7a1a4834aa409904f78e48dd799e580f7f7d0397e", + "stderr": "", + "stdout": "schedpol events=110 examined=4566 assigned=10 hol_stops=0 bypasses=4 reservations=1\n", + "verdict": "PASS", + "wall_ms": 5908 + }, + { + "binary_sha256": "b811819a6217edc8203f462ed9bd47a4ec08d53da56ec092bd883df110225632", + "case": "mut396-jn-room-before-dup", + "compile_exit": 0, + "expected_exit": 170, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/journal.om", + "from": "if ge jn_jfind id 0\nret neg long 4\nend\nif not sched_room id\nret neg long 2\nend\n", + "to": "if not sched_room id\nret neg long 2\nend\nif ge jn_jfind id 0\nret neg long 4\nend\n" + }, + "run_exit": 170, + "source_sha256": "32f3cc804c4c9a91b30d89369705274118fafb1318971b254d4e229aa777b3b8", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 3290 + }, + { + "binary_sha256": "e9012cfe1b99f92d1122f26ff75040ea1d4221ba501649aac56ab40cbea2d27d", + "case": "mut396-jn-no-room-check", + "compile_exit": 0, + "expected_exit": 173, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/journal.om", + "from": "if not sched_room id\nret neg long 2\nend\nif ne jn_rec 2 id deps flags 0\n", + "to": "if ne jn_rec 2 id deps flags 0\n" + }, + "run_exit": 173, + "source_sha256": "5d8f6e7a38034c195d4ee795b4affdd18d3009600edc454a35bb9a8e88cdc914", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 3299 + }, + { + "binary_sha256": "bc3ae8919bfde0803e31d8c1e39e1dace02578f05826f3f41b7a3148e4b7dfab", + "case": "mut396-jn-no-room-check-c17", + "compile_exit": 0, + "expected_exit": 175, + "issue": "DRA-396", + "mutation": [ + { + "file": "seed/node/journal.om", + "from": "if not sched_room id\nret neg long 2\nend\nif ne jn_rec 2 id deps flags 0\n", + "to": "if ne jn_rec 2 id deps flags 0\n" + }, + { + "file": "seed/node/journal-test.om", + "from": "jt_c16\njt_c17\n", + "to": "jt_c17\n" + } + ], + "run_exit": 175, + "source_sha256": "6d09e1563734f878761b7bd35217912324f87b25c4fcc5937d596743b1add2e3", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 3487 + }, + { + "binary_sha256": "fd9324b7fb2525fd73d76047be50d82837e1d1bfc48e462e0c6255a5570c9eba", + "case": "mut396-fifo-overcount", + "compile_exit": 0, + "expected_exit": 9, + "issue": "DRA-396", + "mutation": { + "file": "seed/node/sched.om", + "from": "for j ulong 64\nput scst 3 add get scst 3 1\n", + "to": "for j ulong 64\nput scst 3 add get scst 3 3\n" + }, + "run_exit": 9, + "source_sha256": "bac43db019ceb6b822f1839ec1a022176c5031988c451537b0b9e3e43439eb9b", + "stderr": "", + "stdout": "", + "verdict": "PASS", + "wall_ms": 11 + } + ], + "compiler": { + "path": "seed/out/omc", + "sha256": "5f90edea61bac241398df5036990d899361a5acd9decb37954ce088ec0f6f6df" + }, + "cpu_affinity": [ + 12, + 13, + 14 + ], + "execution": "NATIVE Linux AArch64 host CPU (DGX Spark host, no GPU opened)", + "hashes": { + "seed/authority/action.om": "59cb9c3dfdcd9193bc4a272deda4fcd256a0d7693f3bcb58bc4e30ed78faab2b", + "seed/node/auth-gate.om": "e58fe99ff6245ccd5a552d540c901b2225c59ade9e3026071f05838419cf92b0", + "seed/node/auth-test.om": "af66c87f83d73a5bdbaf181378eb69bb0645a86fe9b39de2f1b714041fbc20b8", + "seed/node/auth.om": "edf2f075d3751a8025363bc658252537f865dfc29f975fcf5d93c353b3282b30", + "seed/node/code-test.om": "df87a21e31f38d85ab9145af3fb18bafc52144a20aed0d9fbad60f6059ddacd0", + "seed/node/code.om": "aa9f8463fbe9534626c205e991e3a2170a25cbf91a106932ec399353583c0bf7", + "seed/node/gram.om": "ebba1f4c693f218969dc2f17eb680760977d38d694ac76db477853aefa64b291", + "seed/node/journal-gate.om": "ae9418da6250c34475d99acae85830ef763394716a045737a56a27769b1d6173", + "seed/node/journal-test.om": "58547e87068911e009fa2f99c8b995249acc6113e21c692bf2e74ec8238ea011", + "seed/node/journal.om": "b8f970d02b3f752d217f61b601817d5abc5a8c22fd2288544af15a18f628feac", + "seed/node/pool.om": "e7fba928bdc5c4194e7aee42109265de4f172d2b197946133d788b2dbcb30ccc", + "seed/node/sched-gate.om": "7299e23edf889403474b4d64a5ce6d52bb940a7e8fe87f66830419bb97e90b68", + "seed/node/sched-test.om": "29a3587d35a217403c63395eb2b11b4992727812af66512be3e452ea6381a545", + "seed/node/sched.om": "2621d47aa45b1d20878cdbb7bab28f0d81166e2a5d75f5a9d7aac52a46fc8774", + "seed/node/schedpol-gate.om": "7f42afc2358bd75ded665f6df7263fede547988b6ca43137864b834f624dbd9c", + "seed/node/schedpol-test.om": "2bae507c83e811d006a4c9e7a1e342b621d18d4539edb0d4d3ae460c291d1ba4", + "seed/node/super.om": "d104ac8116c6df57fdc93f03791d7315e5b60875d8d6177480ef9967b6f53d5a", + "seed/node/transport.om": "d0dd69ef5e0b71294a2390b3526865d62ca07accd269b9ce57a028339e34f6da" + }, + "issue": "DRA-396", + "platform": "Linux 7.0.0-1019-nvidia aarch64 spark-b87b", + "project": "P-DRA-14", + "script": { + "cases": { + "cases": [ + { + "case": "schedpol-gate", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "expect": 0, + "gate": "seed/node/schedpol-gate.om", + "issue": "DRA-395", + "repeat": 10, + "stdout_has": [ + "PASS node schedpol" + ], + "timeout": 120 + }, + { + "args": [ + "fifo" + ], + "case": "schedpol-gate-fifo", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "expect": 11, + "gate": "seed/node/schedpol-gate.om", + "issue": "DRA-396", + "repeat": 5, + "stdout_has": [ + "schedpol hol witness head=20050 fits_behind=30050 free_cpu=1 idle_worker=1", + "schedpol hol witness head=20050 fits_behind=50050 free_cpu=1 idle_worker=1" + ], + "timeout": 120 + }, + { + "args": [ + "noreserve" + ], + "case": "schedpol-gate-noreserve", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "expect": 61, + "gate": "seed/node/schedpol-gate.om", + "issue": "DRA-396", + "repeat": 5, + "timeout": 120 + }, + { + "case": "sched-gate", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "expect": 0, + "gate": "seed/node/sched-gate.om", + "issue": "DRA-287" + }, + { + "case": "auth-gate", + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/auth-test.om" + ], + "expect": 0, + "gate": "seed/node/auth-gate.om", + "issue": "DRA-288" + }, + { + "case": "journal-gate", + "clean": [ + "build/node/jt" + ], + "compose": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/journal-test.om" + ], + "expect": 0, + "gate": "seed/node/journal-gate.om", + "issue": "DRA-289" + }, + { + "args": [ + "unit", + "build/node/cu" + ], + "case": "code-test-unit", + "clean": [ + "build/node/cu" + ], + "expect": 0, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/gram.om", + "seed/node/code.om", + "seed/node/code-test.om" + ], + "issue": "DRA-290", + "om2": true + }, + { + "case": "mut-impossible-admitted", + "expect": 31, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "if not sp_feas req\n", + "if false\n" + ], + "why": "C: impossible request admitted; check sched_admitr == -8 code 31" + }, + { + "case": "mut-collect-no-release", + "expect": 133, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "j = sub b 1\nsp_give j\n", + "j = sub b 1\n" + ], + "why": "C: jobs reviewed still hold; pt_inv in pt_drain code 133" + }, + { + "case": "mut-capacity-ignored", + "expect": 44, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "if gt sp_need req k a\n", + "if false\n" + ], + "why": "D: use exceeds capacity; pt_inv in pt_drain code 44" + }, + { + "args": [ + "fifo" + ], + "case": "mut-ready-unstamped", + "expect": 54, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "if ne and get sjdep j topics 0\nsp_ready j\n", + "if ne and get sjdep j topics 0\nput sjst j 2\n" + ], + "why": "F under fifo: ready order wrong, y not first; code 54" + }, + { + "case": "mut-give-after-review", + "expect": 122, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "j = sub b 1\nsp_give j\nif ge sched_count 4 4 get sclim 1\ncontinue\nend\n", + "j = sub b 1\nif ge sched_count 4 4 get sclim 1\ncontinue\nend\nsp_give j\n" + ], + "why": "V: second CPU not released while review full; suse==0 code 122" + }, + { + "case": "mut-no-take", + "expect": 130, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "end\nsp_take j\nif eq get scpol 5 add j 1\n", + "end\nif eq get scpol 5 add j 1\n" + ], + "why": "C: running unfinished job holds nothing; pt_inv in pt_until code 130" + }, + { + "case": "mut-cap-below-use", + "expect": 131, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-395", + "mutate": [ + "seed/node/sched.om", + "if lt sp_need caps k get suse k\n", + "if false\n" + ], + "why": "C: sched_cap below use accepted; == -8 code 131" + }, + { + "case": "mut287-wake-all", + "expect": 16, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "if ne and sc_cell w 32 topics 0\n", + "if true\n" + ] + }, + { + "case": "mut287-no-wake", + "expect": 34, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "sc_set w 0 q\nsc_wake w\n", + "sc_set w 0 q\n" + ] + }, + { + "case": "mut287-review-unbounded", + "expect": 50, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "if ge sched_count 4 4 get sclim 1\n", + "if false\n" + ] + }, + { + "case": "mut287-admit-unbounded", + "expect": 48, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "room = ulong 0\nif lt a get sclim 0\nroom = sub get sclim 0 a\nend\n", + "room = ulong 64\n" + ], + "why": "DRA-287 sched-gate admission-limit check: headroom ignored, admissions beyond the limit; 48 (pattern moved with the DRA-396 room rewrite)" + }, + { + "case": "mut287-unknown-rerun", + "expect": 83, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "put sjst j 6\n", + "put sjst j 2\n" + ] + }, + { + "case": "mut287-lost-no-ack", + "expect": 92, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "sc_set w 64 get scseq w\n", + "" + ] + }, + { + "case": "mut287-deps-ignored", + "expect": 68, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/sched.om", + "put sjst j 1\n", + "put sjst j 2\n" + ] + }, + { + "args": [ + "idle" + ], + "case": "mut287-super-spin", + "expect": 138, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/sched-test.om" + ], + "issue": "DRA-287", + "mutate": [ + "seed/node/super.om", + "iv = interval\n", + "iv = long 0\n" + ] + }, + { + "case": "mut288-pause-ignored", + "expect": 121, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/auth-test.om" + ], + "issue": "DRA-288", + "mutate": [ + "seed/node/sched.om", + "if ne get scpause 0 0\n", + "if false\n" + ] + }, + { + "case": "mut396-cursor-stuck", + "expect": 15, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "put scpol 4 rem add cur win 64\n", + "" + ], + "why": "pt_cursor (exit 15) checks after every step that the cursor moved by win per window scan mod 64; with win 64 that is no move, so phases before W pass; the first scan in W (win 4) leaves the cursor in place where 4 slots were expected: 15" + }, + { + "case": "mut396-tickets-ignored", + "expect": 75, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if eq get scpol 6 0\nret true\n", + "if true\nret true\n" + ], + "why": "Q: with room, Y asking before ticket holder X is admitted; code 75" + }, + { + "case": "mut396-no-holdback", + "expect": 61, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "rq = get sjneed rj\n", + "rq = ulong 0\n" + ], + "why": "S: smalls refill freed CPU, big never runs; first check code 61" + }, + { + "case": "mut396-never-reserve", + "expect": 61, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "put scpol 5 add o 1\n", + "" + ], + "why": "S: no reservation, big never runs; first check code 61" + }, + { + "case": "mut396-lease-never", + "expect": 82, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if ge now d\n", + "if false\n" + ], + "why": "L: sched_overdue never reports; eq o h code 82" + }, + { + "case": "mut396-cancel-keeps-reserve", + "expect": 94, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "put sjst j 0\nif eq get scpol 5 add j 1\nput scpol 5 0\nend\n", + "put sjst j 0\n" + ], + "why": "R: reservation survives cancel; sched_stat 29 == 0 code 94" + }, + { + "case": "mut396-window-ignored", + "expect": 9, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "for i ulong win bound 64\n", + "for i ulong 64 bound 64\n" + ], + "why": "pt_step bound (exit 9): candidate reads <= events x db x (win+1); in W (win 4, db 2) one pick scanning 64 slots reads 65 > 2 x 5 = 10 per event: 9" + }, + { + "case": "mut396-tickets-never-lapse", + "expect": 80, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if lt add get stts t get scpol 7 get scst 2\n", + "if false\n" + ], + "why": "Q: stale ticket of 150050 blocks new caller 160050; ge 0 code 80" + }, + { + "case": "mut396-cursor-by-one", + "expect": 15, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "put scpol 4 rem add cur win 64\n", + "put scpol 4 rem add cur 1 64\n" + ], + "why": "pt_cursor (exit 15): in W (win 4) a scan moves the cursor by 1 instead of 4, so cursor != u0 + 4 x scans mod 64 at the first step that scans: 15 (with win 64, 1 vs 0 mod 64 also differs, so it may trip in phase A already; same exit)" + }, + { + "case": "mut396-holders-by-room", + "expect": 105, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if eq t 0\nret true", + "if lt t room\nret true" + ], + "why": "T: second holder Y enters with two openings; 105" + }, + { + "case": "mut396-room-ignores-slots", + "expect": 191, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if lt fs room\nroom = fs\n", + "if false\nroom = fs\n" + ], + "why": "X: table full of review results, sched_room true; 191" + }, + { + "case": "mut396-lease-early", + "expect": 83, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "if ge now d\n", + "if ge add now 100000000 d\n" + ], + "why": "L: overdue reported before the stored deadline; 83" + }, + { + "case": "mut396-jn-room-before-dup", + "clean": [ + "build/node/jt" + ], + "expect": 170, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/journal-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/journal.om", + "if ge jn_jfind id 0\nret neg long 4\nend\nif not sched_room id\nret neg long 2\nend\n", + "if not sched_room id\nret neg long 2\nend\nif ge jn_jfind id 0\nret neg long 4\nend\n" + ], + "why": "journal case 16: duplicate at the limit gets -2 and a ticket, not -4; 170" + }, + { + "case": "mut396-jn-no-room-check", + "clean": [ + "build/node/jt" + ], + "expect": 173, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/journal-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/journal.om", + "if not sched_room id\nret neg long 2\nend\nif ne jn_rec 2 id deps flags 0\n", + "if ne jn_rec 2 id deps flags 0\n" + ], + "why": "journal-gate case 16 runs before 17: jn_admit 7003 at the limit now journals ADMIT and sched_admit refuses (-2, 172 holds, ticket count 1 holds); after the cancel, jn_admit 7003 finds 7003 in the journal and returns -4, so jt_ok ge ... 173 fails: 173" + }, + { + "case": "mut396-jn-no-room-check-c17", + "clean": [ + "build/node/jt" + ], + "expect": 175, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/authority/action.om", + "seed/node/journal.om", + "seed/node/auth.om", + "seed/node/journal-test.om" + ], + "issue": "DRA-396", + "mutate": [ + [ + "seed/node/journal.om", + "if not sched_room id\nret neg long 2\nend\nif ne jn_rec 2 id deps flags 0\n", + "if ne jn_rec 2 id deps flags 0\n" + ], + [ + "seed/node/journal-test.om", + "jt_c16\njt_c17\n", + "jt_c17\n" + ] + ], + "why": "case 16 is not run (removed from main), so case 17 is the first to meet the missing room check: jn_admit 9001 journals ADMIT (jseq grows) and sched_admit refuses (-2, 174 holds; ticket count 1 holds); jt_ok eq get jseq 0 q 175 fails: 175" + }, + { + "args": [ + "fifo" + ], + "case": "mut396-fifo-overcount", + "expect": 9, + "fragments": [ + "seed/node/transport.om", + "seed/node/pool.om", + "seed/node/super.om", + "seed/node/sched.om", + "seed/node/schedpol-test.om" + ], + "issue": "DRA-396", + "mutate": [ + "seed/node/sched.om", + "for j ulong 64\nput scst 3 add get scst 3 1\n", + "for j ulong 64\nput scst 3 add get scst 3 3\n" + ], + "timeout": 120, + "why": "run with fifo: every pick under policy 0 now counts 192 reads; pt_step bound (exit 9) allows (assigned + events) x 64 per step, and a step with p picks has assigned + events >= p and <= p + 1 ... at the first step with a pick, 192p > 64(p+1) for p >= 1: 9 (phase A, before its head-of-line exit 11)" + } + ], + "issue": "DRA-396", + "statuses": { + "DRA-396": "IMPLEMENTED, EXERCISED on native host; not QUALIFIED; not MERGED; not DEPLOYED", + "expected_exits": "derived from the check site each mutant targets (field why), before the run; DRA-287/288 mutants carry their original derivations from those PRs", + "gpu": "NOT_RUN (not involved)" + } + }, + "cases_sha256": "65d670c564c38d4f56fa4a19e407d65f4b252e2d3e9164c4ceb50b0bac910c6b", + "path": "~/handoffs/hive/sched/bin/receipt.py", + "sha256": "edf71900d19a79281e14d7ad3db0a7d3265fb74a8ce5b5cb72eb68a97d615b41", + "source": "#!/usr/bin/env python3\n\"\"\"Run a scheduler-policy case list against a clean omega-mv checkout and\nwrite a content-addressed receipt (evidence//receipt..json).\n\nUsage: receipt.py CASES.json REPO OUTDIR_REL [--write]\nRun it under the queen pool lock, e.g.\n flock -o ~/handoffs/hive/queen/pool-8-9.lock taskset -c 8-9 nice -n 10 receipt.py ...\n\nA case: {\"case\", \"issue\", \"fragments\": [paths] | \"gate\": path, \"om2\": bool,\n \"mutate\": [path, old, new] or a list of them (optional; each old must\n occur exactly once in its fragment),\n \"args\": [..], \"expect\": int, \"timeout\": s, \"clean\": [rel dirs removed first],\n \"stdout_has\": [substrings every run must print] (optional),\n \"repeat\": N runs, each must pass (optional, default 1)}.\nThe receipt embeds this script's source and the case list for replay.\nMutants are applied to a disposable copy of the fragment; the checkout is\nnever modified. Verification tooling only: the implementation is the .om.\n\"\"\"\nimport hashlib, json, os, platform, shutil, subprocess, sys, tempfile, time, datetime\n\ndef sh(cmd, cwd, **kw):\n return subprocess.run(cmd, cwd=cwd, capture_output=True, **kw)\n\ndef sha(path):\n h = hashlib.sha256()\n with open(path, 'rb') as f:\n h.update(f.read())\n return h.hexdigest()\n\ndef main():\n cases_path, repo, outrel = sys.argv[1], os.path.abspath(sys.argv[2]), sys.argv[3]\n write = '--write' in sys.argv\n spec = json.load(open(cases_path))\n dirty = sh(['git', 'status', '--porcelain', '--untracked-files=normal'], repo).stdout.decode()\n dirty = [l for l in dirty.splitlines() if not l[3:].startswith('build/')]\n if dirty:\n print('REFUSED: dirty tree\\n' + '\\n'.join(dirty), file=sys.stderr)\n sys.exit(3)\n head = sh(['git', 'rev-parse', 'HEAD'], repo).stdout.decode().strip()\n tree = sh(['git', 'rev-parse', 'HEAD^{tree}'], repo).stdout.decode().strip()\n omc = os.path.join(repo, 'seed/out/omc')\n work = tempfile.mkdtemp(prefix='schedrcpt-')\n files = set()\n results = []\n for c in spec['cases']:\n frags = c.get('fragments') or [c['gate']]\n src = b'om2\\n' if c.get('om2') else b''\n mut = c.get('mutate')\n muts = (mut if mut and isinstance(mut[0], list) else [mut]) if mut else []\n for m in muts:\n if m[0] not in frags:\n print(f'REFUSED: mutant {c[\"case\"]}: {m[0]} is not one of its fragments', file=sys.stderr)\n sys.exit(4)\n for fr in frags:\n files.add(fr)\n data = open(os.path.join(repo, fr), 'rb').read()\n for m in muts:\n if m[0] != fr:\n continue\n old, new = m[1].encode(), m[2].encode()\n n = data.count(old)\n if n != 1:\n print(f'REFUSED: mutant {c[\"case\"]}: pattern occurs {n} times', file=sys.stderr)\n sys.exit(4)\n data = data.replace(old, new)\n src += data\n if c.get('gate') and not mut and c.get('compose'):\n composed = b''.join(open(os.path.join(repo, f), 'rb').read() for f in c['compose'])\n if composed != src:\n print(f'REFUSED: {c[\"gate\"]} is not the concatenation', file=sys.stderr)\n sys.exit(5)\n binp = os.path.join(work, c['case'])\n p = subprocess.run([omc], input=src, capture_output=True)\n with open(binp, 'wb') as f:\n f.write(p.stdout)\n os.chmod(binp, 0o755)\n r = {'case': c['case'], 'issue': c.get('issue'), 'compile_exit': p.returncode,\n 'expected_exit': c['expect'], 'source_sha256': hashlib.sha256(src).hexdigest()}\n if muts:\n ms = [{'file': m[0], 'from': m[1], 'to': m[2]} for m in muts]\n r['mutation'] = ms[0] if len(ms) == 1 else ms\n if p.returncode != 0:\n r.update(run_exit=None, verdict='FAIL', stderr=p.stderr.decode(errors='replace'))\n results.append(r)\n continue\n runs, code, out, err = [], None, b'', b''\n t0 = time.monotonic()\n for n in range(c.get('repeat', 1)):\n for d in c.get('clean', []):\n shutil.rmtree(os.path.join(repo, d), ignore_errors=True)\n try:\n q = subprocess.run([binp] + c.get('args', []), cwd=repo, capture_output=True,\n timeout=c.get('timeout', 120))\n code, out, err = q.returncode, q.stdout, q.stderr\n except subprocess.TimeoutExpired as e:\n code, out, err = 'timeout', e.stdout or b'', e.stderr or b''\n text = out.decode(errors='replace')\n miss = [s for s in c.get('stdout_has', []) if s not in text]\n runs.append({'exit': code, 'missing_stdout': miss})\n ok = all(x['exit'] == c['expect'] and not x['missing_stdout'] for x in runs)\n r.update(run_exit=code, wall_ms=int((time.monotonic() - t0) * 1000),\n stdout=out.decode(errors='replace')[-4000:],\n stderr=err.decode(errors='replace')[-2000:],\n binary_sha256=sha(binp),\n verdict='PASS' if ok else 'FAIL')\n if c.get('stdout_has'):\n r['stdout_has'] = c['stdout_has']\n if len(runs) > 1:\n hist = {}\n for x in runs:\n k = f\"{x['exit']}{'' if not x['missing_stdout'] else ' missing-stdout'}\"\n hist[k] = hist.get(k, 0) + 1\n r['repeat'] = {'runs': len(runs), 'outcomes': hist}\n results.append(r)\n print(f\"{r['verdict']} {c['case']} expect={c['expect']} got={code}\"\n + (f\" runs={r['repeat']['outcomes']}\" if len(runs) > 1 else ''), flush=True)\n shutil.rmtree(work, ignore_errors=True)\n rec = {\n 'project': 'P-DRA-14', 'issue': spec['issue'], 'source_commit': head, 'source_tree': tree,\n 'platform': ' '.join([platform.system(), platform.release(), platform.machine(), platform.node()]),\n 'cpu_affinity': sorted(os.sched_getaffinity(0)),\n 'execution': 'NATIVE Linux AArch64 host CPU (DGX Spark host, no GPU opened)',\n 'timestamp_utc': datetime.datetime.now(datetime.timezone.utc).isoformat(),\n 'compiler': {'path': 'seed/out/omc', 'sha256': sha(omc)},\n 'hashes': {f: sha(os.path.join(repo, f)) for f in sorted(files)},\n 'script': {'path': '~/handoffs/hive/sched/bin/receipt.py', 'sha256': sha(__file__),\n 'source': open(__file__).read(),\n 'cases_sha256': sha(cases_path), 'cases': spec},\n 'statuses': spec.get('statuses', {}),\n 'checks': results,\n 'summary': {'pass': sum(r['verdict'] == 'PASS' for r in results),\n 'fail': sum(r['verdict'] != 'PASS' for r in results)},\n }\n body = (json.dumps(rec, indent=2, sort_keys=True) + '\\n').encode()\n digest = hashlib.sha256(body).hexdigest()\n print(f\"summary pass={rec['summary']['pass']} fail={rec['summary']['fail']} receipt_sha256={digest}\")\n if write:\n d = os.path.join(repo, outrel)\n os.makedirs(d, exist_ok=True)\n path = os.path.join(d, f'receipt.{digest}.json')\n with open(path, 'wb') as f:\n f.write(body)\n print(path)\n else:\n with open(os.path.join(tempfile.gettempdir(), f'sched-receipt-{digest}.json'), 'wb') as f:\n f.write(body)\n sys.exit(0 if rec['summary']['fail'] == 0 else 1)\n\nmain()\n" + }, + "source_commit": "44065b1929e9587b4aee09701e1805b5a9bbf3c7", + "source_tree": "e98c0700ae27de995b42bb3ab49e85b16ec9c016", + "statuses": { + "DRA-396": "IMPLEMENTED, EXERCISED on native host; not QUALIFIED; not MERGED; not DEPLOYED", + "expected_exits": "derived from the check site each mutant targets (field why), before the run; DRA-287/288 mutants carry their original derivations from those PRs", + "gpu": "NOT_RUN (not involved)" + }, + "summary": { + "fail": 0, + "pass": 39 + }, + "timestamp_utc": "2026-11-07T06:40:11.633303+00:00" +} From 41fbd00f40b9b10918c21a4141df821604c8f6e5 Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Sat, 7 Nov 2026 00:40:19 -0600 Subject: [PATCH 19/20] chore(crumb): recompile after DRA-396 receipt --- .crumb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.crumb b/.crumb index fbada92c5..5112938d6 100644 --- a/.crumb +++ b/.crumb @@ -108,14 +108,14 @@ } ], "children_root": "sha256:966bedb54caa4209f9ab84526da66f6b13ce72e8831470170364eb5881355748", - "compiled_at": "2026-11-07T06:35:33Z", + "compiled_at": "2026-11-07T06:40:17Z", "compiler": "crumb-compile/1", - "digest": "sha256:12b655ae035f3a45c0a1817e480fd045d50f3d7bfd119f19ce4628864f09131b", - "evidence_files": 15705, - "evidence_root": "sha256:4a6b72b3f73e2fbe644e4894a957d3573ca27eade0821ec6cb76b30904497b2c", - "files": 24266, - "generated_at_commit": "d2bb69bc148eda7320f518319510b461775c7950", - "source_tree": "sha256:80508c54d8044703321e7d09827834040ec107de6a4a807554aef46d563720be" + "digest": "sha256:53f9b3e443924027f317448d2c90774927c4261bdfcff4d1dcda64ba58bf5b29", + "evidence_files": 15706, + "evidence_root": "sha256:ca1ae28bec5a8001136bfc6307f983fc89a18b568c2cc5ff6c46af06eb471dcc", + "files": 24267, + "generated_at_commit": "ff320ecb1e13405cf6092f8651df7648d8cb656a", + "source_tree": "sha256:bdeb40ca5c4c9d288669b13932ca55891fa1427a6207e184b2e50b11d54c5614" }, "owner_lane": "", "provenance": { From 9dcc6de45ffd211cc823c83caf2b04125aa4c115 Mon Sep 17 00:00:00 2001 From: Drake Stapleton <213298340+drakestapleton@users.noreply.github.com> Date: Sat, 7 Nov 2026 00:43:02 -0600 Subject: [PATCH 20/20] docs(contributors): DRA-396 credit row after reviews r3 and r4 --- .crumb | 8 ++++---- CONTRIBUTORS.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.crumb b/.crumb index 5112938d6..5b5670ab1 100644 --- a/.crumb +++ b/.crumb @@ -108,14 +108,14 @@ } ], "children_root": "sha256:966bedb54caa4209f9ab84526da66f6b13ce72e8831470170364eb5881355748", - "compiled_at": "2026-11-07T06:40:17Z", + "compiled_at": "2026-11-07T06:43:03Z", "compiler": "crumb-compile/1", - "digest": "sha256:53f9b3e443924027f317448d2c90774927c4261bdfcff4d1dcda64ba58bf5b29", + "digest": "sha256:9a80657c28609831363202ba49e4e6cc44d4790468e6ff1562c4071cfdae8290", "evidence_files": 15706, "evidence_root": "sha256:ca1ae28bec5a8001136bfc6307f983fc89a18b568c2cc5ff6c46af06eb471dcc", "files": 24267, - "generated_at_commit": "ff320ecb1e13405cf6092f8651df7648d8cb656a", - "source_tree": "sha256:bdeb40ca5c4c9d288669b13932ca55891fa1427a6207e184b2e50b11d54c5614" + "generated_at_commit": "d4474157db84e4b0b02904b246dddfc0ac2a9895", + "source_tree": "sha256:047d95680f73d95961f1e53a99926e62f34ca4d8c9c3ef7239f240d8c7b721a0" }, "owner_lane": "", "provenance": { diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 47bc5fc53..e0108a2b5 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -14,7 +14,7 @@ The current development method is [Human-Directed Agentic Engineering (HDAE)](RE | Claude Opus 5.5 (via omp) | DRA-289 for `seed/node`: `journal.om`, a checksummed append-only journal of every authority transition (OPEN, ADMIT, START, DONE, RELEASE, REVOKE, PAUSE, CANCEL), each checked by the recovery tables, written and fdatasync'd before anything acts on it or publishes it; a failed write or sync stops all later appends. `flock` fencing that forked workers also hold, fence numbers per creator incarnation, torn-tail cutting, refusal of corrupt records, other format versions and other objectives. Restart recovery settles operations left in flight (idempotent class 3 by its key, class 1 UNKNOWN and never rerun), releases or readmits each job, and restores authority generation and pause. `auth.om` journals through it and accepts class 3. `journal-gate.om` crashes real creators at every boundary, SIGKILLs them mid-tool and checks the result with its own reader; ten negative controls. Native AArch64 host evidence only; not QUALIFIED on the Spark gate. | | Claude Opus 5.5 (via omp) | DRA-290 for `seed/node`: `code.om`, the coding workflow driving the own Omega model (round40 checkpoint, served by aien-train `ollm serve` `/v1/completions`, aien-train #76) through the Node's scheduler, authority and journal: one inference at a time, typed read/check/replace jobs and a review check, each a cancellable child process group, the round40 repair policy enforced by the creator before every grant, explicit failure reasons and no fallback provider. `infer.om`, a bounded loopback-only completion client returning a versioned record; `tool.om`, the read/check/replace tools inside one root with omagent's path rule (moved to `seed/agent/path.om`), durable replace and sandboxed tests; `gram.om`, the repair grammar. `code-test.om` (54 checks, 15 mutants), `tests/tool-replay.py` (all 108 recorded round40 runs) and live own-model runs with cancellation and crash restart. `seed/agent/agent.om` now kills the tool's whole process group; `seed/authority/action.om` renames a local so the node composes as OM-2. Native AArch64 host evidence only; not QUALIFIED on the Spark gate. | | Claude Opus 5.5 (via omp, sched lane) | P-DRA-14 DRA-395 for `seed/node`: reconciled scheduler ownership (the spark-harness `Core::pump` at aien-sovereign-core-mv `dffdbd19` is reference-only and not deployed) and reproduced its head-of-line block in Rust and natively. `sched.om` gains four-kind resource requests packed in one word, capacity admission that refuses impossible requests and capacities below use, atomic take and release (also while a result waits for review room), and policy 0 (FIFO with the pump's head-of-line stop rule) behind one `sched_dispatch`. `schedpol-test.om` checks the capacity invariant after every creator step; its blocked-head phases print a checked witness and fail (exit 11) until fair fitting lands (DRA-396). Seven negative controls; independent review by openai-codex/gpt-6-astra. Native AArch64 host evidence only. | -| Claude Opus 5.5 (via omp, sched lane) | P-DRA-14 DRA-396 for `seed/node`: policy 1 in `sched.om`, now the default: fair fitting over a bounded window from a persistent cursor that moves on by the window after every window scan, oldest admitted first, a bypass budget that reserves the oldest bypassed job and holds back the capacity it still lacks, admission tickets in strict order with room bounded by free table slots (`sched_room`, also asked by `jn_admit` after its duplicate check), and leases reported once by `sched_overdue`. Candidate reads, maintenance reads and the cursor's movement per window scan are checked at every step. `schedpol-test.om` adds starvation, ticket, lease, reserved-cancel, window, ticket-order, full-table and review-liveness phases, with `fifo` and `noreserve` controls (exits 11 and 61); `journal-test.om` cases 16 and 17; fourteen DRA-396 mutants. Independent reviews r1 and r2 by openai-codex/gpt-6-astra. Native AArch64 host evidence only. | +| Claude Opus 5.5 (via omp, sched lane) | P-DRA-14 DRA-396 for `seed/node`: policy 1 in `sched.om`, now the default: fair fitting over a bounded window from a persistent cursor that moves on by the window after every window scan, oldest admitted first, a bypass budget that reserves the oldest bypassed job and holds back the capacity it still lacks, admission tickets in strict order with room bounded by free table slots (`sched_room`, also asked by `jn_admit` after its duplicate check), and leases reported once by `sched_overdue`. Candidate reads (bounded by actual picks), maintenance reads and the cursor's movement per window scan are checked at every step and around publish and resume dispatch. `schedpol-test.om` adds starvation, ticket, lease, reserved-cancel, window, ticket-order, full-table and review-liveness phases, with `fifo` and `noreserve` controls (exits 11 and 61); `journal-test.om` cases 16 and 17; sixteen DRA-396 mutants, one of them two mutations in one case. Independent reviews r1 to r4 by openai-codex/gpt-6-astra. Native AArch64 host evidence only. | | Grok 4.7 (via Cursor Agent) | Merged main `fd3751b31` (#1020, carrying #1045 and #1050) into #1052. The only conflict was the generated root `.crumb` (child `last_commit` stamps, the `tests` digest, and the root digest). Recompiled with the crumb.lock tool (`d0f0b95d`); `crumb verify .` current. The #525/#962 pins were left as committed: `src/checker2/c2_check.c`, `src/compiler/osc_ir.c` and `src/compiler/osc_ir.h` still hash to the SHA-256s in `ACCEPTED`. | | Claude Opus 5.5 (via omp) | #1020 (actions/cache-4.3.0 ->6.1.0): merged main `d3d1b1bc` and recompiled the root crumb with the crumb.lock tool (`d0f0b95d`). The root crumb's source tree covers `.github/workflows/`, so the bump alone left it stale and `AIEN Checks` failed at `crumb verify .` (`1 of 188 crumbs stale`). | | Claude Opus 5.5 (via omp) | #1018 (actions/upload-artifact-4 ->7): merged main `d3d1b1bc` and recompiled the root crumb with the crumb.lock tool (`d0f0b95d`). The root crumb's source tree covers `.github/workflows/`, so the bump alone left it stale and `AIEN Checks` failed at `crumb verify .` (`1 of 188 crumbs stale`). |