Skip to content

feat: add Telegram and Zalo reminder scheduling - #20

Merged
daohoangson merged 1 commit into
mainfrom
codex/chat-reminders
Oct 14, 2026
Merged

daohoangson merged 1 commit into
mainfrom
codex/chat-reminders

Conversation

@daohoangson

Copy link
Copy Markdown
Owner

Intent

User asked how to allow Bubby bot to set schedules/reminders, then said Do it. Implement one-time and recurring text reminders for Telegram and Zalo, with list, reschedule, pause/resume and cancel, per-user ownership, trusted originating chat/topic routing, current allowlist checks at execution, and Asia/Ho_Chi_Minh as the default timezone. The user reported Zalo typing then silence; remove redundant tool approvals because Zalo has no approval UI and the chat request authorizes the bounded reminder action. The user reported a successful creation receipt but no delivery: the bundled Eve dev in-memory provider has no timers and parses UTC local date strings in the host timezone, so add a process-local timezone-aware dev scheduler. Dev reminders may be lost on restart/worker reload, failures pause reminders, jitter is unsupported in dev, while production must use Eve experimental Vercel Schedules with Vercel OIDC. Reminders send saved text directly rather than executing future agent tasks; provider retries may repeat delivery. User confirmed live Zalo and Telegram dev scheduling. User now explicitly asks to commit, push to main, deploy production, watch CI/Vercel, verify production health and production scheduling. Review and preserve these intended policies. Keep README focused on current setup, usage and essential operations; do not append change histories, test transcripts, deployment records or per-feature implementation notes. Existing production webhooks must be preserved. A feature branch is being used for validation before the authorized merge to main and production deployment.

What Changed

  • Add chat-managed one-time and recurring text reminders for Telegram and Zalo, including trusted chat/topic routing, owner isolation, and current allowlist checks at delivery.
  • Add a process-local, timezone-aware Croner provider for development that supports reminder lifecycle operations and pauses reminders after delivery failures.
  • Configure reminder tool guidance and document production and development scheduling behavior.

Risk Assessment

✅ Low: The change is bounded to reminder scheduling, preserves verified chat identity through creation and delivery, rechecks allowlists at execution, and its dev timer state transitions match the stated containment policy.

Testing

After resolving the initially absent lockfile dependencies, targeted tests exercised automatic timezone-aware firing, recurring pause/resume/reschedule/cancel behavior, failure pausing, ownership and allowlist checks, approval bypass, and direct Telegram/Zalo delivery. The manual provider transcript confirms saved text routes to the exact Telegram topic and Zalo chat; transient node_modules files were removed.

Evidence: Dev schedule delivery transcript (Telegram topic and Zalo chat)
{
  "scenario": "Saved reminder text dispatched directly through the dev schedule provider",
  "deliveries": [
    {
      "transport": "Telegram Bot API",
      "destination": "-10042",
      "topic": 7,
      "text": "Drink water"
    },
    {
      "transport": "Zalo Bot API",
      "destination": "zalo-chat-42",
      "topic": null,
      "text": "Uong nuoc nhe"
    }
  ]
}

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • pnpm install --frozen-lockfile (resolved missing local dependencies for the initial test attempt)
  • node --test lib/reminders.test.ts lib/dev-schedules.test.ts agent/schedules/reminders.test.ts
  • Manual dev-provider delivery check: created and invoked one-time schedules for a Telegram topic and a Zalo private chat, recording the outbound saved-text routing in the evidence transcript.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Copilot AI balanced review requested due to automatic review settings October 14, 2026 14:31
@vercel

vercel Bot commented Oct 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
bubby Ready Ready Preview Oct 14, 2026 2:31pm UTC

Request Review

@daohoangson
daohoangson merged commit cb17e29 into main Oct 14, 2026
4 checks passed
@daohoangson
daohoangson deleted the codex/chat-reminders branch October 14, 2026 14:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Missing-timezone handling conflicts with the promised default, and development can re-invoke completed reminders.

2 open findings
What changed in this PR

Adds chat-managed Telegram and Zalo reminders with secure routing, ownership isolation, and development scheduling.

Changes:

  • Adds reminder authorization and direct delivery.
  • Adds a process-local Croner development provider and tests.
  • Documents reminder behavior and operational constraints.
File Description
README.md Documents reminder usage and deployment behavior.
package.json Adds Croner dependency.
pnpm-lock.yaml Locks Croner 10.0.1.
lib/​reminders.ts Implements routing, authorization, and delivery.
lib/​reminders.test.ts Tests reminder security and delivery.
lib/​dev-schedules.ts Implements development scheduling.
lib/​dev-schedules.test.ts Tests timer lifecycle and failure handling.
agent/​schedules/​reminders.ts Defines reminder schedule tools.
agent/​schedules/​reminders.test.ts Tests approvals and owner isolation.
agent/​instructions.md Adds reminder-management guidance.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/dev-schedules.ts
throw new Error("Dev reminders do not support jitter; omit it from the schedule.");
}
const job = new Cron(expression.type === "single" ? expression.at : expression.cron, {
timezone: expression.timezone ?? "UTC", paused: true, unref: true, protect: true,
Comment thread lib/dev-schedules.ts
});
},
async invoke(ctx, name) {
await once(ctx, () => dispatch(requireEntry(ctx, name), `manual_${ctx.operationId}`, new Date().toISOString()));

This branch was successfully deployed

1 active deployment
Preview — a66dc6e5 Deployed Oct 14, 2026 by vercel[bot]
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.

2 participants