DrumsBench

Research notes / 2026-10-25

The shared-runtime model

One booted base runtime, private mutable state per attempt, copy-on-write, the reset and branch paths, and the exact list of state that must be scoped for training correctness.

A shared runtime means one operating system and one set of already-started applications serve many attempts at once. Each attempt sees its own files, its own clipboard, its own screen and its own input. The code, the kernel and the warmed caches are shared. This note describes the model and, more importantly, the list of things that break it.

The parts

PartWhat it isShared or private
Base runtimeThe booted kernel, system services, installed applications, warmed code pagesshared, read-only
Private mutable stateThe attempt's documents, profile, preferences, clipboard, window state, temp filesprivate per attempt
GenerationA counter per attempt that increases on every reset or branch; every mutating call carries itprivate per attempt
VerifierCode that reads the final state and returns a result; runs outside the attemptshared service, per-attempt rows
attempt Aattempt Battempt Cprivate page(written by B)readreadcopy onfirst writeshared base: running OS + initialized apps, read-onlyB changed one page of its own copy. The base did not change,so A and C still see it; B sees its page and the rest of the base.
Copy-on-write: every attempt starts as a reference to the same prepared state and only the blocks it changes are copied. A reset discards the private delta; a branch makes a second delta from the same base.

Copy-on-write, in plain words

Copy-on-write means two copies of something share the same bytes until one of them writes. Only the changed part is duplicated. It exists at several layers, and they are not interchangeable:

Reset, replay, restore, branch

prepared state(checkpoint)env01env02env03reset: back to the checkpointreset = kill apps, clear pasteboard,swap ~/work for a fresh clone, then g+1env02 generationg=1g=2g=3action, g=1appliedaction, g=1 (late)409 stale_gen, not appliedaction, g=3applied
Four paths from a prepared state. Reset throws the delta away and starts a new generation from the base. Restore brings back a saved snapshot (files, and on Linux with CRIU also processes). Branch makes two independent continuations from one intermediate state. Replay re-applies a recorded action list to a fresh reset; it is a check, not a mechanism.

The generation counter

Every attempt has an integer generation. Every mutating call (click, type, launch, clipboard write, reset) carries the generation it was issued for. The check and the effect are one atomic step, so a reset cannot land between them. A call with an old generation is refused with an error (HTTP 409 in our implementation), does nothing, and the action log must show it was never applied. CUA-Sandbox published the same protocol with a measured check: 0 of 100 mixed-generation events with the protocol on, 100 of 100 with it off (author-reported). Our isolation test 10 repeats that check with 100 resets fired mid-step.

What must be scoped

This is the list that decides whether sharing is correct for training. Each item is a place where one attempt's state can reach another's. If any one of them is shared, a reward can be wrong and the training data is poisoned without anyone noticing.

StateWhy it mattersHow it is scoped (design)
Files and home directorydocuments, profiles, autosave, recent-files listsprivate tree per attempt, manifest-checked after reset
Clipboardcopy in one attempt, paste in anotherper-session pasteboard on macOS; per-display clipboard on Linux; cleared on reset
Display and screenshotsone attempt's pixels in another's observationown window-server session on macOS; own virtual display on Linux
Input events and modifier keysa held Shift in one attempt capitalises text in anotherown event tap per session; modifier leak is an explicit test
Focus and dialogsa Save As dialog in one attempt steals keys from anotherper-session frontmost app; dialog steal is an explicit test
IPC and message busesD-Bus names, X connections, listening socketsper-attempt bus and display; a forked process duplicating a bus name was one of five measured breakages (EXP-004)
Caches and indexesderived state that is cheap to rebuild and wrong to shareprivate prefix per attempt, rebuilt not copied
Preferences daemonsa preference written by one attempt read by anotherper-user daemon; restarted on reset
Asynchronous jobsautosave timers, background sync, crash reporterskilled at reset; a reset that cannot kill them fails rather than proceeding
Open handles and locksa POSIX lock lost across restore makes a database think it is unlockedlock census before resume; the open failure in EXP-009
Network identityports, hostnames, cookiesown port per attempt; a restored Linux container with a broken loopback was the finding in EXP-010
Randomnessrestored clones sharing RNG state produce identical "random" behaviourreseed after restore (hygiene)

Not a security boundary

Scoping the list above is enough for training correctness if, and only if, the checks confirm it. It is not a security boundary. On macOS every session shares one kernel, one WindowServer and one root; a process in one session is one user account away from another, not one machine away. On Linux every namespace shares the host kernel. An agent that runs arbitrary code can cross any of these on purpose. Published VM-based systems name kernel isolation as a security requirement for exactly that reason (EvoCUA, author-stated). Drums measures accidental cross-talk over stated environment-hours; it does not defend against a hostile agent.

The variants we are building or comparing

VariantUnit of an environmentSharedPrivateRestore of processesStatus
macOS sessionsone macOS user logged in to its own GUI sessionkernel, WindowServer, root, network, system privacy databasepasteboard, preferences daemon, privacy daemon state, home, event stream, Dock and Findernone (no process checkpoint on macOS); APFS clone swap of the work treeharness tests pass on the target Mac (EXP-001); no density or isolation number yet
Linux OCI container plus CRIU (reference arm)one runc container over the same desktop imagehost kernelnamespaces, overlay rootfs, cgroup limitsyes, CRIU 4.3 through runc 1.5.2restore reached with a broken network namespace; cause found and a holder fix shown on a minimal container (EXP-010)
Linux custom rootfs slot (candidate arm)one private-namespace tree over a read-only mount of the same desktop imagehost kernel, read-only imageoverlay, pid and mount namespaces, cgroupyes, CRIU 4.3 with a --root contractdump reached; restore loses a POSIX lock on a mapped file, unresolved (EXP-008, EXP-009)
Linux VM with N virtual displays (comparison arm on the same Mac)one user and one Xvfb display inside one Ubuntu VMthe VM's kernel and userlanddisplay, clipboard, home, input per displaynone (files via reflink)source only (EXP-017)