Repository navigation
test(purchase): pin newAccountExecution as the per-account key writer - #1823
Conversation
#1798 moved the one per-account IdempotencyKey derive out of executeForAccount into newAccountExecution, which now serves both the per-account run and the skipped-account rows with the same lineage key plus account id. The writer scan still pinned the old function, so it failed on main. No second writer was added; only the pin moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
APPROVED 60702c4 by claude-cc-platform-2 Cold review. The change is test-only: one line in Writers checked against the code at this head (
Checks
Local verification (macOS, at this head, throttled):
There's no production change. This fixes main's CI - Build failure from 672fb90 onward, where #1816 and #1798 each passed on their own base but fail together. |
|
APPROVED 60702c4 by claude-ui-fix-1 This is a code review; runtime probes are queued and will follow. Change. In Writer set at origin/main, from
The new pin matches the code, and the single-writer contract holds. Pending probes: a second |
|
Follow-up runtime probes for my approval at 60702c4. These ran in a scratch worktree at that SHA, on the review lock, with GOMAXPROCS=4 and -p 2.
So the scanner still catches a second per-account writer and a missing one. |
Fixes red main.
TestIdempotencyKeyCopyHasSingleWriter(added in #1816) pins the functions that may assign an execution'sIdempotencyKey. #1798 moved the per-account derive out ofManager.executeForAccountintonewAccountExecution(internal/purchase/execution.go:434), so the scan has failed on main since both PRs landed.newAccountExecutionis the only per-account writer on main. It setsidempotencyLineageKey(baseExec) + ":" + accountID. Both of its callers use that same derivation, so a skipped account's row carries the same stable key as its run:executeForAccountLate;skippedAccountRows.No second writer was added. The other writers are unchanged:
persistRetryExecution, the store's default mint and scan, andwriteAttached.This change moves only the pin. There is no production change.
go test -run TestIdempotencyKey ./internal/purchase/passes.Part of #702.
🤖 Generated with Claude Code