Skip to content

refactor(agent): delegate reusable harness mechanics - #5524

Merged
senamakel merged 16 commits into
tinyhumansai:mainfrom
senamakel:move-agent-inference-to-tinyagents
Aug 12, 2026
Merged

refactor(agent): delegate reusable harness mechanics#5524
senamakel merged 16 commits into
tinyhumansai:mainfrom
senamakel:move-agent-inference-to-tinyagents

Conversation

@senamakel

@senamakel senamakel commented Aug 12, 2026

Copy link
Copy Markdown
Member

Summary

  • delegate the generic active-run queue mechanics to TinyAgents
  • keep OpenHuman-owned queue modes, message metadata, warnings, and consumption APIs in a thin host adapter
  • consume TinyAgents' local-runtime chat-template rejection classifier while retaining OpenHuman's user-facing error mapping
  • advance the TinyAgents gitlink to the companion extraction PR
  • restore OpenHuman compatibility with the TinyFlows 0.6.1 gitlink already on main

Problem

OpenHuman still owned provider-neutral queue storage and local-runtime error-recognition logic. That blurred the kernel boundary and made other TinyAgents hosts duplicate harness mechanics.

Solution

The host now maps its product-specific QueueMode and QueuedMessage into TinyAgents' payload-generic queue. The inference compatibility module re-exports the TinyAgents classifier, while UI remediation remains in OpenHuman. The public OpenHuman behavior and wire surface are unchanged.

TinyFlows 0.6.1 reached main as a gitlink-only change, so path-based Rust CI did not exercise its new shell capability and NodeKind. This PR keeps shell execution disabled by wiring shell: None until OpenHuman has a policy-aware adapter, while updating workflow authoring and node-contract surfaces to recognize shell nodes. It also refreshes both Cargo locks and gives the RSS fixture's debug test an explicit worker stack so the upgraded graph is exercised reliably.

Submission Checklist

  • Tests added or updated (happy path + edge cases)
  • Diff coverage target covered by focused crate and host tests
  • N/A: no coverage-matrix feature row changed
  • No new external network dependencies introduced
  • N/A: no release-cut surface changed
  • N/A: architecture-boundary extraction; no linked issue

Impact

No user-visible or wire-level change. Desktop, CLI, and embedded core retain the same queue semantics and error remediation. Shell workflow execution remains unavailable unless and until OpenHuman supplies an explicit policy-aware adapter. The TinyAgents dependency PR must merge before this PR.

Related


AI Authored PR Metadata

Commit & Branch

  • Branch: move-agent-inference-to-tinyagents
  • Commit SHA: b3b23502d906952a8fb295d8ae938f56fb6c1a35

Validation Run

  • TinyAgents: cargo clippy --all-targets --all-features -- -D warnings; cargo build --all-targets; cargo test --all-features
  • OpenHuman: CI Lite Rust formatting and clippy (product, contributor, and Tauri sets)
  • OpenHuman: feature-gate smoke and kernel guards
  • OpenHuman: focused queue, chat-template, workflow authoring, node-contract, and RSS tests

Behavior Changes

  • Intended behavior change: None; reusable ownership moved across the host/crate boundary.
  • User-visible effect: None.
  • Legacy behavior preserved: FIFO lane behavior, status counts, invalid-mode warnings, and template-error classification.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel
senamakel requested a review from a team August 12, 2026 13:25
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7560c112-9b86-4a24-8a70-0910ba9b4c00

📥 Commits

Reviewing files that changed from the base of the PR and between 2025729 and 65d92e2.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • app/src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • src/bin/rss_bench.rs
  • src/openhuman/flows/tinyflows/caps/ops.rs
  • src/openhuman/flows/tools.rs
  • src/openhuman/flows/tools_tests.rs

📝 Walkthrough

Walkthrough

The change delegates queue operations and chat-template rejection detection to TinyAgents. It removes the local QueueStatus type, updates the vendored TinyAgents revision, disables direct shell capability exposure, adds shell configuration hints, and adjusts test setup.

Changes

Host integration changes

Layer / File(s) Summary
TinyAgents delegation
src/openhuman/agent/harness/run_queue/mod.rs, src/openhuman/agent/harness/run_queue/types.rs, src/openhuman/inference/provider/chat_template.rs, vendor/tinyagents
RunQueue forwards lane operations to TinyAgents. The local QueueStatus type is removed. Chat-template rejection detection is re-exported from TinyAgents.
Shell capability and hints
src/openhuman/flows/tinyflows/caps/ops.rs, src/openhuman/flows/tools.rs, src/openhuman/flows/tools_tests.rs
The capability bundle sets shell to None. Shell-node hints prefer script_path and otherwise use truncated inline source. Tests cover both cases.
Test runtime setup
src/openhuman/config/migration_helpers/ops.rs, src/bin/rss_bench.rs
Migration tests install memory host implementations before creating Config. The RSS warm-up test uses an explicit Tokio runtime and spawned task.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Poem

Poem

A rabbit guides queues through TinyAgents lanes,
One classifier now handles the same.
Shell hints show paths or source trimmed small,
Memory hosts help migration tests call.
Tokio tasks warm up and join.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR adds the migration memory seam but does not address the issue's kernel-floor, dep-sim, or deleted-test allowlist requirements; lockfile changes are excluded from review. Implement the remaining CI fixes, or remove issue #5518 as a linked objective if this PR only targets the TinyAgents refactor.
Out of Scope Changes check ⚠️ Warning Queue and chat-template delegation, shell capability changes, RSS test changes, and the TinyAgents gitlink are unrelated to linked issue #5518. Move the TinyAgents refactor and shell/RSS changes to a separate PR, or link issues that define those objectives.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: delegating reusable agent harness mechanics to TinyAgents.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Co-authored-by: Medulla <medulla@tinyhumans.ai>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 12, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 12, 2026
Co-authored-by: Medulla <medulla@tinyhumans.ai>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 12, 2026
Co-authored-by: Medulla <medulla@tinyhumans.ai>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 12, 2026
Co-authored-by: Medulla <medulla@tinyhumans.ai>
coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 12, 2026
Co-authored-by: Medulla <medulla@tinyhumans.ai>
senamakel and others added 7 commits August 12, 2026 18:09
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
…to-tinyagents

# Conflicts:
#	scripts/kernel-floor.limits
#	src/openhuman/config/migration_helpers/ops.rs
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel
senamakel merged commit fc747bd into tinyhumansai:main Aug 12, 2026
37 of 51 checks passed
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