From 16f8bb165aa4f1f17abd0e37f741bead2fda54b9 Mon Sep 17 00:00:00 2001 From: AIOS Governed Continuation Date: Sun, 9 Aug 2026 15:09:29 +0800 Subject: [PATCH] fix(v2r2c1): project credential path for gitea publisher --- .../app/aios_chatgpt_bridge_v2_server.py | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/active-runtime/app/aios_chatgpt_bridge_v2_server.py b/active-runtime/app/aios_chatgpt_bridge_v2_server.py index 641cf3c..6aec5db 100644 --- a/active-runtime/app/aios_chatgpt_bridge_v2_server.py +++ b/active-runtime/app/aios_chatgpt_bridge_v2_server.py @@ -350,8 +350,24 @@ def serve(adapter: BridgeV2Adapter, host: str = "127.0.0.1", port: int = 18892) def main() -> None: state_root = Path("/var/lib/aios-gitops/bridge-v2-staging") - config = RuntimeConfig(os.environ.get("AIOS_CONTROL_PLANE_TARGET_OID", ""), Path("/data/aios-gitops/repo.git"), state_root, state_root / "jobs", Path(os.environ.get("AIOS_GITEA_TOKEN_FILE", "/run/credentials/aios-chatgpt-bridge-v2-staging.service/gitea_token")), Path(os.environ.get("AIOS_GITEA_SSH_KEY_PATH", "/home/aiman/.ssh/id_ed25519_codex_tmp")), target_version=os.environ.get("AIOS_CONTROL_PLANE_TARGET_VERSION", "V2R2C1")) - runtime = GovernedRuntime(config); serve(BridgeV2Adapter(runtime_status=runtime.runtime_status(), handlers=runtime.handlers()), port=int(os.environ.get("AIOS_BRIDGE_V2_PORT", "18892"))) + token_path = Path(os.environ.get("AIOS_GITEA_TOKEN_FILE", "/run/credentials/aios-chatgpt-bridge-v2-staging.service/gitea_token")) + ssh_key_path = Path(os.environ.get("AIOS_GITEA_SSH_KEY_PATH", "/home/aiman/.ssh/id_ed25519_codex_tmp")) + os.environ["CREDENTIAL_FILE"] = str(token_path) + os.environ.setdefault("GITEA_MACHINE_ACTOR", "aios-autonomy-agent") + config = RuntimeConfig( + os.environ.get("AIOS_CONTROL_PLANE_TARGET_OID", ""), + Path("/data/aios-gitops/repo.git"), + state_root, + state_root / "jobs", + token_path, + ssh_key_path, + target_version=os.environ.get("AIOS_CONTROL_PLANE_TARGET_VERSION", "V2R2C1"), + ) + runtime = GovernedRuntime(config) + serve( + BridgeV2Adapter(runtime_status=runtime.runtime_status(), handlers=runtime.handlers()), + port=int(os.environ.get("AIOS_BRIDGE_V2_PORT", "18892")), + ) if __name__ == "__main__": main()