Language-idiom round: one-buffer shell quoting, AfterFunc drain, synctest suite - #73
Merged
Conversation
40 of 43 timed tests now run on the bubble's virtual clock; the three that deliberately stall a goroutine while holding a real sync.Mutex stay on wall clock — mutex contention is not durably-blocked under synctest.
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.
Language-idiom round across the Go and Rust trees. Scan provenance: the
standalone
modernizetool (all 23 analyzers) reports zero findings on everymodule and clippy already denies
unwrap_used— this round only carries whatthose gates structurally cannot see. Production behavior is unchanged.
silkd (Rust)
shell_quote→shell_quote_into: session command lines are built in onebuffer instead of N quoted temporaries + a
Vec+joinper exec; theTable::createcd/export init lines fold the same way. Quoting output isbyte-identical, now pinned by a unit case table (plain, space, embedded
quote, empty).
find.rs: the one remaining.map(...).unwrap_or(false)becomesis_some_and, matching the file's existing idiom.cargo fmt --check,clippy --all-targets, and the full test suite(17 lib + 78 integration tests) run clean on Linux (rust 1.97.1 container on
the testbed; cargo is unavailable on the dev host).
sandboxd (Go)
main.go: the shutdown-drain goroutine becomescontext.AfterFunc,matching the preview-server shutdown a few lines above. Drained-channel
semantics preserved.
pooltests: 40 of the 43 timing-dependent tests now run undertesting/synctest(stable since Go 1.25), so their 5ms–3s polling loopsresolve on the bubble's virtual clock — deterministic timing, no more
CI-tail latency on the 2–3s worst-case loops (0.00s under isolation;
whole-package wall clock ~2.9s→1.9s). The three exceptions deliberately
stall a goroutine while holding a real
sync.Mutex, which synctest nevertreats as durably blocked (the bubble would deadlock); each carries a WHY
comment with that root cause.
egress_test.gois untouched — it arms realUnix-socket listeners.
Considered and rejected (recorded so the next scan doesn't re-walk them)
os.Rootfor data_dir/store/marker paths: every join is either pinned byan ID regex at the API boundary or an operator-configured path — ceremony,
not safety.
unique.Makeinterning of pool keys/tenants: Go string assignment doesn'tcopy backing bytes; the intern table would add lock indirection to the
warm-claim path for nothing.
sleep-dominated by three orders of magnitude.
materialized slices stay.
Gates
-raceacross all 14 packages, dual-GOOS golangci-lint(cache-cleaned) 0 issues, gofmt/gofumpt/goimports clean, asl dual-GOOS zero
findings.
boot/inituntouched.data path; the silkd change trims allocations on the exec verb only.