Repository navigation
review: whole-repo round — claims projection off the claim path, single-pass find/list, outbound frame cap, typed SDK errors - #126
Merged
Conversation
…ngle listing, leased mesh epoch, comment budget The claim store keeps its persisted projection incrementally (set/del/mark under the store mutex, the file write under a second one), so a claim no longer copies every live claim under the manager mutex (5000 claims: 580 µs and 5018 allocs → 30 ns, 0 allocs). Startup egress resync lists locked taps once instead of one netlink socket per claim; the mesh epoch is persisted as a leased ceiling so gossip churn stops fsyncing twice a second; the guest port handshake reads through the existing buffered reader; docs/sandboxd-api.md states that reconcile records nothing for dropped claims. Test files carry no comments; the comment budget is applied across the daemon (−1683 lines).
… frame cap, LSP attach TTL, typed errors fs.find walks the tree in one spawn_blocking and streams batched matches through a bounded channel (10k files on .79: 350–670 ms → 51–76 ms); fs.list scans a directory in one blocking pass; fs.replace skips files over the find bound; the write side enforces the same 8 MiB frame cap every client enforces; watch drains up to 64 events per write; the LSP broker drops its three Arc<Mutex> and reaps a server nothing attaches within 300 s; session ids come from getrandom; init waits for every NIC against one deadline. The Python SDK wraps socket and decode failures as ProtocolError/StreamTimeout, joins the proxy pump before close, and the langchain toolkit states its 5-minute exec bound.
…decoder tables, comment budget; README and Makefile go.work wording Pty.Write chunks like every other writer so a large paste cannot exceed the frame cap; the decoder tables use named pointer constraints so a mispaired entry fails to compile; frameTag returns bytes (one allocation off every decoded frame); apiError drains its body for connection reuse. README and Makefile now say why GOWORK=off is needed: the workspace includes these modules, CI has none.
Reconcile's ordering rule, recLock's shared mode, the recLocks eviction rule, the S3 lifecycle rule behind SweepStaging and the randHex suffix on the wake return path each carried a fact the code cannot show; they return as one-line comments.
…API error bodies A client that vanishes between lsp_request taking the stdio halves and the Ready write left a child the attach TTL no longer covered; the write error now reaps it. The Go SDK's apiError drains resp.Body itself instead of the already exhausted LimitReader. The watch e2e no longer assumes the first event after ready is its own write: FSEvents replays the watched directory's creation first on macOS.
…eader of SILKD_LSP_DIR
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.
Whole-repo quality round for sandbox (sandboxd, silkd, boot/init, protocol/wire, sdk/go, sdk/python, sdk/langchain, mcp, e2e).
Hot paths, measured:
.79, same sandboxd and rootfs, July silkd vs this silkd: 350–670 ms → 51–76 ms (3 claims × 5 calls each).Correctness:
Style and docs: comment budget applied across every module (test files carry no comments), one-line docs, modern Go 1.27 and Rust idioms (LazyLock, let-else), README/Makefile state the real reason for GOWORK=off (the workspace includes these modules).
Held: truncation/batching for git.status and find frames over the cap (wire change), parallel EROFS mounts (needs a boot trace A/B), the pkg-level fake hoist (inverts the module DAG), sandboxd's
cocoon vm listper e2b request (caller-side fix in sandbox-operator).Gates: GOWORK=off make go-lint (10 × 0 issues: five modules × two GOOS), golangci-lint fmt --diff clean in every module, asl ./... on both GOOS, go test -race -count=1 in every module, sandboxd tests in a Linux container (golang:1.27, linux/arm64); silkd and boot/init: cargo fmt/clippy -D warnings/test on macOS and in a Linux container (rust 1.98.0); ruff check + pytest for the Python SDK (153) and langchain (6).