✨ feat(commitments): due time + timezone#56
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for optional time-of-day and timezone precision on commitments (Tasks). It adds a new object_instant column and partial index to the claims table, promotes and extends timezone helpers, and introduces a shared DUE_ON metadata schema. Write paths (createCommitment, setCommitmentDue) and read paths (getOpenCommitments, listCommitments, getCommitment) are updated to handle, filter, sort, and display the new dueTime, timeZone, and dueAt fields. Additionally, the daily digest is updated to support instant-aware overdue bucketing, and comprehensive test coverage is added across all affected components. I have no feedback to provide as there are no review comments to assess.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two seed claims represented superseded history but were inserted with status='active', leaving a task with two active HAS_TASK_STATUS claims and another with two active DUE_ON claims: - "Done task used to be pending" → 'superseded' (task already done) - "Review memo was previously due on 2026-04-27" → 'superseded' (rescheduled) getOpenCommitments filters objectValue/dueOn before its newest-wins dedupe, so the stale active claims leaked the done task into the open list and the old due date into the dueBefore filter. Production supersession guarantees a single active claim per (task, predicate); the seed now models that. Pre-existing latent failures, surfaced once the suite became runnable (CI does not run vitest). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Formatting-only pass over the due-time + timezone feature files (and the spec/plan docs). No behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…t clock + DST test Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
c46c345 to
d7bca89
Compare
Summary
Adds an optional time of day + IANA timezone to commitment due dates, so a Task can be due "2026-06-10 at 17:00 in America/New_York" rather than only "2026-06-10". Fully additive and backward-compatible — date-only commitments are unaffected.
Data model (additive, no backfill):
DUE_ONclaim keeps pointing at the sharedYYYY-MM-DDday node. The wall-clock time + zone are stored as the canonical human truth in the claim'smetadatajsonb:{ dueTime: "HH:mm", timeZone: "<IANA>" }.claims.object_instant(timestamptz) holds the resolved UTC instant (derived via a singleinstantFromLocalTimehelper), enabling instant-precise querying. Migration0018adds the column + a partial index.Write —
createCommitment/setCommitmentDueacceptdueTime(24hHH:mm) +timeZone(validated IANA). Mutually required; a time requires a date. Responses echodueTime/timeZone/dueAt. Supersession unchanged.Read
dueTime/timeZone/dueAtsurfaced ongetOpenCommitments/getCandidateCommitments,listCommitments, andgetCommitment(one sharedreadDueQualifiermapper; malformed metadata degrades to date-only, never 500s).listCommitments: newdueAtsort key (nulls-last, reuses the existing keyset machinery) +dueBeforeInstant/dueAfterInstantfilters (timed tasks only).dueTodaytooverdueonce 09:00 passes in the caller's zone; date-only tasks keep calendar-day comparison.due=<date> <time> <zone>via a sharedformatDueformatter.Docs — SDK JSDoc,
docs/sdk/commitments.md, CHANGELOG; version bumped to 1.17.0.Non-goals: NL due-time inference in the ingestion extractor; an actual reminder scheduler (we persist a resolvable instant for a future/external one); a stored user-level timezone (caller-provided per write, matching the digest convention).
Design spec:
docs/superpowers/specs/2026-06-07-commitment-due-time-design.md· Plan:docs/superpowers/plans/2026-06-07-commitment-due-time.mdTest plan
pnpm run test— 72 files / 361 tests pass (against Postgres on :5431)pnpm run build:check— typecheck + structured-output schemas cleanpnpm run lint— cleanpnpm exec prettier --check .— cleanobject_instant21:00Z → read back 17:00); set-time-then-clear; reschedule supersedes; date-only fallbackdueAtkeyset pagination across the dated→null boundary; instant-range filters exclude date-only tasks; digest intraday overdue flip0018applies cleanly on a real DB (pnpm run drizzle:migrate)🤖 Generated with Claude Code