Skip to content

Fix: Confirmed all-day signup missing from Cantina daily roster (event-scoping suspected) #896

Description

@FrankFanteev

Context

A human with Confirmed all-day shifts on a given day is missing from the Cantina daily roster for that day.

Reporter-confirmed repro (production, humans.nobodies.team):

  • One affected human (specific name + profile id withheld from this public tracker per GDPR — available from the reporter on request).
  • Has 7 Confirmed signups (7 upcoming, 0 pending, 0 past), rota Infrastructure / Construction Crew, all-day, dated Mon Jun 29 → Sun Jul 5, 2026 (build week, day offsets −8 … −2).
  • Their Jun 29 shift is Confirmed, yet they do not appear on /Cantina/Roster/Day?dayOffset=-8 (header "Jun 29, 2026 — Today", 77 humans on site).
  • Reporter confirms it is not a burner-name display issue (the playa name is the one expected; not hidden off-screen in the list).

Investigation so far

The daily-roster "on-site" cohort is computed by a single query with no team / rota-type / all-day / meal filter:

CantinaRosterService.GetDailyRosterAsync (src/Humans.Application/Services/Cantina/CantinaRosterService.cs:167, call at :200)
ShiftManagementService.GetOnSiteUserIdsForDayAsync (src/Humans.Application/Services/Shifts/ShiftManagementService.cs:1974)
ShiftRepository.GetUserIdsForDayAsync (src/Humans.Infrastructure/Repositories/Shifts/ShiftRepository.Signups.cs:106):

WHERE Shift.Rota.EventSettingsId == <active event>
  AND Shift.DayOffset           == <day being viewed>
  AND (Status == Pending OR Status == Confirmed)

So an all-day Construction Crew shift counts identically to a cantina shift. (Shift.QualifiesForCantinaMeal() at src/Humans.Domain/Entities/Shift.cs:151 exists but is only used by the dashboard dietary nudge HasQualifyingCantinaSignupAsync — not by the roster.)

By that rule the signup satisfies status (Confirmed) and day: the profile renders the shift as Jun 29, and the profile date is derived from GateOpeningDate + DayOffset (Shift.GetAbsoluteStart, Shift.cs:120), so the stored DayOffset is −8 — matching the roster's −8 query. The only remaining filter that could silently exclude it is the Shift.Rota.EventSettingsId == <active event> clause.

Leading hypothesis

The Construction Crew rota carrying his Jun 29 shift is wired to a different EventSettings record than the one the roster treats as active (duplicate/old event, or a build rota attached to the wrong event). The roster's EventSettingsId == clause then drops the signup even though day + status are correct. If so, this is a data defect (rota→event linkage), not roster logic — but the roster silently swallowing it is itself worth hardening.

Investigation / fix steps

  1. For the affected human's Jun 29 signup (id from reporter), compare Shift.Rota.EventSettingsId against the active EventSettings.Id (and against the EventSettings.Id whose GateOpeningDate = 2026-07-07). Confirm Shift.DayOffset == -8 and Status == Confirmed.
  2. If the rota points at a non-active event → find how/why (rota seeding / event duplication), correct the data, and document the constraint.
  3. If the rota is the active event (hypothesis wrong) → instrument GetUserIdsForDayAsync for this user/day to find the actual excluding clause; widen investigation.
  4. Decide whether the roster should surface (or guard against) signups on rotas bound to a non-active event rather than silently excluding them.

Acceptance criteria

  • Root cause identified for why a Confirmed, correctly-dated all-day signup is absent from the daily roster (no surgical patch — per hard rules).
  • The daily roster includes every human with a Pending/Confirmed signup whose shift falls on the viewed day of the active event.
  • If data defect: offending linkage corrected and the invariant documented; if logic defect: query/scoping fixed.
  • Regression test covering a Confirmed all-day build-week shift appearing on its day's roster.

Sprint Metadata

  • Size: S (pending root cause; could be data-only)
  • Tier: standard
  • Area: shifts (Cantina roster reads via Shifts service)
  • Key files: src/Humans.Infrastructure/Repositories/Shifts/ShiftRepository.Signups.cs, src/Humans.Application/Services/Shifts/ShiftManagementService.cs, src/Humans.Application/Services/Cantina/CantinaRosterService.cs, src/Humans.Domain/Entities/Shift.cs
  • Migration: unknown (likely no — data correction or query scoping)

Filed from a support investigation; no refresh interval is involved — the roster is computed live per request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions