Repository navigation
Overnight B2 — swap-claim marketplace - #202
Merged
Merged
Conversation
Volunteers can cover a teammate: /v/swaps lists swap_requested
assignments in their org (not their own, future, events they're not
on). POST /v/swaps/{id}/claim transfers the assignment to the claimer
(person_id→claimer, status→confirmed, decline_reason cleared),
re-validated server-side & org-scoped — completes the swap workflow
end-to-end (previously admin approve/deny only). Linked from /v/open.
Committed multi-actor e2e (tests/e2e/test_swap_marketplace.py): admin
event → Vol A claims → A requests swap → Vol B covers it → B's
schedule shows it, A's doesn't. + 5 web tests.
Closes #201
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The swap-marketplace flow clicked Claim then immediately navigated to /v/schedule without waiting for the HTMX POST to commit, so the assignment was not yet persisted under CI's slower timing (passed locally on a fast machine). Mirror B1's proven synchronization by waiting for the open-list to show "No open shifts" before navigating. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
16 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the swap workflow end-to-end.
/v/swapslistsswap_requestedassignments in the volunteer's org (excluding their own requests, past events, and events they're already on).POST /v/swaps/{id}/claimtransfers the assignment to the claimer (person_id→claimer,status→confirmed,decline_reasoncleared), re-validated server-side & org-scoped. Previously a swap could only be admin-approved/denied (P1.11) — now another volunteer can actually cover it. Linked from/v/open.Part of #196 (Phase B).
Test plan
black --check api tests/ruff check api testscleantests/web/test_swap_marketplace.py(5) — auth gate, transfer + requester-doesn't-see-own, already-on-event blocked, non-swap blocked, /v/open links to itpytest tests/web— 200 passedtests/e2e/test_swap_marketplace.py— multi-actor (admin + 2 isolated volunteer contexts): A claims → requests swap → B covers → B's schedule shows it, A's doesn't. Full e2e suite (smoke+B1+B2) green locally (8.7s)ci+ blockinge2elanes greenCloses #201
🤖 Generated with Claude Code