Repository navigation
Description
Follow-ups from the ST4 worker (#87, PR #172) that were seen, judged, and deliberately
not fixed. None affects the acceptance battery or runtime correctness on the paths the
harness exercises today.
Filed as its own issue rather than a note in the repo, because an in-repo list went stale
within one commit: it was generated from an implementation ledger that recorded findings
as they were raised and never reconciled against the code after the final review wave,
so it advertised three blockers that were already fixed. Everything below was audited
against feat/st4-go-worker at review time.
Item numbers are stable and never reused. Resolved items move to Resolved at the
bottom keeping their original number, because commit messages and a test comment
(packages/knative-server/test/worker-deployment.test.ts) cite them as "#173 item N".
Last reconciled against main at dd77aca, 2026-09-08 — each open item below was
re-verified in the tree, not just re-read. Four items remain open: 2, 4, 9, 10.
None is a correctness defect: 2 needs a both-ends wire decision, 4 is a pure refactor, and
9 and 10 are small. Note item 4 is now more worth doing than when filed — PRs #229 and #230
both touched accept's signature, which is the plumbing item 4 is about.
Worth doing, in rough priority order
-
2. gRPC
MaxCallRecvMsgSizeis unconfigured, so abase64write payload above the
4 MiB default is rejected.
kills the whole stream rather than one exec, triggering a reconnect. Needs a decision
on both ends plus a documented max write size — relay-side coordination, which is why it is
not in the PR.
Severity corrected 2026-09-08, and it is LOWER than written — but the real defect is
something this item never mentioned. Traced rather than re-read; see
the analysis comment below.- The stream is not killed. Two receivers could reject the oversized
Exec: the relay's
SandboxExecserver (harness→relay, anExecRequest) and the worker's Attach client
(relay→worker, aServerFrame).ExecRequestis{sandbox_id, exec}andrelay.ts
forwards{exec: {…}}with nosandbox_id, so the frame the worker receives is
strictly smaller than the request that carried it in. Both limits are 4 MiB, so the
relay's ingress always trips first and the Attach stream never sees the payload. Blast
radius is one exec, rejected withRESOURCE_EXHAUSTED. - The real defect is a read/write asymmetry. Read is
cat→ raw stdout, capped by
DEFAULT_OUTPUT_CAPat 8 MiB. Write is content → base64 (×4/3) →stdin, capped at 4 MiB
⇒ ~3 MiB of file. The relay path can therefore read a file it cannot write back,
andcreatePodEditOpscomposes read with write, so Pi's Edit on a 4 MiB file succeeds at
reading and then fails.KubectlTransporthas no such ceiling, so the identical write
succeeds on the pod path — the backend-dependent divergence persistentExecInPod is an uncapped third SandboxTransport, and it serves the file-reading tools #180/KubectlTransport has no default deadline while GrpcRelayTransport always applies 120s, and the battery cannot see it #182/Output-cap enforcement is not equivalent across transports: kubectl kills only the local client #185 were closed on. - "Needs a both-ends decision" was illusory, and is what kept this item untouched for a
month. Derive the limit instead:DEFAULT_OUTPUT_CAP × 4/3plus command and framing
headroom, pinned by a coupling test the wayoutput-cap-coupling.test.tspins the caps.
Write capacity ≥ read capacity by construction, no committee required.
- The stream is not killed. Two receivers could reject the oversized
-
4. Unify the session's state plumbing.
abortReq/finishclose overinflight/mu
whilerecvLoop/accepttake the map and a*sync.Mutexas positional parameters —
seven parameters, two of them raw synchronization primitives. For a file whose central
safety property is "every access is undermu", one convention would make that locally
checkable instead of requiring a whole-file audit. A small struct with methods collapses
both signatures. Wanted specifically because this is the reference implementation
other language ports get written against.
Still open atloop.go:248(recvLoop) andloop.go:278(accept). Pure refactor —
best folded into whichever change next touches that file.
Smaller
-
9.
settle()is a fixed sleep in an otherwise poll-based test file. Justified: there
is no exported observable for "the inflight slot has been released". An exported test
hook would let it become a condition wait. -
10. The images install
findutils, which none of the harness's operations use.
Still present inremote-worker/Dockerfileandremote-worker/Dockerfile.runtime.
Resolved
-
1. A dropped refusal left an exec unanswered. Done in PR fix(worker): reserve outbound capacity for terminal frames (#173 item 1) #230 (
b0da405, refined in
26c689b). The receive goroutine sent through a non-blockingtrySendso it could never
stall and miss anAbort, but every frame it sends is terminal and refusals are uncached,
so a drop lost the caller's only answer — and it correlated with the overload that caused it.
KubectlTransport has no default deadline while GrpcRelayTransport always applies 120s, and the battery cannot see it #182 had since made that stall up to 30 minutes (DEFAULT_EXEC_TIMEOUT_S), retiring the
deferral's own "survivable because the harness timeout is dual-ended".
The remedy named in this item is unsafe as written. "A priority channel, or a dedicated
terminal-frame forwarder" both let a terminal frame overtake queued chunks for the same
req_id, and spec §8 requiresChunk* thenEnd. Two reachable cases: a cache-hit replay
overtaking the original's still-queued chunks, and a colliding refusal overtaking an earlier
exec's frames under the same id — the harness settles on whichever lands first and discards
the real output behind it. Safe priority needs per-req_idpending tracking.
Shipped instead: reserved capacity in the single channel.outboundstays one FIFO (so it
cannot reorder, by construction) and gainsTerminalReserve(QueueCap/4= 16) slots that a
chunkSlotssemaphore keeps chunk producers out of; the sender releases a slot when it
takes a non-reserved frame, so the accounting measures channel residency rather than
trackingSendlatency. Exhaustion is then a genuinely different condition — nothing draining
at all — soacceptreturnsErrEgressWedged,recvLooppropagates it, andServereturns
it formain.goto re-dial, with dedup answering redeliveries (§5, §6.2). A dropped cache-hit
replay escalates too: the harness redelivers precisely because it never got the first answer.
Guarded byTestBusyRefusalSurvivesAChunkBacklog(defect + FIFO),
TestExhaustedReserveEndsTheSession, and a compile-time assertion that the reserve cannot
silently become 0. No wire or proto change — §8 is enforced here, not amended.
Also fixed a teardown wedge that predates this item: aSendthat blocks (rather than
fails) parked the sender, so a producer waiting for room waited forever andwg.Wait()never
reached zero, after whichServecould never return — the one thing that makesmain.go
re-dial.enqueuenow gives up onconnCtx.TestSendFailureDoesNotWedgeTeardownmissed it
because a failingSendlets the sender keep draining. Pinned by
TestBlockedSendDoesNotWedgeProducers. -
3.
SANDBOX_TOKENwas a literal env value inworker-deployment.yaml, filled by
sedindeploy-incluster.sh, so it landed in the Deployment spec,oc describe, and
any GitOps mirror. Done in PR fix: open-issue triage, first session (#190, #191, #192, #182, #173 item 3) #226 (e33bf3eand follow-ups): the token now arrives
viasecretKeyRefon the worker Deployment, the OCP overlay, and both deploy scripts,
and both relay and worker are restarted after a token rotation, since env from a
secretKeyRefis resolved only at pod start.worker-example.yamlkeeps its literal
dev-tokenon purpose. Guarded by
packages/knative-server/test/worker-deployment.test.ts, which fails if the literal
returns or if thesecretKeyRefstops matching the Secret name/key the deploy script
creates. -
5. Most tests never joined the
Servegoroutine. Done in PR fix(worker): #173 items 5, 6, 8 — build constraint, joined Serve goroutines, activity-based drain grace #229 (e8aae74).
loop_test.gogained aserve()helper that startsServeand registers the cleanup
which closes the stream and waits for the return;contract_test.go's
attachCancellablenow joins as well as cancels, and theSH_LIVE_RELAYgate joins too.
fakeStream.close()became idempotent, since the cleanup always closes as well.
Measured rather than assumed: injecting this item's exact deadline — deleting the
cancelConn()beforeclose(queue), so the heartbeat producer never returns — left
14 ofloop_test.go's 15 tests passing; with the join it fails 17. A second fault
that cancellation cannot mask (close(outbound)removed) confirmed the contract-test
join: all 11 catch it, where before they passed. No production code changed.
This item's premise was wrong on one point: it said "Two of them observe teardown".
Only one did.TestSendFailureDoesNotWedgeTeardownlooks like the second, but a failing
Sendmakes the sender callcancelConn()itself, ending the heartbeat producer as a
side effect, so it passed even with the deadlock injected. Its comment now says what it
really covers. -
6. Drain-watchdog grace was wall-clock, not activity-based. Done in PR fix(worker): #173 items 5, 6, 8 — build constraint, joined Serve goroutines, activity-based drain grace #229
(c5f17c9, refined inafc83eb).drainGraceis now a quiet period: any read returning
bytes defers the force-close, tracked by one atomic counter thatdrainbumps before
delivery. The watchdog moved out ofRuninto a package-levelwatchDrain, so both
behaviours are unit-testable at millisecond timings.
Two deliberate departures from this item as written. It was not as narrow as "the run
is already out of budget" implies — apython3writer thatos.setsid()s out of the
process group and ticks every 400 ms delivered 7 of 10 ticks, truncated at exactly
3.01 s = 1 s timeout + 2 s grace. And "resetting the timer on read activity" is unbounded
as stated, so a holder trickling forever would pin a pool slot and up toBufferCap—
a slower form of the wedge the watchdog exists to prevent. AddeddrainCeiling = 30 s
(15× the grace), verified by neutering it and watching only the ceiling test fail.
Note the real teardown bound: progress is sampled at timer expiry, not observed per
read, so the close lands between 1× and 2×drainGraceafter the last byte — up to
~4 s. Pinned byTestWatchDrainClosesAtTwiceGraceAfterTheLastRead. No wire or spec
change; the watchdog appears in no spec. -
7. The memory coupling is documented but unenforced.
BufferCap× 2 streams ×
MaxConcurrentmust fit the pod limit; both sides carried the arithmetic in a comment,
but nothing stopped a futureWORKER_MAX_CONCURRENTentry in the Deployment from
invalidating the 256Mi limit silently. Done before this issue's first triage pass
(65160bf, strengthened bya1ba25b, both 2026-08-28): the same
worker-deployment.test.tsreadsBufferCapfromrunner.go,DefaultConcurrencyfrom
loop.go, and the manifest'sWORKER_MAX_CONCURRENToverride if one exists, then
asserts the pod memory limit covers2 × concurrency × BufferCap. It throws loudly
rather than skipping if a constant is reformatted out of reach. -
8. No
//go:build unixconstraint. Done in PR fix(worker): #173 items 5, 6, 8 — build constraint, joined Serve goroutines, activity-based drain grace #229 (7aa1bad). Both
syscall.Setpgidandsyscall.Killnow sit behind//go:build unix.
This needed one step past the remedy this item prescribed. "Just the tag" would have
turned two errors about a struct literal intobuild constraints exclude all Go files in …/internal/exec— better located, but still not the "clear unsupported platform message"
the item asks for. So the!unixside is a refusal rather than a second implementation:
Runreturns "remote-worker is unix-only:<GOOS>has no equivalent of the process-group
isolation (Setpgid/Kill) that abort and timeout depend on" before spawning anything, on the
grounds that a runner which cannot reliably kill what it spawned has no correct behaviour
to offer. Still no platform-specific logic — a tag and a refusal.
Guarded byTestModuleCrossCompilesForNonUnix, which cross-compiles the module for
GOOS=windows(~1.1 s) rather than asserting on the constraint's text.
Platform note, not a follow-up
TestRunReturnsWhenPipeHolderEscapesGroup needs setsid to detach a pipe holder from the
process group, so it skips on macOS and runs on Linux CI. It is the test that hangs
rather than fails if the drain watchdog regresses, so its coverage is real — just not on a
developer's Mac.
Its sibling from item 6, TestSlowDrainKeepsTrailingOutput, needs the same detachment but
gets it from python3 -c 'import os; os.setsid()', which works on macOS too — so that one
runs everywhere. Prefer that form for any future test needing a process outside the group;
setsid(1) simply does not exist on macOS, and a test that silently skips looks exactly
like a test that passes.
Assisted-By: Claude Code
Activity
docs(notes): move the ST4 write-ups out of the repo and into the issues
docs(deploy/knative): correct SH_RELAY_TOKEN comment's blast radius
feat(deploy/knative): add live gate proving leaf execs land on relay …
test(knative-server): manifest-shape test for both worker Deployments
fix(deploy): create the relay-token Secret in the script that applies…
fix(remote-worker): restart relay and worker after rotating the token…
docs(deploy): warn that `set env` undoes the relay token's secretKeyR…
fix(remote-worker): read SANDBOX_TOKEN from a Secret, not a sed place…
fix(deploy): patch the relay's token to a Secret in the OCP overlay (#…
Merge pull request #226 from pdettori/fix/issue-triage-first-session
pdettori commentedon Sep 6, 2026
Item 3 (
SANDBOX_TOKENis a literal env value) is done in #226, merged as1b5d4ef. Leaving this issue open for the rest.It took four commits rather than the one
secretKeyRefthis item describes, because the leak had more surfaces than the item names.499269d— the worker template.SANDBOX_TOKENnow arrives viasecretKeyRef;deploy-incluster.shcreates the Secret withcreate --dry-run=client | applyso a re-run rotates instead of failing. The same script'swas putting the identical token into the relay's spec, so fixing only the worker would have left the leak open one Deployment over. It now points the relay at the same Secret.
One Secret, one key, read by both sides. Fail-closed auth requires the relay's
SH_RELAY_TOKENand the worker'sSANDBOX_TOKENto be equal, and a shared key makes that structural rather than something a test compares — which is why the key is namedSH_RELAY_TOKENeven on the worker side.7cf5058— the OCP overlay.relay-deployment.yaml'sdev-tokenis a deliberate public value for Kind, but the same file is a shared resource ofoverlays/ocp, so it was a live credential on any OCP-deployed relay. Patched in the overlay, not the base: the base is applied bare bydemo-remote-worker.sh,relay-leaf-smoke.shand README-worker.md Step 1, and since relay auth is fail-closed, a base referencing a Secret would turn "Secret not created yet" into "every Attach rejected" on all of those paths.value: nullis load-bearing — without it kustomize emits bothvalueandvalueFrom, which the API server rejects. Verified against realkubectl kustomizeoutput both ways.f4e0f77— the blocker review caught. The patch madesh-relay-tokena hard requirement of the overlay, butsetup-ocp.sh— which renders and applies that overlay — never created it. On a fresh OCP install the relay pod would have sat inCreateContainerConfigError, and silently, sincesetup-ocp.shdoesn'trollout statusthe relay. It now creates the Secret with a generated token (defaulting todev-tokenwould satisfy the manifest while keeping exactly what this item is about), and never overwrites an existing one, so a re-run can't rotate a token out from under an attached worker.334be0e— a rotation defect found while verifying that. Env from asecretKeyRefis resolved only at pod start, andoc set env --from=secret/...is a no-op on a re-run, so rewriting the Secret left both pods serving the old token. Nastier than a plain break: both stay stale together and keep matching, so it's invisible until one pod restarts alone and fail-closed rejects everything. Both Deployments now get an explicitrollout restart. The oldset env SH_RELAY_TOKEN=<literal>had masked this by changing the spec every time.cd4df9fadds caveats to the three documentedset env SH_RELAY_TOKEN=commands (README-worker.md Step 1 and its troubleshooting row,remote-sandbox-demo.mdstep 1b) —set envreplaces the whole env entry rather than merging, so on an overlay deployment those commands would swap thesecretKeyRefback for a literal, in the live spec where no manifest test can see it.Deliberately unchanged:
deploy/knative/worker-example.yamlkeeps itsdev-token. It's the third-party copy-and-edit surface paired with the Kind base's public dev value, andrelay-deployment.test.tspins that pair.Residual, honestly: the token is still on
deploy-incluster.sh's argv for the life of theoc create secretcall — visible topson the machine running the deploy. That's the standard--from-literaltradeoff and is noted in the script; it no longer persists in cluster state, which was the point. And theoccalls themselves are unverified — there's no cluster-free harness forremote-worker/scripts and no OCP cluster was available. shellcheck plus the manifest↔script coupling tests are the coverage.Bookkeeping on the rest of this list. Item 7 (memory coupling documented but unenforced) also looks already done —
packages/knative-server/test/worker-deployment.test.tscarries a test that derivesBufferCapandDefaultConcurrencyfrom the Go source and asserts the pod limit covers2 × concurrency × BufferCap, citing "#173 item 7", and it reads aWORKER_MAX_CONCURRENToverride if one ever appears. Worth ticking off if that matches your reading.Still open: 1 (dropped
busy: queue fullrefusal — the real bug), 2 (MaxCallRecvMsgSize, needs a both-ends decision), 4 (session state plumbing), 5 (tests never joinServe), 6 (drain-watchdog grace is wall-clock), 8 (//go:build unix).pdettori commentedon Sep 6, 2026
Reconciled the body against
mainat1b5d4ef. Items 3 and 7 moved to a newResolved section at the bottom with what closed each; the remaining eight items are now
the whole list, and each carries a pointer to where it was re-verified in the tree.
Item numbers are kept stable rather than renumbered, because
worker-deployment.test.tsand several commit messages cite them as "#173 item N".
One correction worth recording: item 2 (
MaxCallRecvMsgSize) was expected to bealready done and is not — no message-size option is set anywhere in
remote-worker/or
packages/sandbox-relay/. It stays open, and still needs a both-ends decision plus adocumented max write size.
Assisted-By: Claude (Anthropic AI) [email protected]
pdettori commentedon Sep 7, 2026
Items 5, 6 and 8 addressed — PR #229 (open, not yet merged)
One commit per item, each independently revertable. This issue stays open: items 1, 2, 4, 9 and 10 remain. Item 1 is still the top correctness item on the list.
I'll move these three into Resolved in the body — keeping their numbers, per the convention above — once #229 merges, so the body never claims something the tree does not yet do.
5 — most tests never joined the
Servegoroutineloop_test.gogets aserve()helper that startsServeand registers the cleanup that closes the stream and waits for the return;contract_test.go'sattachCancellablenow joins as well as cancels.fakeStream.close()became idempotent, since the cleanup always closes too.Measured, not assumed. Injecting the exact deadlock this item describes — deleting the
cancelConn()that precedesclose(queue)inServe, so the heartbeat producer never returns andwg.Wait()never reaches zero — left 14 ofloop_test.go's 15 tests passing. With the join registered, the same fault fails 17. A second fault that cancellation cannot mask (close(outbound)removed) confirmed the contract-test join: all 11 catch it, where before they passed.One correction to this item's premise. It says "Two of them observe teardown". Only one does.
TestSendFailureDoesNotWedgeTeardownlooks like the second, but a failingSendmakes the sender callcancelConn()itself, ending the heartbeat producer as a side effect — so it passes even with the missing-cancelConndeadlock injected. Its real coverage is the sender's drain-after-failure behaviour, and its comment now says so.No production code changed for this item —
loop.gois byte-identical tomain.6 — drain-watchdog grace was wall-clock, not activity-based
drainGraceis now a quiet period: any read that returns bytes restarts it, tracked by a single atomic counter thatdrainbumps before delivery, so the record is of when the pipe produced bytes rather than when a slow sink finished accepting them.Two departures from the item as written, both deliberate:
It is not as narrow as "the run is already out of budget" suggests. A
python3writer thatos.setsid()s out of the process group (so the SIGKILL at timeout misses it) and emits a tick every 400 ms delivered 7 of 10 ticks, truncated at exactly 3.01 s = 1 s timeout + 2 s grace. Three ticks of legitimate output, silently gone."Resetting the timer on read activity" is unbounded, so it needs a cap. A holder trickling one byte per second would reset the grace forever, pinning a pool slot and up to
BufferCap— a slower form of the wedge the watchdog exists to prevent. AddeddrainCeiling = 30 s: 15× the grace, far longer than any legitimate trailing flush, negligible beside the harness's 30-minute exec ceiling.The watchdog moved out of
Runinto a package-levelwatchDrainso both behaviours are testable without a child process — the ceiling especially, which end-to-end would mean waiting 30 real seconds and is driven at 50 ms/500 ms instead. Verified by neutering the ceiling and watching only the ceiling test fail.No wire or spec change — the watchdog appears in no spec, so no §8 amendment.
8 — no
//go:build unixconstraintBoth calls now sit behind
//go:build unix.This needed one step past the item's own remedy. The item says "no second implementation is needed — just the tag". A bare tag turns
into
build constraints exclude all Go files in …/internal/exec— better located, but still not the "clear unsupported-platform message" the item asks for. So the!unixside is a refusal rather than a second implementation:Runreturnsbefore spawning anything, on the grounds that a runner which cannot reliably kill what it spawned has no correct behaviour to offer. Still no platform-specific logic — just a tag and a refusal.
Guarded by
TestModuleCrossCompilesForNonUnix, which cross-compiles the module forGOOS=windows(~1.1 s) rather than asserting on the constraint's text.Verification
Each fix was watched failing before it was written. Both injected faults were removed before commit;
git diffagainstmainforloop.gois empty.go test -race ./...·go vet ./...·gofmt -l .·make test(whole repo) ·make typecheck(0 errors) ·make lint(9/9 hooks) — all green.worker-deployment.test.ts, which parsesBufferCapout ofrunner.gofor item 7's guard, is 7/7.New coverage: 1 cross-compile test, 1 end-to-end trailing-output test, 5
watchDrainunit tests.internal/execgoes from 6.7 s to 15.0 s, 4.4 s of which is the end-to-end test waiting out a real writer by design. The session suite is unchanged at ~9.8 s.Note for whoever takes item 9
Item 9 wants an exported test hook so
settle()can become a condition wait. #229 does not add one, andsettle()is untouched — but theserve()helper is now the single place every test inloop_test.gostarts a session, so a hook would have one obvious place to be threaded through.Assisted-By: Claude (Anthropic AI) <[email protected]>
fix(worker): put the unix-only syscalls behind a build constraint (#173…
test(worker): join the Serve goroutine in every session test (#173 it…
1 remaining item
fix(worker): make the drain grace activity-based, with a ceiling (#173 …
Merge pull request #229 from pdettori/fix/173-small-go-batch
pdettori commentedon Sep 7, 2026
Reopened — closed at 14:46 as "completed" shortly after #229 merged, but #229 only covered items 5, 6 and 8 and said so explicitly. Five items were never done: 1, 2, 4, 9, 10.
The body is now reconciled against
mainatf9c59d1: 5, 6 and 8 moved to Resolved keeping their numbers (per the convention at the top), each carrying what closed it and where it departed from the item as written. The two open sections list exactly the five that remain.Flagging item 1 in particular, so a future close does not take it silently: it is the top correctness item on this list, and its severity has risen since it was filed. The code comment deferring it (
loop.go:145-159) justifies the loss as "survivable only because the harness timeout is dual-ended" — written when the relay ceiling was 120 s. #182 replaced that with a sharedDEFAULT_EXEC_TIMEOUT_S = 30 * 60, so a droppedbusy: queue fullrefusal now strands its caller for up to 30 minutes, under exactly the overload that produces the drop. The deferral was correct when written; the value it depended on changed underneath it.Items 9 and 10 are the genuinely small ones. 2 needs a decision on both ends of the wire, and 4 is a pure refactor best folded into whichever change next touches
loop.go— plausibly item 1's.pdettori commentedon Sep 7, 2026
Item 1 addressed — PR #230 (open, not yet merged)
Items 2, 4, 9 and 10 remain, so this issue stays open. As with 5/6/8, item 1 moves to Resolved in the body only once #230 merges.
The remedy this item names is unsafe as written. It proposes "a priority channel, or a dedicated terminal-frame forwarder with its own bounded queue". Either lets a terminal frame overtake queued chunks for the same
req_id, and spec §8 requiresChunk* thenEnd. Two reachable cases: a cache-hit replay overtaking the original's still-queued chunks, and a colliding refusal overtaking an earlier exec's frames under the same id. The harness settles the exec on whichever arrives first, then discards the real output behind it. Making a priority lane safe needs per-req_idpending tracking.What shipped instead: reserved capacity in the single channel.
outboundstays one FIFO — so it cannot reorder, by construction — and gainsTerminalReserve(QueueCap/4= 16) slots that achunkSlotssemaphore keeps chunk producers out of. The sender releases a slot when it takes a non-reserved frame rather than afterSend, so the accounting measures channel residency instead of trackingSend's latency.Exhaustion is now a distinct condition. The reserve is a probability argument, not a proof — nothing bounds how many refusals arrive between drains. But with chunk producers fenced off, a failed terminal enqueue no longer means "busy", it means nothing is draining at all. So
acceptreturnsErrEgressWedged,recvLooppropagates it, andServereturns it formain.goto re-dial with the dedup cache covering the rest — seconds rather than the 30 minutes this item was about. A dropped cache-hit replay escalates too: it reads as harmless, but the harness redelivers precisely because it never got the first answer.A teardown wedge that predates this item, and was uncovered. A
Sendthat blocks rather than fails parks the sender, so a producer waiting for room waits forever andwg.Wait()never reaches zero — after whichServecan never return, which is the only thing that makesmain.gore-dial.TestSendFailureDoesNotWedgeTeardownmisses it because a failingSendlets the sender keep draining.enqueuenow gives up onconnCtx. Honest limit:Servestill cannot return whileSendblocks forever, since teardown ends atwgSender.Wait(); gRPC's keepalive bounds that in production, and the new test says so.Item 4 stays open.
acceptgains an error return, which is not the plumbing refactor item 4 describes — kept separate deliberately, per this issue's own note that item 4 belongs with whichever change next touches the file, as a pure refactor with tests green either side.No wire or proto change: §8 is enforced here, not amended, so nothing is owed in the spec or ADR-0024.
fix(worker): address PR rossoctl#230 review — observed barrier, guard…
fix(worker): reserve outbound capacity for terminal frames (#173 item 1)
Merge pull request #230 from pdettori/fix/173-item1-dropped-refusal
pdettori commentedon Sep 8, 2026
Item 2 re-scoped — the severity claim was wrong, and correcting it unblocks the item
Item 2 has sat untouched for a month behind "needs a decision on both ends plus a documented max write size — relay-side coordination." I traced it instead of re-reading it, and both halves of that framing turn out to be off.
The stream is not killed
The item says an oversized
base64write "kills the whole stream rather than one exec, triggering a reconnect."Two receivers could reject the oversized
Exec:ExecRequest {sandbox_id, exec}SandboxExecserver (grpc-js)ServerFrame {exec}relay.tsforwards{exec: {reqId, command, stdin, timeoutS, streaming}}— nosandbox_id. So the frame the worker receives is strictly smaller than the request that carried it in. With both limits at 4 MiB, the relay's ingress always trips first, on the larger message. The Attach stream never sees the payload, so it cannot be killed by it.Blast radius is one exec, rejected with
RESOURCE_EXHAUSTED. No reconnect.Verified rather than assumed: grpc-js 1.14.4
DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH = 4 * 1024 * 1024,DEFAULT_MAX_SEND_MESSAGE_LENGTH = -1; grpc-godefaultClientMaxReceiveMessageSizeanddefaultServerMaxReceiveMessageSizeboth 4 MiB, sendMaxInt32. One caveat on my own evidence: the Go constants came from[email protected]in the local module cache, while this repo pinsv1.83.2, which was not cached.The real defect is a read/write asymmetry the item never mentions
cat→ raw stdoutDEFAULT_OUTPUT_CAP= 8 MiBstdinThe relay path can read a file it cannot write back. Files between ~3 and 8 MiB read fine and fail to write — and
createPodEditOpscomposes read with write, so Pi's Edit on a 4 MiB file succeeds at reading and then fails at writing.KubectlTransportpipes base64 throughkubectl execstdin with no 4 MiB ceiling, so the identical write succeeds on the pod path. That is the backend-dependent divergence #180, #182 and #185 were each closed on.Why the blocker was illusory
The number stops being a judgement call once the asymmetry is the framing. Derive it:
DEFAULT_OUTPUT_CAP × 4/3(≈10.7 MiB) plus headroom for the command string and framing. Then write capacity ≥ read capacity by construction, and the relationship gets pinned by a coupling test exactly asoutput-cap-coupling.test.tsalready pins the caps across the language boundary. No cross-team decision needed.Considered dismissing it
Writes above ~3 MiB are rare, which is the honest argument for closing this as won't-fix. What defeats it is precedent: this repo has repeatedly treated backend-dependent behaviour as a bug worth fixing, and read-then-fail-to-write is reachable through ordinary Edit use rather than requiring an adversarial payload.
The generalizable point, which is the third time this pattern has appeared across these issues: an item's stated severity is not evidence. Here the true severity was lower than claimed, and the true reason to fix it was absent from the item entirely. Both only showed up by following the message through both hops.
Assisted-By: Claude (Anthropic AI) <[email protected]>
refactor(worker): put the in-flight slot map behind a registry type (#…
Merge pull request #232 from pdettori/fix/173-item4-state-plumbing
fix(transport): derive the gRPC message ceiling from the output cap (#…
Merge pull request #233 from pdettori/fix/173-item2-message-size
fix(harness): the prompt leaf runs R3's sandbox check itself (rossoct…