Fix #79: commit manifest last + same-source resume #89
No reviewers
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub!89
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-79"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #79 (failed import wedges target: committed manifest, no access.json, un-actionable 409).
What
runImport PutCreates the in-progress import.json claim (complete:false) BEFORE the manifest CAS, commits the manifest provisionally, converges idempotently (presence-probed packs with .idx ensure, create-only ref converge that aborts loud on divergent refs, tier-2 repack, importer-admin), CAS-completes the sidecar (complete:true), and rolls every failure back to resumable-or-clean. Begin resumes same-source retries (202); 409 names only genuinely foreign manifests (no sidecar), foreign completions, and live foreign claims.
Why not literal manifest-last
The publish path needs the handle Create returns and internal/wal is untouchable (S12/law 8), so the commit stays provisional instead — same guarantee, arbitration unchanged. Documented in 10 Decisions.
Winner semantics
Exactly-one-winner preserved at three CAS points: claim PutCreate (adopt/resume/takeover/409), manifest PutCreate (unchanged name arbitration), completion PutUpdate (one completer, losers adopt same-source).
Tests
New resume_test.go: fault injection at ingest/admin/doc stages (rollback-to-clean or resume-converge, retry succeeds, never caller-unfixable), divergent-ref 409, Begin matrix (resume 202/live-foreign 409/expired-takeover), concurrent same-target one-winner, cross-instance converge, full error-arm units. Coverage 95.9% (>=95% gate), gofmt/vet clean, full suite green incl. -race. Evidence budget holds: 13 control PUTs, 7 GETs, 0 LIST, flat S/M.