CedarCopilot wants to merge 2 commits into staging from fix/remove-reminder-task-type
Libra ran this behavior against the change and confirmed the check detects when it breaks.
Changed code: aop-schema.ts.
Live on prod, 0 of 8 surfaces working, less than a day left
Verification reached its 130s outer budget before the verifier returned. Libra is keeping this intent verifying until the next check.
Verification reached its budget before a verdict.
Verification reached its budget before a verdict.
Since 2026-09-18T19:03:16Z in staging, telemetry contains only low-volume read/list evidence: userTasks.listUserTasks (3 related spans, HTTP 200, p95 ~724 ms, 1 distinct user) and userTasks.getTaskById (4 related spans, HTTP 200, p95 ~100 ms, 1 distinct user), plus one.
internal_only
internal_only
internal_only
internal_only
internal_only
Libra found 8 production surfaces on prod but could not judge any of them yet. 4 surfaces had under 20 requests, so Libra has not judged them; 4 surfaces had no requests at all. Libra checks hourly for 3 days after each deploy.
Every create-task call with taskType: 'reminder' has been failing since the feature shipped (2026-05-26): the app-level TASK_TYPES enum allowed it, but the migration adding it to the live user_tasks_task_type_check constraint (0039_add_reminder_task_type.sql) was never applied to prod. Confirmed via prod: zero task_type='reminder' rows have ever existed , both the user-facing "remind me on a thread" feature and agent-created follow-ups (e.g. next-steps) silently lost the task every time, retrying up to 4x against the same deterministic failure and firing a Slack alert each time.
Rather than apply the missing migration, this removes 'reminder' as a task type outright:
apps/mail/modules/userTasks/TASK_AXES_DESIGN.md) already treats 'reminder' as having no long-term home , its own backfill mapping files it under the "Follow-ups" task group, and its divergence notes say it becomes other once task_type is eventually dropped.task_type itself is still live (~111 files still read it; the migration's Phase 8b/9 to drop the column is deferred/gated, stalled since 2026-08-23), so this isn't blocked on that larger migration finishing.aop-schema.ts , removed 'reminder' from TASK_TYPES, TASK_TYPE_DESCRIPTIONS, and the Drizzle check() definition, which now matches the live prod constraint exactly.mail.ts's upsertReminderTaskForConversation (the one real write path) , now writes taskType: 'follow-up' instead, matching the task-groups migration's own reminder -> Follow-ups mapping. Tightened its lookup predicate with taskCreatedBy: 'user' so it can't collide with agent-created follow-up tasks on the same thread.schemas.ts, taskTool.ts , removed 'reminder' from the agent-facing tool descriptions.user-tasks.ts, task-admin/cli.ts , removed independent 'reminder' enum copies (not derived from the canonical TASK_TYPES).services/user-tasks/tasks.ts , doc comment.mail-remind.test.ts , updated the one test asserting the old (always-failing) behavior.Left untouched: DailyRecapCategory in recap-helpers.ts/admin.ts and its downstream display-category branches , independently typed, not TaskType-derived, so they don't break; they just become permanently unreachable now that no row can ever have task_type='reminder' again. Optional follow-up cleanup, not part of this PR.
pnpm --filter @zero/server run types , cleanpnpm --filter @zero/server exec vitest run src/trpc/routes/__tests__/mail-remind.test.ts src/mastra/tools/task , 251 passed, 3 pre-existing skipstaskType: 'reminder') inside a rolled-back transaction with taskType: 'follow-up' instead , succeedspsql against prod: SELECT count(*) FROM user_tasks WHERE task_type = 'reminder' → 0, so no data migration is needed🤖 Generated with Claude Code
The PR is not safe to merge until Remind Me tasks can be identified without matching and overwriting ordinary user-created follow-ups.
| Surface | Requests | Errors | p95 | Users | Verdict |
|---|---|---|---|---|---|
| model_chunk Next Steps and Tasks Manager | 131 → 5 | 0 → 0 (0%) | 1 ms → 7 ms | 0 | Insufficient traffic 5 requests, under the 20 Libra needs |
| /api/trpc/userTasks.listUserTasks | 6 → 3 | 0 → 0 (0%) | 6248 ms → 724 ms | 0 | Insufficient traffic 3 requests, under the 20 Libra needs |
| /api/trpc/userTasks.getTaskById | 0 → 3 | 0 → 0 (0%) | not measured → 101 ms | 0 | Insufficient traffic 3 requests, under the 20 Libra needs |
| model_step Next Steps and Tasks Manager | 70 → 2 | 0 → 0 (0%) | 36136 ms → 11832 ms | 0 | Insufficient traffic 2 requests, under the 20 Libra needs |
| POST /api/trpc/userTasks.listUserTasks | 4 → 2 | 0 → 0 (0%) | 6248 ms → 724 ms | 0 | Insufficient traffic 2 requests, under the 20 Libra needs |
| invoke_agent Next Steps and Tasks Manager | 36 → 1 | 0 → 0 (0%) | 65219 ms → 22857 ms | 0 | Insufficient traffic 1 request, under the 20 Libra needs |
| execute_tool list-tasks | 1 → 1 | 0 → 0 (0%) | 292 ms → 59 ms | 0 | Insufficient traffic 1 request, under the 20 Libra needs |
| mail.setRemind | 0 → 0 | 0 → 0 (0%) | not measured | 0 | No traffic No requests recorded since this deploy. |
| mail.setRemind | 0 → 0 | 0 → 0 (0%) | not measured | 0 | No traffic No requests recorded since this deploy. |
| /api/trpc/userTasks.listUserTasks | 0 → 0 | 0 → 0 (0%) | not measured | 0 | No traffic No requests recorded since this deploy. |
| POST /api/trpc/userTasks.listUserTasks | 0 → 0 | 0 → 0 (0%) | not measured | 0 | No traffic No requests recorded since this deploy. |
| /api/trpc/userTasks.getTaskById | 0 → 0 | 0 → 0 (0%) | not measured | 0 | No traffic No requests recorded since this deploy. |
| model_chunk Next Steps and Tasks Manager | 16 → 0 | 0 → 0 (0%) | 1 ms → not measured | 0 | No traffic No requests recorded since this deploy. |
| model_step Next Steps and Tasks Manager | 7 → 0 | 0 → 0 (0%) | 18588 ms → not measured | 0 | No traffic No requests recorded since this deploy. |
| invoke_agent Next Steps and Tasks Manager | 1 → 0 | 0 → 0 (0%) | 24843 ms → not measured | 0 | No traffic No requests recorded since this deploy. |
| execute_tool list-tasks | 1 → 0 | 0 → 0 (0%) | 459 ms → not measured | 0 | No traffic No requests recorded since this deploy. |