Repository navigation
review: solo whole-repo round on d5d7887 (config seed fix, cuts, owner calls) - #303
Merged
Merged
Conversation
…ig-owned fields poolSeedHash stripped egress, warmup, capture_trim and storage but not egress_upstream_env, which SetPools also rejects. Editing a config pool's egress_upstream_env on a node with pools.json made the next boot warn that the config pools were overridden, though the field still applies from the config. The SDK PoolSpec doc and the PUT /v1/pools reference missed the field the same way.
deleteCkLocked, retryArchiveDelete and resolveGolden release the record lock once instead of on every branch; NewManager, ValidateVolumes, handleSandboxes and the MCP tool-error path take cmp.Or for their fallbacks (config validation already rejects a negative fork count or refill concurrency); Policy.Validate checks a repeated port against the ports before it; Untar drops a default branch that only continued the loop.
…check decode_response's fast path swallowed binascii.Error with try/except/pass, which /code-py spells contextlib.suppress; _feed_stdin re-checked a stdin its only caller already requires non-empty.
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 review round on
maind5d7887: Go (sandboxd, protocol/wire, sdk/go, mcp, e2e harness and credsmoke), Rust (boot/init, silkd) and Python (cocoonsandbox, openai, langchain) production files read in full, plus every test file the hygiene ledger listed as changed by #299/#302.Fix
poolSeedHashstrippedegress,warmup,capture_trimandstoragebut notegress_upstream_env.SetPoolsalso rejects that field as config-owned. On a node withpools.json, editing a config pool'segress_upstream_envmade the next boot log "config.json pools differ from the API-applied set and are overridden", even though the field still applies from the config.TestPoolSeedHashIgnoresConfigOwnedFields: it fails on the old code (a egress_upstream_env edit changed the seed) and passes now.omitempty, so existingpools.jsonfiles keep matching.PoolSpecdoc and thePUT /v1/poolsreference had the same omission and now list the field.Cuts (behavior-preserving, no comments added)
deleteCkLocked,retryArchiveDeleteandresolveGoldennow release the record lock once instead of separately on every branch.NewManager,ValidateVolumes,handleSandboxesand the MCP tool-error path usecmp.Orfor their fallbacks. Config validation already rejects a negativemax_fork_countorrefill_concurrency, and no test passes one.Policy.Validatechecks for a repeated port against the ports before it instead of building a map.Untardrops adefault: continuethat did nothing.decode_responsenow usescontextlib.suppressinstead oftry/except/pass, as/code-pyrequires._feed_stdindrops a non-empty check that its only caller already guarantees.Owner calls (logic changes, not applied)
sync_claims. Concurrent writers are group-committed by sequence. Candidate: an append-only claim journal with periodic compaction. This changes the on-disk format and the recovery path.engine.readLinereads the hybrid-vsockOK <port>reply one byte at a time. That is about 10 read syscalls on everyDialSilkd, which every relay, exec and port dial pays. A buffered reader handed to the returned conn would remove them, but it changes the conn the relay copies over. It needs an interleaved A/B on hardware first.claim_env()re-reads/run/silkd.envon every exec, pty and session spawn. The host can rewrite the file at any time, so caching it needs invalidation (mtime or an explicit signal). Spawn cost dominates today. Listed for completeness only.Kept, with reasons
refillGated,benignSweepErrandskipIdle: already recorded as kept in the ledger.HasPromotedTemplate/ownedTemplate/checkTemplateOwner): each maps errors differently, and a shared helper would hide each caller's policy.ReloadConfig'sappend([]string{}, changed...):slices.Clonewould turn an emptychangedinto JSONnull.tenants/pgReplace'sslices.AppendSeq([]string{}, …): an empty set must reachANY($1)as{}, notNULL. WithNULL, the delete would remove nothing.peer.dedupAddrs: it keeps the original order, and no stdlib helper does an order-preserving dedup.Env.HasInject/HasGuestloops: the stdlib has no iteratorContainsFunc, and collecting the values first would allocate.Hibernate/Engine.Stop, and wrapped multi-line godoc inprotocol/wireand the public SDK types: adding or rewrapping comments in a sweep is churn..clone()either builds an owned wire value (ProcInfo.argvforps, the LSP server id for both the reply and the reaper, a session id that is both inserted and returned), crosses a'staticboundary (replace's path intospawn_blocking), or is anArc(the per-file name shared byfindmatches).Hot path
No change to the claim, relay or egress request path. The cuts touch config load, record-lock release order and admin endpoints.
Gates
GOWORK=off make go-lint(darwin)0 issues.×10GOOS=linux GOWORK=off make go-lint0 issues.×10asl -forwarder=false ./..., 5 modules × 2 GOOSasl ./...(advisory forwarder)fmt --diffon sandboxd and mcpmake go-testwithSANDBOXD_TEST_PG_URL(darwin)oktenants/pg, uncached, verbosego test -race -count=1 ./..., 5 modules, golang:1.27.1 linux/arm64, non-root, PG reachableokruff format --check,ruff check,pytest(py3.12)Not covered
credsmokeand the harness were not re-read: they are unchanged and already clean in the ledger.LOC
This round:
Repo at this head:
e2e3426,silkdtest630,tenantstest256,storetest242), so Go prod without it is 21700.Since 2026-09-03 (aab87ad):
Ledger (
.hygiene/sandbox.tsv), files due: