Skip to content

Self-improving AI Employees for everyone

test(temporal): the golden records each plugin's task queue (1b.42)

trohitg8d308b9a754c
diff --git a/docs-internal/TEMPORAL_ARCHITECTURE.md b/docs-internal/TEMPORAL_ARCHITECTURE.md
index d84a6bee..d9f02305 100644
--- a/docs-internal/TEMPORAL_ARCHITECTURE.md
+++ b/docs-internal/TEMPORAL_ARCHITECTURE.md
@@ -809,18 +809,21 @@ keep that release's command identities:
- activity, child-workflow and patch commands with their ids
(`workflow_identities.identity_snapshot`);
- Signal, Update and Query handler names (`handler_snapshot`);
- - plugin activity names.
+ - plugin activity names;
+ - plugin task queues.
`test_workflow_identity_golden.py` fails when:
- commands change without a reviewed patch entry;
- a patched marker vanishes before a release has shipped it as
`deprecate_patch` (RFC-0005 §24.3);
- a handler is renamed or removed;
- - a plugin activity name changes.
+ - a plugin activity name changes;
+ - a plugin moves to another task queue, since an open agent run's frozen
+ tool policy names the old one and would wait on it forever.
New handlers and node types are fine.
`record_fixtures --golden-only --source-commit <commit>` refreshes the file
- at each release.
+ at each release; it starts no server, so it needs no `TEMPORAL_TEST_CLI`.
- **Release check.** `test_the_current_version_has_its_replay_histories` in
`cli/tests/test_release_pipeline_config.py` fails a version that has no
`fixtures/<version>/`. It also fails a set recorded on another CLI than the
diff --git a/server/tests/temporal/fixtures/workflow_identities.json b/server/tests/temporal/fixtures/workflow_identities.json
index 507d22e5..9b030467 100644
--- a/server/tests/temporal/fixtures/workflow_identities.json
+++ b/server/tests/temporal/fixtures/workflow_identities.json
@@ -1182,5 +1182,164 @@
"employeeJob": "node.employeeJob.v1",
"employeeJobSource": "node.employeeJobSource.v1",
"start": "node.start.v1"
+ },
+ "plugin_task_queues": {
+ "aiAgent": "ai-heavy",
+ "ai_employee": "ai-heavy",
+ "android_agent": "ai-heavy",
+ "autonomous_agent": "ai-heavy",
+ "browser_agent": "ai-heavy",
+ "chatAgent": "ai-heavy",
+ "claude_code_agent": "ai-heavy",
+ "codex_agent": "ai-heavy",
+ "coding_agent": "ai-heavy",
+ "consumer_agent": "ai-heavy",
+ "orchestrator_agent": "ai-heavy",
+ "payments_agent": "ai-heavy",
+ "productivity_agent": "ai-heavy",
+ "rlm_agent": "ai-heavy",
+ "social_agent": "ai-heavy",
+ "task_agent": "ai-heavy",
+ "tool_agent": "ai-heavy",
+ "travel_agent": "ai-heavy",
+ "web_agent": "ai-heavy",
+ "airplaneModeControl": "android",
+ "appLauncher": "android",
+ "appList": "android",
+ "audioAutomation": "android",
+ "batteryMonitor": "android",
+ "bluetoothAutomation": "android",
+ "cameraControl": "android",
+ "deviceStateAutomation": "android",
+ "environmentalSensors": "android",
+ "location": "android",
+ "mediaControl": "android",
+ "motionDetection": "android",
+ "networkMonitor": "android",
+ "screenControlAutomation": "android",
+ "systemInfo": "android",
+ "wifiAutomation": "android",
+ "awsAction": "rest-api",
+ "browser": "browser",
+ "chatHistory": "machina-default",
+ "chatReply": "machina-default",
+ "chatSend": "machina-default",
+ "chatUi": "machina-default",
+ "cloudflareAction": "rest-api",
+ "javascriptExecutor": "code-exec",
+ "montyExecutor": "code-exec",
+ "pythonExecutor": "code-exec",
+ "typescriptExecutor": "code-exec",
+ "context": "machina-default",
+ "discordAction": "rest-api",
+ "discordInteraction": "triggers-event",
+ "discordReceive": "triggers-event",
+ "discordSend": "messaging",
+ "documentParser": "machina-default",
+ "embeddingGenerator": "ai-heavy",
+ "fileDownloader": "rest-api",
+ "httpScraper": "rest-api",
+ "textChunker": "machina-default",
+ "vectorStore": "machina-default",
+ "dodoPaymentsAction": "rest-api",
+ "dodoPaymentsReceive": "triggers-event",
+ "emailRead": "messaging",
+ "emailReceive": "triggers-poll",
+ "emailSend": "messaging",
+ "fileModify": "machina-default",
+ "fileRead": "machina-default",
+ "fsSearch": "machina-default",
+ "gallery": "machina-default",
+ "shell": "machina-default",
+ "gcloudAction": "rest-api",
+ "githubAction": "rest-api",
+ "googleCalendar": "rest-api",
+ "googleContacts": "rest-api",
+ "googleDrive": "rest-api",
+ "googleGmail": "rest-api",
+ "googleGmailReceive": "triggers-poll",
+ "googleSheets": "rest-api",
+ "googleTasks": "rest-api",
+ "gmaps_create": "machina-default",
+ "gmaps_locations": "rest-api",
+ "gmaps_nearby_places": "rest-api",
+ "mcpConnector": "rest-api",
+ "msCalendar": "rest-api",
+ "msMail": "rest-api",
+ "msMailReceive": "triggers-poll",
+ "mobile_use_agent": "android",
+ "android_tool": "android",
+ "anthropicChatModel": "ai-heavy",
+ "cerebrasChatModel": "ai-heavy",
+ "deepseekChatModel": "ai-heavy",
+ "geminiChatModel": "ai-heavy",
+ "groqChatModel": "ai-heavy",
+ "kimiChatModel": "ai-heavy",
+ "lmstudioChatModel": "ai-heavy",
+ "mistralChatModel": "ai-heavy",
+ "ollamaChatModel": "ai-heavy",
+ "openaiChatModel": "ai-heavy",
+ "openaiCompatibleChatModel": "ai-heavy",
+ "openrouterChatModel": "ai-heavy",
+ "sarvamChatModel": "ai-heavy",
+ "proxyConfig": "machina-default",
+ "proxyRequest": "rest-api",
+ "proxyStatus": "machina-default",
+ "cronScheduler": "triggers-poll",
+ "timer": "machina-default",
+ "apifyActor": "rest-api",
+ "crawleeScraper": "browser",
+ "tikhubAction": "rest-api",
+ "braveSearch": "rest-api",
+ "duckduckgoSearch": "rest-api",
+ "perplexitySearch": "rest-api",
+ "serperSearch": "rest-api",
+ "masterSkill": "machina-default",
+ "simpleMemory": "machina-default",
+ "socialReceive": "machina-default",
+ "socialSend": "messaging",
+ "speechToText": "rest-api",
+ "textToSpeech": "rest-api",
+ "stripeAction": "rest-api",
+ "stripeReceive": "triggers-event",
+ "telegramReceive": "triggers-event",
+ "telegramSend": "messaging",
+ "fileHandler": "machina-default",
+ "textGenerator": "machina-default",
+ "agentBuilder": "machina-default",
+ "calculatorTool": "rest-api",
+ "canvas": "machina-default",
+ "currentTimeTool": "machina-default",
+ "dataSource": "machina-default",
+ "taskManager": "machina-default",
+ "writeTodos": "machina-default",
+ "detectLanguage": "rest-api",
+ "translateText": "rest-api",
+ "transliterateText": "rest-api",
+ "chatTrigger": "triggers-event",
+ "taskTrigger": "triggers-event",
+ "webhookTrigger": "triggers-event",
+ "twitterReceive": "triggers-poll",
+ "twitterSearch": "rest-api",
+ "twitterSend": "messaging",
+ "twitterUser": "rest-api",
+ "console": "machina-default",
+ "httpRequest": "rest-api",
+ "processManager": "machina-default",
+ "teamMonitor": "machina-default",
+ "webhookResponse": "rest-api",
+ "vercelAction": "rest-api",
+ "visionAnalyze": "ai-heavy",
+ "whatsappDb": "messaging",
+ "whatsappReceive": "triggers-event",
+ "whatsappSend": "messaging",
+ "whatsappBusinessMedia": "messaging",
+ "whatsappBusinessReceive": "triggers-event",
+ "whatsappBusinessStatus": "triggers-event",
+ "whatsappBusinessSend": "messaging",
+ "approvalGate": "triggers-event",
+ "employeeJob": "machina-default",
+ "employeeJobSource": "machina-default",
+ "start": "machina-default"
}
}
diff --git a/server/tests/temporal/record_fixtures.py b/server/tests/temporal/record_fixtures.py
index 7fd31d05..0cfb82da 100644
--- a/server/tests/temporal/record_fixtures.py
+++ b/server/tests/temporal/record_fixtures.py
@@ -1371,6 +1371,8 @@ def write_golden(source_root: Path, commit: str) -> None:
"identities": identity_snapshot(source_root), "patch_entries": [],
"handlers": handler_snapshot(source_root),
"plugin_activity_types": {name: f"node.{cls.type}.v{cls.version}" for name, cls in registered_node_classes().items()},
+ # An open agent run's frozen tool policy names each tool's queue.
+ "plugin_task_queues": {name: cls.task_queue for name, cls in registered_node_classes().items()},
}, indent=2) + "\n", encoding="utf-8")
@@ -1407,10 +1409,6 @@ def committed_source(commit: str | None):
def main() -> int:
- cli = os.environ.get("TEMPORAL_TEST_CLI")
- if not cli or not Path(cli).is_file():
- print("Set TEMPORAL_TEST_CLI to the pinned Temporal CLI binary (see TEMPORAL_ARCHITECTURE.md).", file=sys.stderr)
- return 2
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("out", nargs="?", type=Path, default=FIXTURES_DIR / release())
parser.add_argument("--source-commit", help="Record the exact app source at this commit, isolated from uncommitted changes")
@@ -1420,6 +1418,11 @@ def main() -> int:
options = parser.parse_args()
if options.scenarios and options.out.resolve() == (FIXTURES_DIR / release()).resolve():
parser.error("--scenario records a supplementary set: give it its own folder, e.g. fixtures/<release>-<topic>")
+ # The identity inventory starts no server.
+ cli = os.environ.get("TEMPORAL_TEST_CLI")
+ if not options.golden_only and (not cli or not Path(cli).is_file()):
+ print("Set TEMPORAL_TEST_CLI to the pinned Temporal CLI binary (see TEMPORAL_ARCHITECTURE.md).", file=sys.stderr)
+ return 2
os.environ["DEBUG"] = "false"
os.environ.setdefault("LOG_LEVEL", "WARNING")
with tempfile.TemporaryDirectory(prefix="opencompany-fixtures-") as data_dir:
diff --git a/server/tests/temporal/test_workflow_identity_golden.py b/server/tests/temporal/test_workflow_identity_golden.py
index 6a006ba8..df5cb923 100644
--- a/server/tests/temporal/test_workflow_identity_golden.py
+++ b/server/tests/temporal/test_workflow_identity_golden.py
@@ -120,3 +120,16 @@ def test_plugin_activity_type_versions_retain_the_release_names():
# their N-1 workflows have drained or a reviewed migration is supplied.
changed = {name: expected for name, expected in golden["plugin_activity_types"].items() if current.get(name) != expected}
assert not changed, f"Historical plugin activity names changed without compatibility registration: {changed}"
+
+
+def test_plugin_task_queues_retain_the_release_queues():
+ """An open agent run's frozen tool policy names each tool's queue, so a
+ released plugin that moves queue strands those runs. New plugins are
+ additive."""
+ import nodes # noqa: F401 -- discover the production node classes
+ from services.node_registry import registered_node_classes
+
+ golden = json.loads(GOLDEN.read_text(encoding="utf-8"))
+ current = {name: cls.task_queue for name, cls in registered_node_classes().items()}
+ changed = {name: expected for name, expected in golden["plugin_task_queues"].items() if current.get(name) != expected}
+ assert not changed, f"Released plugins changed task queue; open runs would wait on the old one: {changed}"