"Vibe-Trading: Your Personal Trading Agent"
Python ai-agentalgorithmic-tradingbacktestingfintechllmmcpmulti-agentpythonquantitative-financetrading
fix(desktop): satisfy packaging CI gates
QCYTSNc3544dda5e2a
diff --git a/.github/workflows/desktop-windows.yml b/.github/workflows/desktop-windows.ymlindex d852324e0..93f0ccc95 100644--- a/.github/workflows/desktop-windows.yml+++ b/.github/workflows/desktop-windows.yml@@ -15,7 +15,11 @@ permissions:jobs:package:- runs-on: windows-2025+ # The checksum-pinned legacy GTK runtime extractor crashes on the Server+ # 2025 image even though the resulting runtime works on current Windows.+ # Keep packaging reproducible on the clean Server 2022 image until the+ # native PDF dependency is replaced with a newer archive format.+ runs-on: windows-2022timeout-minutes: 90steps:diff --git a/agent/src/api/settings_routes.py b/agent/src/api/settings_routes.pyindex 4ea385cd1..7cae5d2c5 100644--- a/agent/src/api/settings_routes.py+++ b/agent/src/api/settings_routes.py@@ -17,7 +17,7 @@ import httpxfrom fastapi import Depends, FastAPI, HTTPException, statusfrom pydantic import BaseModel, Field-from src.config.accessor import reset_env_config+from src.config.accessor import get_env_value, reset_env_config# Agent root (agent/) — resolved from this file's location (agent/src/api/)._AGENT_DIR = Path(__file__).resolve().parent.parent.parent@@ -162,7 +162,7 @@ def _desktop_secure_credential_names() -> set[str]:def _desktop_secure_credentials_enabled() -> bool:- return os.environ.get("VIBE_TRADING_DESKTOP_SECURE_CREDENTIALS") == "1"+ return get_env_value("VIBE_TRADING_DESKTOP_SECURE_CREDENTIALS") == "1"# ---------------------------------------------------------------------------@@ -221,7 +221,7 @@ def _read_settings_env_values() -> Dict[str, str]:if _desktop_secure_credentials_enabled():for name in _desktop_secure_credential_names():- runtime_value = os.environ.get(name, "")+ runtime_value = get_env_value(name)if runtime_value:values[name] = runtime_valueelse:diff --git a/agent/src/config/accessor.py b/agent/src/config/accessor.pyindex 32f6f5ed9..63bf8e087 100644--- a/agent/src/config/accessor.py+++ b/agent/src/config/accessor.py@@ -22,7 +22,13 @@ from typing import TYPE_CHECKINGif TYPE_CHECKING:from src.config.env_schema import EnvConfig-__all__ = ["get_env_config", "reset_env_config", "_parse_bool", "get_env_or"]+__all__ = [+ "get_env_config",+ "reset_env_config",+ "_parse_bool",+ "get_env_or",+ "get_env_value",+]# ---------------------------------------------------------------------------# Module-level singleton state@@ -130,3 +136,13 @@ def get_env_or(primary: str, fallback: str, default: str = "") -> str:if value:return valuereturn default+++def get_env_value(name: str, default: str = "") -> str:+ """Read a dynamically named environment value through the config layer.++ Most application settings should use typed :class:`EnvConfig` fields.+ This narrow accessor exists for data-driven registries whose environment+ aliases are loaded at runtime, such as provider credential metadata.+ """+ return os.getenv(name, default)diff --git a/agent/tests/test_env_schema.py b/agent/tests/test_env_schema.pyindex 0d65991a4..188a7ce99 100644--- a/agent/tests/test_env_schema.py+++ b/agent/tests/test_env_schema.py@@ -10,6 +10,7 @@ Covers:- Thread safety- _parse_bool utility- get_env_or utility+- get_env_value utility- _parse_env_bool (EnvBool BeforeValidator)"""@@ -23,6 +24,7 @@ from src.config.accessor import (_parse_bool,get_env_config,get_env_or,+ get_env_value,reset_env_config,)from src.config.env_schema import (@@ -473,6 +475,20 @@ class TestGetEnvOr:assert get_env_or("PRIMARY", "FALLBACK", "default") == "default"+class TestGetEnvValue:+ """Verify dynamic registry keys still go through the config layer."""++ def test_reads_configured_value(self, monkeypatch: pytest.MonkeyPatch) -> None:+ monkeypatch.setenv("DYNAMIC_PROVIDER_API_KEY", "secret")+ assert get_env_value("DYNAMIC_PROVIDER_API_KEY") == "secret"++ def test_returns_default_for_missing_value(+ self, monkeypatch: pytest.MonkeyPatch,+ ) -> None:+ monkeypatch.delenv("DYNAMIC_PROVIDER_API_KEY", raising=False)+ assert get_env_value("DYNAMIC_PROVIDER_API_KEY", "fallback") == "fallback"++# ===================================================================# TestSubModelDirectConstruction# ===================================================================diff --git a/desktop/electron/WINDOWS_PACKAGING.md b/desktop/electron/WINDOWS_PACKAGING.mdindex 1998934fe..0a0a410b4 100644--- a/desktop/electron/WINDOWS_PACKAGING.md+++ b/desktop/electron/WINDOWS_PACKAGING.md@@ -106,6 +106,16 @@ tooling. Those packages are not copied into the packaged application, but thereview workflow still treats the lockfile as trusted build input. This shouldbe re-audited whenever Electron Builder publishes a repaired dependency tree.+## CI build-host note++The packaging job is pinned to GitHub's clean `windows-2022` image. The+checksum-pinned GTK runtime installer used solely to extract WeasyPrint's+native DLL subset exits with an access violation on the Server 2025 runner,+although the extracted runtime and packaged application work on current+Windows 10/11 hosts. Moving that native dependency to a newer, directly+extractable upstream archive is a follow-up; silently dropping PDF support or+accepting an unverified binary is not.+## Local validation recordWindows host validation on 2026-08-08 against the current upstream