Repository navigation
feat: serve flows and scheduling through TinyBus - #157
Conversation
…s,crates/tinyflows-module/src/r Auto-committed-on: macbook
Auto-committed-on: macbook
Auto-committed-on: macbook
feat: serve scoped workflow run lifecycle
…/sandbox.rs Auto-committed-on: macbook
…s-bus/src/runs_tests.rs,crates/ Auto-committed-on: macbook
…nyflows-module/src/runs_service Auto-committed-on: macbook
Auto-committed-on: macbook
…ox.rs Auto-committed-on: macbook
…ox.rs Auto-committed-on: macbook
…es/tinyflows-module/tests/run_a Auto-committed-on: macbook
…/src/sandbox_tests.rs Auto-committed-on: macbook
…yflows/src/sandbox_tests.rs Auto-committed-on: macbook
…s-bus/src/runs_tests.rs,crates/ Auto-committed-on: macbook
…ates/tinyflows-copilot/src/tool Auto-committed-on: macbook
…yflows-copilot/src/tools/dry_ru Auto-committed-on: macbook
Auto-committed-on: macbook
…ates/tinyflows-module/tests/run Auto-committed-on: macbook
…yflows-copilot/src/tools/dry_ru Auto-committed-on: macbook
Auto-committed-on: macbook
…ates/tinyflows-copilot/src/tool Auto-committed-on: macbook
…rs,crates/tinyflows-copilot/src Auto-committed-on: macbook
…ox.rs Auto-committed-on: macbook
Auto-committed-on: macbook
Auto-committed-on: macbook
…es/tinyflows-module/tests/run_a Auto-committed-on: macbook
…yflows-copilot/src/tools/dry_ru Auto-committed-on: macbook
Auto-committed-on: macbook
feat: add TinyFlows sandbox run operation
Auto-committed-on: macbook
…sts.rs,crates/tinyflows-module/ Auto-committed-on: macbook
…sts.rs,crates/tinyflows-module/ Auto-committed-on: macbook
…sts.rs Auto-committed-on: macbook
…surface_artifact.rs Auto-committed-on: macbook
…sts.rs Auto-committed-on: macbook
…4_manual_artifact.rs Auto-committed-on: macbook
…tinyflows-bus/src/schedule/mod_ Auto-committed-on: macbook
Auto-committed-on: macbook
Auto-committed-on: macbook
…rtifact_callbacks.rs Auto-committed-on: macbook
…im_tests.rs Auto-committed-on: macbook
…ts.rs,crates/tinyflows-module/t Auto-committed-on: macbook
feat(schedule): add durable occurrence leases in v4
Add a test that drives a retry into its backoff wait, takes over the lease from another owner, and asserts the scheduler abandons the attempt without re-invoking the job or writing records. The fixture clock gains hooks to pause and release the backoff and heartbeat waits so the race can be orchestrated deterministically. Auto-committed-on: macbook
The lease takeover test was relocated from runtime_tests.rs into a new runtime_lease_tests.rs module, registered via a path attribute, to keep the runtime test file focused and give lease-related coverage its own home. Auto-committed-on: macbook
Retries now renew the occurrence lease before each attempt so a long-running job cannot lose its claim mid-retry. The work future is also polled after the lease wait in the select loop, ensuring lease renewal takes priority over completion. Auto-committed-on: macbook
The retry guard now re-checks claim ownership before invoking the executor's failure callback, so a scheduler that has lost the occurrence no longer reports a terminal failure it does not own. The lease renewal was factored into a shared helper and the test fixture gained a configurable trigger failure count to cover the new path. Auto-committed-on: macbook
…lbacks Extend the runtime lease tests so the parked-retry helper can drive either a cron or flow trigger, and add a case asserting that a lease takeover blocks a flow trigger retry. Also add a test that a takeover fences the final failure callback when an attempt is still in flight, ensuring the callback is not invoked and no records or projections are written. Auto-committed-on: macbook
Relocate the retry test covering preservation of the last non-empty raw detail into the lease test module, where the surrounding retry and lease behaviour is exercised. No test logic changed. Auto-committed-on: macbook
The concurrency test now expects two renewals instead of one, since the pre-attempt ownership fence counts alongside the controlled heartbeat, and the assertion carries a message explaining the expected count. Auto-committed-on: macbook
fix(schedule): fence retries after lease takeover
…le-v4 # Conflicts: # crates/tinyflows-bus/src/schedule/mod.rs # crates/tinyflows-module/Cargo.toml # crates/tinyflows-module/README.md # crates/tinyflows-module/src/schedule_service_tests.rs
fix(schedule): integrate fixed clock with occurrence leases
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reached
This review includes 175 billable files and costs up to $43.75. View limit details
Comment |
Tiny Sweeper reviewTiny Sweeper reviewed this change across 5 lane(s) and found 0 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below. State: Incomplete Review snapshot
Completeness: Incomplete FeaturesNone identified with supported citations. TestsNo supported feature-to-test mapping was produced. Test execution is not inferred.
FindingsNo active actionable findings. Could not review: CHANGELOG.md, crates/tinyflows-bus/README.md, crates/tinyflows-bus/src/catalog.rs, crates/tinyflows-bus/src/catalog/extended_types.rs, crates/tinyflows-bus/src/catalog/extended_types_tests.rs, crates/tinyflows-bus/src/catalog/storage_types.rs, crates/tinyflows-bus/src/catalog/types.rs, crates/tinyflows-bus/src/catalog_authoring_tests.rs, crates/tinyflows-bus/src/catalog_tests.rs, crates/tinyflows-bus/src/copilot/copilot_tests.rs, crates/tinyflows-bus/src/lib.rs, crates/tinyflows-bus/src/lib_tests.rs, crates/tinyflows-bus/src/node_kinds.rs, crates/tinyflows-bus/src/node_kinds/group_01.rs, crates/tinyflows-bus/src/node_kinds/group_02.rs, crates/tinyflows-bus/src/node_kinds/group_03.rs, crates/tinyflows-bus/src/portability.rs, crates/tinyflows-bus/src/portability_tests.rs, crates/tinyflows-bus/src/runs.rs, crates/tinyflows-bus/src/runs/caps_agent_types.rs, crates/tinyflows-bus/src/runs/caps_types.rs, crates/tinyflows-bus/src/runs_tests.rs, crates/tinyflows-bus/src/runs_tests/caps_agent_wire_tests.rs, crates/tinyflows-bus/src/runs_tests/caps_wire_tests.rs, crates/tinyflows-bus/src/schedule/mod.rs, crates/tinyflows-bus/src/schedule/mod_tests.rs, crates/tinyflows-bus/src/schedule/records.rs, crates/tinyflows-bus/src/schedule/requests.rs, crates/tinyflows-catalog/src/approval_manifest.rs, crates/tinyflows-catalog/src/run_registry.rs, crates/tinyflows-catalog/src/run_registry_tests.rs, crates/tinyflows-copilot/src/dry_run_port_tests.rs, crates/tinyflows-copilot/src/fallback.rs, crates/tinyflows-copilot/src/fallback_tests.rs, crates/tinyflows-copilot/src/tools.rs, crates/tinyflows-copilot/src/tools/dry_run.rs, crates/tinyflows-copilot/src/tools/fakes.rs, crates/tinyflows-copilot/src/tools/parameters/propose_workflow.json, crates/tinyflows-copilot/src/tools/ports.rs, crates/tinyflows-copilot/src/tools/propose.rs, crates/tinyflows-copilot/src/tools/propose_tests.rs, crates/tinyflows-copilot/src/tools/run_flow.rs, crates/tinyflows-copilot/src/tools/run_flow_tests.rs, crates/tinyflows-drivers/README.md, crates/tinyflows-drivers/src/catalog/definitions.rs, crates/tinyflows-drivers/src/catalog/import.rs, crates/tinyflows-drivers/src/catalog/import_tests.rs, crates/tinyflows-drivers/src/catalog/lineage_tests.rs, crates/tinyflows-drivers/src/catalog/mod.rs, crates/tinyflows-drivers/src/catalog/revision_sequence.rs, crates/tinyflows-drivers/src/catalog/revision_sequence_tests.rs, crates/tinyflows-drivers/src/catalog/revisions.rs, crates/tinyflows-drivers/src/catalog/revisions_tests.rs, crates/tinyflows-drivers/src/catalog/run_events.rs, crates/tinyflows-drivers/src/catalog/run_events_tests.rs, crates/tinyflows-drivers/src/catalog/runs.rs, crates/tinyflows-drivers/src/catalog/runs_lifecycle_tests.rs, crates/tinyflows-drivers/src/catalog/runs_recovery.rs, crates/tinyflows-drivers/src/catalog/runs_tests.rs, crates/tinyflows-drivers/src/catalog/state.rs, crates/tinyflows-drivers/src/catalog/state_tests.rs, crates/tinyflows-drivers/src/schedule/claims.rs, crates/tinyflows-drivers/src/schedule/claims/completion.rs, crates/tinyflows-drivers/src/schedule/jobs.rs, crates/tinyflows-drivers/src/schedule/manual_claim_tests.rs, crates/tinyflows-drivers/src/schedule/mod.rs, crates/tinyflows-drivers/src/schedule/runtime_tests.rs, crates/tinyflows-module/Cargo.toml, crates/tinyflows-module/README.md, crates/tinyflows-module/src/caps.rs, crates/tinyflows-module/src/caps/agent.rs, crates/tinyflows-module/src/caps/task_executor.rs, crates/tinyflows-module/src/caps_tests.rs, crates/tinyflows-module/src/caps_tests/agent_protocol_tests.rs, crates/tinyflows-module/src/caps_tests/callback_tests.rs, crates/tinyflows-module/src/caps_tests/scope_tests.rs, crates/tinyflows-module/src/caps_tests/support.rs, crates/tinyflows-module/src/caps_tests/tasks_tests.rs, crates/tinyflows-module/src/catalog_authoring.rs, crates/tinyflows-module/src/catalog_authoring_tests.rs, crates/tinyflows-module/src/catalog_documents.rs, crates/tinyflows-module/src/catalog_extended_operations_tests.rs, crates/tinyflows-module/src/catalog_extended_ops.rs, crates/tinyflows-module/src/catalog_extended_service_tests.rs, crates/tinyflows-module/src/catalog_service.rs, crates/tinyflows-module/src/catalog_service_tests.rs, crates/tinyflows-module/src/copilot_port_call_tests.rs, crates/tinyflows-module/src/copilot_service_tests.rs, crates/tinyflows-module/src/copilot_tool_belt.rs, crates/tinyflows-module/src/copilot_tools.rs, crates/tinyflows-module/src/copilot_wire_compat_tests.rs, crates/tinyflows-module/src/exports.rs, crates/tinyflows-module/src/host.rs, crates/tinyflows-module/src/lib.rs, crates/tinyflows-module/src/portability_service.rs, crates/tinyflows-module/src/run_manager.rs, crates/tinyflows-module/src/run_manager/actor.rs, crates/tinyflows-module/src/run_manager/cancellation.rs, crates/tinyflows-module/src/run_manager/events.rs, crates/tinyflows-module/src/run_manager/events_tests.rs, crates/tinyflows-module/src/run_manager/preparation.rs, crates/tinyflows-module/src/run_manager/resume.rs, crates/tinyflows-module/src/run_manager/sweeps.rs, crates/tinyflows-module/src/run_manager_tests.rs, crates/tinyflows-module/src/runs_service.rs, crates/tinyflows-module/src/schedule_callbacks.rs, crates/tinyflows-module/src/schedule_clock_tests.rs, crates/tinyflows-module/src/schedule_members_tests.rs, crates/tinyflows-module/src/schedule_queue_tests.rs, crates/tinyflows-module/src/schedule_service.rs, crates/tinyflows-module/src/schedule_service_tests.rs, crates/tinyflows-module/src/schedule_store.rs, crates/tinyflows-module/src/schedule_store_tests.rs, crates/tinyflows-module/src/service.rs, crates/tinyflows-module/src/service_tests.rs, crates/tinyflows-module/src/validation.rs, crates/tinyflows-module/src/validation_tests.rs, crates/tinyflows-module/src/wiring_authoring_tests.rs, crates/tinyflows-module/tests/module_artifact_tests.rs, crates/tinyflows-module/tests/run_artifact/document_callback.rs, crates/tinyflows-module/tests/run_artifact/flow_helpers.rs, crates/tinyflows-module/tests/run_artifact/graphs.rs, crates/tinyflows-module/tests/run_artifact/poll.rs, crates/tinyflows-module/tests/run_artifact/sandbox.rs, crates/tinyflows-module/tests/run_artifact/support.rs, crates/tinyflows-module/tests/support/approval_park_tests.rs, crates/tinyflows-module/tests/support/authoring_contract_calls.rs, crates/tinyflows-module/tests/support/authoring_surface_artifact.rs, crates/tinyflows-module/tests/support/copilot_artifact.rs, crates/tinyflows-module/tests/support/copilot_port_artifact.rs, crates/tinyflows-module/tests/support/dedup_snapshot_test.rs, crates/tinyflows-module/tests/support/failed_run_test.rs, crates/tinyflows-module/tests/support/portability_artifact.rs, crates/tinyflows-module/tests/support/run_artifact_tests.rs, crates/tinyflows-module/tests/support/run_lifecycle_tests.rs, crates/tinyflows-module/tests/support/run_resume_tests.rs, crates/tinyflows-module/tests/support/schedule_artifact_callbacks.rs, crates/tinyflows-module/tests/support/schedule_v4_artifact.rs, crates/tinyflows-module/tests/support/schedule_v4_delivery_artifact.rs, crates/tinyflows-module/tests/support/schedule_v4_manual_artifact.rs, crates/tinyflows-module/tests/support/schedule_v4_recovery_artifact.rs, crates/tinyflows-module/tests/support/wiring_warning_artifact.rs, crates/tinyflows-schedule/src/runtime/claims.rs, crates/tinyflows-schedule/src/runtime/execution.rs, crates/tinyflows-schedule/src/runtime/mod.rs, crates/tinyflows-schedule/src/runtime/ports.rs, crates/tinyflows-schedule/src/runtime/runtime_concurrency_tests.rs, crates/tinyflows-schedule/src/runtime/runtime_lease_tests.rs, crates/tinyflows-schedule/src/runtime/runtime_tests.rs, crates/tinyflows/Cargo.toml, crates/tinyflows/src/caps/host/http.rs, crates/tinyflows/src/caps/host/http_tests.rs, crates/tinyflows/src/caps/http_credential.rs, crates/tinyflows/src/caps/mock_schema_aware.rs, crates/tinyflows/src/caps/mod.rs, crates/tinyflows/src/caps/tasks.rs, crates/tinyflows/src/caps/tasks_tests.rs, crates/tinyflows/src/catalog.rs, crates/tinyflows/src/engine.rs, crates/tinyflows/src/engine/api.rs, crates/tinyflows/src/engine/resumable.rs, crates/tinyflows/src/engine/resumable/continuation.rs, crates/tinyflows/src/engine_tests/engine_tests_part_05_tests.rs, crates/tinyflows/src/graph/observability/mod.rs, crates/tinyflows/src/lib.rs, crates/tinyflows/src/sandbox.rs, crates/tinyflows/src/sandbox_tests.rs, crates/tinyflows/src/triggers.rs, crates/tinyflows/src/triggers_tests.rs, crates/tinyflows/src/wiring.rs, crates/tinyflows/src/wiring/authoring.rs, crates/tinyflows/src/wiring/authoring_tests.rs, docs/tinyflows-bus-design.md, scripts/verify-module-artifact.sh, tinysweeper/description, tinysweeper/tests Before merge
How this fits togetherflowchart LR
n0["run_event_round_trips<br/>changed"]:::changed
n1["RunEvent<br/>changed"]:::changed
n0 -->|uses| n1
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
There was a problem hiding this comment.
tinysweeper found nothing blocking, but could not review everything, so this is not an approval: CHANGELOG.md, crates/tinyflows-bus/README.md, crates/tinyflows-bus/src/catalog.rs, crates/tinyflows-bus/src/catalog/extended_types.rs, crates/tinyflows-bus/src/catalog/extended_types_tests.rs, crates/tinyflows-bus/src/catalog/storage_types.rs, crates/tinyflows-bus/src/catalog/types.rs, crates/tinyflows-bus/src/catalog_authoring_tests.rs and 168 more.
$0.0010 · 389,481 in / 3,701 out · 31,232 cached (8%) · ladder/vectors-oai3, glm-5.3-flash, , deepseek-v4.1-flash · 732 embedded
critique: $0.0007 · 73,407 in / 1,027 out · 0 cached (0%) · glm-5.3-flash,
security: $0.0002 · 316,074 in / 2,674 out · 31,232 cached (10%) · deepseek-v4.1-flash,
TinyFlows now exposes the catalog, graph authoring, run lifecycle, copilot tools, and scheduling through its loadable TinyBus module. Hosts can use the transport-only
tinyflows-buscontracts while retaining product policy, approvals, scope binding, storage I/O, and execution callbacks.The combined Schedule contract is version 5 because upstream PR #156 and the epic independently introduced distinct version-4 interfaces. Manual
config.nowdrives due selection, persisted run timestamps and recurrence; automatic loops refuse a fixed instant.Part of tinyhumansai/openhuman#8055. The OpenHuman adapters and released-module adoption are separate changes in that epic.
Validation:
a0cda2c7dcfce523ff79d0a3af58b78f6da20035: 2,722 workspace tests passed, 0 failed; all 16 native loaded-module artifact tests passed separately.c880848b1a2cbc5512783f182985e9c14046779fand canonical main7e5e091909d8e12767916b6ad9db1300090059a5.a0cda2c7dcfce523ff79d0a3af58b78f6da20035: PR workflow, push workflow. Fork merge tipb9ef9e480c9b76c3badd4a2ba343a53c8ca25c8ehas the same tree.Included fork PRs (each preserves its individual commits):