Skip to content

B5 — calendar subscription only carries published work - #209

Merged
tomqwu merged 1 commit into
mainfrom
overnight-B5-calendar-sub
May 19, 2026
Merged

tomqwu merged 1 commit into
mainfrom
overnight-B5-calendar-sub

Conversation

@tomqwu

@tomqwu tomqwu commented May 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • /api/v1/calendar/feed/{token} previously returned every assignment for the person, including draft solver output. Now it returns only published work: assignments whose Solution.is_published is true, plus direct assignments with no solution (manual / self-serve / swap).
  • The web app already surfaces the subscribe URL on /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 404
  • Committed e2e tests/e2e/test_calendar_subscription.py — solve → volunteer's ICS feed lacks the shift; publish → same subscribe URL returns it
  • No regression: tests/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 tests clean; full tests/e2e/ 4 passed
  • CI: lint/type/test + blocking e2e lane green

Closes #208 · part of #196 (Phase B).

🤖 Generated with Claude Code

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>
@tomqwu tomqwu added this to the Overnight — e2e workflows milestone May 19, 2026
@tomqwu
tomqwu merged commit d1975f4 into main May 19, 2026
5 checks passed
@tomqwu
tomqwu deleted the overnight-B5-calendar-sub branch May 19, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

B5 — calendar subscription verified e2e (ICS has published assignment)

1 participant