Repository navigation
refactor(agent): pin tinyagents main; harness close_budget, TurnCost and ToolCallPolicy (#7600) - #7798
Merged
Conversation
Bumped the tinystoragedrivers crates to 0.11.0 and advanced the vendored tinyagents submodule to its latest commit. The lockfile also picks up transitive dependency adjustments that follow from these updates. Auto-committed-on: dragonfly
The session store now records the workspace associated with a session so that it can be restored when the session is resumed. This keeps workspace context available across restarts instead of relying on the caller to supply it again. Auto-committed-on: dragonfly
Tool results that exceed the inline size budget are now written to artifact storage and replaced with a compact reference, keeping conversation context small without losing the underlying data. The subagent runner resolves these references when replaying results. Auto-committed-on: dragonfly
…on is empty, and the stat is Could you paste the diff (or at least the stat and the relevant hunks) for `artifact_offload_tests.rs`? Once I can see the `+`/`-` lines I'll write the Conventional Commits message. Auto-committed-on: dragonfly
Turns can now be bounded by a deadline and a backstop so a session that stops making progress is detected and ended instead of hanging. The backstop and deadline logic live in their own modules with tests covering the expiry paths. Auto-committed-on: dragonfly
Introduce turn guard checks in the session host driver and runtime session turn so web chat turns can be validated before execution. This prevents overlapping or invalid turns from being processed and adds tests covering the new guard behaviour. Auto-committed-on: dragonfly
The doc comment pointed at `turn_deadline_tests.rs`, which no longer holds the backstop ordering tests, so it now references `turn_backstop_tests.rs`. Auto-committed-on: dragonfly
Turn cost accumulation now lives in tinyagents_harness, which owns the pricing-aware TurnCost and records model usage itself, so the host only seeds the accumulator with the product catalog. This removes the local TurnCost type and its StopHookMetrics impl, and the vendored tinyagents submodule is bumped to the revision that provides them. Auto-committed-on: dragonfly
Introduce a runtime adapter that drives session turns through the session host, wiring the turn lifecycle into the runtime session API. Tests cover the adapter's turn handling. Auto-committed-on: dragonfly
Introduce a session host builder that assembles runtime sessions from host-only and host-tools configurations, along with a tool policy module that governs which tools a turn may invoke. This separates session construction from execution so hosts can be composed and tested independently. Auto-committed-on: dragonfly
Introduce a tool policy middleware that is wired into the tinyagents harness during assembly, allowing tool calls to be filtered or gated before execution. The live harness and session host builder were updated to construct and pass the middleware through, with tests covering the policy behaviour. Auto-committed-on: dragonfly
Introduce a turn policy layer in the tinyagents middleware and wire it into the session host so live tool calls and runtime sessions share consistent per-turn behaviour. This centralises turn handling that was previously duplicated across the session host paths. Auto-committed-on: dragonfly
Embedded agent sessions can now carry file attachments through to the runtime session host. This lets callers pass attachments when starting a session instead of only supplying plain text input. Auto-committed-on: dragonfly
Update the host-only and attachment policy tests to use the new RunContext and ToolCall based policy interface, replacing the removed ToolPolicyRequest and ToolPolicyDecision types. The attachments module also picks up import reordering and rustfmt line wrapping with no behaviour change. Auto-committed-on: dragonfly
…pty, and the stat is blank to Could you paste the diff (or at least the stat and a summary of what changed in `crates/openhuman-core/src/agent/cost_tests.rs`)? Once I have that, I'll produce the Conventional Commits message. Auto-committed-on: dragonfly
The host-only gate test referenced a policy binding that no longer exists, so the assertions now read the policy from the built agent and the inline blocks were reformatted for readability. Auto-committed-on: dragonfly
Adds unit tests covering cost accounting, artifact offload behaviour, and middleware tool policy so these paths are exercised by the suite. Auto-committed-on: dragonfly
The goal runtime tests now build turn costs through the shared cost helpers so priced calls are recorded consistently. The tool policy test drops the removed session argument from the middleware constructor. Auto-committed-on: dragonfly
…rkspace state The blob key is relative, so the crate's path policy cannot see where the reader's copy will land; offload_oversized_result now takes the security policy and keeps the inline result when the resolved target would reach core state. Tests were updated to cover the fail-closed path end to end. Auto-committed-on: dragonfly
Re-export PolicyDecision and ToolCallPolicy from the embed seams so hosts can supply a tool-call policy to HostTools::with_policy. The runtime boundary check now allowlists these exports along with the TurnCost stop-hook metrics type. Auto-committed-on: dragonfly
Update the boundary baseline to match current line numbers and add newly detected moved-symbol aliases and upstream re-exports so the CI check stays in sync with the code. Auto-committed-on: dragonfly
…se_budget) Co-authored-by: Medulla <medulla@tinyhumans.ai>
Move the tenant blob-store lookup and oversized-output offload out of the sub-agent runner into a reusable `offload_run_result` helper in the artifact offload module, so other callers can offload a finished run's output the same way. The runner now delegates to it, and the layout budget entries shrink to match the reduced line counts. Auto-committed-on: dragonfly
Update the lockfile to resolve windows-sys to 0.61.2 across the dependency graph and bump the tinystoragedrivers crates to 0.11.0. Also allowlist the artifact offload module in the storage-bypass check, since its JSON write is a derived view of a blob-stored artifact rather than a source of truth. Auto-committed-on: dragonfly
Tiny Sweeper review
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
⛔ Files ignored due to path filters: 2
📒 Files selected for processing: 51
Comment |
This was referenced Oct 14, 2026
This was referenced Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slice of #7600 (epic #7540). Module PR: tinyhumansai/tinyagents#450 (merged, c7a763b6); close_budget landed in tinyagents#448.
What changed
vendor/tinyagentsto mainc7a763b6(carries [Bug][Autocomplete][macOS] Repeated not authorised Apple Events errors (-1743) #446/[Perf/Cost] Optimize prompt payloads and stop repeating full context each turn #447 blob-store artifacts, [Feature] Subconscious loop proactive nudges from live context #448TurnDeadline::close_budget, [Bug] Release script never bumps root Cargo.toml — core binary reports stale version since v0.49.17 #449 turn driver, feat: consolidate overlay into desktop app and add compact orb demo #450 TurnCost pricing).ArtifactOffloadtakes anArc<dyn BlobStore>and no longer writes files. The host binds the acting tenant's blob store (session_store::artifact_blobs_for) and materialises the stored body under the parent's action root, so the pointer'soutputs/...path still opens withfile_read. The workspace-internal guard moved to the materialised target (checked before anything is stored). Failure of any step keeps the result inline, as before.agent/turn_deadline.rsdeleted.close_budgetis the harness'sTurnDeadline::close_budget(now); the env override and task-local live insession_host/turn_backstop.rs.agent/tool_policy.rsdeleted. The harnessToolCallPolicy<OpenHumanRunContext>/PolicyDecisionare used directly (host-only gate, embed attachments, builder setters); the session adapter is gone.ToolCallContext's session/channel/agent ids were unread by any in-tree policy. RPC/config wire unchanged.TurnCost. The host copy is gone; the harnessTurnCostprices recorded responses through an injected lookup (tinyagents#450) and the host seeds it with the catalog lookup (cost::turn_cost,StopHookMiddleware::with_metrics_seed).TurnOptions { controls }from the turn driver pin.Tests
StopHookMetricspath and are unchanged.Gates
cargo check (default, product features,
--no-default-features -p openhuman), app manifest check,openhuman-corebuild,pnpm rust:layout, agent-runtime boundary, submodule monotonic.Not in this PR (stays open on #7600)
turn_policy,turn_outcome,turn_run_error,turn_run_finalize,response_shape(task-local),turn_stop,error.rsmoves. The boundary baseline gained 2 vendor entries that arrive with the #449 pin (EarlyExitre-export,ExposureProbe); no baseline entry mapped to the removed files.