fix(orchestration): repair TinyAgents-migration build break (main does not compile)#4442
fix(orchestration): repair TinyAgents-migration build break (main does not compile)#4442M3gA-Mind wants to merge 1 commit into
Conversation
PR tinyhumansai#4399 deleted the SqlRunLedgerCheckpointer adapter and made BuiltinAgent.graph_fn optional, but left dangling references that broke `cargo build`: - orchestration/graph/mod.rs + ops.rs imported the removed SqlRunLedgerCheckpointer (E0432). Repointed onto the crate's SqliteCheckpointer at {workspace}/graph_checkpoints.db — matching the migration's stated intent (it enabled features=["sqlite"] and pinned the toolchain precisely for this). - agent_registry/agents/loader.rs passed bare fn items to the now Option<fn() -> AgentGraph> graph_fn field (E0308 x2). Wrapped in Some(). - graph/state.rs: updated the stale intra-doc link to SqliteCheckpointer. Verified: cargo check green; the orchestration checkpoint regression test (full_cycle_persists_one_dm_one_compressed_one_diff_and_checkpoints) passes.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 8 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
Comment |
|
Redundant — |
…ent (tinyhumansai#4254, backend) Rework of tinyhumansai#4413's backend onto post-tinyhumansai#4399 code. tinyhumansai#4399 deleted the original classification hook (session/agent_tool_exec.rs) and the ProgressReporter trait; the tool loop now runs on the tinyagents crate, so the hook is re-homed on the adapter seam. - New `src/openhuman/tool_status/` module: `classify(error_text, timed_out)` and `describe(class)` map a tool outcome to a `ClassifiedFailure` (class + category + plain-language cause + next action). Pure, unit-tested (16 tests: all classes, timeout/unknown/precedence, category mapping, recoverability). - `AgentProgress::ToolCallCompleted` + `WebChannelEvent` gain a `failure` field carrying that classification to the chat "View processing" timeline. - Core hook + latent-bug fix: the crate's `AgentEvent::ToolCompleted` carries only call_id + tool_name, so the bridge previously hardcoded `success: true` (a failed tool never surfaced). `ToolOutcomeCaptureMiddleware::after_tool` now classifies each result and writes a `call_id → (success, failure)` side-channel (mirroring the existing `ToolNameMap`); the bridge reads it to emit real `success` + `failure`. Absent entry falls back to `(true, None)`. - `progress_bridge` serializes `failure` onto the `tool_result` socket event and the run ledger. Backend only. The frontend consumer (chat timeline "why / next" render) and i18n keys are a companion — they rebase cleanly onto current `main` from tinyhumansai#4413 (only the Rust hook conflicted with tinyhumansai#4399), so they are not re-included here to avoid reverting unrelated locale drift. NOTE: the middleware-before-event ordering that populates the side-channel is crate-internal; the fallback keeps behavior no worse than before if the event is ever projected first. Needs runtime validation once tinyhumansai#4442 lands (drive a deliberately-failing tool and confirm `success:false` + `failure` on the wire).
Summary
cargo buildbreak left onmainby feat: finish TinyAgents harness migration (#4249) #4399 (the TinyAgents harness migration): a danglingSqlRunLedgerCheckpointerimport and agraph_fntype mismatch. The core lib currently does not compile.Problem
#4399 deleted the
SqlRunLedgerCheckpointeradapter and madeBuiltinAgent.graph_fnoptional (Option<fn() -> AgentGraph>), but left live references behind:orchestration/graph/mod.rs+orchestration/ops.rsstill import the removedSqlRunLedgerCheckpointer→ E0432.agent_registry/agents/loader.rspasses barefnitems to the now-Optiongraph_fnfield → E0308 (×2).Net:
maindoes not build.Solution
SqliteCheckpointerat{workspace}/graph_checkpoints.db— the direction feat: finish TinyAgents harness migration (#4249) #4399 intended (it enabledfeatures = ["sqlite"]and pinned the toolchain precisely for this).graph_fncall sites inSome(...).graph/state.rs.Minimal, mechanical, behavior-preserving.
Submission Checklist
full_cycle_persists_one_dm_one_compressed_one_diff_and_checkpoints(drives a real wake cycle and asserts checkpoints persist via the crateSqliteCheckpointer); passes.Impact
SqliteCheckpointer({workspace}/graph_checkpoints.db), completing the feat: finish TinyAgents harness migration (#4249) #4399 migration direction. No frontend change.Related
main.AI Authored PR Metadata
Validation Run
GGML_NATIVE=OFF cargo checkgreen (Rust 1.96.1);cargo fmtclean.format:check/typecheck— no frontend changes.