Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
fix(realtime): accept audited Codex config origin
rubenluetke10-beep13df77c91d97
diff --git a/jarvis/codex_app_server.py b/jarvis/codex_app_server.pyindex 9e2445f9f8..724414a38a 100644--- a/jarvis/codex_app_server.py+++ b/jarvis/codex_app_server.py@@ -284,6 +284,18 @@ _DISABLED_APP_SERVER_FEATURES: Final = ("chronicle",)+# Codex 0.147 keeps the effective/session-layer value for ``multi_agent_v2``+# as the scalar supplied by ``--disable``, but config/read attributes that one+# value to the structured feature field ``features.multi_agent_v2.enabled``.+# Canonicalize only this audited release/path pair. The exact origin set,+# sessionFlags source, version, effective value, and allowed session surface+# are still checked below, so this does not admit an additional config field.+_CODEX_CONFIG_ORIGIN_PATH_ALIASES: Final = {+ _SUPPORTED_CODEX_VERSION: {+ "features.multi_agent_v2.enabled": "features.multi_agent_v2",+ },+}+_TRANSPORT_BASE_INSTRUCTIONS: Final = ("This ephemeral thread exists only to carry a realtime voice transport. ""Never use tools, inspect files, access the network, or perform actions. "@@ -2752,7 +2764,19 @@ class CodexAppServerClient:for path, expected in expected_paths.items()if expected not in ([], {})}- if not isinstance(origins, Mapping) or set(origins) != expected_origin_keys:+ if not isinstance(origins, Mapping):+ raise CodexSubscriptionUnavailable(+ "Codex configuration origins failed the transport safety audit."+ )+ origin_keys = set(origins)+ aliases = _CODEX_CONFIG_ORIGIN_PATH_ALIASES.get(+ self._trusted_binary_version or "", {}+ )+ canonical_origin_keys = {aliases.get(key, key) for key in origin_keys}+ if (+ len(canonical_origin_keys) != len(origin_keys)+ or canonical_origin_keys != expected_origin_keys+ ):raise CodexSubscriptionUnavailable("Codex configuration origins failed the transport safety audit.")diff --git a/tests/unit/codex_app_server/test_transport.py b/tests/unit/codex_app_server/test_transport.pyindex e7335ee985..dea1080b12 100644--- a/tests/unit/codex_app_server/test_transport.py+++ b/tests/unit/codex_app_server/test_transport.py@@ -2045,6 +2045,42 @@ def test_effective_config_audit_requires_empty_host_layers_and_session_origins()shutil.rmtree(client._workspace.root, ignore_errors=True)+def test_effective_config_audit_accepts_0147_structured_feature_origin() -> None:+ client = CodexAppServerClient()+ client._trusted_binary_version = transport._SUPPORTED_CODEX_VERSION+ client._workspace = transport._create_safe_transport_workspace()+ client._sink_base_url = "http://127.0.0.1:43123/v1"+ try:+ result = _safe_audit_result(client)+ origin = result["origins"].pop("features.multi_agent_v2")+ result["origins"]["features.multi_agent_v2.enabled"] = origin++ client._audit_effective_config(result)++ client._trusted_binary_version = transport._LEGACY_CODEX_VERSION+ with pytest.raises(CodexSubscriptionUnavailable, match="origins failed"):+ client._audit_effective_config(result)+ finally:+ shutil.rmtree(client._workspace.root, ignore_errors=True)+++def test_effective_config_audit_rejects_duplicate_structured_feature_origin() -> None:+ client = CodexAppServerClient()+ client._trusted_binary_version = transport._SUPPORTED_CODEX_VERSION+ client._workspace = transport._create_safe_transport_workspace()+ client._sink_base_url = "http://127.0.0.1:43123/v1"+ try:+ result = _safe_audit_result(client)+ result["origins"]["features.multi_agent_v2.enabled"] = dict(+ result["origins"]["features.multi_agent_v2"]+ )++ with pytest.raises(CodexSubscriptionUnavailable, match="origins failed"):+ client._audit_effective_config(result)+ finally:+ shutil.rmtree(client._workspace.root, ignore_errors=True)++@pytest.mark.asyncioasync def test_dedicated_home_is_revalidated_before_a_warm_thread_start(monkeypatch: pytest.MonkeyPatch,