Skip to content

fix(orchestration): repair TinyAgents-migration build break (main does not compile)#4442

Closed
M3gA-Mind wants to merge 1 commit into
tinyhumansai:mainfrom
M3gA-Mind:fix/tinyagents-migration-build-break
Closed

fix(orchestration): repair TinyAgents-migration build break (main does not compile)#4442
M3gA-Mind wants to merge 1 commit into
tinyhumansai:mainfrom
M3gA-Mind:fix/tinyagents-migration-build-break

Conversation

@M3gA-Mind

Copy link
Copy Markdown
Collaborator

Summary

Problem

#4399 deleted the SqlRunLedgerCheckpointer adapter and made BuiltinAgent.graph_fn optional (Option<fn() -> AgentGraph>), but left live references behind:

  • orchestration/graph/mod.rs + orchestration/ops.rs still import the removed SqlRunLedgerCheckpointerE0432.
  • agent_registry/agents/loader.rs passes bare fn items to the now-Option graph_fn field → E0308 (×2).

Net: main does not build.

Solution

  • Repoint orchestration graph checkpointing onto the crate's SqliteCheckpointer at {workspace}/graph_checkpoints.db — the direction feat: finish TinyAgents harness migration (#4249) #4399 intended (it enabled features = ["sqlite"] and pinned the toolchain precisely for this).
  • Wrap the two graph_fn call sites in Some(...).
  • Fix the stale intra-doc link in graph/state.rs.

Minimal, mechanical, behavior-preserving.

Submission Checklist

  • Tests — covered by the existing orchestration regression test full_cycle_persists_one_dm_one_compressed_one_diff_and_checkpoints (drives a real wake cycle and asserts checkpoints persist via the crate SqliteCheckpointer); passes.
  • N/A: Diff coverage — build-fix / mechanical repoint of a deleted type; no new logic.
  • N/A: Coverage matrix — no feature rows change.
  • N/A: Affected feature IDs — none.
  • No new external network dependencies introduced.
  • N/A: Manual smoke checklist — build fix, no release-cut surface change.

Impact

Related


AI Authored PR Metadata

Validation Run

  • Rust fmt/check: GGML_NATIVE=OFF cargo check green (Rust 1.96.1); cargo fmt clean.
  • N/A: frontend format:check / typecheck — no frontend changes.

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.
@M3gA-Mind M3gA-Mind requested a review from a team July 3, 2026 14:00
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 8 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b0ebe5fb-8bbe-4692-a56e-5a93ddb60485

📥 Commits

Reviewing files that changed from the base of the PR and between 4e75a63 and 3789f92.

📒 Files selected for processing (4)
  • src/openhuman/agent_registry/agents/loader.rs
  • src/openhuman/orchestration/graph/mod.rs
  • src/openhuman/orchestration/graph/state.rs
  • src/openhuman/orchestration/ops.rs

Comment @coderabbitai help to get the list of available commands.

@M3gA-Mind

Copy link
Copy Markdown
Collaborator Author

Redundant — main now compiles. Another PR landed an equivalent build-fix for the #4399 migration break (checkpointer repointed to tinyagents::graph::SqliteCheckpointer at orchestration_graph_checkpoints.db, and graph_fn set to None on the builtin agents). Verified cargo check on current main is green, so this standalone fix is no longer needed. The PRs that were stacked on it just need a rebase onto current main.

@M3gA-Mind M3gA-Mind closed this Jul 3, 2026
M3gA-Mind added a commit to M3gA-Mind/openhuman that referenced this pull request Jul 3, 2026
…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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant