Skip to content

fix(replication): preserve normalized replica metadata - #194

Merged
Vonng merged 3 commits into
mainfrom
codex/r7-replication-content-encoding
Sep 15, 2026
Merged

Vonng merged 3 commits into
mainfrom
codex/r7-replication-content-encoding

Conversation

@Vonng

@Vonng Vonng commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Trusted streaming replica writes re-extracted ordinary metadata after normalization, persisting Content-Encoding: aws-chunked and restoring redacted user metadata. Restore only the six replication-specific fields so bare aws-chunked disappears, mixed encoding retains gzip, and SSE replication metadata stays intact.

The production fix is based on #187 by Mikhail Khadarenka, whose authorship is retained. This branch adds authenticated PUT, COPY REPLACE, multipart and Snowball regressions, plus the recorded investigation and independent Opus 5 Max review.

After #193 entered main, this branch incorporated that exact main without changing any R7 source. A second fresh Opus 5 Max integration review also approved with zero blockers. All eight applicable PR checks passed on the integrated head 5f00f6762f4ecc62c9befc12b8ca99f982d87ce7.

Validation

  • Final integrated Go CI, VulnCheck and DCO passed. The full unfiltered cmd suite passed in 258.209s on the GitHub runner with empty GOFLAGS and no capacity overlay. The tested merge tree matches the final candidate tree.

  • 80 focused subtests, existing SSE-C single/multipart and replication trust/poisoning/trailer tests passed.

  • Focused race tests, make verifiers (lint: 0 issues) and make build passed.

  • Same final regression tests with only the old production extractor restored: 44 controls passed and 36 expected assertions failed.

  • Local disk tests used the documented temporary capacity overlay; actual data and metadata I/O used test disks. The overlay is not in this PR. typos was unavailable and skipped by the Makefile.

  • Fresh independent claude-opus-5 --effort max implementation review returned APPROVE_WITH_NONBLOCKING_NOTES, zero blockers. The full review and dispositions are recorded under docs/investigations/r7/implementation-review/. Merge remains conditional on this PR passing its applicable CI.

Compatibility

Trusted Snowball entries no longer inherit ordinary metadata from the outer archive, matching ordinary Snowball behavior. Existing exact-token whitespace handling, request authorization and six replication-only SSE fields retain their behavior. Existing objects are not rewritten. If an authoritative source still has polluted encoding, later heal/resync/comparison can repeatedly select metadata replication; the separate remediation proposal prioritizes authoritative source versions before replica reconciliation. No distributed two-site/restart acceptance, deployment or release is claimed.

Contribution licensing

Contributions are under AGPL-3.0-or-later, inbound=outbound, without a CLA. Existing notices remain; all non-merge commits carry a matching DCO Signed-off-by trailer. See CONTRIBUTING.md.

Vonng and others added 3 commits September 16, 2026 00:00
Restore only the six replication-specific metadata fields after trust
validation, so streaming uploads retain their actual content encoding and
Snowball entries do not inherit ordinary metadata from the outer archive.

Include helper, authenticated PUT/COPY/multipart and Snowball regressions,
plus the R7 investigation, actual Opus 5 consensus and local verification.
The production change is based on PR #187 by Mikhail Khadarenka.

Co-authored-by: Mikhail Khadarenka <[email protected]>
Signed-off-by: Feng Ruohang <[email protected]>
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