Repository navigation
B5 — calendar subscription only carries published work - #209
Merged
Merged
Conversation
The public ICS feed (/api/v1/calendar/feed/{token}) returned every
assignment, including draft solver output. Scope it to published work:
assignments tied to a published Solution, plus direct manual /
self-serve / swap assignments (no solution). Draft solutions stay out
of the volunteer's subscribed calendar until published.
Tests: tests/web/test_calendar_feed_published.py (draft hidden, manual
shown, publish reveals) and committed e2e
tests/e2e/test_calendar_subscription.py (solve → feed lacks shift;
publish → same subscribe URL now returns it).
Closes #208
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
/api/v1/calendar/feed/{token}previously returned every assignment for the person, including draft solver output. Now it returns only published work: assignments whoseSolution.is_publishedis true, plus direct assignments with no solution (manual / self-serve / swap)./v/profile(Sprint 11.11); this PR closes the gap that draft schedules leaked into a subscribed calendar and adds the missing end-to-end proof.Test plan
tests/web/test_calendar_feed_published.py— draft hidden, manual always shown, publishing the solution reveals it; invalid token still 404tests/e2e/test_calendar_subscription.py— solve → volunteer's ICS feed lacks the shift; publish → same subscribe URL returns ittests/unit/test_calendar.py+tests/api/test_calendar_auth.py(30 passed); contract + OpenAPI snapshot unchanged (no new route)black --check api tests+ruff check api testsclean; fulltests/e2e/4 passedCloses #208 · part of #196 (Phase B).
🤖 Generated with Claude Code