Dashboard › opencode › Distillation
cbcd9a7c-d6e5-45de-aec2-59d1f0229c4b["lore_tm_v1_eLOj-s4G7DiY9s2CPJ6mectmajvXFeJvW8smZqcfxoQ","lore_tm_v1_aBHuxFWUUBTyvhlX_2DNsT0ZIHEAV8zlrFI1gJATjik","lore_tm_v1_PU7oWhv-xo2n7OzK8aWoFcy_83REiYDQhGh8b_8aY_s","lore_tm_v1_3g7v3_eTMUPOOWfoOCgdleTKriz9wu1W27mLZ68norI","lore_tm_v1_eHrrWKnRHMoizgepnKTNVWBEZs_HtOW3abK7tOkLH74","lore_tm_v1_QpUYyxSbRYcG8f22O71KwYP_ESdyHgvMb5N-jWqnObM","lore_tm_v1_7EGdUqsfRsymM02Jb8vbjLbUZFZ1cYXDiGKQy5ovLds","lore_tm_v1_O1pBdyvKPxgHnn92up2_B--WUgs3tGN-81BCXvTr2Y4","lore_tm_v1_433TSe0KbSaaH0NlxdR1WVOgqs887xvC70iiVg9aeVc","lore_tm_v1_1Z-yK-wwxRxmE24mEhojPeu8LvSiVXKEMhHMsz05E2M","lore_tm_v1_T938qRxppd6FAfqN9kK7pMsOCX8f0cgZ7Bj341z4WCw","lore_tm_v1_IMbFf0pejfP3NusPqOsQt0_2MLAqDfHXRq-7qAM7Wa0","lore_tm_v1_HeE5xUa3OcEooaZlhJYo37ZrhpDP7HS15B18MWCut5Q","lore_tm_v1_Ufw1eZAL-Mo_aZ3n4Hq6bkepP7XS91AEcozSaBGZoP0","lore_tm_v1_gDTLAT1F17p-xRrGE-jhDYuFYPO1ajSxlCfz4wQwGGQ"]
/home/byk/.local/share/opencode-v2-pilot/supervisor: ROOT-ACCEPTANCE.md, PROTOCOL.md, go.mod, go.sum, opencode-pty.slice, opencode-pty-supervisor.service, bin/opencode-pty-launcher, bin/opencode-pty-supervisor, cmd/supervisor/main.go, cmd/launcher/main.go, cmd/launcher/main_test.go, internal/protocol/frame.go, internal/protocol/frame_test.go, internal/supervisor/auth.go, internal/supervisor/auth_test.go, internal/supervisor/server.go, internal/supervisor/server_test.go, internal/supervisor/systemd.go, and internal/supervisor/systemd_test.go./home/byk/.local/share/opencode-v2-pilot/supervisor/internal/supervisor/unit.go, but that file does not exist.internal/protocol/frame.go defines a 12-byte OPTY header, protocol Version=1, MaxFrameSize=64*1024, MaxIOPayloadSize=32*1024, frame types TypeStart=1, TypeInput=2, TypeOutput=3, TypeExit=4, and TypeError=5; start requests allow at most MaxArgs=128, MaxArgSize=4096, and MaxRuntimeSec=3600.internal/protocol/frame.go encodes Start payloads as device uint64, inode uint64, runtime seconds uint32, argument count uint16, then length-prefixed arguments; DecodeStart rejects zero arguments, excess limits, NUL bytes, empty Args[0], truncation, and trailing bytes.internal/supervisor/systemd.go defines clientService="opencode-v2.service", supervisorService="opencode-pty-supervisor.service", ptySlice="opencode-pty.slice", expectedClientCgroup="/system.slice/opencode-v2.service", launcherPath="/usr/local/libexec/opencode-pty-launcher", stopTimeout=15*time.Second, and valid unit names matching ^opencode-pty-[0-9a-f]{32}\.service$.internal/supervisor/systemd.go:230-264 constructs transient-unit properties including Type=exec, Slice=opencode-pty.slice, BindsTo=opencode-pty-supervisor.service, After=opencode-pty-supervisor.service, User=byk, Group=byk, NoNewPrivileges=true, UMask=0077, KillMode=control-group, KillSignal=15, FinalKillSignal=9, SendSIGKILL=true, TimeoutStopUSec=15 seconds, OOMPolicy=kill, Delegate=false, RemainAfterExit=true, and CollectMode=inactive.internal/supervisor/systemd.go:256-258 set both StandardInputFileDescriptor and StandardOutputFileDescriptor to stream.Fd(), while StandardErrorFileDescriptor is set to cwd.Fd(); inaccessible paths include /run/dbus/system_bus_socket, /run/docker.sock, /run/user/1000/bus, and /var/run/docker.sock.internal/supervisor/systemd.go:230-235 are encoded as launcherPath followed by each original argument prefixed with "a" and encoded using base64.RawURLEncoding.internal/supervisor/systemd.go starts units with StartTransientUnitContext(..., "fail", ...), waits for job result "done", subscribes to systemd PropertiesChanged and UnitRemoved signals, decodes Result, ExecMainCode, and ExecMainStatus, and performs orphan cleanup only for valid matching units whose BindsTo property is exactly [opencode-pty-supervisor.service].internal/supervisor/auth.go obtains SO_PEERCRED and SO_PEERPIDFD, marks the pidfd close-on-exec, checks the peer PID against the current opencode-v2.service MainPID, requires ActiveState="active" and ControlGroup="/system.slice/opencode-v2.service", validates the pidfd with PidfdSendSignal(..., 0, ...), then re-queries service state to detect identity changes.internal/supervisor/auth_test.go cover acceptance of the current peer, rejection of the wrong MainPID, and rejection of an inactive service.internal/supervisor/auth.go gained the full authenticate path between two reads.internal/supervisor/server_test.go cover receiving a start request with one directory descriptor and matching device/inode metadata, rejecting metadata mismatch, accepting a start header fragmented after 3 bytes while carrying SCM_RIGHTS, rejecting an output frame passed to copyInput, and checking that a manually constructed exit payload remains within protocol.MaxFrameSize.