Dashboard › opencode › Distillation
80ce784b-cc06-487b-af28-72c4c8eaaa90["lore_tm_v1_fCHlMAlYxUBbIW7A0CGj1PiMzAEF8X3Q3hfx-PadSco","lore_tm_v1_7YM8vmGPQTya2zR3K41fLCqG4q5NZ0xfANCqjAr_w9s","lore_tm_v1_zaro8rbzDNK29H9axhLZ9-4pLEEf6ZSzZ2_ehNQ4D84","lore_tm_v1_kcIQc14dzIpB0ItVUNuKuQTSUifWe4zAsiwEutEkPzI","lore_tm_v1_0yO1Hf0PxS-utOBh440jPj5Qg3eDhEKCDqai3l3vKUY","lore_tm_v1_q3k01-TyQ6zcW-F3WLL3KRjpB7asX7eg4I9P9F1jOtg","lore_tm_v1_cwgP46ZEoAuHYn82Rhxh-Xko00o5BA-a6n700NM2aEQ","lore_tm_v1_iMn9iu7-96_9EI337SlFwgwDyUB38afUmkqvAQ20d3w","lore_tm_v1_FzLe2WYD1XHXXZOmK3oQ3hh1Gt1iTCCyqpyuwG4s2ck","lore_tm_v1_y1K0CJ1dNGFu_N2m44E-vXWbP8tpITGZfYlybT2bukI"]
Date: Sep 8, 2026
/home/byk/.local/share/opencode-v2-pilot/supervisor/internal/supervisor/server_test.go (787 lines). TestReceiveStartWithDirectoryDescriptor transfers one cwd descriptor via SCM_RIGHTS, requires FD_CLOEXEC, and verifies command printf with argument ok; TestReceiveStartRejectsMetadataMismatch rejects supplied device/inode values 1/2 that do not match the descriptor.server_test.go: TestReceiveStartClosesEveryExtraDescriptor sends 4 copies of the cwd descriptor and requires rejection with no descriptor-count change; TestReceiveStartClosesDescriptorsAfterControlTruncation runs 20 iterations, sends maxStartDescriptors+16 rights, requires rejection, and checks the post-cleanup descriptor count equals before-3; TestReceiveStartHandlesFragmentedHeader sends the first 3 packet bytes with the descriptor and then the remainder, requiring successful receipt.server_test.go: ambiguous Start() failure "ambiguous start" must produce a type-TypeError frame and invoke cleanup; normal unit completion must stop before draining "final output" and then emit a structured TypeExit for {Result:"success", ExecMainCode:1, ExecMainStatus:7}; cleanup error "cleanup failed" must surface; and a TypeStop request receives an empty TypeStopped frame only after StopAndWait() closes manager.stopped.server_test.go: blocked input forwarding is stressed with 32 frames, each protocol.MaxIOPayloadSize, before closing the client after 50 ms; disconnect must be detected within 2 seconds. watchDisconnect() must return context.Canceled for an already-canceled context. copyOutput() must preserve payload "last" before returning io.EOF. copyInput() must reject a wrong-direction TypeOutput frame containing "bad".server_test.go require at most maxAdmissionsPerMinute ordinary unauthenticated admissions, bounded admission history, a separately reserved one-connection capacity for the likely service MainPID, and ordinary saturation not consuming that reserve. likelyMainPID() accepts the current PID, rejects os.Getpid()+1, and caches identity so the test manager receives exactly 1 D-Bus-equivalent query.TestTypeScriptTransportUsesHelperAndSplitsWrites builds ./cmd/client using go build -trimpath, invokes /home/byk/.local/share/opencode-v2-pilot/config/opencode/plugins/pty-transport.ts under Bun with command /bin/true, argument arg, and runtime 60; it verifies a 65,536-byte write is split into exactly 2 TypeInput frames of protocol.MaxIOPayloadSize, then validates output "ok" and exit {result:"success", execMainCode:1, execMainStatus:0}.TestTypeScriptTransportBoundsOutputBeforeListener sends 1_000_000 + protocol.MaxIOPayloadSize*8 bytes of z output before the listener is attached and requires exactly MAX_BUFFER_SIZE valid tail bytes plus result "success". TestTypeScriptTransportBoundsBackpressuredStopWrite queues 256 writes of 32,768 bytes, sets the server read buffer to 1,024 bytes, uses helperTimeoutMs: 500 and stopTimeoutMs: 100, requires transport.close() to fail with "stop timed out", and requires completion within 3 seconds./home/byk/.local/share/opencode-v2-pilot/supervisor/cmd/client/main_test.go (192 lines). TestNodePassesConnectedSocketWithoutChangingPeerMainPID has Node connect to the Unix socket, spawn the fixed helper with the socket as fd 3 and cwd as fd 4, and verifies SO_PEERCRED.Pid remains the Node process PID. After helper exit, an unrelated /bin/sh checks that neither /proc/self/fd/3 nor /proc/self/fd/4 exists.TestSendStartTransfersExactlyOneCloexecDirectoryDescriptor in cmd/client/main_test.go passes runtime 60, command /bin/printf, and argument ok; receives with unix.MSG_CMSG_CLOEXEC; rejects message/control truncation; requires exactly 1 control message containing exactly 1 descriptor with FD_CLOEXEC; and decodes the original command/argument boundaries.TestDecodeStartEnforcesCommandArgumentAndAggregateLimits rejects: a command of protocol.MaxCommandSize+1; an argument of protocol.MaxArgSize+1; and aggregate metadata containing command x, 4 arguments each of protocol.MaxArgSize, plus another argument x./home/byk/.local/share/opencode-v2-pilot/config/opencode/tsconfig.json (18 lines). It uses strict: true, noEmit: true, target/lib ESNext, module Preserve, module resolution Bundler, allowImportingTsExtensions: true, Bun types, and includes plugins/**/*.ts plus test/**/*.ts. Path aliases map @opencode/plugin to /home/byk/Code/opencode-v2-pilot/packages/plugin/src/promise/index.ts and @opencode/plugin/* to /home/byk/Code/opencode-v2-pilot/packages/plugin/src/promise/*.ts./home/byk/.local/share/opencode-v2-pilot/config/opencode/package.json (10 lines). It is private ESM, depends on effect via file:/home/byk/Code/opencode-v2-pilot/node_modules/.bun/effect@4.0.0-rc.112/node_modules/effect, and uses dev dependency @types/bun version 1.2.21./home/byk/.local/share/opencode-v2-pilot/config/opencode/test/followup.test.ts; no file contents were shown./home/byk/Code/opencode-v2-pilot/packages/server/test/pty-socket.test.ts, packages/server/test/persistent-pty.test.ts, packages/server/src/pty-environment.ts, packages/server/src/handlers/pty.ts, packages/server/src/handlers/pty-socket.ts, packages/server/src/handlers/persistent-pty.ts, packages/schema/src/persistent-pty.ts, packages/schema/src/pty.ts, packages/schema/src/pty-ticket.ts, packages/protocol/src/groups/pty.ts, packages/protocol/src/groups/persistent-pty.ts, packages/client/test/solid-pty.test.ts, packages/client/src/solid/pty.ts, packages/client/src/pty-handoff.ts, packages/core/test/persistent-pty-daemon.test.ts, packages/core/test/pty/pty-windows.test.ts, packages/core/test/pty/pty-session.test.ts, packages/core/test/fixture/pty-windows.ts, packages/cli/script/opencode-pty.ts, packages/core/src/pty.ts, packages/core/src/persistent-pty/pty-binding.ts, packages/core/src/persistent-pty.ts, packages/core/src/pty/pty.workerd.ts, packages/core/src/pty/pty.node.ts, packages/core/src/pty/pty.bun.ts, packages/core/src/pty/pty.ts, and packages/core/script/fix-node-pty.ts.2ac698d65aa4690a694307e9cbdf44537ea9a4fb with 7 modified tracked files: packages/core/src/plugin/host.ts, packages/core/test/plugin.test.ts, packages/core/test/plugin/fixture.ts, packages/core/test/plugin/host.ts, packages/plugin/src/effect/permission.ts, packages/plugin/src/promise/adapter.ts, and packages/plugin/src/promise/permission.ts; and 3 untracked directories: packages/cli/dist-v2-pilot-final/, packages/cli/dist-v2-pilot-next/, and packages/cli/dist-v2-pilot/.packages/plugin/src and that reviewed identity is based on the content hash rather than Git commit alone. Assistant described the checkout as having 6 uncommitted plugin/core files, while the displayed Git status listed 7 modified tracked plugin/core files.packages/core/src/plugin/host.ts now exposes permission.assert as permission.assert; packages/plugin/src/effect/permission.ts and packages/plugin/src/promise/permission.ts add PermissionAssertInput with sessionID, action, resources, optional save, metadata, source, and agent. The Effect API returns Effect.Effect<void, unknown>; the Promise API returns Promise<void>. packages/core/test/plugin/host.ts adds the default test stub assert: () => Effect.die("unused permission.assert").packages/plugin/src/promise/adapter.ts adds TypedFailure, and Promise-plugin permission.assert runs host.permission.assert(input) while converting typed Effect failures through Effect.catch((error) => Effect.die(new TypedFailure(error))), preserving them across the Promise boundary.executePromiseTool in packages/plugin/src/promise/adapter.ts changes from Effect.promise to Effect.tryPromise. A rejected TypedFailure becomes Effect.fail(new Tool.Error(...)); its message prefers a string feedback property, then Error.message, then String(error.error). All other Promise-tool errors become defects through Effect.die(error).packages/core/test/plugin/fixture.ts replaces a fixed permission layer with exported pluginTestLayer(assert: Permission.Interface["assert"] = () => Effect.void), injecting the supplied assertion implementation into Permission.Service; PluginTestLayer remains exported as pluginTestLayer()."exposes canonical permission assertions to Promise plugins" activates plugin promise-permission, calls ctx.permission.assert for session ses_plugin_permission, action shell, resources ["'true'"], and tool source {messageID:"msg_plugin_permission", id:"call_plugin_permission"}, then requires the plugin state to remain "active"."preserves Promise permission assertion outcomes through tool execution" adds Promise-plugin tool permission and checks ordered outcomes: action "allow" returns text "allowed"; "corrected" raises Permission.CorrectedError with feedback "Use a read-only command instead" and must become Tool.Error with that message; "defect" dies with Error("permission assertion defect"); and "declined" dies with Permission.DeclinedError. Both defect and declined exits must have dies and no fails.packages/plugin/src/promise/adapter.ts found 8 Effect.runPromise/Effect.runPromiseWith matches at lines 82, 247, 248, 251, 274, 425, 426, and 617; line 617 is the Promise-tool progress bridge Effect.runPromise(context.progress(update)).