Show when a plan's scheduled run was skipped, and why, outside the daemon's log

Open
#800 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
api, backend, frontend

Research direction

The design is in §5 and §16 of docs/design/scheduling-and-config.md; read the overlap-policy and scheduler passages first. Trace the scheduler's skip path to where PlanSchedule is updated and the plan response is built, then the plan page and start-page list that would render it. Done means a skip's time and localized reason code live on PlanSchedule, appear in the API and UI, clear at the next run start, and both design sections are updated.

Written by the indexing model from the issue text.

Description

enhancement priority: medium

What happens

A plan's scheduled run that its overlap policy skips leaves no trace outside the daemon's log. The plan pages, the start page and the operation history all show nothing for it, so from the UI the run looks like it silently didn't happen.

Seen on 0.3.1 (macOS, hourly cron = "0 * * * *", default overlap):

  • 18:46 local: a backup started by hand.
  • 19:00:00: the log says the scheduled run of plan … was skipped: its last run is still running.
  • 19:01: the manual backup ends Succeeded.

Nothing in the web UI says the 19:00 run was skipped or why. The only way to find out is to read the log file.

Why it's this way today

This is the design, not a defect in the code. §5 (docs/design/scheduling-and-config.md, "Overlap policy" and the scheduler paragraph) says "a skip is said in the daemon's log, never queued", "A skipped run records no operation; the daemon's log says why", and "The start page lists each plan with its planned run." Runs skipped for an unmet condition (AC power) or for location rules are said only in the log too.

Proposal

Show the plan's most recent skipped scheduled run, with its time and reason, until the plan's next run starts. For example: "The scheduled run at 7:00 PM was skipped: the last run was still going." It should appear on the plan's page and in the start page's plan list, at least.

Questions for the design:

  • Where the fact lives: PlanSchedule already holds per-plan state (next_run, last_success, …). One field there, "last skipped scheduled run: when, why", would keep "a skip records no operation" true without adding a new Operation status.
  • Which skips count: the overlap policy, unmet conditions (AC power), and location rules that don't hold. One reason code each, through l10n, never core sentences.
  • When it clears: at the plan's next run start (any trigger), or only at its next success.
  • Notifications: the default is no, since a skip isn't a failure. Maybe an opt-in event later.
  • API and MCP: surface it in the plan's response so list_plans and the CLI can show it too.

The user can already avoid this case with overlap = "queue", but that doesn't make a skip visible when one happens.

Acceptance

  • A scenario: given an hourly plan whose manual run is still going at the hour, when the scheduled run comes due, then the plan shows that its scheduled run was skipped, with the time and the reason, and that clears when the plan's next run starts.
  • The design's §5 text and a §16 decision are updated in the same change.
Dominant language
Rust
Stars
0
Forks
0
Avg merge
56m
Merged PRs (30d)
349

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nledford/Ladderback

All issues in nledford/Ladderback

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.