Skip to content

TinyAgents migration (v0.58.7 → main) parity & bug-fix tracker — harness audit findings #4470

Description

@senamakel

TinyAgents migration (v0.58.7 → HEAD): parity & bug-fix tracker

A full audit was run comparing production release v0.58.7 against current main over src/openhuman/agent/ (especially harness/) — the TinyAgents migration (#4249, landed via #4261#4372#4399) plus follow-ups: Langfuse tracing (#4434), memory protocol (#4444), tool-failure classification (#4445). ~4,900 insertions / ~15,200 deletions across 98 files; the in-house engine (engine/, tool_loop.rs, token_budget.rs, …) was replaced by the published tinyagents = "1.3" crate via the seam in src/openhuman/tinyagents/.

Audit verdict

The migration is thoughtfully executed — approval gate, tool policy, iteration caps, cap checkpoints, streaming, payload summarizer, cache-align, handoff cache internals, spawn-depth/tier/sandbox enforcement, and checkpoint/resume were all verified faithfully re-ported. Genuine improvements landed too (real streaming deltas, durable event journal, max_tool_calls + wall-clock backstops, #4093 empty-final re-prompt, orphaned tool_call_id elimination).

But it is not at parity. The recurring failure pattern: behaviors that lived inline in the old loop were re-expressed as middleware/events/spawned tasks whose semantics differ subtly — and in several places a comment asserts parity the code doesn't deliver (handoff ordering, empty-allowlist convention, capture-middleware ordering). Separately, two follow-up PRs shipped with broken end-to-end assumptions (memory protocol pivots on an unregistered tool; the failure classifier was tuned against strings our own approval gate never emits).

Test accounting: net −67 test functions (1,029 → 962, +79 seam tests) despite −6.7k test lines — most coverage was rewritten or moved into the crate (~711 test attrs). The behaviors that lost all coverage line up with the dropped features tracked below. Spec Phase 11 (parity matrix, behavior-cluster ports) remains unchecked in docs/tinyagents-migration-spec.md.

Plan

Phase 1 — Critical correctness & security (release blockers)

Phase 2 — Durable-state corruption & leaks

Phase 3 — Follow-up PR repairs

Phase 4 — Parity restoration

Phase 5 — Tests & cleanup

Working notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentBuilt-in agents, prompts, orchestration, and agent runtime in src/openhuman/agent/.bugpriority: criticalBlocks boot or core functionalityrust-coreCore Rust runtime in src/: CLI, core_server, shared infrastructure.

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions