Dashboard › opencode › Distillation
80b4a9ae-d924-4795-81ef-eb441f8176bc["lore_tm_v1_MYUPMkFcSWe9ssq_nrzR9MFzxi-pSFqvV0ltyk28oS4","lore_tm_v1_TbHivugQAx97AsMTv3FFHeU-i6oUkA8gqXGKSOf_7z4","lore_tm_v1_JpT0ua86ATn3311TWZVhaG32iczZn6YwrnHVAlgWpLs","lore_tm_v1_LoboBzNldychriqua1bwvj4A5jtkCVuHt6vIhFAdg5A","lore_tm_v1_lRkLbnRfsaBsrjz79eM-oXPYMmXjJQwacmcCufQmKaQ","lore_tm_v1_Dh2vA9VgLoPCJmaSBaCNNA2lpBuj1G_Ehp24Sp-sbm0","lore_tm_v1_D7mAqJcZMPGwx2TjjelvnygfLXx4PY6E-hUXo9ywJ-Y","lore_tm_v1_ZJkMnc-yH76Yh0s1SUOy6umgoJO7BpXRPWSzLVJoi-k","lore_tm_v1_3-HJbGSEZtnRwwPrDX1rt5Jf1mTcOSvojXOqKsgiiso","lore_tm_v1_IIycw69fp-D6UNbOqCiCLN6dVYd0Ve2ciNNYL8fhSSs","lore_tm_v1_3PLLsU5G5Fiq71_3rQ7R6F0n9GUCLUVP-h8ATeO-idI"]
Date: Sep 8, 2026
DeliverSignal, AddSignal, RemoveSignal, and Signal references under github.com/godbus/dbus/v5@v5.1.0, including server_interfaces.go, sequential_handler.go, conn.go, default_handler.go, and their tests./home/byk/go/pkg/mod/github.com/godbus/dbus/v5@v5.1.0/default_handler.go:250-312, defaultSignalHandler protects closed and signals []*signalChannelData with sync.RWMutex; DeliverSignal() holds an RLock and delivers to every registered channel unless closed; Terminate() closes each channelβs done, waits for deferred deliveries, closes the destination channel, marks the handler closed, and clears signals; AddSignal() appends { ch, done: make(chan struct{}) }; RemoveSignal() scans backward and removes every matching channel after calling close()./home/byk/go/pkg/mod/github.com/godbus/dbus/v5@v5.1.0/default_handler.go:314-342, signalChannelData.deliver() sends immediately when possible, returns if done is closed, or increments a sync.WaitGroup and starts deferredDeliver() when the destination is blocked; deferredDeliver() waits for either delivery or closure and then calls wg.Done(); close() closes done and waits for all spawned goroutines.No files found.@resources operations were ioprio_set, mbind, migrate_pages, move_pages, nice, sched_setaffinity, sched_setattr, sched_setparam, sched_setscheduler, set_mempolicy, set_mempolicy_home_node, setpriority, and setrlimit./usr/bin/systemd-run, /usr/bin/script, /usr/bin/sh, /usr/bin/grep, /usr/bin/sha256sum, /usr/bin/stat, /usr/bin/sed, and /usr/bin/wc./home/byk/.local/share/opencode-v2-pilot/supervisor/cmd/client/main.go defines inherited socketFD = 3 and cwdFD = 4; main() calls sendStart(socketFD, cwdFD, os.Args[1:]), prints errors to stderr, and exits with status 1.sendStart() in /home/byk/.local/share/opencode-v2-pilot/supervisor/cmd/client/main.go:29-69 marks both inherited descriptors close-on-exec, validates the connected socket with unix.Getpeername, validates the cwd via unix.Fstat and unix.S_IFDIR, derives device/inode metadata, calls decodeStart(), protocol.EncodeStart(), and protocol.MarshalFrame(), then sends the frame plus cwd descriptor with unix.SendmsgN(..., unix.UnixRights(cwd), ..., unix.MSG_NOSIGNAL) and finishes partial writes with unix.Write; zero-byte writes return syscall.EIO.decodeStart() in /home/byk/.local/share/opencode-v2-pilot/supervisor/cmd/client/main.go:71-107 requires between 2 and protocol.MaxArgs+2 metadata values; parses runtime as unsigned base-10 32-bit and rejects values above protocol.MaxRuntimeSec; requires each argument to begin with a and use canonical unpadded URL-safe Base64 grammar [A-Za-z0-9_-]; applies protocol.MaxCommandSize to the first decoded value and protocol.MaxArgSize to later values; rejects decode failures, noncanonical encodings, NUL bytes, and aggregate arguments exceeding protocol.MaxArgsSize; returns protocol.Start{Device: device, Inode: inode, RuntimeSec: uint32(runtime), Command: decoded[0], Args: decoded[1:]}./home/byk/.local/share/opencode-v2-pilot/supervisor/internal/protocol/frame.go defines HeaderSize = 12, MaxFrameSize = 70 * 1024, MaxIOPayloadSize = 32 * 1024, Version = 1, frame types TypeStart = 1, TypeInput = 2, TypeOutput = 3, TypeExit = 4, TypeError = 5, TypeStarted = 6, TypeStop = 7, and TypeStopped = 8; limits are MaxArgs = 128, MaxCommandSize = 4096, MaxArgSize = 16384, MaxArgsSize = 65536, and MaxRuntimeSec = 3600; frame magic is OPTY.Start in /home/byk/.local/share/opencode-v2-pilot/supervisor/internal/protocol/frame.go contains Device uint64, Inode uint64, RuntimeSec uint32, Command string, and Args []string; EncodeStart() and DecodeStart() enforce nonempty UTF-8 command text, UTF-8 arguments, no NUL bytes, all command/argument/runtime/count/aggregate limits, exact payload consumption, and MaxFrameSize.0:8, inode at 8:16, runtime at 16:20, command length at 20:22, argument count at 22:24, followed by command bytes and each argument prefixed by a 2-byte length.ReadFrame(), WriteFrame(), MarshalFrame(), and ParsePacket() enforce the 12-byte header and maximum payload size; parseHeader() rejects incorrect header length, magic, version, nonzero reserved bytes 6 or 7, oversize payloads, and types outside TypeStart through TypeStopped; writeAll() loops over partial writes and returns io.ErrShortWrite on a zero-byte write.go.mod=d1d088bdd65f99056657717658d3336ae233acd2ad39fa998ebe8a773f68348e; go.sum=dad6a6773121326ee41a6a081cf310444b6fcd3540f28f4b3f31de559d31726b; internal/protocol/frame.go=83ef89be747e6c1bd51ba1474307980dd4e9d4c1d17360be1c02538c990f832d; internal/protocol/frame_test.go=c7c45eeaf44411bd6fe87998fce153cb8decda5df7d7e805fad9dc6f6cdfd591; internal/supervisor/auth.go=7e87448cedd42966156ecd3a17e654ccec15e11d276ccdcf014c0fa66b49a974; internal/supervisor/auth_test.go=9fc722a3e84e6a445c66a031882fc40ae6fc1f0216c21cd0e50770621bd6c7eb; internal/supervisor/server.go=6e4230fcd20b8f5cdc6d417776ba1ea0bd6032882f358352ba1fd46bd71b6589; internal/supervisor/server_test.go=7ef99b1f2cb77bf573327688d7ac734e712c4560154eee504a72203676a0285b; internal/supervisor/systemd.go=7e1c6de7d917b584e207788899d9af5a96b262a5a7b52fcf8f1196dcfc0188cf; internal/supervisor/systemd_test.go=eede59ca6e0927c9ab8524b7a10cc59a32b0332250d7d45210f5c22f114ce4e1.cmd/client/main.go=9471c8c9dd2a8c00274e1e6ecc89983377c3810e2a7ad47b962df19ce6d2995b; cmd/client/main_test.go=506fe06b72e9859bdd101b2c048b63c6b866a290a1ab27311ccaff9bdd23658b; cmd/launcher/main.go=c5fef296d93af561b99284f9e73bdd9569d8501f92bd34bf47a10ae2fe03f41b; cmd/launcher/main_test.go=e584ce5e320bc8c9dc6c250c548bbae517fa6ecdc721a5813cd6bb148fc3b090; cmd/supervisor/main.go=d7381fa5feeacacbf94cddbf36539f8544ccab9705fa4b7906207726d67c387d; opencode-pty-supervisor.service=63414c4afc3e4bad52d4738e9bfd1886a312012663dd4eb7390481cc50636239; opencode-pty.slice=5f03c865c17fbb54e2fa3a0e0c7cbf899ad4509228d1a7262aaa4ea3387b9e20; PROTOCOL.md=2a588cef62538063cbe7f3dbc27305a7e8e2511a59a86c6cec6b5b18b1b2275f; ROOT-ACCEPTANCE.md=9f70a745367e68d0f35aa14cb5048b8c83652cf10e279539ab16f25037757f1a.../config/opencode/plugins/pty.ts=f4f31124e753d11682f45aceef4c9344965de44b74b7afc4bb62968f469f52af; ../config/opencode/plugins/pty-transport.ts=c8a117e96de883f01762765b21c3f2abeb09af9e22c74d5cf503b3204bb49f2d; ../opencode-v2.service=c93e779848222afc2b96540f626a9f2b66a83cb38b459d25682269d1fc4b8928; ../CUTOVER.md=c6e731ef91d2ba97805685ec10ebb31c3baad8021b2c9bf5b327ab456691680f; bin/opencode-pty-supervisor=c5c09ece21c802868721dfc3e2610496ad9630c1b3a4c258104bc92b2bd9aca1; bin/opencode-pty-launcher=d833c859476f021565e8f425e6ee51353909060fa5f64ce629fb07d3411987dd; bin/opencode-pty-client=fb8739d98ff7882782005e04ef731b6120e8daf0719e606362a1fe620adc2cde.SupervisorTransport.close() in config/opencode/plugins/pty-transport.ts:197-202 awaits the STOP write without a deadline, and its 25-second timeout begins only after that write completes. If the supervisor stops reading because PTY input is blocked and its receive buffer fills, the write callback may never fire, causing session deletion, plugin unload, and pty_kill to hang indefinitely through terminate() at config/opencode/plugins/pty.ts:483-491. Recommended fix: apply the same bounded-write handling used for input frames and test STOP behind saturated input backpressure.PROTOCOL.md:3 and ROOT-ACCEPTANCE.md:20; an unprivileged syscall trace recorded openat(AT_FDCWD, "/sys/kernel/mm/transparent_hugepage/hpage_pmd_size", O_RDONLY) = 3 from the Go runtime before application validation. The source at cmd/client/main.go:29-68 uses only inherited descriptors and opens no socket. Proposed alternatives: constrain the invariant to application-initiated filesystem/socket operations and list permitted runtime reads, or produce a binary satisfying the absolute claim.tsgo --noEmit -p tsconfig.json, including registrations at config/opencode/plugins/pty.ts:193-197, 289-294, 310-314, 348-352, and 360-365. Root cause: pty.ts:4 resolves effect from the pilot config, while tsconfig.json:9-10 resolves @opencode/plugin into the repository and therefore a different Effect package instance; their schema AST types are incompatible. No successful exact-source TypeScript validation exists.connectedSocketFD() relies on undocumented socket._handle.fd at config/opencode/plugins/pty-transport.ts:211-222. The candidate SEA embeds Node 26.4.0, but TestNodePassesConnectedSocketWithoutChangingPeerMainPID uses host node at cmd/client/main_test.go:28-29, which is Node 24.16.0; therefore the test does not prove descriptor access, peer-PID preservation, or inheritance behavior in the shipped SEA runtime, despite the gate in ROOT-ACCEPTANCE.md:18-20.internal/supervisor/server_test.go:456-545 covers one successful START, two input frames, one output, and one exit. No reviewed test implements the five-tool adversarial smoke from ROOT-ACCEPTANCE.md:38 or the exact-host concurrency, cgroup, resource-pressure, timeout, escalation, inheritance, and malformed-protocol checks from ROOT-ACCEPTANCE.md:22-36; ROOT-ACCEPTANCE.md:3 says source tests do not substitute for these checks.pty_spawn always calls openSupervisorTransport() at config/opencode/plugins/pty.ts:217-229.SCM_RIGHTS; internal/supervisor/server.go:402-469 receives with MSG_CMSG_CLOEXEC, rejects truncation and extra descriptors, closes descriptors on failures, and checks directory device/inode.internal/supervisor/auth.go:19-107 requires exact UID, GID, MainPID, active/running state, cgroup, InvocationID, and SO_PEERPIDFD; internal/supervisor/server.go:200-205 immediately rechecks pidfd liveness and InvocationID before startup.internal/supervisor/systemd.go:82-111 obtains MainPID from the Service interface and lifecycle/cgroup fields from the Unit interface, matching pinned go-systemd behavior.internal/supervisor/server.go:530-535 and internal/supervisor/systemd.go:34.StartTransientUnit failures enter cleanup at internal/supervisor/server.go:180-209; cleanup failure terminates the supervisor at internal/supervisor/server.go:218-225.internal/supervisor/server.go:260-269 and 370-400.internal/supervisor/server.go:279-332.internal/protocol/frame.go, config/opencode/plugins/pty-transport.ts, and PROTOCOL.md.execve directly at cmd/launcher/main.go:52-67.internal/supervisor/systemd.go:341-405.opencode-v2.service:18; CUTOVER.md:23-34 requires explicit approval and preserves rollback.go test ./... passed; go test -race ./... passed; two ordinary CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath builds matched each other.-trimpath -ldflags=-buildid= matched all shipped binaries: supervisor c5c09ece21c802868721dfc3e2610496ad9630c1b3a4c258104bc92b2bd9aca1, launcher d833c859476f021565e8f425e6ee51353909060fa5f64ce629fb07d3411987dd, and client fb8739d98ff7882782005e04ef731b6120e8daf0719e606362a1fe620adc2cde.1.22.2, CGO_ENABLED=0, GOARCH=amd64, go-systemd 22.5.0, godbus 5.1.0, and x/sys 0.20.0.systemd-analyze security --offline=yes opencode-pty-supervisor.service reported exposure 0.9 SAFE.systemd-analyze verify could not complete because required /usr/local/libexec/opencode-pty-supervisor was intentionally not installed; no production or privileged state was changed.DO-NOT-MERGE.