Skip to content

Resolve the three deferred TinyAgents §5 design decisions (recommend_tier, NotOwned, ToolScope/is_concurrency_safe) #4565

Description

@senamakel

Summary

The TinyAgents port audit (§5 of docs/tinyagents-port-plan.md) surfaced three code-quality items that are genuine design decisions, not mechanical fixes. The behavior-preserving parts were landed in #4542, but each carries a real "implement vs defer" choice that was intentionally left open. This issue tracks resolving them.

Problem / Context

Each item currently reads as dead/misleading code but changing it alters behavior, a public type, or a trust boundary — so it needs an explicit decision rather than a drive-by change. #4542 added clarifying comments/annotations in place; this issue is where the actual decisions land (some are gated on later port phases).

Scope

Three independent decisions:

  1. recommend_tier RAM scaling (src/openhuman/inference/presets.rs) — reads device RAM but always returns MVP_MAX_TIER; its test pins the non-scaling contract. Decide: implement RAM→tier scaling (and update recommend_tier_scales_with_ram), or formally keep the intentional MVP cap and drop the unused RAM read. fix(tinyagents-audit): execute §5 fix-in-place items — provider diagnostic, anchor coupling, dead-read clarifications #4542 documented it as an intentional cap.
  2. SteerError::NotOwned RPC-path ownership (src/openhuman/agent_orchestration/subagent_control.rs) — the arm is unreachable on the trusted RPC steer_control path (no ownership check there); the agent-tool running_subagents::steer path does enforce ownership. Enforcing it on the RPC path would change the JSON-RPC payload shape (forbidden during the port) → deferred to Phase 4 (graph::orchestration::SteeringRegistry ownership consolidation).
  3. ToolScope::AgentOnly vs All + is_concurrency_safe (src/openhuman/tools/traits.rs) — AgentOnly has three real constructors but no execution path gates on it (behaves like All); is_concurrency_safe maps to tinyagents ToolRuntime.idempotent, which the harness never reads for dispatch (serial tool loop). Reconcile with the crate tool model in Phase 2; adopting concurrency needs upstream parallel dispatch.

Acceptance criteria

  • recommend_tier — decision made and implemented (scale or formally cap + strip param)
  • NotOwned — RPC-path ownership resolved as part of Phase 4 SteeringRegistry, or explicitly documented as permanently trusted-RPC
  • ToolScope::AgentOnly / is_concurrency_safe — reconciled with the tinyagents tool model in Phase 2 (gate AgentOnly or collapse to All; wire concurrency only behind upstream parallel dispatch)
  • Diff coverage ≥ 80% — implementing PR(s) meet the changed-lines coverage gate

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions