Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

docs(cron): document schedule migration ownership and host callbacks

Steven Enamakel18ae49d4ad36
diff --git a/crates/openhuman-core/src/cron/README.md b/crates/openhuman-core/src/cron/README.md
index 91009d2c53..4c5174a159 100644
--- a/crates/openhuman-core/src/cron/README.md
+++ b/crates/openhuman-core/src/cron/README.md
@@ -278,8 +278,11 @@ on the storage ports via the host's document port
([`documents_port.rs`](./documents_port.rs)): one `ScheduleDocuments` object per
`(workspace, storage scope)`, which relays `get`/`put`/`query`/`atomic_batch`
and friends mechanically, preserves the `conflict` error kind and refuses any
-collection other than the four schedule ones. The configured history cap and
-due-job batch size ride on every request. tinyflows has no SQLite store of its
+collection or shared TSD key outside the schedule module's owner namespace.
+The module owns the v1-to-v2 schedule migration, including its exact progress
+keys and legacy source retirement. Core calls its `Migrate` operation before
+store CRUD, scheduler start and manual-run preparation. The configured history
+cap and due-job batch size ride on every request. tinyflows has no SQLite store of its
own, so there is one path whatever the storage URL says: the installed backend
when there is one, else the workspace default (`sqlite:<workspace>/storage`).
The `jobs.db` tinyflows used to write (with its policy side table) is decoded
@@ -301,7 +304,7 @@ feature) nothing loads and every cron call answers `COMPONENT_DISABLED:tinyflows
| [`store.rs`](./store.rs) | The synchronous job and run API the core calls. Applies the operator limits, then sends one `StoreOperation` to the module. |
| [`client.rs`](./client.rs) | Typed calls to the module's `Schedule` object: `store_in`/`store_blocking`, `runs_closer_than`, `parse_human_delay`, `default_delivery`, `check_origin_requirements`, and other host adapters. |
| [`documents_port.rs`](./documents_port.rs) | The `ScheduleDocuments` callback object: the scope's document store, served to the module. |
-| [`bus_host.rs`](./bus_host.rs) | `Binding` (config, policy, context of one scope) and the `ScheduleHost` callback object (`Execute`, `Failed`, `Deliver`, `ScheduleTrigger`), served per scheduler. |
+| [`bus_host.rs`](./bus_host.rs) | `Binding` (config, policy, context of one scope) and `ScheduleHost` callbacks (`Execute`, `Failed`, `Send`, `Deliver`, `ScheduleTrigger`), served per scheduler or manual invocation. |
| [`handlers.rs`](./handlers.rs) | The job-kind handler registry (`JobKindHandler`, `JobOutcome`, `register_kind`) and the system-job handlers. |
| `ops.rs` | Business operations: `add_once`, `add_once_at`, pause/resume, and the async `cron_*` RPC operations. Also re-exported as `cron::rpc`. |
| [`schemas.rs`](./schemas.rs) | Controller schemas and handlers for the `cron` namespace. |
diff --git a/docs/module-boundary-inventory.md b/docs/module-boundary-inventory.md
index 96bb8bd084..e3383240ee 100644
--- a/docs/module-boundary-inventory.md
+++ b/docs/module-boundary-inventory.md
@@ -550,4 +550,4 @@ schedule rows included, regardless of `flows`.
Supersedes the section above for who runs the scheduler. The `tinyflows` module (registry record `records_flows.rs`, contract `tinyflows_bus::schedule` v6) owns the scheduler runtime, claims, retry timing, completion, the cron job and run store (`CronDocuments`) and the schedule maths (`NextRun`, `ValidateSchedule`, `RunsCloserThan`, `NormalizeExpression`, `ParseHumanDelay`, `ValidateDelivery`, `DefaultDelivery`, `CheckOriginRequirements`, `CheckPatch`, `TruncateCronOutput`). Core links only `tinyflows-bus` (serde and chrono): `cargo tree -p openhuman -e normal -i tinyflows-schedule` is empty, and `tinyflows-drivers` is optional behind `flows` for the catalog alone.
-The host keeps four adapters in `crates/openhuman-core/src/cron/`: `client.rs` (typed calls and `ScheduleStore` requests), `documents_port.rs` (the scope's document store served to the module), `bus_host.rs` (the `ScheduleHost` callbacks `Execute`, `Failed`, `Deliver`, `ScheduleTrigger`, bound per scope) and `handlers.rs` (the job-kind registry that replaced the hard-coded shell/agent/flow split and absorbed the system-job handlers). Deleted: `claims.rs`, `scheduler/host.rs`, `scheduler/run_record.rs` and the `tinyflows_schedule` re-export facade. Temporary exception: `tinyflows-bus` carries `chrono` (record timestamps), recorded in `scripts/ci/module-boundaries.json`.
+The host keeps four adapters in `crates/openhuman-core/src/cron/`: `client.rs` (typed calls and `ScheduleStore` requests), `documents_port.rs` (the scope's document store served to the module), `bus_host.rs` (the `ScheduleHost` callbacks `Execute`, `Failed`, `Send`, `Deliver`, `ScheduleTrigger`, bound per scheduler or manual invocation) and `handlers.rs` (the job-kind registry that replaced the hard-coded shell/agent/flow split and absorbed the system-job handlers). Manual invocation owners retain their callback and bound context until the v6 module worker reaches terminal state and its handle is acknowledged. The host forwards the document metadata and migration contract without implementing the schedule schema. Deleted: `claims.rs`, `scheduler/host.rs`, `scheduler/run_record.rs` and the `tinyflows_schedule` re-export facade. Temporary exception: `tinyflows-bus` carries `chrono` (record timestamps), recorded in `scripts/ci/module-boundaries.json`.