You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix Object Lock metadata field in site-replication initial sync #76
The existing site-replication initial-sync path constructs an Object Lock metadata event with the correct type but puts the payload in the wrong field:
The receiver dispatches this type to PeerBucketObjectLockConfigHandler, which reads item.ObjectLockConfig, not item.Tags. The explicit Object Lock XML is therefore absent on receive and the initial-sync operation can report success without applying that metadata.
This was confirmed while adversarially reviewing the per-bucket CORS replication follow-up in #75. It predates #71 and must remain a separate repair.
Required work
Reproduce initial sync with non-default Object Lock configuration.
Change the sender to populate ObjectLockConfig rather than Tags.
Add a transport/apply regression that proves the exact XML reaches PeerBucketObjectLockConfigHandler.
Confirm whether MakeBucket's LockEnabled setup masks any subset of this failure and document the difference between enabling lock and replicating retention configuration.
Run focused site-replication tests, race tests, full cmd, and remote CI.
Scope boundary
Do not combine this with the CORS #75 branch or a broad site-replication refactor. Fix the incorrect field and the directly affected tests/documentation only.
This is confirmed as a real bug on both single-drive and Erasure ObjectLayer backends.
Additional evidence beyond the original issue:
The wrong Tags field appears in two production paths, not one:
existing-bucket initial sync in syncToAllPeers;
remote repair in healOLockConfigMetadata.
PeerBucketMakeWithVersioningHandler(... LockEnabled: true) installs only the minimal ObjectLockEnabled=Enabled XML.
A review-only regression used a lock-enabled bucket plus a 30-day GOVERNANCE DefaultRetention document. Feeding the exact current initial-sync/heal event shape returned success but left only the minimal Enabled XML; the default-retention rule never arrived.
Normal live PutObjectLockConfig sends ObjectLockConfig correctly, so the failure is scoped to initial sync/new-site onboarding and remote heal after a missed event.
Add a regression that starts from a lock-enabled peer bucket, carries a non-default retention document through the production event-construction path, applies it through PeerBucketObjectLockConfigHandler, and verifies the exact parsed retention configuration.
Evaluate a tiny unexported event constructor shared by initial sync and heal so the two same-type call sites cannot drift again; retain it only if the regression can exercise production construction without heavier fake-admin infrastructure.
No production code has been changed. Final architecture and test shape remain pending the requested multi-round Fable 5 Max challenge; the local Fable quota is currently exhausted.
Final repair plan after four Opus 5 Max adversarial rounds
Verdict: PLAN READY.
Final diagnosis
The bug is real in two sender paths:
existing-bucket initial sync in syncToAllPeers;
remote healOLockConfigMetadata.
Both construct SRBucketMetaTypeObjectLockConfig but put the XML in Tags; the receiver reads ObjectLockConfig and silently no-ops nil. Normal live PutObjectLockConfig is unaffected. A two-backend review test proved that a 30-day GOVERNANCE DefaultRetention document is lost and only the minimal ObjectLockEnabled=Enabled XML remains.
Normal add-peer topology should self-heal after a healthy heal interval because source CreatedAt is forwarded and the full config wins the normal election. The divergence window is nevertheless compliance-adjacent and unbounded when heal is degraded. Pre-existing same-name bucket adoption has a separate destructive overwrite and is tracked in #78.
One-commit implementation
Add unexported newSRBucketObjectLockMeta(bucket, encodedConfig, updatedAt) that sets Type, Bucket, ObjectLockConfig, and UpdatedAt.
Use it in both initial sync and remote Object Lock heal. No Object Lock sender in these paths may populate Tags.
Add unexported srObjectLockPayload(item) that returns:
item.ObjectLockConfig when present;
otherwise legacy item.Tags;
otherwise nil.
Use the selector in the admin Object Lock dispatch. This makes new receiver ← old buggy sender work during rolling upgrade; new sender → old receiver already works because old receivers read ObjectLockConfig.
Tests
Table-test payload selection: new style, legacy Tags fallback, both-present priority, both nil.
Assert constructor fields directly.
JSON round-trip only as protection against madmin field/tag drift; do not claim it detects the original bug.
ExecObjectLayerAPITest with LockEnabled: true: apply a non-default 30-day GOVERNANCE document through the selected payload and real PeerBucketObjectLockConfigHandler; assert exact persisted and parsed retention configuration on both backends.
Focused normal/race, full cmd, lint, generated/compatibility checks, and remote CI.
Resolved by #89. Live, initial-sync, heal, and legacy payload handling now carry ObjectLockConfig correctly, with signed dispatch and compatibility tests. Final main 1be684b passed Go CI, VulnCheck, the full local race suite, and Test Release run 33254848256.
Activity
Vonng commentedon Aug 28, 2026
Reproduced diagnosis (pending Fable adversarial review)
This is confirmed as a real bug on both single-drive and Erasure ObjectLayer backends.
Additional evidence beyond the original issue:
Tagsfield appears in two production paths, not one:syncToAllPeers;healOLockConfigMetadata.PeerBucketMakeWithVersioningHandler(... LockEnabled: true)installs only the minimalObjectLockEnabled=EnabledXML.DefaultRetentiondocument. Feeding the exact current initial-sync/heal event shape returned success but left only the minimal Enabled XML; the default-retention rule never arrived.PutObjectLockConfigsendsObjectLockConfigcorrectly, so the failure is scoped to initial sync/new-site onboarding and remote heal after a missed event.Provisional repair boundary
Tagsassignments toObjectLockConfig.PeerBucketObjectLockConfigHandler, and verifies the exact parsed retention configuration.No production code has been changed. Final architecture and test shape remain pending the requested multi-round Fable 5 Max challenge; the local Fable quota is currently exhausted.
Vonng commentedon Aug 28, 2026
Final repair plan after four Opus 5 Max adversarial rounds
Verdict: PLAN READY.
Final diagnosis
The bug is real in two sender paths:
syncToAllPeers;healOLockConfigMetadata.Both construct
SRBucketMetaTypeObjectLockConfigbut put the XML inTags; the receiver readsObjectLockConfigand silently no-ops nil. Normal livePutObjectLockConfigis unaffected. A two-backend review test proved that a 30-day GOVERNANCE DefaultRetention document is lost and only the minimalObjectLockEnabled=EnabledXML remains.Normal add-peer topology should self-heal after a healthy heal interval because source CreatedAt is forwarded and the full config wins the normal election. The divergence window is nevertheless compliance-adjacent and unbounded when heal is degraded. Pre-existing same-name bucket adoption has a separate destructive overwrite and is tracked in #78.
One-commit implementation
newSRBucketObjectLockMeta(bucket, encodedConfig, updatedAt)that sets Type, Bucket, ObjectLockConfig, and UpdatedAt.Tags.srObjectLockPayload(item)that returns:item.ObjectLockConfigwhen present;item.Tags;Tests
ExecObjectLayerAPITestwithLockEnabled: true: apply a non-default 30-day GOVERNANCE document through the selected payload and realPeerBucketObjectLockConfigHandler; assert exact persisted and parsed retention configuration on both backends.cmd, lint, generated/compatibility checks, and remote CI.Boundaries
Rollback is a single commit and changes no storage or public wire schema.
Vonng commentedon Aug 29, 2026
PR submitted
PR #89 implements the corrected ObjectLockConfig sender field, rolling-upgrade Tags fallback, signed admin dispatch seam, and live/initial/heal constructor reuse. Dual-backend normal/race and remote-heal transport tests pass locally.
Vonng commentedon Aug 29, 2026
Resolved by #89. Live, initial-sync, heal, and legacy payload handling now carry ObjectLockConfig correctly, with signed dispatch and compatibility tests. Final main 1be684b passed Go CI, VulnCheck, the full local race suite, and Test Release run 33254848256.