Repository navigation
review: audit after the node-loss, reader and S3 chunk merges - #367
Merged
Merged
Conversation
encoding/json/v2 applies omitempty only to empty JSON values, so a bool tagged omitempty is written as false on every claim row and registry claim; omitzero, which the sibling flags use, omits it.
chunkRefs kept a per-lineage map for the removed sweep; with only the dedup set left, a mutex-guarded set and the same lineage check replace it.
Egress audit records moved to egressFrame, so Method, Decision, Secret and Upstream on auditFrame were always empty.
Seven identical refusal blocks become one name/predicate table, the shape config.ReloadDiff already uses for the same fields, so a new config-owned field is one row; the egress event name becomes a constant, which goconst asks for once the table names the egress field. The test now covers egress_upstream_env too.
…nd the chunked S3 store
…ner's Nodes of a fresh cell starting together each saw the table missing and ran its schema; PostgreSQL serializes the CREATEs on its catalog index, so every loser failed with a unique violation (SQLSTATE 23505) and sandboxd exited at startup. A failed schema now re-checks the table: the schema runs as one implicit transaction, so a table that exists after the failure is the winner's complete one.
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 audit after the 2026-10-17/18 merges (#339, #349, #352–#366), on main 68f34d1.
What changed
reader_safeomits false (types.Sandbox, the claim DTO). encoding/json/v2 appliesomitemptyonly to empty JSON values, so the bool was written as"reader_safe":falseon every claim row and registry claim;omitzero, which the sibling flags use, omits it. A test pins the encoding.referencedChunkscollects one lineage's chunks into a mutex-guarded set.chunkRefskept a per-lineage map for the sweep store/s3: sparse-aware, chunked, content-addressed checkpoint transfer #364 removed; the lineage check stays.auditFramedropsMethod,Decision,SecretandUpstream, which no writer sets since egress audit records moved toegressFrame(egress and disk hardening: own-address guard, audit attribution, per-claim connection rate, disk reserve #352).SetPoolsrefuses config-owned pool fields from one name/predicate table, the shapeconfig.ReloadDiffuses for the same fields, so a new config-owned field is one row. The egress event name becomes a constant (goconst). The test now coversegress_upstream_env.Prod Go net −13 (+65 −78), tests +34, docs +15 −10. No behavior change except the dropped false flag in persisted JSON (readers treat absent as false). Zero hot-path cost.
Audit scope
Read in full or as the diff since the hygiene ledger's last verdict:
sandboxd/pool,store/{s3,dir,peer,sparse},archives,server,egress,outbound,engine,tenants,config,types,protocol/wire,mcp, the Python SDK and silkd;Kept, with reasons, in the ledger:
putArchive/replaceArchive/putReplica/replaceReplicaforwarders nameputRow's two flags;store.isZeronames its shifted-compare trick;wire.IsContinuationandRequestOpboth parse the op, but folding them would make the relay audit tap allocate per line.LOC (loc-justify)
Go prod includes 4,666 lines of test scaffolding (e2e drivers 3,632, archivestest 548, storetest 268, tenantstest 218).
Since 2026-09-17 (de42fd5), prod Go grew +11,610 over 134 commits, almost all features; the 29 review and cut commits sum to −484.
Gates
GOWORK=off make go-lint: 10 ×0 issues.(5 modules × linux/darwin, fmt included).asl -forwarder=false ./...clean on darwin and linux in every module.go test -race -count=1 ./...green in every module.make lintandcargo testgreen.ruff+pytest+mypygreen.SANDBOXD_TEST_PG_URLon the testbed PostgreSQL) green:archives/pg(with the new concurrent-start test) andpoolset/pg. Intenants/pg,TestARoleWithoutCreateServesAPreCreatedTablecould not run: the testbed role may not CREATE ROLE, so its setup fails.Hardware
Full E2E and performance regression on two bare-metal nodes (one cell, PostgreSQL, SeaweedFS, cocoon v0.7.3,
rt:24.04), three builds interleaved over two waves (A → B → C → C → B → A each):Functional: every item passed on every build in every run.
sandboxd-e2e.shwith the full smoke on both nodes;Skipped: volumesmoke (no volume catalog on the kit) and the egress smokes (no egress attachment).
Cold start: with the tables dropped and both nodes started at the same instant (pids 4–21 ms apart), C started cleanly 5 of 5 times. A and B lost the race twice in the waves, the loser exiting with SQLSTATE 23505 on
sandboxd_archivesandsandboxd_tenants.Performance (C against B: no confirmed regression; every delta over 5 % went away in interleaved reruns):
Notes:
child 0 machine-id not distinct) is flaky on every build: A 7/16, B 3/16, C 9/16 in repeated runs. sandboxd-e2e.sh's smoke passed 12/12 in the suite runs. It predates these merges.