Skip to content

fix(qqbot): honor Gateway timezone for recurring reminders - #116294

Merged
vincentkoc merged 1 commit into
mainfrom
fix/qqbot-reminder-local-timezone
Jul 30, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/qqbot-reminder-local-timezone

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Jul 30, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes an issue where QQBot recurring reminders without an explicit timezone always ran in Asia/Shanghai, regardless of the Gateway host timezone. This made the plugin disagree with core cron behavior and surprised operators outside that zone.

Why This Change Was Made

QQBot now omits schedule.tz when the model does not supply a timezone, allowing the canonical Gateway cron scheduler to use its host timezone. Explicit IANA timezone values are trimmed and preserved.

The fixed fallback originated in the QQBot reminder implementation and was later named while #98032 tightened guardrails; that PR explicitly preserved the existing default rather than establishing a cross-product timezone contract.

User Impact

Recurring QQBot reminders now follow the same rule as every other Gateway cron job: an explicit timezone wins, otherwise the Gateway host timezone applies. Existing reminders with an explicit timezone are unchanged.

Upgrade semantics are bounded: the previous QQBot implementation always persisted tz: "Asia/Shanghai" when creating a reminder without an explicit timezone. Those existing jobs retain that stored timezone and are not rewritten by this change. Only newly created QQBot reminders with an omitted timezone adopt Gateway-local behavior; manually created existing cron jobs that already omit tz already use Gateway-local behavior.

Evidence

  • Focused QQBot reminder tests: 2 files, 9 tests passed.
  • Fresh changed-surface gate passed on Blacksmith Testbox: https://github.com/openclaw/openclaw/actions/runs/30523488490
  • Fresh autoreview: clean, no accepted or actionable findings.
  • Regression coverage proves:
    • omitted timezone produces a cron schedule without tz and reports gateway local;
    • whitespace-padded America/New_York is trimmed and preserved.
  • Core contract checked in src/cron/schedule.ts: omitted tz resolves through the Gateway process timezone.
  • Croner 10.0.1 contract checked directly: timezone is optional and accepts IANA identifiers.

Alternatives Considered

  • Keep Asia/Shanghai: rejected because it is a plugin-specific global default with no operator signal.
  • Default to UTC: rejected because it would still diverge from documented Gateway cron behavior.
  • Add a QQBot-specific config key: rejected because the existing explicit timezone field and canonical Gateway default already cover both needs.

AI-assisted implementation; the runtime path, history, core scheduler, and dependency contract were manually inspected.

@vincentkoc vincentkoc self-assigned this Jul 30, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review July 30, 2026 07:43
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Jul 30, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 30, 2026
@clawsweeper

clawsweeper Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 30, 2026, 4:21 AM ET / 08:21 UTC.

ClawSweeper review

What this changes

The PR removes QQBot’s implicit Asia/Shanghai timezone for newly created recurring reminders, allowing omitted timezones to use the Gateway host timezone while trimming and preserving explicit IANA timezones.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this maintainer-authored PR open for explicit merge review. The patch is a focused, internally consistent correction: new QQBot recurring reminders without an explicit timezone defer to the canonical Gateway cron default, while explicitly zoned reminders retain their zone; the remaining judgment is whether that bounded future-job behavior change is the intended QQBot upgrade contract.

Priority: P2
Reviewed head: f5642f3626bacb764fb8ef820ff9f618f1ae4c38
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused patch and targeted regression coverage support the implementation; explicit maintainer confirmation of the future-job default remains the merge gate.
Proof confidence 🌊 off-meta tidepool Not applicable: The PR is authored by a repository member, so the external-contributor real-behavior-proof gate does not apply; its body still supplies focused test and CI evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The PR is authored by a repository member, so the external-contributor real-behavior-proof gate does not apply; its body still supplies focused test and CI evidence.
Evidence reviewed 5 items PR patch narrows the fallback at the owner boundary: The proposed QQBot change removes the plugin-local Asia/Shanghai default, trims params.timezone, and only includes schedule.tz for a non-empty explicit value; the accompanying summary renders an omitted value as gateway local.
Regression coverage covers both branches: The proposed tests assert that an omitted timezone creates a cron schedule without tz and that whitespace-padded America/New_York is trimmed and preserved.
Shared cron contract is documented: OpenClaw’s public cron documentation describes cron timezones as optional and tells operators to distinguish an explicit --tz from the host timezone, matching the omitted-timezone path proposed here.
Findings None None.
Security None None.

