Skip to content

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

chore(ci): allow memory scope accessors in runtime boundary check

Steven Enamakel5b5873d09d3d
diff --git a/scripts/ci/check-agent-runtime-boundary.mjs b/scripts/ci/check-agent-runtime-boundary.mjs
index 8a3e92ff3d..f28d5601e4 100644
--- a/scripts/ci/check-agent-runtime-boundary.mjs
+++ b/scripts/ci/check-agent-runtime-boundary.mjs
@@ -163,7 +163,6 @@ const deletedTaskLocalModules = [
// it can go. Any other declaration is a new violation.
const taskLocalDeclarationAllowlist = [
"crates/openhuman-core/src/core/runtime/context.rs",
- "crates/openhuman-core/src/memory/scope.rs",
];
const taskLocalAccessors = [
"current_parent",
@@ -203,6 +202,9 @@ const taskLocalAccessors = [
"dedup_turn_scope",
"current_meter",
"with_turn_activity",
+ // `memory::scope` (the acting memory identity) is explicit now: a run's
+ // `OpenHumanRunContext::memory_identity`, or a `&MemoryIdentity` argument.
+ "resolve_current",
];
const taskLocalStatics = [
"PARENT_CONTEXT",
@@ -230,6 +232,8 @@ const taskLocalStatics = [
"APPROVAL_CHAT_CONTEXT",
"APPROVAL_COPILOT_STREAM_CONTEXT",
"APPROVAL_FLOW_RUN_CONTEXT",
+ // `memory/scope.rs`: the ambient memory identity.
+ "CURRENT",
];
async function filesUnder(root, predicate) {
@@ -669,6 +673,7 @@ for (const path of await filesUnder(
/\b(?:turn_origin|turn_workspace|turn_dispatch_guard)::(?:current|capture|propagate|spawn|spawn_unlabelled|check|record_subagent_elapsed|with_workspace)\b/.test(
compact,
) ||
+ /\bmemory::scope::(?:current|within|within_agent)\b/.test(compact) ||
(/\/turn_workspace\.rs$/.test(path) &&
/\bwith_workspace\s*\(/.test(text));
const declaresUnlistedTaskLocal =