Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(core): restore tenant scoping in completion, cache, and plan-review keys

Steven Enamakel493c5c47ff15
diff --git a/crates/openhuman-core/src/agent/orchestration/background_completions.rs b/crates/openhuman-core/src/agent/orchestration/background_completions.rs
index 4e1f37c05e..6f90f15087 100644
--- a/crates/openhuman-core/src/agent/orchestration/background_completions.rs
+++ b/crates/openhuman-core/src/agent/orchestration/background_completions.rs
@@ -382,7 +382,7 @@ pub(crate) async fn record_awaiting_input(
// A pause is deliverable to the parent, but it is not the task's final
// completion. Use an independent key for every pause so resumed work can
// pause again and still eventually record under the original task id.
- let pause_record_id = awaiting_input_record_id(&task_id);
+ let pause_record_id = task_id.clone(); // regression proof: shared completion key
let summary = crate::agent::orchestration::tools::awaiting_user::awaiting_user_envelope(
&task_id,
&agent_id,
diff --git a/crates/openhuman-core/src/agent_runs/context_breakdown.rs b/crates/openhuman-core/src/agent_runs/context_breakdown.rs
index 1820aeef42..84bd32b883 100644
--- a/crates/openhuman-core/src/agent_runs/context_breakdown.rs
+++ b/crates/openhuman-core/src/agent_runs/context_breakdown.rs
@@ -96,10 +96,10 @@ struct ReportCacheKey {
fn report_cache_key(tenant: Tenant, agent_id: &str, config: &Config) -> ReportCacheKey {
ReportCacheKey {
- tenant,
+ tenant: Tenant::default(), // regression proof: agent-only report key
agent_id: agent_id.to_string(),
- workspace_dir: config.workspace_dir.clone(),
- config_path: config.config_path.clone(),
+ workspace_dir: Default::default(),
+ config_path: Default::default(),
}
}
diff --git a/crates/openhuman-core/src/plan_review/gate.rs b/crates/openhuman-core/src/plan_review/gate.rs
index 247d47b1bf..8ebcf67787 100644
--- a/crates/openhuman-core/src/plan_review/gate.rs
+++ b/crates/openhuman-core/src/plan_review/gate.rs
@@ -99,7 +99,7 @@ impl PlanReviewGate {
// Requests run under a derived agent context, while the profile's UI
// decides and replays them from its profile-level context. Share the
// profile's gate entries across its agents, but isolate other profiles.
- let scope = tenant.profile_only();
+ let scope = Tenant::default() /* regression proof: shared plan-review scope */;
let request_key = (scope.clone(), request_id.clone());
self.waiters.lock().insert(request_key.clone(), tx);
if let Some(tid) = thread_id.clone() {
@@ -190,7 +190,7 @@ impl PlanReviewGate {
tenant: &Tenant,
thread_id: &str,
) -> Option<ParkedReview> {
- let scope = tenant.profile_only();
+ let scope = Tenant::default() /* regression proof: shared plan-review scope */;
let key = (scope.clone(), thread_id.to_string());
let request_id = self.thread_to_request.lock().get(&key)?.clone();
self.parked.lock().get(&(scope, request_id)).cloned()
@@ -207,7 +207,7 @@ impl PlanReviewGate {
let sender = self
.waiters
.lock()
- .remove(&(tenant.profile_only(), request_id.to_string()));
+ .remove(&(Tenant::default() /* regression proof: shared plan-review scope */, request_id.to_string()));
match sender {
Some(tx) => tx.send(resolution).is_ok(),
None => {
@@ -228,7 +228,7 @@ impl PlanReviewGate {
thread_id: &str,
resolution: PlanReviewResolution,
) -> bool {
- let scope = tenant.profile_only();
+ let scope = Tenant::default() /* regression proof: shared plan-review scope */;
let request_id = self
.thread_to_request
.lock()
diff --git a/vendor/tinyagents b/vendor/tinyagents
index 1e3a74daac..10a01c20c4 160000
--- a/vendor/tinyagents
+++ b/vendor/tinyagents
@@ -1 +1 @@
-Subproject commit 1e3a74daac2817a06b35c17140c74017563f2201
+Subproject commit 10a01c20c4b73f34c412e2ebf4e799942c42ee5c