How this fits together

QQBot’s reminder tool converts a model-requested recurring reminder into a Gateway cron job. The cron job’s schedule is then persisted and evaluated by the shared scheduler, which uses an explicit timezone when present and the host timezone when it is omitted.

flowchart LR
  A[QQBot user reminder request] --> B[QQBot reminder tool]
  B --> C{Timezone supplied?}
  C -->|Explicit IANA zone| D[Trim and store timezone]
  C -->|Omitted or blank| E[Leave timezone unset]
  D --> F[Gateway cron job]
  E --> F
  F --> G[Shared scheduler]
  G --> H[Reminder delivery]
Loading

Decision needed

Question Recommendation
Should QQBot’s implicit timezone for newly created recurring reminders align with the Gateway host timezone rather than continue using Asia/Shanghai? Align with Gateway cron: Merge the patch so an omitted QQBot timezone follows the same host-timezone default as other Gateway cron jobs while existing stored schedules remain untouched.

Why: The code has a narrow implementation and regression coverage, but selecting the default schedule timezone is an operator-visible compatibility decision for future reminders and this PR is protected for maintainer handling.

Before merge

  • Resolve merge risk (P1) - Merging changes the scheduled wall-clock time for future QQBot recurring reminders created without a timezone: they will use the Gateway host timezone instead of the prior Asia/Shanghai default. The PR body credibly bounds this to newly created jobs, but the protected maintainer label requires an explicit maintainer confirmation of that upgrade policy.
Agent review details

Security

None.

PR surface

Source +3, Tests +48. Total +51 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 9 6 +3
Tests 1 48 0 +48
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 57 6 +51

Review metrics

Metric Value Why it matters
Implicit timezone defaults 1 removed, 0 config options added The PR deliberately replaces one channel-specific hidden default with the existing Gateway scheduler default, so the future-job compatibility effect needs maintainer acknowledgment.

Merge-risk options

Maintainer options:

  1. Confirm and merge the bounded change (recommended)
    Confirm that only new timezone-omitted reminders should switch to Gateway-local scheduling and retain the focused regression tests.
  2. Preserve the existing default
    Pause this PR if the project intends Asia/Shanghai to remain a user-visible QQBot default, then define an explicit migration or opt-in direction.

Technical review

Best possible solution:

Adopt the shared Gateway cron timezone rule for newly created QQBot reminders, preserve already persisted explicit tz values unchanged, and document the intentional future-job behavior in the merge rationale.

Do we have a high-confidence way to reproduce the issue?

Source-reproducible: the supplied diff identifies the old unconditional QQBot timezone fallback and adds direct tests for omitted and explicit timezone inputs. A live current-main reproduction was not independently run because the read-only shell could not start.

Is this the best way to solve the issue?

Yes, conditionally: delegating an omitted timezone to the canonical Gateway cron scheduler avoids a competing channel-specific default, provided maintainers confirm the intended future-job compatibility behavior.

AGENTS.md: unclear because the file could not be read completely.

Codex review notes: model internal, reasoning high; reviewed against cc570a74532e.

Labels

Label justifications:

  • P2: This corrects a bounded QQBot reminder scheduling inconsistency without evidence of an emergency regression.
  • merge-risk: 🚨 compatibility: Future QQBot recurring reminders that omit a timezone will schedule in a different wall-clock timezone than before.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The PR is authored by a repository member, so the external-contributor real-behavior-proof gate does not apply; its body still supplies focused test and CI evidence.

Evidence

