Redeem refuses a target the completion did not record #10
Loading…
Reference in a new issue
No description provided.
Delete branch "heimdall/redeem-refuse-unexpected-target"
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?
Redeem compared targets only when the completion recorded one, so a caller naming a target against a completion minted with none got a 201. The comparison is now symmetric: any difference between pending.targetId and request.body.targetId refuses with 403 completion_target_mismatch, without consuming the code.
Test first (commit 1 fails on main: got 201, wanted 403; commit 2 fixes). sign_in and no-target redeems still pass (both sides undefined); tests/link-binding.test.ts 11/11. Full suite: the same 30 failures with and without the change (entrypoint/idunn/etc. environmental), none new.
🤖 Generated with Claude Code