Skip to content

eNotify waker 迁移 · 切换:删 [triggers]、单一由 waker 驱动 - #161

Merged
todosdev[bot] merged 1 commit into
mainfrom
tds/conv-01a187fc-c70a-7035-8b99-2353c58e52f8
Oct 29, 2026
Merged

todosdev[bot] merged 1 commit into
mainfrom
tds/conv-01a187fc-c70a-7035-8b99-2353c58e52f8

Conversation

@todosdev

@todosdev todosdev Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Completes stage 2 of the waker migration: the hourly reminder sweep is now driven only by the waker job hourly-reminder-sweep, with the native Cron Trigger turned off via [triggers] crons = [] in worker/wrangler.toml.
  • An empty cron list is the only thing that actually removes the deployed trigger — deleting the [triggers] section or commenting out crons leaves it running, because wrangler only PUTs /schedules when crons is defined. The CI interlock is retargeted to this mechanism so a deploy still can never ship with neither a cron nor the waker key.
  • No business code, receiver, execution ledger or tick-claim logic is touched.

Changes

worker/wrangler.toml

  • [triggers] crons = ["0 * * * *"] → crons = []; the section stays (with a comment explaining why the empty array, not deletion, is the switch). Rollback = restore the cron expression.

.github/workflows/deploy.yml

  • Interlock now parses the [triggers] body and decides on a non-empty crons list (comments inside the array are stripped) instead of merely detecting the section header. It still fails the deploy when WAKER_SIGNING_KEY is unset and no cron is configured.
  • Deploy log now reports native cron: configured|disabled and drops the misleading "(native cron only)" label.

Docs (README.md, README.en.md, CLAUDE.md)

  • Waker documented as the single schedule source, with WAKER_SIGNING_KEY required; added the Cloudflare/wrangler rationale for crons = [].
  • Cutover section replaced by current state / rollback (crons back to ["0 * * * *"]) / disable-callbacks steps.
  • CLAUDE.md notes the native scheduled() entry stays in code for the rollback path only.

Testing

  • pnpm test: 23 files, 301 tests passed. pnpm format:check (157 files), pnpm typecheck, pnpm build pass. pnpm lint reports no errors; the 2 advisories are pre-existing and in untouched files (biome schema 2.5.0 vs CLI 2.5.15, unused import in worker/src/routes/items.ts).
  • wrangler deploy --dry-run succeeds and wrangler's own config resolution reports triggers = {"crons":[]}.
  • Deploy interlock exercised with the exact script lifted from deploy.yml across 6 cases: empty crons + key → deploy; empty crons + no key → blocked (exit 1); crons = ["0 * * * *"] + no key → deploy (rollback state); no [triggers] + no key → blocked; comment-only array + no key → blocked; comment-only array + key → deploy.
  • Post-deploy check (user gate): Cloudflare Triggers shows no cron, and the next top-of-hour waker execution logs executed: true.

Set `[triggers] crons = []` so the deployed Cron Trigger is actually cleared
(deleting the section leaves it running), and make the deploy interlock test
for a non-empty crons list instead of the section header.

Checkpoint: kwgfdL9Jb-ddBC8gHsLW1
@todosdev
todosdev Bot merged commit da97d51 into main Oct 29, 2026
1 check passed
@mapxn
mapxn deleted the tds/conv-01a187fc-c70a-7035-8b99-2353c58e52f8 branch November 8, 2026 11:28
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.

0 participants