Repository navigation
refactor(runtime): read components, profile capabilities and hook contexts from explicit contexts (#7801) - #7880
Merged
Merged
Conversation
Adds operations and schemas for the about_app platform module, exposing app metadata through the runtime dispatch context so callers can query build and version information. Auto-committed-on: dragonfly
The scheduler now routes the output of a scheduled run through the delivery path so results reach the configured channel instead of being dropped. This restores the expected behaviour for cron jobs that rely on their output being sent. Auto-committed-on: dragonfly
Dispatch now consults the components gate before routing to a component, so requests for components that are not enabled are rejected early instead of failing deeper in the pipeline. Auto-committed-on: dragonfly
Added schema types for the tokenjuice inference path and wired them into the runtime module so callers can validate and construct tokenjuice payloads through the shared runtime surface. Auto-committed-on: dragonfly
…tion Sandbox policy resolution and the component gate now take the caller's DispatchCtx instead of reading the ambient core context, so component state is read from the context the call actually runs under. Callers in the sandbox schemas, shell tool, and tests were updated to pass their context through. Auto-committed-on: dragonfly
…olution The flow code capability now builds a single ambient dispatch context and passes it to both policy resolution and sandbox execution instead of constructing one inline. Tests were updated to supply the dispatch context to sandbox_component_off, which now takes it as a parameter. Auto-committed-on: dragonfly
Session transcripts are now fed into the memory pipeline as they are produced, so conversations become searchable without a separate import step. Tests cover the ingest path for runtime sessions. Auto-committed-on: dragonfly
The relay ops module is no longer referenced anywhere, so it has been deleted to keep the providers tree free of dead code. Auto-committed-on: dragonfly
Introduce capability definitions and provider settings for profiles so profile configuration can describe what a provider supports and how it should be configured. Auto-committed-on: dragonfly
Introduce capability and tool profile definitions so profiles can declare which capabilities and tools they expose. This provides the foundation for resolving per-profile permissions. Auto-committed-on: dragonfly
Host agent dispatch now builds and drives turns through the session host instead of the previous direct path, so host agents share the same turn lifecycle and profile handling as other sessions. Supporting changes wire the profile factory, turn parts, memory engine, and profile tools into that flow. Auto-committed-on: dragonfly
Host agents are now wired into the session host builder and profile factory so sessions can be constructed with a host agent, and turn parts startup passes the host agent through. This lets the runtime launch sessions backed by host agents instead of only the default agent. Auto-committed-on: dragonfly
Search requests can now be routed through a configurable proxy, with the setting threaded through the config ops, search bus, and tools. This lets deployments behind restricted networks reach external search providers. Auto-committed-on: dragonfly
…s,crates/openhuman-core/src/mod Auto-committed-on: dragonfly
Introduce a graph-based harness for the agent, providing the structure needed to model agent execution as a graph of steps. Auto-committed-on: dragonfly
Add tests exercising the sandbox operations to lock in current behaviour and catch regressions in the ops layer. Auto-committed-on: dragonfly
Adds tests exercising the browser computer tool's action handling so regressions in click, type, and navigation behaviour are caught early. Auto-committed-on: dragonfly
Introduce a post-commit hook that lets the learning sink observe committed runtime session state. This wires the agent hooks into the session host so learning updates are captured after each commit. Auto-committed-on: dragonfly
Cover the hook dispatch paths around tool call start and completion so regressions in ordering and payload handling are caught. Auto-committed-on: dragonfly
Add tool registration for the tinyagents agent so its tools are wired up the same way as the other agent implementations. Auto-committed-on: dragonfly
Add tool registration support for the tinyagents agent so its tools are wired up alongside the other agent implementations. Auto-committed-on: dragonfly
Deleting a thread now removes its associated data instead of leaving it behind. The purge path was previously unreachable from the delete flow, so orphaned records accumulated over time. Auto-committed-on: dragonfly
Adds tests covering the about app operations and the thread title and cancellation operations, extending existing test modules to exercise these paths. Auto-committed-on: dragonfly
Reordered the DispatchCtx import to keep the use block sorted and condensed the comment explaining why hosted profiles skip the config-derived tool belt. No behaviour change. Auto-committed-on: dragonfly
Bind the ambient dispatch context to a local before checking profile capabilities, so the same value can be reused instead of being constructed inline in the condition. Auto-committed-on: dragonfly
The comment on from_config_for_agent still described the operator-selected factory carrying registration and permission bounds, which no longer matches the code path. Shortened it to state only that a hosted profile skips the ordinary config-derived belt. Auto-committed-on: dragonfly
The ambient-context baseline entries for several crates were dropped and the remaining line numbers shifted, reflecting the removal of those CoreContext::current() call sites from the source tree. Auto-committed-on: dragonfly
Add tests covering host profile resolution in the embed crate to verify the expected profile is selected for host environments. Auto-committed-on: dragonfly
Update the public agent harness test to call fire_hooks with the new DispatchCtx argument, keeping the test in sync with the changed signature. Auto-committed-on: dragonfly
apply_search_settings now takes the caller's DispatchCtx instead of constructing an ambient one, so the module refresh runs under the correct tenant. The remaining changes are rustfmt reflows and import ordering with no behaviour change. Auto-committed-on: dragonfly
Update the vendored tinyconnectors submodule to a newer revision. Auto-committed-on: dragonfly
Update the vendored tinyconnectors submodule to commit 00c5609. 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 selected for processing: 48
Comment |
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.
Summary
Part of #7801 (child of #7523). Moves a first batch of
CoreContext::current()/scoped()readers onto explicitDispatchCtx/Arc<CoreContext>carriers. No behaviour change: an explicit context resolves to what the ambient read returned.DispatchCtx::components()/domains(); about_app list/lookup/search, the RPC component gate (disabled_component_for_method), tokenjuicegate, sandboxsandbox_component_off/sandbox_disabled_by_host/resolve_sandbox_policy, cron flow-schedule component check and the module callbacks install take a context.ProfileCapabilities::in_ctx,ProfileProviderSettings::in_ctxreplacecurrent();admits/authorizes_approval/profiles::tools::admits_in/gate_verdictread through a context. The search module proxy (execute_tool,list_tools,refresh_loaded) andapply_search_settingstake one.fire_hooks,TurnOriginScope(reads the tool run carrier), the channel graph turn, relay turn derivation, session memory profile capture and threadsrun_to_completionhand over the caller's context instead of readingcurrent()/scoped().load_config_with_timeoutis now a thinDispatchCtx::ambient()wrapper.Tests
run_to_completion_runs_under_the_explicit_context(explicit ctx wins over the task scope; two contexts do not cross, concurrent and across awaits),an_explicit_context_decides_which_capabilities_are_disabled(about_app), updatedfired_hooks_observe_the_firing_dispatchs_core_context(explicit ctx, no task scope) and the memory-ingest profile capture tests (explicit ctx).cargo test -p openhuman --lib: 9543 passed, 1 failed (platform::startup::ops::tests::workspace_startup_migrates_transcripts_once, known pre-existing).saas_mode_e2e19/19,saas_profile_isolation_e2e3/3, embedsaas_profilespass.Gates
cargo check(default,--no-default-features -p openhuman, product features--workspace --all-targets, app manifest),cargo build -p openhuman-cli --bin openhuman-core,pnpm rust:layout, agent-runtime boundary check, process-statics check, SaaS ambient ratchet (baseline only lost entries / moved lines).Remaining
Production
CoreContext::current(17,scoped(6,spawn_scoped49,scope(39.spawn_scoped->tokio::spawnand the productionscope(wrappers cannot go until the remainingDispatchCtx::ambient()readers (approval gate, flows caps, session builders, MCP client table,AgentDefinitionRegistry::current(),resolve_backend_transport, registry visibility) have carriers.Refs #7801, #7523