Skip to content

Native takeover: refuse PHP schedules native cannot run yet - #568

Merged
rmcdaniel merged 3 commits into
mainfrom
rust-325-takeover-schedules
Oct 21, 2026
Merged

rmcdaniel merged 3 commits into
mainfrom
rust-325-takeover-schedules

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

Part of #325. Takeover now refuses a PHP database that has live schedules native cannot run yet. Before, such a schedule would have stopped firing, or failed every scheduler tick, after the upgrade.

Why

Native schedules are still a bounded subset of PHP's:

  • one UTC P1D or PT2S interval;
  • the skip overlap policy, no jitter, and at most one run;
  • the default namespace only.

Takeover did not check schedules at all. Once due, a taken-over PHP cron schedule would make every native scheduler tick fail, because native refuses to compute its next occurrence, and that would hold back the schedules due after it. A schedule in a named namespace would silently stop firing.

Change

  • Every upgrade inspection (upgrade-inspect and the takeover's own) now reports schedule_inspection. It contains the number of live (not deleted) schedules and, by reason, how many fall outside native's subset.
  • The reasons are native's own schedule-creation refusals, plus five others: namespace, status, memo/search attributes/labels, note, buffered actions and queue routing. Native would not describe those fields.
  • Schedule names and values never appear in the report.
  • Any such schedule makes the inspection unqualified. Takeover then refuses with upgrade_source_schedules_unsupported before the fingerprint check or any write.
  • Deleted schedules keep only their audit history and do not block takeover.

Tests

  • SQLite. A cron schedule and a named-namespace schedule each refuse takeover and leave the file byte-identical. A runnable schedule and a deleted cron schedule convert normally. Inspection counts the reasons and contains neither schedule names nor memo values. All 46 upgrade tests pass.
  • PostgreSQL 17, MySQL 8.0 and MariaDB 10.11. Takeover qualification refuses a cron schedule with the source unchanged. All takeover qualification tests pass locally on each.

Native schedule parity (PHP cron, time zones, overlap policies, jitter, quotas, metadata and namespaces) is in progress and will narrow this refusal.

🤖 Generated with Claude Code

Native's scheduler fires only default-namespace schedules with one UTC
P1D or PT2S interval, the skip policy, no jitter and at most one run. Once
due, a taken-over PHP cron schedule would fail every scheduler tick, and a
named-namespace one would silently stop firing. Every upgrade inspection now
reports schedule_inspection, counting live schedules outside native's subset
by reason without naming them, and takeover refuses such a source with
upgrade_source_schedules_unsupported before any change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…edules

# Conflicts:
#	docs/rust-server-port.md
@rmcdaniel

Copy link
Copy Markdown
Member Author

Merged main after #567 (11301b9); the port-log conflict was resolved by keeping both entries. Superseded runs for the previous head: 39540006648.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Merged main again after #558 (e86af8b); the merge was clean and touched no native source. Superseded runs: 39554188005 39554188205 .

@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel merged commit ae5bcbc into main Oct 21, 2026
10 checks passed
@rmcdaniel
rmcdaniel deleted the rust-325-takeover-schedules branch October 21, 2026 06:53
rmcdaniel pushed a commit that referenced this pull request Oct 21, 2026
#568's takeover schedule check is narrowed to what native still cannot run
now that it runs PHP schedules: search attributes, visibility labels, queue
routing, an unknown status, a definition native's creation refuses and a
specification it cannot evaluate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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