Skip to content

feat(cli): [curator] config, tole curator schedule and a doctor line (#593 part 3a) - #663

Merged
ajianaz merged 2 commits into
developfrom
feat/curator-config-schedule
Nov 13, 2026
Merged

ajianaz merged 2 commits into
developfrom
feat/curator-config-schedule

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

What

Part 3a of #593: a user-layer [curator] config table, tole curator schedule (the weekly sweep as a job on the built-in scheduler) and a tole doctor line. What remains of #593 is run outcomes (part 3b).

Why

The owner wants the curator on by default, switchable off, and run weekly on the scheduler (design skills-registry-design.md §4.5, §6.4; issue #593: curator.enabled). Parts 1 and 2 (#659, #661) built the core and the command; nothing scheduled it and nothing let the owner turn it off or tune the thresholds in config.

Changes

  • [curator] in the user config: enabled (default on), stale_days (14), archive_days (30), grace_days (30), each at most 3650. User layer only, like [cron]: a project's table is ignored, and tole config check shows it as ignored. The pair is validated with defaults filled in, so one key alone cannot leave archive_days at or below stale_days. A user config that cannot be read is reported and the defaults apply.
  • With enabled = false, tole curator run and the weekly job report what they would do and change nothing; status says why.
  • tole curator schedule [--cron EXPR] saves one script job curator-weekly (tole curator run, default 0 4 * * 1, UTC, zero tokens); unschedule removes it. The scheduler refuses a path-qualified program, so the job runs the bare tole from the scheduler's PATH; schedule warns when tole is not on this PATH. It runs when the scheduler ticks (tole serve --cron, or cron(8) calling tole cron tick).
  • tole doctor gains a curator: line; tole curator status shows the schedule.
  • README.md (config table and status), CHANGELOG.md and docs/epics.md are updated in this PR.

Testing

  • cargo fmt --all; clippy -D warnings on tole-core and on tole-cli lib, bins and every test target except tui_e2e (also --no-default-features --lib): clean.
  • New: a config test (strict keys, types, bounds, the pair check, user-layer-only layering, the IGNORED note), unit tests for a switched-off curator and for the weekly job (a bare-name zero-token script saved once, removable, re-savable, a bad schedule or a relative workdir refused), and two end-to-end tests with the real binary (config thresholds, switched off, a bad pair reported; schedule then cron list then status, a second schedule refused, unschedule).
  • Not caused by this PR, reproduced on clean develop on macOS: tui_e2e does not compile (libc::openpty), 3 delegate:: tests and compaction_e2e::doctor_warns_non_fatally_about_a_missing_window fail; serve_* tests are flaky locally (flaky test: session_effort_e2e::a_rejecting_provider_still_answers_without_the_parameter (session lock still held by the test process) #646). CI runs on Linux.
  • Cora agent review: review_prepare 0 deterministic findings, review_finalize should_block: false with one info note (the job needs tole on the scheduler's PATH).

@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

…593 part 3a)

A user-layer [curator] table switches the curator off or sets the
thresholds, tole curator schedule saves a weekly script job on the
built-in scheduler, and tole doctor reports whether it is on and scheduled.
@ajianaz
ajianaz force-pushed the feat/curator-config-schedule branch from 74cd83e to 08612db Compare November 13, 2026 08:04
@ajianaz
ajianaz merged commit c093104 into develop Nov 13, 2026
15 checks passed
@ajianaz
ajianaz deleted the feat/curator-config-schedule branch November 20, 2026 08:36
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