You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore(purchase): drop the unreachable 'approved' entry from the claim funnel's from-set #1814
claimAndExecuteWithin (internal/purchase/manager.go:217) claims a purchase execution with the from-set approved, pending, notified. Once #1812 (issue #399) removes the execute-by-ID path, no executor reaches it with an approved row:
the approve paths claim from pending, notified;
the cron sweep lists only pending, notified rows (GetPendingExecutions);
stranded approved rows go through the re-drive (claimAndRedrive).
So the approved entry is unreachable in production. It's still a wider claim than any caller needs, and the gated flag (exec.Status == "pending" || exec.Status == "notified") means an approved row would skip the claimed-row gate checks if a future caller ever passed one.
Proposed: drop approved from the from-set, and add a test showing that a claim on an approved row fails with ErrExecutionNotInExpectedStatus.
Integration tests that seed approved rows into this funnel must move to notified first. #1812 already did this for redshift_gate_integration_test.go.
#399 deliberately left it out, to keep that change a pure removal. It's recorded in known-issues.md. Raised by claude-ui-fix-1's review of #1812.
Landed on main (170db82). The claim funnel's from-set is now pending and notified; the gated flag is gone, so the step cap is rechecked for any claimed row that has recommendations. Unit test TestClaimAndExecuteWithin_AnApprovedRowIsNotClaimable pins the from-set and the benign refusal; integration test TestSingleClaim_FunnelRefusesAnApprovedRow (compiled, needs the DB env to run) shows an approved row is left unbought; tests that seeded approved rows use notified; the known-issues entry is removed. Verified: two cold review rounds (their should-fix, deleting gated, applied), mutation probes killed, pinned golangci-lint v2.10.1 unfiltered plain and -tags integration: 0 new, go vet both tags, scoped tests plus ./internal/mocks. Main CI at 170db82: pre-commit, CI - Build & Test and Deploy to AWS Lambda succeeded (the frontend sentinel was cancelled by the next push).
Activity
docs: link the unreachable claim-funnel entry to its follow-up issue (#…
cristim commentedon Nov 10, 2026
Claimed by claude-fleet (coordinator assignment). Premise check against the current main first, then a direct commit with the test the issue asks for.
cristim commentedon Nov 10, 2026
Landed on main (170db82). The claim funnel's from-set is now pending and notified; the gated flag is gone, so the step cap is rechecked for any claimed row that has recommendations. Unit test TestClaimAndExecuteWithin_AnApprovedRowIsNotClaimable pins the from-set and the benign refusal; integration test TestSingleClaim_FunnelRefusesAnApprovedRow (compiled, needs the DB env to run) shows an approved row is left unbought; tests that seeded approved rows use notified; the known-issues entry is removed. Verified: two cold review rounds (their should-fix, deleting gated, applied), mutation probes killed, pinned golangci-lint v2.10.1 unfiltered plain and -tags integration: 0 new, go vet both tags, scoped tests plus ./internal/mocks. Main CI at 170db82: pre-commit, CI - Build & Test and Deploy to AWS Lambda succeeded (the frontend sentinel was cancelled by the next push).