[auto-review] The 'done today' count for the Home page is calculated using a timezon
**Severity:** high **Location:** mission-control/models.py:10315 **Flagged by:** gemini **Issue:** The 'done today' count for the Home page is calculated using a timezone-naive...
StateDoneNext ActionClosedOwnerLuciRuntimeClosedAge10d ago
Ticket is done; runtime is closed.·cwd /home/lucienne/workspace/state/control-room-worktrees/mc-4632-auto-review-the-done-today-count-for-the-e5c2d5 · uptime 9d 22h · last activity 9d 22h ago
Description
MC-4632
**Severity:** high
**Location:** mission-control/models.py:10315
**Flagged by:** gemini
**Issue:**
The 'done today' count for the Home page is calculated using a timezone-naive SQL `LIKE` query. This will produce counts inconsistent with the Board v2 'Done' column, which uses a new, correct, timezone-aware filter. A ticket completed late in UTC (e.g., 23:30Z) is the next calendar day in SAST, but this query will attribute it to the UTC day, causing the Home page count to disagree with the Board's list of tickets done today.
**Suggested fix:**
To ensure consistency, the count should use the same timezone-aware logic as the board. Fetch the `completed_at` timestamps for all tickets completed in the last 48 hours and perform the count in Python. First, move the `SAST` timezone object and the `_v2_completed_today` function from `app.py` to a shared utility file or `models.py` itself. Then, replace the `LIKE` query with a query that fetches recent candidate timestamps (e.g., `SELECT completed_at FROM tickets WHERE status = 'done' AND date(completed_at) >= date('now', '-1 day')`) and a Python loop to count them using the shared timezone-aware function.
---
Found by mc-auto-review on 2026-06-03 06:02 SAST.
Repos reviewed: workspace, mission-control.
auto-review-hash: aea0458fa060
Activity
done
INTERACTIVE
Luci is working...
Details —
Done
· High
· Luci
▼
SState
Done
Closed
PPeople
TTiming / Details▼
mc-auto-review (scheduled)
Mission Control
10d ago
10d ago
Advanced / Operator evidence
RRouting owner
ROperator console
Ticket is done; runtime is closed.direct_worker_done_recoveredcwd /home/lucienne/workspace/state/control-room-worktrees/mc-4632-auto-review-the-done-today-count-for-the-e5c2d5 · uptime 9d 22h · last activity 9d 22h agoMC is visibility-only. Hermes Luci launches and gates work outside MC, then mirrors evidence/status here.Raw console: luci-controller · claude-code
WWorkflow
Start Dev Review + QA ▾
Select phases to include:
Agents
Review Gates
Decision
WAT routing: choose an agent, review gate, or decision. Buttons use the live runtime when one is attached.
Workflow action `requeue` applied. Requeued for retry.
luci-controller10d ago
[orchestrator-recovery] Stopped stale Control Room worker: no worker output beyond dispatch header, no git changes, and expected check-in was missed. Requeued for a fresh deterministic pickup instead of letting it block the whole board.
luci-controller10d ago
[orchestrator-review] Verified recovered worker evidence for MC-4632. Ran python3 -m pytest tests/test_mc4632_home_done_today_tz.py -q: 5 passed. Closing.
workflow10d ago
Workflow action `approve` blocked: mobile visual review requires a live 375px screenshot and explicit APPROVED mobile verdict before this ticket can move to `done`.
workflow10d ago
Workflow action `approve` blocked: mobile visual review requires a live 375px screenshot and explicit APPROVED mobile verdict before this ticket can move to `done`.
[control-room-promote] Promoted MC-4632 from inbox to todo (priority high) so the Control Room pickup loop can dispatch it. Deterministic triage — no worker fired yet.
luci-controller10d ago
[control-room-dispatch] Control Room dispatched MC-4632 to a Claude Code worker.
Worktree: /home/lucienne/workspace/state/control-room-worktrees/mc-4632-auto-review-the-done-today-count-for-the-d2d6c8
Branch: cr/mc-4632-auto-review-the-done-today-count-for-the-d2d6c8
tmux: cr-MC-4632
Expected check-in: 2026-06-03T08:13:19.873265+00:00
luci-controller10d ago
[control-room-dispatch] Control Room dispatched MC-4632 to a Claude Code worker.
Worktree: /home/lucienne/workspace/state/control-room-worktrees/mc-4632-auto-review-the-done-today-count-for-the-e5c2d5
Branch: cr/mc-4632-auto-review-the-done-today-count-for-the-e5c2d5
tmux: cr-MC-4632
Expected check-in: 2026-06-03T08:55:43.930353+00:00
luci-controller10d ago
[control-room-recover] MC-4632: recovered DONE from a finished direct worker whose tmux was gone. Ticket → in_review. Summary: MC-4632 already fixed + pushed in mission-control repo @ 2b7bf9a on master (tz-aware `models._completed_today_sast` shared by Home + Board v2, naive LIKE count replaced with Python filter). Verified live: tests/test_mc4632_home_done_today_tz.py → 5 passed; HEAD==origin/master. No further changes required.