What I checked:

  • PR patch narrows the fallback at the owner boundary: The proposed QQBot change removes the plugin-local Asia/Shanghai default, trims params.timezone, and only includes schedule.tz for a non-empty explicit value; the accompanying summary renders an omitted value as gateway local. (extensions/qqbot/src/engine/tools/remind-logic.ts:224, f5642f3626ba)
  • Regression coverage covers both branches: The proposed tests assert that an omitted timezone creates a cron schedule without tz and that whitespace-padded America/New_York is trimmed and preserved. (extensions/qqbot/src/engine/tools/remind-logic.test.ts:62, f5642f3626ba)
  • Shared cron contract is documented: OpenClaw’s public cron documentation describes cron timezones as optional and tells operators to distinguish an explicit --tz from the host timezone, matching the omitted-timezone path proposed here. Public docs: docs/automation/cron-jobs.md. (docs/automation/cron-jobs.md:1, cc570a74532e)
  • Related QQBot history is adjacent, not a replacement: The merged QQBot guardrail work touched the same reminder surface and explicitly preserved the prior behavior, but it focused on skill safety rather than establishing the cross-product timezone default; it does not supersede this PR. (extensions/qqbot/src/engine/tools/remind-logic.ts:1, 56c2d637d940)
  • Repository inspection limitation: The required on-disk read-only inspection command could not start because the execution sandbox rejected loopback setup, so scoped-policy, current-main source, and git-history checks beyond the supplied PR context could not be independently completed.

Likely related people:

  • Patrick-Erichsen: Merged QQBot work in commit 56c2d63 includes the reminder surface and records the earlier default as intentionally preserved at that time, making this a useful routing contact for the changed contract. (role: recent adjacent QQBot contributor; confidence: medium; commits: 56c2d637d940; files: extensions/qqbot/src/engine/tools/remind-logic.ts, extensions/qqbot/src/engine/tools/remind-logic.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Confirm the intended upgrade policy for future timezone-omitted QQBot reminders before merging.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-07-30T07:47:03.259Z sha f5642f3 :: needs maintainer review before merge. :: none

@vincentkoc
vincentkoc merged commit 91dca69 into main Jul 30, 2026
155 of 164 checks passed
@vincentkoc
vincentkoc deleted the fix/qqbot-reminder-local-timezone branch July 30, 2026 08:32
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 30, 2026
…n-dedupe

* origin/main: (25 commits)
  fix(qqbot): use Gateway timezone for reminders (#116294)
  test(openai): cover out-of-order named mark acks
  docs(openai): clarify cumulative playback marks
  test(openai): cover sustained unnamed mark acknowledgements
  fix(openai): preserve playback acknowledgement order
  test(openai): verify bounded playback acknowledgements
  fix(openai): bound realtime playback marks
  test(agents): mock incremental registry persistence (#116307)
  fix(memory-core): MEMORY.md compaction deletes user notes written under a promotion-style heading (#116180)
  feat(reply): annotate recent history images (#100866)
  chore(ios): refresh native i18n inventory
  fix(ios): isolate capability router handlers
  docs(ios): cut 2026.7.22 release notes
  docs(hooks): document validation responses
  test(qa): assert hook account rejection reasons
  fix(gateway): validate hook delivery accounts
  perf(gateway): bound prepared runtime startup work (#116261)
  fix(agents): prevent registry stalls during large fan-outs (#116286)
  fix(sqlite): preserve replaced snapshot targets on Windows (#116284)
  fix(ci): load frozen shard runner without repository fetch (#116273)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 31, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 31, 2026
…n-dedupe

* origin/main: (25 commits)
  fix(qqbot): use Gateway timezone for reminders (openclaw#116294)
  test(openai): cover out-of-order named mark acks
  docs(openai): clarify cumulative playback marks
  test(openai): cover sustained unnamed mark acknowledgements
  fix(openai): preserve playback acknowledgement order
  test(openai): verify bounded playback acknowledgements
  fix(openai): bound realtime playback marks
  test(agents): mock incremental registry persistence (openclaw#116307)
  fix(memory-core): MEMORY.md compaction deletes user notes written under a promotion-style heading (openclaw#116180)
  feat(reply): annotate recent history images (openclaw#100866)
  chore(ios): refresh native i18n inventory
  fix(ios): isolate capability router handlers
  docs(ios): cut 2026.7.22 release notes
  docs(hooks): document validation responses
  test(qa): assert hook account rejection reasons
  fix(gateway): validate hook delivery accounts
  perf(gateway): bound prepared runtime startup work (openclaw#116261)
  fix(agents): prevent registry stalls during large fan-outs (openclaw#116286)
  fix(sqlite): preserve replaced snapshot targets on Windows (openclaw#116284)
  fix(ci): load frozen shard runner without repository fetch (openclaw#116273)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: qqbot maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant