Skip to content

ST4: worker — Go reference worker (dial Attach, run/stream/abort, dedup, dual timeout) #87

Closed

Description

@pdettori

ST4 — Worker: Go reference worker

Part of the SandboxTransport epic (see epic #89). Worker track (Go / sandbox side) — a separate contributor from the backend. Depends only on ST1 (the published sandbox/v1 proto); builds in parallel with ST2/ST3.

Spec: docs/specs/2026-07-08-sandbox-transport-grpc-design.md §7, §8.

Problem

The contract is language-neutral (ST1), but nothing yet proves it: we need one worker that a) implements the SandboxWorker.Attach client, and b) is deliberately not TypeScript — the honest proof the seam isn't secretly TS-shaped (driver #2, §2). A Go static binary drops into any sandbox image with no runtime dependency.

Goal

Ship a thin, single-purpose Go static binary that holds no LLM key and no orchestration — it only executes commands and returns bytes (what makes "central brain" trust-correct, §7). Behavior per §7:

  1. On start: read SANDBOX_ID, RELAY_ADDR, SANDBOX_TOKEN from env; dial SandboxWorker.Attach over TLS :443 (HTTP/2) with Authorization: Bearer <token>.
  2. Send Hello (id, labels, capabilities, capacity_max, trust).
  3. Loop on ServerFrame:
    • Exec → run bash -c <command> locally, feeding stdin. If streaming: emit Chunk* then End{exit_code}. Else: a single End carrying full stdout. Enforce timeout_s locally (SIGKILL on expiry).
    • Abort → SIGKILL the in-flight child for that req_id.
  4. Send Heartbeat periodically (liveness + NAT/proxy keepalive).
  5. Maintain a bounded req_id → End dedup cache; on a redelivered req_id, re-emit the cached result instead of re-running (at-least-once + dedup, §8).

Persistent-shell semantics (one long-lived bash preserving cwd/env across execs) are an internal choice; the wire only requires ordered, one-in-flight execs (§7).

Non-goals (this task)

  • The relay and GrpcRelayTransport (ST3 — backend).
  • mTLS / SPIFFE (bearer token only day-one, §9); additional-language workers (§13.4).
  • Any orchestration or credential handling in the worker.

Acceptance

  • Go contract test (Go test, real Attach against a relay, worker pointed at local bash) round-trips read/write/bash/grep, plus abort mid-stream, timeout (worker SIGKILLs child), and reconnect → dedup (redelivered req_id re-emits cached End, no re-run).
  • Static binary, no runtime deps; drops into a sandbox image.
  • Chunk size capped so a single frame stays small (backpressure, §8).

Touches

New Go module for the worker (e.g. worker/ or a dedicated repo dir), consuming ST1's generated Go stubs; a minimal container build for the static binary; Go unit + contract tests.

Next step

Join ST3 for the ST5 live gate (real worker pod → in-cluster relay on :443). Worker plan lives locally in docs/plans/, authored by the worker contributor.

