Repository navigation
Description
Context
This is a record of a review of the changes merged in the 7 days from Nov 7, 2026, 12:05 PM to Nov 14, 2026 (AEDT, UTC+11): 27 commits, 3e479f2 (#127) through 4e78771 (#189). They cover the format 1 data log and capsule journal, journal and data log compaction, storage roots, the persisted scrub schedule, the store key, and the S3 changes (#156, #163, #164, #171, #177).
The defects I found are filed separately: #194 (missing space.journal), #195 (scrub results lost on restart) and #196 (unchecked PUT integrity and protection headers). This issue lists what held up, with how I checked each item, so the same ground isn't covered again.
Severity: informational. Nothing here needs a change unless noted.
Discovery Path
I read every commit in the range and ran cargo test --workspace (all pass, rustc 1.95.0). I also ran cargo audit, ran spacectl and serve-s3 against scratch stores, drove the server with curl and boto3 1.44.3, and added throwaway tests in a separate worktree.
Failure Mechanism
None for these items. Each is one of:
Verified correct
cargo audit --deny warningsis clean at4e78771(cargo-audit 0.23.0, 1509 advisories loaded), so Clear the cargo audit advisories and audit dependencies in CI #145's three remaining ignores are the only ones the tree triggers.- CI's
actions/checkout@v7is a current major. v7.0.0 was released on Jun 18, 2026 and v7.0.1 on Jul 20, 2026. Preconditions::check_readevaluates headers in RFC 9110 §13.2.2 order:If-Match, or elseIf-Unmodified-Since, gives 412, thenIf-None-Match, or elseIf-Modified-Since, gives 304. With boto3, a PUT withIfNoneMatch="*"to an existing key got 412.- Journal compaction (
Journal::compact_with) and data log compaction (NvramLog::compact_with) take a snapshot, copy without the lock, then catch up and rename under the lock. Records appended meanwhile are copied unchanged. A failed rename followed by a failed reopen setslost, and appends and reads are then refused (Refuse data log reads and appends after a swap that can't recover #180). I checked this by reading the code and running the existing crash-step tests. [fold] One generation swap for data-log and journal compaction #191 covers folding the two swaps into one. - When an overwrite or DELETE drops a capsule that a GET is still streaming, its segments are kept until the last reader's
Leasedrops (S3View::release), so downloads aren't cut short and compaction keeps those records. KEYrecords are refused inside aBATCHby the encoder and bycommit.write_livewrites theKEYrecord first, so compaction keeps the store's key.check_store_keyrefuses a different fingerprint.- With boto3 1.44.3 over
http://, these calls work asdocs/guides/QUICKSTART_S3.mdsays:create_bucket,put_object(ContentTypeandMetadataround-trip through Store an S3 object's Content-Type and x-amz-meta-* headers with its key #189),head_object,get_object, a 1 MBupload_fileobj,list_objects_v2anddownload_fileobj. A 9 MBupload_fileobjfails atCreateMultipartUploadwithNotImplemented, which [Gap] S3 view has no ListBuckets, DeleteBucket, DeleteObjects or multipart upload #159 covers.
By design
ByteRange::parsesends the whole object when aRangehas several ranges or doesn't parse. RFC 9110 §14.2 allows a server to ignoreRange.- A policy file with
encryption: Disabledstores that capsule unencrypted on a store that has a key, withoutSPACE_ALLOW_PLAINTEXT. It's an explicit per-capsule choice.SPACE_ALLOW_PLAINTEXTonly covers opening without the key. I found this by reading the code and didn't run it.
Edge cases
PolicyFileaccepts any Zstd level, for example!Zstd { level: 99 }orlevel: -5000.adjusted_levelclamps it to -5..=22 with a warning, but the capsule's stored policy keeps the requested level. I reproduced this withspacectl create --policy-file, which exits 0.Policy::validatecould range-check it.listen(None, 0)binds::1on the port the OS picked for127.0.0.1. If another process holds that port on::1,serve-s3 --port 0fails withAddrInUseinstead of picking again, and the unit testserve_s3_listens_on_both_loopback_addresses_on_one_portcould flake for the same reason. I found this by reading the code and didn't reproduce it.- Journal compaction keeps
BINDrecords whose capsulespacectl deleteremoved (Live::applykeeps every name), so those names stay in the journal for good. [CLI] Remove S3 keys when spacectl delete drops their capsule #138 covers this. PUTchecks that the bucket exists before streaming the body and doesn't check again at the commit. That's safe only while there's no DeleteBucket ([Gap] S3 view has no ListBuckets, DeleteBucket, DeleteObjects or multipart upload #159). The comment input_object_withsays so, and the check will need to move under the pipeline lock when DeleteBucket lands.- The CI
pushtrigger ignoresdocs/**, butpull_requestdoesn't, so docs-only PRs run CI and docs-only pushes to main don't. It's harmless either way.
Reproducible Counterexample
Commands behind the reproduced items:
$ cargo audit --deny warnings # 294 crate dependencies, no findings
$ printf 'compression: !Zstd { level: 99 }\n' > z.yaml
$ spacectl create -f in.bin --policy-file z.yaml # exit 0s3.put_object(Bucket="bkt", Key="a.txt", Body=b"x", IfNoneMatch="*")
# ClientError: PreconditionFailed
s3.upload_fileobj(io.BytesIO(b"z" * 9_000_000), "bkt", "d.bin")
# ClientError: NotImplemented ... CreateMultipartUpload ... POST /bkt/d.bin is not implementedUpstream Reference & Modern Standard
- RFC 9110 §13.2.2, Precedence of Preconditions (https://www.rfc-editor.org/rfc/rfc9110#section-13.2.2), and §14.2, Range (https://www.rfc-editor.org/rfc/rfc9110#section-14.2).
- actions/checkout releases (https://github.com/actions/checkout/releases): v7.0.0 (Jun 18, 2026) and v7.0.1 (Jul 20, 2026).
- RustSec advisory database through cargo-audit 0.23.0 (https://github.com/RustSec/advisory-db).
- Amazon S3 API Reference, PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html), for the boto3 behaviour above.
Proposed Resolution
Nothing is required. Optional follow-ups:
- Range-check the Zstd level in
Policy::validate(item 10). - Retry the pair bind when
::1is taken under--port 0(item 11). - Recheck the bucket under the lock once DeleteBucket exists (item 13).
Activity
saworbit commentedon Nov 14, 2026
Recommend closing this once it's been read. It's the record of what held in the 3e479f2..4e78771 review, and the defects from the same pass are #194, #195 and #196. Leaving it open for now.
saworbit commentedon Nov 14, 2026
Closing. This was a record and asked for no change. Item 13 is done: since #202 a PUT checks its bucket again at the commit (crates/protocol-s3/src/lib.rs:603). Items 10 and 11 stay noted here as optional.