Skip to content

Instantly share code, notes, and snippets.

@grahama1970
Created September 30, 2025 12:30
Show Gist options
  • Select an option

  • Save grahama1970/5a71e0ae449ee5c63ea278fe8908cebd to your computer and use it in GitHub Desktop.

Select an option

Save grahama1970/5a71e0ae449ee5c63ea278fe8908cebd to your computer and use it in GitHub Desktop.
Scheduler Integration Review 2025-09-30

Scheduler Integration Review (Single File)

  • Date: 2025-09-30

Context

Adds a config.toml-driven scheduler crate and feature-gated MCP server bootstrap. Default-off at build and runtime; starts only when [scheduler] is enabled in ~/.codex/config.toml.

Files to Analyze

  • codex-rs/scheduler/Cargo.toml
  • codex-rs/scheduler/src/lib.rs
  • codex-rs/scheduler/src/config.rs
  • codex-rs/scheduler/src/db.rs
  • codex-rs/scheduler/src/cronloop.rs
  • codex-rs/scheduler/src/runner.rs
  • codex-rs/Cargo.toml (workspace member added)
  • codex-rs/mcp-server/Cargo.toml (feature-gated dep)
  • codex-rs/mcp-server/src/scheduler_bootstrap.rs
  • codex-rs/mcp-server/src/main.rs (feature-gated call)

Key Questions

  • Locking and due detection: any edge cases or improvements recommended?
  • DB API: is post_json_with_retry sufficient; should inserts use AQL vs document POST consistently?
  • Error handling and TLS: any additional hardening suggested?
  • Tests: what minimal unit/integration tests do you want added?

Request

Please provide unified diffs to:

  1. Add minimal tests (cron proximity, runner timeout path). Expose helpers as pub(crate) if preferred.
  2. Suggest DB API cleanup (query wrapper, retry policy) and migrate call sites.
  3. If desired, wire Option B submitter-based injection in mcp-server/src/message_processor.rs.

Diffs (current working tree)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment