Skip to content

fix(core): preserve retention offsets and verify host listing admission - #1668

Merged
overtrue merged 5 commits into
mainfrom
fix/9705-native-listing-inventory
Nov 29, 2026
Merged

overtrue merged 5 commits into
mainfrom
fix/9705-native-listing-inventory

Conversation

@overtrue

@overtrue overtrue commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

RustFS now authorizes native metadata listings, checks the deferred SSE refusal, and then counts and serves the request. Teach the route collector to verify that sequence and the operation-specific metric. It continues to read the earlier handler shape. The host wire tests also found that CopyObject and CreateMultipartUpload lost their source UTC offsets. Both now use the same validated header capture as PutObject under the RustFS profile. The compatibility commit 5ef262952e66 applies these fixes to the host’s existing gateway model. RustFS pins this commit on the upstream compat/rustfs-9705 branch. The host follow-up is rustfs/rustfs#9758.

Verification

  • The two RustFS census self-tests passed. On the actual host, both inventories contained the same 413 method/path pairs.
  • All 21 metadata listing tests passed, including the earlier host fixtures. Nine scratch mutations were caught. They removed authorization, swallowed or reordered the refusal, ignored its argument, changed or dropped the counter, replaced the authority extension, dropped the helper from provenance, or dropped a route.
  • The new codec test failed with the old dispatcher and passed with the fix. Nine targeted mutations checked both operations, explicit UTC, missing and empty dates, the default profile and malformed or duplicate headers.
  • cargo fmt --all --check, workspace Clippy, cargo test --workspace (11,854 passing tests) and cargo xtask verify --crate rustfs-gateway-core passed on this update.
  • On 24f0b1c2b631, cargo xtask verify --all passed. The workspace build and tests took 460.61s. The guard self-test took 362.10s with ten workers. Each stage stayed within its 480s budget.

Role Verdicts

  • simplicity-adversary: attacked the collector with missing authorization, a swallowed refusal and a swapped counter in the two supported handler forms — no break found
  • security-adversary: attacked malformed and duplicate retention headers on both operations and checked isolation of the default codec profile — no break found

Breaking Change

The public request context keeps its existing signature. Under the RustFS profile, its offset accessor now also reports the supplied offset for CopyObject and CreateMultipartUpload. The default profile keeps its existing behavior.

Checklist

  • The four-command gate passed (fmt, clippy, test, cargo xtask verify)
  • New or changed public API has rustdoc
  • Negative test cases outnumber positive ones
  • Every new assertion was mutated — the implementation was broken on purpose and the assertion
    went red. The PR description names which ones
  • No Protected File touched; if one was, the PR description contains BREAKING and a migration path
  • No unsafe introduced
  • No inventory / linkme introduced
  • No #[non_exhaustive] added to a DTO
  • No s3s code copied; behavioural evidence is URL + self-written summary
  • No credentials, signatures, or expected-signature values reachable from logs or error bodies
  • No plan document, analysis report, or working note committed
  • Commits follow Conventional Commits; PR title ≤72 characters
  • A Handoff comment has been appended to the issue

@overtrue overtrue changed the title fix(inventory): verify deferred refusals on metadata listings fix(core): preserve retention offsets and verify host listing admission Nov 29, 2026
@overtrue
overtrue enabled auto-merge (squash) November 29, 2026 03:17
@overtrue
overtrue merged commit ed9e4f7 into main Nov 29, 2026
34 checks passed
@overtrue
overtrue deleted the fix/9705-native-listing-inventory branch November 29, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant