Dashboard › opencode › Distillation
d52efb81-6253-4bd4-a020-df507ac3e5a6["lore_tm_v1_B_oxut2mS1ElEMBHhI5omO4rZW6FzOWJJCRT4eY3-q0","lore_tm_v1_63SD0t6b1olAZiPJV0CUWiERju-4ZQ5Fiv1SpyKHnLs","lore_tm_v1_MRRH8sVkdA2OSEwyaRw2w8vJvHaNthU6sh375_JYF4Y","lore_tm_v1_v5yDulzp5WYn2078bgs8JXOttgTVtxetZF1lO2Bnt68","lore_tm_v1_bTjPjOcvVLXf946wmKjrXqx9g_JhVZqkxRN11hjBdi4","lore_tm_v1_x4Yt_LjCU4_EnWSdjWrycSodRe7GZpS7S2RGUU2IoIE","lore_tm_v1_-RWg5L5tGmK8QgfyQCExW5dBrndp0Ct6oVo6cU-vb3k","lore_tm_v1_go7y_LcP3Y4Ae0gs4GUGMIyO6j5ZlRWgv2NG-IRTJWU","lore_tm_v1__oXivX70hG8YEPQncsOK12sjvY5HWL1RB_7fLhT0n0c"]
internal/supervisor/server_test.go contains 5 tests: TestReceiveStartWithDirectoryDescriptor, TestReceiveStartRejectsMetadataMismatch, TestReceiveStartHandlesFragmentedHeader, TestCopyInputRejectsOutputFrame, and TestExitPayloadEncodingIsBounded; helper unixConnectionPair(t *testing.T) creates an AF_UNIX SOCK_STREAM|SOCK_CLOEXEC socket pair and returns two *net.UnixConn values.TestReceiveStartWithDirectoryDescriptor opens ".", derives Device and Inode from *syscall.Stat_t, encodes protocol.Start{Device: uint64(stat.Dev), Inode: stat.Ino, Args: []string{"printf", "ok"}}, sends the cwd FD with unix.UnixRights(int(cwd.Fd())), calls receiveStart(server), and verifies exactly 2 arguments with start.Args[1] == "ok".TestReceiveStartRejectsMetadataMismatch sends the actual cwd descriptor alongside deliberately incorrect metadata Device: 1, Inode: 2 and expects receiveStart(server) to return an error.TestReceiveStartHandlesFragmentedHeader sends the first 3 bytes of a start packet together with the cwd descriptor, writes packet[3:] separately, and verifies receiveStart(server) succeeds.TestCopyInputRejectsOutputFrame writes a protocol.TypeOutput frame carrying payload "bad" to the input side and expects copyInput(server, stream) to return a protocol error.TestExitPayloadEncodingIsBounded constructs an exit payload of 9+len("success") bytes, stores the string length at payload[5:9] using binary.BigEndian.PutUint32, copies "success" at offset 9, and verifies the payload does not exceed protocol.MaxFrameSize.SO_PEERPIDFD, passes cwd by descriptor, fixes transient-unit names and arguments, and bounds individual frames. Remaining investigation areas were exact D-Bus FD marshalling, signal-subscription behavior, systemd property semantics, and effective host unit/file permissions because those guarantees depend partly on dependencies and the host rather than project code alone./home/byk/go/pkg/mod, GOPATH /home/byk/go, Go go1.22.2.bin/opencode-pty-launcher is an x86-64 SYSV ELF, statically linked, with debug info and not stripped; Go BuildID 6RQ2SGk3gMRB14wEJKBx/BaGu9vt8LS5pWElxxNOG/QVBBd8KFMpoFP2E7P7KR/yoMXHpawFoMlTKoHDWWm; SHA-256 f97c546f46b6f2b818638c69ced6e461174549207225cd034ecf65da1017c20d.bin/opencode-pty-supervisor is an x86-64 SYSV ELF, dynamically linked with interpreter /lib64/ld-linux-x86-64.so.2, with debug info and not stripped; Go BuildID QNSxF-E7mbp_ecMBvxWo/CB3LcygzrBmD-duo2HiN/hPOfoy4MwUTbZ_KFbJsh/UgIoIOfxoJ_nI8w5bwhb; SHA-256 65f00b20269806f513f5c6a479a7ca051db6a334ca4549121e5b813bbdf75989.., bin, cmd, and internal owned by byk:byk with mode 755; go.mod, go.sum, PROTOCOL.md, ROOT-ACCEPTANCE.md, opencode-pty-supervisor.service, opencode-pty.slice, all enumerated .go source/test files under cmd/ and internal/ had mode 644; bin/opencode-pty-launcher and bin/opencode-pty-supervisor had mode 755.github.com/coreos/go-systemd/v22@v22.5.0. In dbus/properties.go, PropExecStart(command []string, uncleanIsFailure bool) marshals an execStart whose Path is command[0], Args is the entire command slice including argument 0, and UncleanIsFailure is supplied by the caller; the resulting property name is "ExecStart".github.com/coreos/go-systemd/v22@v22.5.0/dbus/properties.go, dependency helpers map directly to named string-array properties: PropBindsTo(...) → "BindsTo" and PropAfter(...) → "After"; PropSlice(slice string) creates property "Slice" with the supplied string variant.github.com/coreos/go-systemd/v22@v22.5.0/dbus/methods.go, StartTransientUnitContext(ctx, name, mode, properties, ch) invokes org.freedesktop.systemd1.Manager.StartTransientUnit via c.startJob(...), passing the unit name, mode, properties, and an empty []PropertyCollection; documentation says the transient unit is released once it is no longer running/referenced or the system reboots, and the name including suffix must be unique.github.com/coreos/go-systemd/v22@v22.5.0/dbus/methods.go, GetUnitPropertiesContext(ctx, unit) converts the unescaped unit name with unitPath(unit) and requests all properties for interface "org.freedesktop.systemd1.Unit"; getProperties(...) calls org.freedesktop.DBus.Properties.GetAll and unwraps each dbus.Variant using Value().github.com/godbus/dbus/v5@v5.1.0: UnixFD/UnixFDIndex types in dbus.go; transport negotiation through SupportsUnixFDs() and EnableUnixFDs(); Unix-rights parsing and descriptor-index substitution in transport_unix.go; encoding adds FieldUnixFDs and sends descriptors using syscall.UnixRights(fds...); dedicated behavior tests exist in transport_unix_test.go.