Repository navigation
Conversation
samgbafa
force-pushed
the
skgbafa/tc-887-r4-kv-sealed
branch
from
November 8, 2026 00:15
4d90c07 to
78fd3e6
Compare
samgbafa
force-pushed
the
skgbafa/tc-887-r4-kv-sealed
branch
from
November 8, 2026 00:41
78fd3e6 to
0fa782d
Compare
… at-rest error mapping Adds storage::sealed (sealed names with the legacy @n generation suffix, read/write/remove plans, envelope streaming, reason-coded errors), joins sealed bytes counted per space tag at boot into a space's quota, and maps at-rest storage errors to 503/500 on /invoke and the KV GET routes. Nothing is sealed yet.
samgbafa
force-pushed
the
skgbafa/tc-887-r4-kv-sealed
branch
from
November 8, 2026 00:53
0fa782d to
2c35d3f
Compare
This branch has not been deployed
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.
TC-887, part 4 of the refreshed at-rest stack (base: #515). Replaces #329 (
skgbafa/tc-887-s3-kv-sealed), ported onto current main.What
tinycloud-node-server/src/storage/sealed.rs: the decisions and envelope plumbing the S3 and FileSystem block stores share: write target (legacy inoff, sealed iffencrypting, else 503), read plan (sealed then legacy;strictsealed only; locked keys: legacy only and a miss is 503), the namecontainschecks (the one a write would use), the names orphan removal deletes, whole-object and range decryption, file/in-memory sealing, and reason-codedAtRestStoreErrors. It uses the coreAtRestView/AtRestSourcefrom feat(TC-887): node wiring for at-rest keys, with a root from the environment #515; a thinAtRestHandleonly gives stores aDebug + Clonehandle.sealed_object_name/space_tag(KAT vectors unchanged) and get the same@Ngeneration suffix as legacy names (TC-735), appended outside the HMAC.BlobIdentity::KvBlockstays{space, content_hash}. Documented indocs/at-rest/INTERFACES.md§5.storage/size.rs: sealed bytes are counted per space tag and joined to a space once keys can name the tag. Main's TC-1578 semantics are kept:init_sizenever lowers or resets an entry (and returns the joined size), decrements saturate.{blocks}/v1/(and no longer trips over it as a non-DID directory); S3 adds oneListObjectsV2underv1/, since main's KV listing is restricted totinycloud:./invoke(after the database-failure branch),signed_kv_getand the public KV GET/HEAD routes map at-rest causes to 503/500.Nothing seals yet: no store holds an at-rest handle in this PR, so behaviour in every mode is unchanged.
Verification (run locally)
cargo fmt --allRUSTFLAGS=-Dwarnings cargo clippy --locked -p tinycloud-node -p tinycloud-core --all-targets: cleancargo test --locked -p tinycloud-node --lib storage::: 54 passed (includesstorage::sealed::tests,storage::size::tests,storage::file_system::test::boot_scan_counts_sealed_objects_by_tag)tests/sql_object_store.rs::mock_s3_kv_scan_ignores_sql_objectsnow also allows the boot scan'sLIST v1/(it still requiresLIST tinycloud:and refuses any other listing). Verified:cargo test --locked -p tinycloud-node --test sql_object_store mock_s3_kv_scan.