Repository navigation
fix(gates): a long hoc script goes up as a staged file - #2360
Open
nicolas-abril wants to merge 1 commit into
Open
nicolas-abril wants to merge 1 commit into
nicolas-abril wants to merge 1 commit into
Conversation
A cluster session through the bastion (BEND_HOC) sent the whole shard script
in its ssh command. The mux client hands that command to the master in one
message, and macOS refuses one near 8 KB ("mm_send_fd: sendmsg: Message too
long", then "mux_client_request_session: send fds failed"), so a shard whose
script landed in that window never started and its tests failed. Scripts of
8,020-8,040 bytes fail on main; adding a test can move a shard into it.
A quoted script over 4096 bytes is now staged on the bastion like the input
pack (once per run, under its sha1) and passed to hoc-ssh as
"$(cat <file>)". Shorter scripts go as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nicolas-abril
added a commit
to nicolas-abril/bend
that referenced
this pull request
Nov 30, 2026
…staged file (bendlang#2360) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Through the bastion (
BEND_HOC),hoc_sshputs the whole shard script in the ssh command. The mux client hands that command to the master in one message, and macOS refuses one near 8 KB:So a shard whose script lands in that window never starts, and all its tests fail. Adding or lengthening a test can move a shard into the window.
Reproduced on main (6180be5) with
lib.ssh(node, ": " + "x".repeat(k) + "; echo ok")for k = 7950…8250 in steps of 10: k = 8020, 8030, 8040 fail with exit 255 and the error above; the rest pass.Fix
In
gates/_lib.ts, a quoted script over 4096 bytes is staged on the bastion the same way the input pack already is: once per run, under its sha1, in~/.bend-gate, cleaned after an hour. It is then passed tohoc-sshas"$(cat <file>)". Shorter scripts go as before, so ordinary sessions don't pay an extra round trip. The staging code that was inline for the input pack is now a smallhoc_stagehelper used for both.Checks
',"and$in them: they arrive intact (wc -con the node prints the same length) on main and on this branch.bun gates/test.ts --gate: 1753 / 1872 on this branch and 1753 / 1872 on main, run back to back. Every failure on both is in the shards that landed on minis without/usr/local/bun/bin/bun(69No such file or directorylines on each), so this branch adds no failure.bun gates/repo.ts --gate: 56 / 56.The missing bun install on some minis (cluster-01 and cluster-1a, at least) is a separate problem, not addressed here.
🤖 Generated with Claude Code