test(cron): add delivery regressions and sync docs#411
Conversation
Greptile SummaryThis PR adds regression tests for the cron delivery pipeline ( Key changes:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Scheduler as Cron Scheduler
participant Gateway as Gateway (server.rs)
participant Agent as Agent Runner
participant Helper as maybe_deliver_cron_output
participant Channel as ChannelOutbound
Scheduler->>Gateway: AgentTurnRequest (deliver, channel, to)
Gateway->>Agent: run isolated agent turn
Agent-->>Gateway: AgentTurnResult (text)
Gateway->>Gateway: strip heartbeat token (if heartbeat turn)
Gateway->>Helper: maybe_deliver_cron_output(outbound, req, delivery_text)
alt deliver=false OR text is blank
Helper-->>Gateway: return (skip)
else channel/to missing
Helper-->>Gateway: return (skip)
else outbound not configured
Helper->>Helper: tracing::debug!(...)
Helper-->>Gateway: return (skip)
else all conditions met
Helper->>Channel: send_text(channel_account, chat_id, text)
Channel-->>Helper: Ok(()) or Err(e)
alt Err
Helper->>Helper: tracing::warn!(error)
end
Helper-->>Gateway: return
end
Gateway-->>Scheduler: AgentTurnResult { output: text }
Last reviewed commit: 08550ba |
Merging this PR will degrade performance by 21.33%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ❌ | env_substitution |
10 µs | 12.7 µs | -21.33% |
Comparing issue-195-and-264 (6bd83f9) with main (d43261b)
Footnotes
-
5 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
* test(cron): add delivery regressions and sync docs * fix(cron): address PR review feedback * test(web-ui): stabilize voice fallback websocket e2e
* test(cron): add delivery regressions and sync docs * fix(cron): address PR review feedback * test(web-ui): stabilize voice fallback websocket e2e
Summary
payload.deliver,channel, andtoon both add and update flowsCloses #195
Closes #264
Validation
Completed
just formatcargo test -p moltis-tools delivery_fields -- --nocapturecargo test -p moltis-cron test_deliver_ -- --nocaptureRemaining
cargo test -p moltis-gateway maybe_deliver_cron_output_ -- --nocapture(stopped after exceeding the repo's 5-minute command limit while compiling heavy gateway dependencies)Manual QA
deliver=true,channel=<account_id>, andto=<chat_id>, then confirm the saved job retains those fields.deliver/channel/tobehavior.surface,session_kind, and channel identifiers are present.