[codex major + omp major-13, same root] Repo-import detached from server cancellation #74
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#74
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?
[codex major + omp major-13, same root] Repo-import detached from server cancellation
internal/repoimport/service.go:232startsdrivein a goroutine built fromcontext.WithoutCancel(context.Background())(:278). Shutdown/drain cannot cancel the import or its store work; the task survives until internal timeouts, and can even commit a manifest CAS after drain begins. Violates "every goroutine exits via context" and the 13 §8 phase-1-ctx rule (omp notes it matches theopsTasksprecedent atserve.go:594— either way it must be fixed or get an explicit doc decision; fix preferred: wire the phase-1/drain context through, keepWithoutCancelONLY where join semantics require it, and forbid post-drain manifest commits).Fix
Thread a cancellable context (drain-scoped) through the import leader; cancel git children + store work on drain; manifest commit refuses after drain begins. Regression test (start import, drain, assert prompt terminal error + no commit). Coverage gate holds; doc Decisions entry (law 12).
Acceptance criteria
go test -race+ coverage ≥95% oninternal/repoimport.Fixed by PR #83 (#83): drain-scoped import cancellation — leader wait on the service drain ctx, Begin/commit-point 503 guards, table+service drain at phase 1, plus the latent TaskTable rt.cancel race fix. Not merging per instructions.
PR #83 review (fix/issue-74, commit
66bc6d8) — verified in scratch worktree /tmp/wt74 (pre-existing; left in place). Main worktree untouched (read-only).PASS
OBSERVATIONS (non-blocking, no fix pushed)
TESTS (scratch worktree, -race -count=1): internal/repoimport ok (26.2s); internal/wal + wal/rw + cmd/walhub ok. Coverage run: 95.6%/95.3%. gofmt -l clean; vet clean.
MERGE RECOMMENDATION: ready to merge.
Fixed by PR #83 (review clean; drain cancels import, no post-drain commit; 95.6%/95.3% coverage), merged. Closing.