Skip to content

Release v1.1.0-rc.8: upgrade legacy scheduler state#48

Merged
LAP87 merged 1 commit into
mainfrom
codex/legacy-scheduler-upgrade
Jul 25, 2026
Merged

Release v1.1.0-rc.8: upgrade legacy scheduler state#48
LAP87 merged 1 commit into
mainfrom
codex/legacy-scheduler-upgrade

Conversation

@LAP87

@LAP87 LAP87 commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • upgrades pre-rc.8 config-bootstrap scan rules exactly once to the configured safety-backup policy
  • marks scheduler jobs left running for more than 24 hours as failed during daemon startup, without touching fresh jobs
  • bumps the release candidate to 1.1.0-rc.8

Production evidence

The rc.7 daemon upgrade exposed an existing rc.3 legacy scan rule with safety_backup disabled and a scheduler run left running since May. This patch makes both repairs durable and automatic.

Verification

  • cargo test --all-targets --locked: 856 passed, 1 ignored
  • cargo clippy --all-targets --all-features --locked -- -D warnings
  • cargo audit: 0 vulnerabilities
  • cargo build --release --locked: symlinkarr 1.1.0-rc.8

@LAP87
LAP87 merged commit b9e33b8 into main Jul 25, 2026
9 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 26e3079b92

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/scheduler.rs
Comment on lines +1078 to +1080
let recovered = db
.fail_stale_scheduler_runs(Local::now() - ChronoDuration::hours(STALE_SCHEDULER_RUN_HOURS))
.await?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Recheck abandoned runs after they cross the cutoff

When the daemon restarts less than 24 hours after a scheduler job was interrupted, this startup-only query deliberately leaves that run in running; because the recovery is never called from the tick loop, the abandoned record remains running even after it becomes older than 24 hours and may stay that way until another restart. Run the stale check periodically, or otherwise distinguish live concurrent jobs from runs abandoned by this daemon instance.

Useful? React with 👍 / 👎.

Comment thread src/scheduler.rs
if rule.safety_backup != cfg.backup.enabled {
rule.safety_backup = cfg.backup.enabled;
if let Some(id) = rule.id {
db.update_scheduler_rule(id, &rule).await?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update only the legacy safety field during migration

For an rc.3–rc.6 database whose legacy scan was edited with values accepted by those releases but rejected by the newer whole-rule validator (for example, an oversized misfire_grace_minutes or max_delete), changing safety_backup here calls update_scheduler_rule and fails validation before any scheduler tick starts. The error propagates through ensure_bootstrap_rules and terminates daemon mode, whereas previously the invalid rule was isolated by the per-rule error handling; use a targeted field update or keep migration validation failures isolated.

Useful? React with 👍 / 👎.

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.

1 participant