[omp major-4] Failed import wedges target: committed manifest, no access.json, un-actionable 409 #79
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 project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub#79
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
[omp major-4] Failed import wedges target: committed manifest, no access.json, un-actionable 409
internal/repoimport/task.go:109-125vs:135-231,service.go:210-215:reg.Create(manifest CAS commit point) runs BEFORE pack ingest, ref publish, repack,ensureImporterAdmin,writeImportDoc. Any later failure (413 pack at:139-141, publish/publishPack/repack/doc errors) leaves a repo with partial packs, zero refs, NO importer-admin binding (access.jsonlands at:208) under the allow-all absent-policy default. Retry: manifest-present + no import.json → 409 "delete and retry" (:213-214) — but the importer may lack delete rights (write ≠ delete on org targets). Nobody can complete or remove the import.Fix
Make failure non-wedging: commit the manifest LAST (after ingest+refs+admin+doc succeed), or roll back the manifest on failure, or grant the retry path (resume-to-complete for the same canonical source, or allow the importer to delete/repair their own wedged target). Recommended: manifest commit last + same-source resume; keep "delete and retry" only for genuinely foreign manifests (B3 semantics). Deterministic fault-injection regression tests (fail at ingest/admin/doc → retry succeeds; state never wedged). Coverage gate holds; doc Decisions entry in 10 (law 12).
Acceptance criteria
Fix ready for review: PR #89 (#89) — claim-first + same-source resume-to-complete, provisional manifest with rollback, 409 kept for genuinely foreign manifests only. No failure sequence leaves a caller-unfixable target; concurrent same-target imports still elect one winner (three CAS points documented). Tests: fault injection at ingest/admin/doc, Begin matrix, concurrency; 95.9% coverage, -race green.
PR #89 review (
bf807ed, reviewer fixes pushed to origin/fix/issue-79):VERDICT: ready to merge.
WALKED:
TESTS (scratch worktree /tmp/pr89, origin/fix/issue-79 + review commit): go test -race ./internal/repoimport/... ok (27s); coverage 95.8% (gate 95%); new TestIssue79DrainRefusalKeepsResumeClaim verified to FAIL pre-fix ('shared claim deleted') and PASS post-fix; Issue79 + claim/race units -count=10 green; gofmt/vet clean. web/dist absent in scratch worktree so cmd/walhub vet's embed error is a pre-existing worktree artifact (PR touches no web surface).
Fixed by PR #89 incl. review-found resume-claim rollback fix, merged. Closing.