Repository navigation
Description
Spec: the draft devlore_authorization_specification.md of 2026-10-16 (in the owner's hands, not yet in the tree) supersedes 6.1-privilege-elevation.md; it lands as 6.1-authorization.md with a status companion through #1116's first task. Neighbours: 6 owns the policy triplet, 6.2 the execution hosts, 6.3 the form of a command, 2.6 the per-unit requirement's place, 2.7 the wire.
Ruled 2026-10-21
- The term is authorization: what a unit requires and a broker grants. Running a process under an account other than the caller's is one case of it, an elevation, which guarantees access to a command runner standing for that account.
authzreplaceselevationandelevatoras the provider package name. Theelevatorstub is dead and is removed (elevator is removed: the stub is dead, and its rename plan is withdrawn #679). This epic's label isEpic:Authorization, renamed fromEpic:ElevationPolicy. - Enums are strings, for readability. The draft's int constants are replaced; the empty string is the zero value and means defer.
- There is no "whether". A command runner stands for one account, root or not, and runs many commands under it. The pkg installers are augmented to obtain the runner they need.
NeedsSudo()becomes "which account";runCommand(argv, sudo bool)goes. - The execution model is a pool of command-runner daemons, one per account, all the same binary, holding no shell: every command is a fresh child, by argv or by
shon a static script file (6.3). A runner runs many commands at once and pumps each child's fds without blocking it. Calls may be brokered through a broker daemon that authenticates the socket's peer, authorizes the account and routes, or go direct to the caller's own runner. Local transport is a Unix domain socket or a Windows named pipe; remote is TLS; HTTP/2 (ruled against HTTP/3 the same day: the local leg cannot carry QUIC, Go has no standard-library HTTP/3, and the frame design needs no cross-stream order). Outputs, narration, events and exit status reach the originator as tagged,seq-numbered frames on the run's open event stream; commands go up on their own stream (2.7). Narration becomes a wire channel, the one change to 2.7.
The substrates
Three, as the draft has them. Command execution: the runners, and the sudo -n sites in pkg/platform that become runner calls (#527). Network and service access: tokens bridged to appnet and, first, the broker's own remote API. Sandboxed agent execution: sbx, of which nothing exists in the tree.
Features and chores
| Kind | Issue | What it is now |
|---|---|---|
| feature | #1116 | The authz provider, under #815 by the 2026-09-05 ruling that every provider is a feature there; its design, types, broker and first tasks |
| feature | #521 | Reconcile the spec with the settled config and broker models. The draft is that reconciliation; #522–#525 are its four "resolved decisions" and close against the adopted spec, with the corrections #1116 lists |
| feature | #526 | Give the dormant plumbing a consumer: #527 routes pkg/platform's sudo through the runner; #528, the JEA spike, may dissolve under the daemon model, since a Windows service can start a process under another account headless (unverified on a host) |
| chore | #679 | elevator is removed; its rename plan is withdrawn |
Ordering and dependencies
- Epic: Rename op to workflow, then partition it #451 (op → workflow) owns a serial window under
pkg/op/; whether authz and the runners land before or after it is open (question 2 of the gap analysis below). - Epic: The Command Runner #442 (execution topology) owns the runner pool and the broker; 6.2 is to absorb document 6's § Approach, § Interface Shape and § Remote Execution onto the account axis and the daemon model.
- David-Noble-at-work/personal#288, the System tree, and its first task personal#289 depend on this epic: a
System/deploy from an unprivileged shell needs the runner standing for root.
The record
The gap analysis of 2026-10-21, with its twenty gaps, eighteen design questions and the rulings so far, is the first comment below until the design document issue carries it into docs/.
Plan and design documents
| Kind | Document |
|---|---|
| Plan | docs/plans/extract-starlark-from-op/phase-8/steps/38-elevation-policy.md |
Activity
[-]Epic: Elevation policy[/-][+]Epic: Authorization[/+]David-Noble-at-work commentedon Oct 21, 2026
Gap analysis and design questions, 2026-10-21. The draft
devlore_authorization_specification.mdreconciled with the tree at develop45a0dd43. Rulings taken in session are marked in place; § 8.1 adds the return path for a command's output and narration, § 8.2 how narration is buffered apart from output, § 8.3 the fork at the control plane (telemetry to the logger, narration and output to the caller), which corrects § 8 and § 8.1. This comment is the record until the design document issue carries it intodocs/; the drawing it refers to is the owner's artifact "writ and the Runner Daemon".authz: the draft reconciled with what the tree holds
Gap analysis and design questions for the owner's ruling. Source draft:
/Users/david-noble/Downloads/devlore_authorization_specification.md, 2026-10-16 15:22, 437 lines. Compared against devlore-cli develop at45a0dd43(2026-10-21):6.1-privilege-elevation.mdand its status,6-execution-topology.md,6.2-process-pool.md,2.6-execution-policies.md,3.2-projected-provider-api.md§ Pluggable brokers,configuration.md, step 38, the rename planelevation-provider-rename.md, and the open issues under epics #520, #442, #530, #451 and #815. Each row says how it is known: D from a design document, C from the code inventory, I from an issue.1. What the draft keeps, and what the tree already agrees with
{Type, Acquire, Revoke}; provider-owned router built from the resolved config; no global registryRegisterDriverbrokerRouteris an unexported field and does not say it implementsBroker. DErrorAction; revocation failure toflow.Degraded/FailedCompensationflow.Provider.Elevate()removed; theelevatorpackage deleted; one package is the homeflow.Providerhas noElevateat all today (Choose,Gather,Subgraph,WaitUntil,Complete,Degraded,Failed); the draft's and 6.1's citationflow/provider.go:507is stale. #679 keeps theelevatorstub as step 38's scaffoldflow; and #679 rules the stub stays and is renamed where the draft deletes it. C, I2. Gaps: what the draft wants that the tree does not have, or has differently
authorization.Provider, packageauthorizationelevator; 6.1 and #679elevation. Now: the term is authorization, the package isauthz, elevation is the process-running case of itsbxmicroVMs, model and MCP endpoints, cloud targets, host-boundary bridge)sbxAuthorizationStrategyandGrantKindas explicitintconstants,0reserved for None; replacediotaints", matchingBackoffStrategy; the shippedop.ElevationStrategyis a string enum; the empty string is the zero value meaning defer-to-defaultMode(Auto/Required/Forbidden) as the missing "whether", needed for brew and the language managers that must never elevate; 2.6 says whether elevation is needed is partly resolved at execution time against the host's managerfallback_strategieson the configured offerFallback *Policyon the unit, chained; the draft's per-unit requirement has no fallback{Start, Exec, WriteFile, Stop}, one per phase, IPC over a pipe — §6's old mechanism, cited as "Designed in §6"authorization:as a top-level section withoffersandbrokersproviders.<name>.brokers...(its own example:profiles.release.providers.elevation.brokers.ssh.default_ttl); the sketchProviderConfig{..., Brokers devconfig.ConfigBase}matches the draft's shape, the path does notProviderConfigembedsconfig.ConfigBase, resolved through the profile treepkg/devconfigis still the flatConfig{sections map[string]Section}; noConfigBase, noPath(), no loader, no overlay. The pattern that exists isop.PoliciesConfig:init()-timeAnnounceSection, embeddevconfig.SectionBase, a typed accessor. No provider package usesdevconfigat all, andencryption.ProviderConfig, the draft's naming precedent, does not exist as a typeGraph,Subgraph,RecoveryStack,ExecutableUnit,GraphExecutorDefinition,Block,Ledger,Node,Executor, in a serial window that conflicts with any in-flight branch underpkg/op/;pkg/op/provider/authorizationis under itauthorizeaction node withoffer_reference_id,requested_ttl_seconds,scope,required_context_assertionsElevationOfferis Go-spec only:WithElevationOfferexists on every spec and nothing calls it, nothing readsElevationOffer(), it is not serialized, andstarlarkbridge/runtime.goskips "elevationwhile it stays dormant" in silence. #856 is theplan.*surface feature; nothing lets a Starlark author declare an offer referenceAuthorizationGrant"pass-by-value, node-owned, memory-zeroed, zero shared state", carryingValue,MaskedVarsandHeadersmaps withjson:"-"PromiseBinding, and a promise resolves throughRecoveryStack.ResultByUnitID: a producer's result is retained on the stack by unit id, so a grant returned as a result lives in shared, committed state until the stack unwinds. That is the opposite of the draft's security property. A struct holding maps is not by-value in Go either, andjson:"-"only keeps the fields out of the codec, not out of the stackAuthorizationGrant";appnet.Downloadattaches headersclaim,on_missinginframework_slots.go); #803 says the taxonomy has no error-only signature and no immediate-mode marker, so signature changes are openrunas/ UAC as aProcessSpawnbackend, in passingrunWindowsCommand(command, elevated)usingStart-Process -Verb RunAs, which is the UAC consent dialog: interactive by construction. #528, the JEA spike on whether headless Windows elevation exists at all, is open and gating #442AuthorizationLease.RevokeHandleis "worker PID/session"; compensation revokes "cached sudo timestamps"sudo -K, or releasing the pooled host; 6.2 drains hosts per run after compensationInteractiveChallengeandMandatedApprovalpause the unit withErrPausedAuthorize(req OfferRequest) (AuthorizationGrant, *AuthorizationLease, error)andCompensateAuthorize(lease); the lease is "registered with the graph's compensation stack"X(activationRecord *op.ActivationRecord, …) (Product, *Receipt, error)paired withCompensateX(activationRecord, *Receipt); the executor commits and pushes the receipt (GraphExecutor.pushAuditReceipt), the provider does not register anything. The lease is therefore aReceiptsealed throughReceiptBase, not a separate registration, and the draft's signatures lack the activation record, as the stub's do todaypkg/op/authorization_policy.go;pkg/platform/helpers.go:77andrunShellCommand;flow/provider.go:507;elevator/broker.go:14and:53pkg/op/elevation_policy.go; the function isrunCommandinhelpers_unix.go:58with the TODO at:70-71;flowhas noElevate; the broker file's types are at other lines. The draft was written against 6.1's text, not the treeop.ValidateGraphat plan and load time (structural, no config in hand) andGraphExecutor.Run's preflight (catalog, runtime environment, variables, resources; fails withReasonPreflightFailed). The offer-id check needs the resolved config, so it belongs in the run-time pass; a graph-only check (every referenced offer is declared on some unit) can sit inValidateGraphNeedsSudo()resolves against "a default host-escalation offer in the active profile"NeedsSudo(); the sudo decision is a literaltrueat every call site (apt, dnf, pacman, systemctl, snap, port, system launchctl) intorunCommand(argv, sudo). Andwrit deployhas no elevation of any kind:BuildGraphsbuilds one graph per scope, the System root is/, and noWithElevationOffer, sudo or euid check exists anywhere undercmd/writ. A System tree deploys today only if writ itself runs as root. This is the precondition personal#289 names3. Design questions, in the order they block each other
authzreplaceselevationandelevatoras the provider package name:pkg/op/provider/authz,authz.Provider,authz.ProviderConfig,authz.Broker. The elevator is dead and can be removed or replaced at any time. Follows from it, as this document reads the ruling: the design document is6.1-authorization.mdwith companion6.1-authorization.status.md, as the draft already names them; the config section and Starlark module areauthz; Epic: Authorization #520's label becomesEpic:Authorization; the draft's "Names — settled" block is rewritten fromauthorization.Providertoauthz.Provider; and G6 is half answered: an elevation is access to an elevated runner, which is the pool's elevated host identity, not a worker the broker owns.pkg/op/; a new package there during the window conflicts irreparably by the epic's own text.AuthorizationStrategyandGrantKindint constants are replaced by string enums in the form document 6 gives: the empty string is the zero value and means defer to default, so there is no reservedNoneconstant.process_spawn,identity_assumption,interactive_challenge,mandated_approval;process_session,bearer_token,credential_env,approval_ticket.Modeis not needed,NeedsSudo()is replaced by "which account", andrunCommand(argv, sudo bool)is replaced by a runner obtained by account. See § 5.{Start, Exec, WriteFile, Stop}leaves the draft. What remains of it is question 18.providers.authzunder the profile tree, or a top-levelauthzsection. configuration.md says the former.map[string]Sectionwith the shape the draft gives? Step 38 ruled the design proceeds and the implementation waits.appnetor a sandbox: whether it travels as a result, and whatZero()guarantees after the copy.appnet); the sandbox substrate needssbx, which nothing in the tree has. Whether they are later features of one epic or epics of their own is still open.runas/ UAC, or does Spike JEA: does headless Windows elevation exist at all? #528's JEA spike run first and Windows wait on its answer?Mode: Requiredon the system graph./through the file provider. §6's worker hadWriteFilefor exactly this. Three ways, for ruling: the sidecar also exposes file operations; the file provider's System-scope actions become commands through the runner (install,ln -s,mkdir), losing the provider's own semantics; or the whole System graph executes inside an elevated executor, which is what 2.4 § Planning describes, "1 system graph, sandboxed at the system root, elevated". This is the gap personal#289 actually lands on.sudo writ deploywith the Home graph refused in that mode, or wait? Nothing incmd/writchecks the effective uid today, sosudo writ deploywould deploy Home as root into root's home.5. The command runner (ruled 2026-10-21; interface to be defined)
The ruling. An API acquires access to a command runner, a sidecar process that runs commands under one specific user account. Root is one account among others. Every runner has an account. The pkg installers are augmented to obtain the runner they need instead of deciding
sudoby a boolean.What it replaces, in the tree.
runCommand(argv []string, sudo bool)inpkg/platform/helpers_unix.go:58and its twenty-odd call sites passing a literaltrue;runWindowsCommand(command, elevated); the uncalledNeedsSudo()on the manager interface; and 6.2's open item "howpkg/platform's manager backends reach the pool".How it fits what is settled. 6.2 already keys an execution host by identity, interpreter × privilege × pooling mode × session. The ruling generalizes the privilege axis to an account: an identity names the account the host runs as. Authorization is what grants access to a runner whose account is not the caller's; elevation is the case where that account is root (question 1). A runner under the caller's own account needs no grant.
A sketch for ruling, not a design. In the vocabulary of
pkg/process.Runner(Capture,Emit,Run,RunNarrating) and 6.2's identity:A manager backend then declares the account its commands need (
aptroot,brewthe caller,launchctla user agent under the caller and a system daemon under root), and the provider acquires that runner once per run and reuses it, which is the credential-paid-once property 6.2 wants.Open under this ruling.
root,caller, a service account)? Name is portable across Unix; Windows wants a SID orDOMAIN\user; a role keeps the graph environment-agnostic, which the three-way split requires.shell.exec._wwwor a service account issudo -u,runas /user, or a launchd/systemd unit; which of these the sidecar uses is the broker's business, but whether the first cut supports any account other than root and caller is a scope question.Start-Process -Verb RunAsis a UAC dialog, not a sidecar; Spike JEA: does headless Windows elevation exist at all? #528's JEA spike is what says whether a headless elevated runner exists on Windows at all.pkg/process(it is a runner),pkg/op(it is a pooled resource the executor manages), or the authz package (it is what a grant gives access to). The dependency direction decides: authz grants, the pool consumes grants, process does the running.6. Where the runner's design already lives (found 2026-10-21)
No document owns the command runner. Its pieces are in four, and they disagree on three points.
6.2-process-pool.md(2026-08-17, no implementation)sudothe worker over a pipe;runaswith a named pipe; JEA for headless Windows, unverified); §11: "the worker is a pooled host whose identity happens to be elevated"6-execution-topology.md§ Approach, § Interface Shape, § Remote Execution/etc) go through the same channel";{Start, Exec, WriteFile, Stop}; the remoteExecutor{Upload, Execute, Download}with the graph as the artifact that travels; SSH multiplexingExecute(cmd string, elevated bool)is a string, which 6.3 forbids, and a bool, which ruling 4 replaces. Theop.Context/Do/Undosketch predates the sealed model, by its own note.WriteFileis the one answer to question 18 the tree already holds6.3-command-execution.md(2026-08-19, no implementation)$1;Result.Command;plan.shell.runandplan.shell.scriptcommand=survives; env and cwd; stdin versus they\nauto-confirm stream; the temp script's readability under the elevated identity; interpreter availability, which it hands to 6.2's identity1-system-model.md§ 62.4-hermeticity-guarantees.mdpkg/process.Runner(code)Capture,Emit,Run,RunNarratingThe three disagreements the runner design must settle.
WriteFile; 2.4 runs the whole System graph in an elevated executor; 6.2 is silent. One answer, in one document.Execute(cmd string, elevated bool)loses to 6.3's argv rule and ruling 4's account. The remote runner is a runner whose identity carries a host.What 6.2 already answers among the open questions. Question 12, the headless case, for Windows: § 10 rules that absent JEA "an elevated acquire there must fail as a named policy failure routed through the elevation failure contract, never block on a dialog nobody can see". Refuse, do not pause. The Unix headless case follows the same rule unless the owner wants a pause.
What stays open from 6.2 and 6 together, now the runner's questions. The worker binary, the same binary behind
--workeror a separatedevlore-worker; the package-manager knobs (DEBIAN_FRONTEND, they\nstdin) and where they live; retirement thresholds; pause and resume across a restart meaning a second credential prompt; the PowerShell serialization boundary; the JEA spike (#528).Recommendation for ruling. 6.2 becomes the runner's document: it already says the worker is a pooled host, and the ruling's account slots into its identity. It absorbs document 6's § Approach, § Interface Shape and § Remote Execution, restated onto activation records and receipts, and takes the file-operations answer. 6.3 stays as the form of what a runner is handed. Document 6 keeps the topology, SSH multiplexing and eventing, and the policy that 6.1-authorization fulfills. The alternative is a new 6.4 for the runner, leaving 6.2 as the pool beneath it; that is one more document for a split the ruling does not make.
7. The daemon (ruled 2026-10-21, transports tentative)
The ruling. The execution model is a daemon. Local clients reach it over named pipes ("I think"); remote clients over REST ("I think"). This is the new execution model, and it reaches the shell provider rewrite (#799).
What it is, read against the tree. The daemon is the runner of § 5 made long-lived and shared: one per machine, owning the pooled hosts 6.2 describes, spawning runners under the account a client is authorized for. It is the sshd shape: a privileged service that authenticates a caller, authorizes a request, and runs the work as the requested account. Which makes it the place authorization is enforced: locally by the peer's credentials on the socket, remotely by a token, and elevation is the daemon spawning as root for a caller allowed to ask. The three substrates meet here: substrate 1 is the daemon's local API, substrate 2 is the token that opens its remote API, and a sandbox is a daemon reached from inside a microVM.
The two "I think"s, with a precedent. Docker is this exact model: one HTTP API, served on a Unix domain socket or a Windows named pipe locally and on TCP with TLS remotely, and the client does not know which. Two notes on the words: on Unix a named pipe is a FIFO, one-directional and credential-less; the Unix equivalent of a Windows named pipe is a Unix domain socket, which carries the peer's uid (
SO_PEERCRED/getpeereid), which the local authorization needs. And "REST" fits request and response but not a running command's stdout; the streaming leg is server-sent events or a WebSocket on the same server, or HTTP/2. Recommended for ruling: one HTTP API, two transports, socket or pipe locally and TLS remotely, streams by SSE.What it changes, by document.
Execute(cmd, elevated)authz.Provideracquires grants in the executor's processProviderConfig's offers and brokers live, client or daemon, is a questionWhat it changes, by issue.
shell.runbecomes a client call to the daemon for a runner under an account; shell.exec bypasses pkg/process: no dry-run, no narration, and the preferred shell is never read #800's missing dry-run and narration become daemon features or client-side wrapping; The shell provider cannot run a process directly: argv execution is absent #801 argv is the request body; The shell provider cannot replace the current process: no execve action #802 execve cannot go through a daemon and stays the one in-process action; The action taxonomy has no error-only signature, and no way to say an action is immediate-mode only #803's taxonomy gains the client call shape; shell.exec raises on a non-zero exit instead of returning the result, and the captured stderr is lost #824's exit codes come back in the response.CreateProcessAsUser, headless, no UAC. That is this document's claim from the Windows service model, not verified on a host; if it holds, headless Windows elevation exists and is the daemon.sudo writ deploy.devlore daemonin the one binary or its own.Questions the daemon opens.
devlore daemonordevlored.sudoonce. Who installs it, writ or lore, and whether a machine without it falls back tosudo -nor refuses.8. The callback mechanism over the wire (design topic, 2026-10-21)
The local model as ruled. Three pipes between the daemon and the runner it spawns: messages in on stdin, outputs on stdout, narration on stderr. That is the Bazel worker shape, and it stays as the daemon-to-runner hop.
The wire is already chosen.
2.7-control-plane.md§ The wire: HTTP/2, a REST plus server-sent-events facade that is curl-drivable, a gRPC twin on the same connection for typed clients, addressing by run id rather than connection, and a per-run monotonicseqon every event so a subscriber detects a dropped-oldest gap. Document 6 § Telemetry adds ndjson events, a log buffer, and "give me everything since X" on reconnect. The daemon's API is that listener, grown to carry a run's outputs and narration as well as its commands and events.Why the pipes do not carry over as pipes. A socket is one stream, so even the local client-to-daemon hop over a Unix domain socket or a named pipe has the remote problem: three channels on one connection. The answer is one framing for both hops: every outbound frame carries a channel tag and the run's
seq; the daemon relays its child's three fds into tagged frames. Docker's attach stream and Kubernetes' exec channels are the precedents, one byte of channel per frame.The mapping.
POST /v1/runs/{id}/commands, one request per message, each its own HTTP/2 stream so the order is the client's; on the gRPC twin, the up direction of the one bidirectional streamoutputon the run's event stream,seq-numbered; large or binary output byGET /v1/runs/{id}/outputasapplication/octet-streamrather than base64 inside SSEseq; 6 § Telemetry ndjsonnarrationon the same stream, which is a change to 2.7: it makes narration "one per process, shared with the hosting application" and never a wire channel. With a daemon the hosting application is on the other end of the wire, so narration becomes a channel, rendered by the client'sstatus.Narrator. It stays orthogonal to events: a distinct tag, not a projection of the event framescontrol; the exit status is a frame, never inferred from the stream closingOrdering. Separate pipes never preserved order between stdout and stderr either, so the local model already accepts cross-channel reordering. One
seq-numbered stream per run gives what pipes could not: a total order across outputs, narration and events, and a resume point.GET /v1/runs/{id}/events?since=<seq>replays from the daemon's per-run buffer, which answers 6 § Reconnection and 6's re-attach wish, and bounds the buffer by what 2.7 already says, drop-oldest with the gap visible.Live stdin. SSE is half-duplex, so a command that reads its stdin while running has no REST channel. Three choices: stdin content is an attribute of the request, a byte string or
auto_confirm, which is whatpkg/platform'sy\nstream is today (6.3 open question 3) and covers every package manager; live stdin exists only on the gRPC or WebSocket full-duplex surface; or live stdin is not offered, and an interactive command is refused with a named failure like the headless elevation case. Recommended: the first by default, the second where a client library asks for it.What this settles if adopted. Document 6's "the graph and the runner binary travel over SSH" is replaced by this wire; its § Telemetry survives as the event frames; 2.7 gains the two outbound tags and the per-run output endpoint; 6.3's stdin question closes as a request attribute; and the daemon over the local socket speaks exactly the remote protocol, which is the property that lets
ssh localhostbe replaced byunix:///var/run/devlore.sockwith zero client changes, the test document 6 asked for in other words.Open.
Note/Warn/Succeed/Failplus text) for the client to render. The second keeps rendering on the client, where the terminal is.8.1 The return path, as a sequence (2026-10-21)
The runner never knows the caller. Frames are addressed to the run; the control plane relays; the originator is the first subscriber.
POST /v1/exec {run: 7f3a, unit: u-12, account: root, argv | script, env, cwd, stdin}→202 {exec_id: e-41}. Nothing else returns on that stream.RunnerSelectorthat returns a runner session for the account by the plugged policy (reuse by account, spawn on demand, capped pool, remote host).exec {rid: e-41, argv, env, cwd, stdin}. It recordse-41 → run 7f3a, unit u-12: the routing table for the return path.{rid, channel: output | narration | control, payload}.e-41; stampseq,ts, unit id; append to the run's buffer (memory ring over the run's file); publish to every subscriber of run 7f3a.GET /v1/runs/7f3a/eventsheld open; each frame an SSE event whoseid:isseq, so a reconnect resendsLast-Event-IDand the control plane resumes from the buffer, nosince=parameter needed. writ demuxes:outputto the unit's result,narrationto the Narrator,controlcarries the exit status, which ends e-41 and not the stream.Properties: any subscriber sees the run; one
seqper run gives total order across commands, which pipes never gave; every frame crosses the control plane and lands in the run's file, so the audit and the trace are the same record. The direct handoff (control plane hands the caller the runner's endpoint and a capability) saves a copy and loses all three, and needs an unprivileged client on a root-owned socket. Bulk output takes the octet-stream endpointGET /v1/runs/7f3a/output?exec=e-41from the run's file, with a capped inline chunk and a pointer on the stream. Unbrokered, the same frames arrive on writ's own connection to its user runner and writ stampsseq.Closes from § 8's open list: backpressure (the runner's spool, never the child's pipe; the control plane's ring drops oldest with the gap visible and the file keeps everything), and the resume mechanism (SSE
id:=seq).8.2 Buffering narration apart from output (2026-10-21)
Separated at the source, by fd. stdout is output, stderr is narration; the runner reads them with two independent pumps into two spools, so they never share a buffer and each is its own channel. Narration is lines of text: one frame per line, a maximum line length, a flush timer so a
\rprogress line still arrives, invalid UTF-8 replaced. Output is bytes: a frame per filled chunk or per timer tick, no decoding.Three buffers, three policies.
seq) and a memory ring over the recent frames for live subscribers and short reconnects. The ring drops oldest with the gap visible; a reconnect older than the ring is served from the file.Structured narration from devlore children. stderr is narration only by convention;
apt-getwrites free text there,devlore run --graphhas categorized records. Two ways: asourcefield on the narration frame (stderrraw,recordstructured) with the runner recognizing ndjson records on stderr, which is sniffing; or a third pipe, fd 3, opened when the exec says the child is devlore-aware, carrying records and hook events, with stderr staying the program's stderr. Recommended: fd 3. One field on the exec request, one more pump in the runner, and "stderr is stderr" stays true for every program.8.3 The fork at the control plane (ruled 2026-10-21)
One request, three kinds of event, two destinations. A single
POST /execyields one response stream from the runner carrying every frame the exec produces, taggedoutput,narration,eventorcontrol. The control plane demultiplexes on the tag:event→ the event bus (2.8, with 2.7's subscription semantics). The logger is its subscriber: the run's events file and the OpenTelemetry exporter.GET /v1/runs/{id}/eventsserves other subscribers, a monitor; the caller is not one by default. The hook seam feeds the same bus from inside the control plane (unit scheduled, started, completed, status transitions), so telemetry is the union of what the runner reports about the exec and what the executor reports about the unit.narration,output,control→ the caller's stream,GET /v1/runs/{id}/console, the one stream writ holds open. Exit status rides it ascontrol.Two sequences. Each sink has its own
seq; they correlate by exec id, unit id and timestamp. Total order holds within the console stream (where a human needs it) and within the event stream (where a logger needs it); none is needed across them.In code: the relay is one goroutine per exec reading the runner's response body, a switch on the tag, two destinations. The runner does not know there are two; writ does not know there is a bus.
Against 2.8's names: its three output streams are narrations, diagnostics and operational events. Telemetry is operational events. Diagnostics, a program's own stderr complaints, go to the caller as narration at a quiet level: the caller sees everything the command said, the logger everything the system did. This corrects § 8 and § 8.1, which had put
eventframes on the caller's stream.4. The epics, as the draft would have them
Epic:ElevationPolicyelevatorelevatorleaves the list. This is where the provider's tasks file, by the ruling; the policy and graph side stay under #520. The two epics owning one subject is itself a question for the ownerDavid-Noble-at-work commentedon Nov 9, 2026
star github triage sweep added this issue to Triage: devlore, for the rule it breaks:
no-evidence: no Evidence of completion section