Repository navigation
Conversation
Retire the active predecessor before removing baseline retirement records for the exact requested ref and tip. Otherwise A-to-B-to-A reports success while A remains hidden from fresh advertisements. Return a store error when retirement or visibility completion fails, and exercise explicit retries after rejected and ambiguous deletes. Keep ordinary new-tip caching and unrelated records unchanged. Fixes dekobon#303
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.
Summary
A sequential Bundle push of A, then B, then a forced return to A currently reports success but advertises no ref: A's old retirement records still hide its newly uploaded bundle.
For a known retired destination, refresh its active predecessor under the existing publication lock, upload the complete requested bundle, retire the predecessor and remove only validated retirement records matching the exact ref/OID before acknowledging publication. Preserve the existing cached path for ordinary new tips, unrelated/malformed records, public API and bucket format.
Related issues
Fixes #303
Test plan
Local verification on macOS ARM64 with Rust 1.96.0:
git-remote-object-store/test-util.cargo test --workspace --features git-remote-object-store/test-util --lib --bins --tests: 1,262 passed, 0 failed, 1 pre-existing ignored. Includes all six new revival regressions.cargo test --workspace --features git-remote-object-store/test-util --doc: 7 passed, 0 failed, 1 pre-existing ignored.cargo clippy --workspace --all-targets --all-features -- -D warnings.cargo fmt --all -- --checkand stagedgit diff --check.make pre-commitandmake ci: attempted, both stop at Make 3.81; the repository requires GNU Make 4.x. These gates have not passed.markdownlint-cli2is unavailable.The first sandboxed workspace attempt passed 1,022 library tests but five AWS-config tests could not load native macOS trust roots. The exact unchanged suite passed with normal host trust-store access; no certificate overrides, TLS changes, skips or assertion changes were applied.
The new tests exercise root/named prefixes, repeated A/B revival, fresh exact advertisements and fetches, an independently frozen raw reachable graph and native Git unbundle/fsck into an empty object database. They also preserve unrelated/malformed markers and inject predecessor-retirement failure, rejected marker DELETE and partial/final accepted DELETE with a lost response, followed by an explicit retry of the same OID.
Notes for reviewers
This is a draft for review of the sequential revival contract and its interruption boundary. Retirement-record removal completes visibility for a previously hidden destination. A failed predecessor retirement or marker DELETE returns the existing typed store/per-ref error rather than a false success. Interrupted marker removal can temporarily advertise no tip until an explicit retry of the same OID. A final DELETE accepted with a lost response can already make the requested tip visible while the command reports an ambiguous failure; the same explicit retry converges in the regression.
The patch does not provide atomic multi-object reader visibility, change GC sweep/lock/heartbeat behavior, or address general stale snapshots and ambiguous bundle-PUT recovery. Provider-backed emulator integration and the required full contribution gates must remain distinct from in-memory protocol regressions. No dependency or public API changes.