CLI 자식 프로세스 환경에 Windows 필수 변수 백필
공개 런타임 승격 체인이 psutil로 이전 프로세스 환경을 통째로 이식하는 과정에서 SystemRoot 가 유실됐고, Go 계열 CLI(agy)는 시스템 인증서 풀/홈 해석에 SystemRoot 가 필요해 agy models 가 조용히 빈 목록을 반환했다(관리자 AI 운영 화면의 'Agy가 선택 가능한 모델을 반환하지 않았습니다' 두 번째 원인). - _cli_subprocess_env(): 상속 환경에서 빠진 SystemRoot/SystemDrive/ComSpec 만 기본값으로 백필해 모든 CLI 스폰(_run_process·codex app-server·agy stream·claude 세션)에 적용. os.environ 의 Windows 대문자 정규화를 고려한 대소문자 무시 조회 - Set-CompleteProcessEnvironment: 이식본에 빠진 Windows 필수 키를 Machine 스코프 표준값으로 병합해 승격 체인 자체의 유실을 원천 보강 - 검증: 신규 2단위 RED→GREEN, engine_gateway 65 passed, app 924 passed, PS 5.1 parser OK, SystemRoot 제거 환경에서 실제 agy CLI 14모델 live 조회 확인
This commit is contained in:
parent
5afd92f8f3
commit
6369f29439
4 changed files with 73 additions and 0 deletions
|
|
@ -41,6 +41,7 @@ from app.contracts.engine_gateway import (
|
|||
)
|
||||
from engine_gateway.provider_registry import (
|
||||
ProviderError,
|
||||
_cli_subprocess_env,
|
||||
discover_capabilities,
|
||||
generate_with_provider,
|
||||
stream_with_provider,
|
||||
|
|
@ -250,6 +251,7 @@ class EngineSession:
|
|||
stdin=asyncio.subprocess.PIPE,
|
||||
stdout=asyncio.subprocess.PIPE,
|
||||
stderr=asyncio.subprocess.PIPE,
|
||||
env=_cli_subprocess_env(),
|
||||
)
|
||||
self._stderr_task = asyncio.create_task(self._drain_stderr())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue