Skip to content

fix(bundle): revive retired tips - #304

Closed
quidl wants to merge 1 commit into
dekobon:mainfrom
quidl:codex/bundle-revival
Closed

quidl wants to merge 1 commit into
dekobon:mainfrom
quidl:codex/bundle-revival

Conversation

@quidl

@quidl quidl commented Oct 30, 2026

Copy link
Copy Markdown

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:

  • RED on unchanged official main: all five initial regressions fail for the expected missing-ref/marker-removal behavior; build and test compilation pass.
  • Final workspace build with explicit 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 -- --check and staged git diff --check.
  • make pre-commit and make ci: attempted, both stop at Make 3.81; the repository requires GNU Make 4.x. These gates have not passed.
  • Markdownlint: attempted; markdownlint-cli2 is unavailable.
  • Docker-backed S3/Azure emulator suites and ShellSpec were not run.

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.

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
@quidl quidl closed this Nov 2, 2026
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.

bundle: force-pushing a retired tip hides the ref

1 participant