Activity

  1. pdettori commented on Jul 10, 2026

    @pdettori
    MemberAuthor

    Testing the Go worker against the ST3 backend

    ST3 (#86, PR #93) is merged, so the relay + GrpcRelayTransport are available to test against now — you don't need to wait for ST5. There are two levels; Level 1 is the fast inner loop and exercises everything the worker must get right.

    Level 1 — worker ↔ relay contract loop (no harness needed)

    1. Redis + relay:

    docker run --rm -p 6379:6379 redis:7            # or reuse an existing one
    # from repo root:
    SH_RELAY_TOKEN=dev-token SH_RELAY_PORT=8443 REDIS_URL=redis://127.0.0.1:6379 \
      pnpm --filter @sh/sandbox-relay start          # binds 0.0.0.0:8443, plaintext (TLS terminates at ingress in prod)

    2. Worker connects: dial localhost:8443 (h2c / insecure), open SandboxWorker.Attach, attach metadata authorization: Bearer dev-token, and send WorkerFrame{hello:{sandbox_id:"sbx-dev-1", ...}} as the first frame. The token must match SH_RELAY_TOKEN (or set SH_RELAY_TOKEN_sbx-dev-1 for a per-sandbox token) — auth is fail-closed: if no token is configured for the sandbox, or it doesn't match, the Attach is rejected before the stream is parked.

    3. Verify presence — the live Attach stream is the registration:

    redis-cli HGETALL sh:sandbox:records     # → field "sbx-dev-1" = {"transport":"grpc",...}
    # close the worker's Attach stream → the field disappears (removed on stream close/error)

    4. Drive an exec from the harness-facing side — two options:

    (a) The real harness client (recommended — it's the exact code the harness runs):

    import { SandboxExecClient, GrpcRelayTransport } from "@sh/k8s-sandbox";
    import { credentials } from "@grpc/grpc-js";
    const client = new SandboxExecClient("localhost:8443", credentials.createInsecure());
    const t = GrpcRelayTransport("sbx-dev-1", client as any);
    const r = await t.exec("echo hello; echo oops >&2; exit 7", { onData: c => process.stderr.write(c) });
    console.log("stdout:", r.stdout.toString(), "exit:", r.exitCode);  // "hello\n", 7
    await t.close();

    Run it with tsx. This proves the whole relay→worker→relay round-trip and the stdout/stderr split in one shot.

    (b) grpcurl (the relay does not register gRPC reflection, so pass the proto):

    grpcurl -plaintext -proto proto/sandbox/v1/sandbox.proto \
      -d '{"sandbox_id":"sbx-dev-1","exec":{"req_id":1,"command":"echo hi","timeout_s":10,"streaming":true}}' \
      localhost:8443 sandbox.v1.SandboxExec/Exec

    The wire contract the worker must satisfy

    From proto/sandbox/v1/sandbox.proto (§8) and what GrpcRelayTransport expects:

    • stdout/stderr split: stdout → Chunk{stream: STREAM_STDOUT} (collected into the returned stdout); stderr → Chunk{stream: STREAM_STDERR} (streamed to onData, excluded from the returned stdout). This is the reason ST3 added Chunk.stream.
    • terminate each exec with End{req_id, exit_code}; exit_code < 0 means signal/none (the harness maps it to null). Failures → ExecError{req_id, message}.
    • abort: on ServerFrame{abort}, SIGKILL the child and emit a terminal frame for that req_id.
    • worker-side timeout: kill the child at exec.timeout_s (the harness enforces its own deadline too — dual-ended).
    • dedup / at-least-once: cache req_id → End; on a redelivered req_id after a reconnect, re-emit the cached terminal result rather than re-running.
    • stdin: feed exec.stdin bytes to the child's stdin. Heartbeat frames are liveness-only (the harness owns lease counts).

    Level 2 — full path (worker ↔ relay ↔ harness)

    Run the harness with SH_REMOTE_SANDBOX=1 and SH_RELAY_ADDR pointed at the relay; with a grpc pool record present, select-sandbox leases it and run-leaf drives a real leaf through GrpcRelayTransport. The end-to-end leaf-smoke for this (extending deploy/knative/leaf-smoke.sh with the relay path) is ST5 (#88)'s deliverable — so Level 1 is what unblocks worker development now; Level 2 lands with ST5.

    Reference pointers

    • Source of truth: proto/sandbox/v1/sandbox.proto (§4 messages/services, §8 wire semantics).
    • Go stubs: gen/go/sandbox/v1/ (module github.com/kagenti/serverless-harness/gen/go) — there's already a contract_test.go there.
    • Relay behavior your worker must interoperate with: packages/sandbox-relay/src/relay.ts (park / presence / routing).
    • Harness-side expectations: packages/k8s-sandbox/src/grpc-relay-transport.ts (reqId correlation, Chunk.stream split, dedup, deadline, per-exec output cap).

    Assisted-By: Claude Code

  2. pdettori commented on Aug 26, 2026

    @pdettori
    MemberAuthor

    Status check — code vs. acceptance (as of docs/turn-sse-streaming-spec, 2026-08-26)

    A worker exists in remote-worker/ but it is the HELLO WORLD proof-of-connectivity stub (landed in 9c78d78 feat(remote-worker): HELLO WORLD SandboxTransport worker), not on main. Its own header says "It runs no shell and holds no secrets." It proves the frame flow but does not yet satisfy the §7 behavior or the acceptance battery.

    Done ✅

    • Dials SandboxWorker.Attach (TLS or h2c) with Authorization: Bearer <token> — remote-worker/main.go:51-68
    • Hello first frame (id / capabilities / capacity_max / trust) — main.go:83-92
    • Periodic Heartbeat (15s) — main.go:96-107
    • Bounded req_id → End dedup cache; redelivered req_id re-emits cached End — main.go:110-142
    • Static-binary container build — remote-worker/Dockerfile

    Missing ❌

    • Executes no bash -c <command> — the core of the worker. It emits fixed "HELLO WORLD" chunks + an echo; there is no child process. main.go:146-153
    • No timeout_s enforcement / SIGKILL on expiry.
    • Abort is stubbed — main.go:128: "Nothing long-running to kill in the stub; emit a signalled terminal." No real child to kill.
    • No streaming vs. non-streaming distinction over real output (single End carrying full stdout when !streaming).
    • No chunk-size cap for backpressure (§8) — output is fixed literals.
    • Go contract test absent. gen/go/sandbox/v1/contract_test.go only does proto marshal/unmarshal round-trips (TestHelloRoundTrip, TestExecNegativeExitCode). None of the required battery: real Attach against a relay with the worker pointed at local bash, round-tripping read/write/bash/grep, abort mid-stream, timeout (worker SIGKILLs child), reconnect → dedup.

    Also

    • Worker track is not merged to main — it lives only on feature branches (this branch is 111 commits ahead of main; remote-worker/ is absent from main).

    Net: connectivity + framing + dedup are proven; real command execution, timeout, abort, and the contract test remain. This blocks the #88 live gate — no leaf can complete through the remote path until the worker actually runs commands.

  3. pdettori commented on Aug 27, 2026

    @pdettori
    MemberAuthor

    ST4 findings — four discrepancies worth other tracks' attention

    Surfaced while implementing the reference worker in remote-worker/ against
    §3/§4/§6/§7 of the design. Design doc:
    docs/specs/2026-08-26-st4-go-reference-worker-design.md.

    1. req_id is not unique per worker (affects ST1/ST3)

    harness/src/select-sandbox.ts:60 deliberately shares sandboxes ("pick
    least-loaded under the soft cap"). Each leaf builds its own
    GrpcRelayTransport for the same sandbox_id, and
    packages/k8s-sandbox/src/grpc-relay-transport.ts:22 seeds reqCounter = 0
    at module scope — per harness process. Knative scales the harness to
    multiple replicas, and the relay (packages/sandbox-relay/src/relay.ts)
    multiplexes all of them onto the one Attach stream it keeps per sandbox_id
    (one Parked entry per sandbox, reqId-keyed sinks registered onto it —
    relay.ts:105-125), so replica A and replica B both send req_id: 1, 2, 3…
    to the same worker.

    A req_id-keyed dedup cache would therefore answer replica B's cat /a with
    the cached terminal frame from replica A's unrelated command — a silent wrong
    result.

    Worker-side mitigation (shipped): the cache
    (remote-worker/internal/session/cache.go) compares a SHA-256 fingerprint of
    command+stdin as well as req_id (Fingerprint, cache.go:15). A
    genuine redelivery is byte-identical and re-emits the cached frame; a
    collision has a different fingerprint, runs fresh, and logs a warning
    (internal/session/loop.go's accept, the collision branch). The same
    fingerprint is also carried on the in-flight slot, which is where the collision
    window is widest: while the original is still running the cache cannot see it at
    all, so a matching fingerprint is coalesced as a redelivery and a mismatching one
    is refused with an ExecError rather than silently swallowed.

    Proposed real fix: make req_id globally unique — a random 64-bit seed
    per transport instance, or a replica-scoped prefix. The worker guard is
    defense-in-depth, not a substitute.

    Worth noting the hazard the dedup cache was built for does not exist yet: the
    relay never redelivers (it fails in-flight execs on stream close with
    { error: { reqId, message: "worker disconnected" } },
    relay.ts:87-98) and the harness never retries a req_id.

    2. §7's non-streaming shape is not expressible in sandbox/v1 (doc fix)

    §7 and §8 of the parent spec say non-streaming ops return "a single End
    carrying full stdout", but the wire message is
    message End { uint64 req_id = 1; sint32 exit_code = 2; }
    (proto/sandbox/v1/sandbox.proto:67) — there is no data field to carry
    output on. GrpcRelayTransport.exec also always sends streaming: true
    regardless of caller intent (grpc-relay-transport.ts:51), so the flag is
    currently dead on the wire in both directions.

    The worker honors the flag's observable intent — no incremental delivery
    while the process is running — without inventing a new field: for
    streaming: false it buffers stdout/stderr until the process exits, then
    emits them as Chunk frames capped at ChunkSize (32 KiB,
    internal/exec/runner.go:24) per stream. Small output still round-trips as
    exactly one Chunk per stream; output larger than the cap goes out as
    several Chunks in that same post-exit burst, since a single frame must stay
    under the wire's 32 KiB cap regardless of the streaming flag
    (internal/exec/runner.go's emitBuffered, exercised by
    TestNonStreamingChunksAtExit and TestNonStreamingSmallOutputIsOneChunkPerStream
    in internal/exec/runner_test.go). Adding bytes stdout to End was
    rejected: it changes a published contract other tracks build against, for a
    field the harness never reads, and creates two ways to return the same
    bytes. Suggest correcting the prose in the parent spec to describe delivery
    timing ("all at once, after exit") rather than frame shape ("a single End
    carrying stdout").

    3. Neither worker image had a shell (fixed here)

    remote-worker/Dockerfile built its final stage on
    gcr.io/distroless/static-debian12:nonroot, and remote-worker/Dockerfile.runtime
    on registry.access.redhat.com/ubi9/ubi-micro:latest. Once the worker
    actually runs bash -c <command> per exec, every exec would fail with
    ENOENT
    in those images. Both now use
    registry.access.redhat.com/ubi9/ubi-minimal:latest with bash,
    coreutils-single (base64, used by writeFile), findutils, and file
    (image MIME sniffing) installed via microdnf. Both images were built and
    run (verified on the change that swapped the base, not repeated for this
    write-up) to confirm bash, base64, and file are present and that the
    non-root USER 1001 takes effect.

    This does not weaken "static binary, no runtime deps": the build stage still
    runs CGO_ENABLED=0 go build (remote-worker/Dockerfile), so the binary
    itself stays CGO-free and statically linked. bash is a dependency of the
    commands the worker execs, not of the worker binary. In production the
    binary drops into a sandbox image that already has a shell — it is the two
    standalone demo images (built directly from this repo, not from a sandbox
    image) that needed the base swap.

    4. A cache hit re-emits only the terminal frame, never the output chunks (contract gap)

    The dedup cache (internal/session/cache.go) stores exactly one
    *pb.WorkerFrame per req_id — the terminal frame (End or ExecError)
    that runOne produced the first time. On a redelivery, accept in
    internal/session/loop.go looks the frame up and sends it straight back
    (trySend(frame)) without ever calling runOne again — so no Chunk
    frames are re-emitted, because none were ever cached. A redelivered
    streaming exec therefore returns its correct exit code with zero
    output
    . For cat file that means End{exit_code: 0} with no Chunk ever
    sent — the caller sees a successful exit and empty content, a silently
    wrong answer.

    The worker is spec-compliant here: the design's own dedup table says a
    fingerprint match should "re-emit cached terminal frame, do not run"
    (§6.3), and End has nowhere to put output even if the worker wanted to
    resend it (see finding 2 — End carries only req_id and exit_code). So
    the gap is in the contract, not in this implementation.

    Why it is not a real bug today: it is unreachable — nothing in the
    system redelivers a req_id (see finding 1's last paragraph: the relay
    fails in-flight execs rather than replaying them, and the harness does not
    retry). It is listed here anyway because it is the same class of problem as
    finding 1: both are latent consequences of dedup being specified only in
    terms of req_id and a terminal frame, with no accounting for what a
    streaming exec's redelivery should return.

    Proposed real fix: if redelivery becomes reachable (e.g. a future
    retrying relay), the contract needs either (a) an explicit statement that a
    cache hit answers with the terminal frame only and callers must not expect
    output on a redelivered streaming exec, or (b) a cache that also replays
    buffered Chunks, which requires bounding how much output a cache entry may
    hold. Today's worker takes the cheapest correct-by-contract option: it does
    exactly what the spec says and nothing more.

    Assisted-By: Claude (Anthropic AI) [email protected]

  4. pdettori commented on Aug 27, 2026

    @pdettori
    MemberAuthor

    ST4 acceptance — where each criterion is covered

    All tests below live under remote-worker/ and were re-run for this
    write-up: go test -race ./... — EXIT:0, 46 passed, 2 skipped (both
    skips explained below; neither is a failure). Contract tests run over a
    real gRPC connection to an in-process fake relay
    (remote-worker/internal/relaytest) driving a real bash, not mocks.

    Criterion Test
    round-trips read TestContractRead (internal/session/contract_test.go) — cat <file>
    round-trips write TestContractWrite (internal/session/contract_test.go) — base64 -d > <file> with stdin, asserts file content on disk
    round-trips bash TestContractBash (internal/session/contract_test.go) — stdout/stderr split across streams + exit 7
    round-trips grep TestContractGrepStreamsMultipleChunks (internal/session/contract_test.go) — ~149 KiB of matches, asserts ≥2 chunks and every chunk ≤ ChunkSize
    abort mid-stream TestContractAbortMidStream (internal/session/contract_test.go) — aborts after a real chunk arrives; asserts End{exit_code:-1} and that a sentinel file the child was appending to stops growing (proves the whole process group died, not just that reads stopped)
    timeout (worker SIGKILLs child) TestContractTimeout (internal/session/contract_test.go) — sleep 30 with timeout_s: 1 → ExecError{message:"timeout:1"}, asserts it took under 10s
    reconnect → dedup TestContractReconnectDedup (internal/session/contract_test.go) — runs req_id 7, drops the stream, reattaches on the same Session, resends req_id 7; asserts the cached End{0} comes back and that a marker file the command appends to still has exactly one line (the command did not re-run)
    static binary, no runtime deps remote-worker/Dockerfile's build stage: CGO_ENABLED=0 go build -trimpath -ldflags "-s -w". Both runtime images (Dockerfile, Dockerfile.runtime) were built and run, with bash, base64, and file checked present and USER 1001 confirmed, when the base image was swapped — a one-time build+run check done for that change, not a repeatable CI gate
    chunk size capped TestChunkCapSplitsLargeOutput (internal/exec/runner_test.go, unit) + TestContractGrepStreamsMultipleChunks above (contract-level)

    All nine rows above run in CI with no Redis, node, or pnpm — they are pure
    Go and need only a real bash on PATH.

    Two things intentionally not counted as passing evidence yet:

    • SH_LIVE_RELAY=1 gated interop has never been run in this work.
      TestLiveRelayInterop (internal/session/live_test.go) drives read,
      write, and bash through the real TypeScript relay via
      SandboxExec.Exec — the one thing the self-authored fake relay cannot
      vouch for. It skips (t.Skip("SH_LIVE_RELAY!=1: ...")) unless that env
      var is set, and it was not set for any run in this task. It exists and
      compiles; it has not exercised the real relay. Full interop remains
      ST5 (ST5: integration & live gate — cross-transport conformance + end-to-end leaf (Kind → OCP) #88)'s gate.
    • The escaped-process-group unit test skips on this platform.
      TestRunReturnsWhenPipeHolderEscapesGroup (internal/exec/runner_test.go)
      covers a pipe holder (e.g. a backgrounded grandchild) that detaches from
      the process group and survives the group's SIGKILL; it needs the
      setsid binary to simulate that, and skips with t.Skip("no setsid: ...")
      when setsid is not on PATH — which is the case on macOS, where this
      worker was built and tested. It has run only in principle here; CI
      (.github/workflows/ci.yml's "Build and test remote-worker" step, on
      ubuntu-latest, which ships setsid) is where it actually executes.
      This is distinct from
      TestContractAbortMidStream and TestContractTimeout above, both of
      which kill the whole process group via Setpgid + Kill(-pid, ...)
      directly and do run (and pass) on macOS — the escape test is specifically
      about a pipe holder that has left that group.

    Two behaviors worth flagging as deliberate, both argued in the design doc
    (docs/specs/2026-08-26-st4-go-reference-worker-design.md):

    • timeout → ExecError{"timeout:<n>"}, not End{-1}. All three
      existing harness transports reject with exactly that string
      (packages/k8s-sandbox/src/exec.ts:79,
      packages/k8s-sandbox/src/persistent-exec.ts:129, and
      GrpcRelayTransport's own deadline path), and the worker's own timer
      normally fires first, so its choice is what the caller sees. End{-1}
      would make a timeout resolve as a success with partial output.
    • only completed determinations are cached — a normal exit and a
      timeout, not an abort (internal/session/loop.go's runOne: the
      cacheable flag is set for the err == nil and ErrTimeout branches
      only, not for ErrAborted). Caching End{-1} for an abort would make
      every later redelivery of that req_id answer -1 forever, even though
      the command never actually ran to completion.

    Assisted-By: Claude (Anthropic AI) [email protected]

  5. pdettori commented on Aug 27, 2026

    @pdettori
    MemberAuthor

    Correction to finding 1 and finding 4 — the fingerprint now covers timeout_s and streaming

    PR review turned up a real gap in the guard I described in finding 1. The fingerprint
    covered command + stdin only, so two axes of the cross-replica collision went
    straight through it:

    delivery 1  req_id 5  "sleep 3"  timeout_s=1   -> ExecError{timeout:1}   [1.01s, ran]
    delivery 2  req_id 5  "sleep 3"  timeout_s=30  -> ExecError{timeout:1}   [649us, NEVER RAN]
    

    The second delivery had ten times the budget it needed and was failed off the cache in
    649µs. Not a cosmetic wrong-message defect — a spurious failure for work that would have
    succeeded. Same shape on the streaming flag:

    delivery 1  req_id 9  "echo hello"  streaming=false -> stdout "hello\n"
    delivery 2  req_id 9  "echo hello"  streaming=true  -> stdout ""
    

    Both fields are now in the hash. A genuine redelivery carries the same Exec message,
    so they are stable across it and including them costs nothing on the path dedup is
    actually for — while excluding them let a collision differing only in budget or
    delivery mode be answered from the wrong entry.

    This also closes the flag-flip half of finding 4 locally, without waiting on the
    contract change: a redelivery that flips streaming now runs fresh instead of being
    answered by a cached terminal frame with no chunks. The rest of finding 4 stands — a
    same-shape redelivery still re-emits the terminal frame with no output, because End
    has nowhere to put output.

    The behavior is pinned by a contract test that asserts the redelivery runs (~3s,
    End{0}) rather than merely returning a different frame. Mutation-checked: excluding
    timeout_s from the hash fails it in 1.01s with timeout_s must be part of the fingerprint.

    Finding 1's real fix is unchanged and still upstream: make req_id globally
    unique. The worker's guard is defense-in-depth, and this PR only widened what it
    covers.

    Assisted-By: Claude Code

  6. added 19 commits that reference this issue on Aug 27, 2026
  7. pdettori commented on Aug 27, 2026

    @pdettori
    MemberAuthor

    Shipped and merged — PR #172, on main at 84118c9

    Verified against merged main rather than the branch: go test -race ./... green across
    all three packages, 0 races.

    Acceptance, item by item

    Criterion Where
    round-trips read TestContractRead — cat <file>
    round-trips write TestContractWrite — base64 -d > <file> on stdin, asserts the bytes on disk
    round-trips bash TestContractBash — stdout/stderr on distinct stream enums, real exit 7
    round-trips grep TestContractGrepStreamsMultipleChunks — ~149 KiB → ≥2 chunks, each ≤32 KiB
    abort mid-stream TestContractAbortMidStream — asserts a sentinel file stops growing, which proves the process group died rather than that reads merely stopped
    timeout (worker SIGKILLs child) TestContractTimeout — sleep 30 at timeout_s: 1 → ExecError{"timeout:1"} in ~1s
    reconnect → dedup TestContractReconnectDedup — drops the stream, reattaches, redelivers req_id 7; asserts the cached terminal frame and that the marker file still holds one line
    static binary, no runtime deps CGO_ENABLED=0 build; the image was rebuilt and exercised — real bash, uid=1001, exit 7 propagating, base64 -d > file round-tripping
    chunk size capped ChunkSize = 32 * 1024, which is also the pipe read size

    Beyond the letter of the list: the worker reconnects with jittered backoff while
    preserving its dedup cache (the stub exited on the first receive error, so a restart
    wiped it and made the dedup criterion unreachable by construction), and both container
    images now ship a shell — they previously shipped none, so every exec would have failed
    with ENOENT.

    One thing this does not claim

    The battery runs against an in-process Go relay written for these tests
    (remote-worker/internal/relaytest). That is a real gRPC Attach with a real stream and a
    real bash, and it is the only way to reach the redelivery path at all — the production
    relay is a pure bridge that cannot redeliver a req_id. But it encodes this repo's
    reading of the wire contract, so its agreement is not independent evidence.

    The gated interop tier that would supply that (TestLiveRelayInterop, SH_LIVE_RELAY=1,
    driving the real relay via SandboxExec.Exec) exists and has never been run — CI has no
    relay. Running it is the cheapest first step of #88's live gate, and I have left a handover
    there covering this and cross-transport equivalence.

    Findings

    Four discrepancies are written up above; the epic-level ones are on #89. Worker-specific
    follow-ups that were deliberately not fixed are tracked in #173, audited against shipped
    code — nothing there affects this battery or runtime correctness.

    Closing: the acceptance criteria are met on main. #88 owns what remains.

    Assisted-By: Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions