Skip to content

설치 스킬 공통 AppContainer 실행과 전수 검증 - #329

Merged
rkttu merged 6 commits into
developfrom
fix/all-skill-appcontainer-execution
Oct 27, 2026
Merged

rkttu merged 6 commits into
developfrom
fix/all-skill-appcontainer-execution

Conversation

@rkttu

@rkttu rkttu commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

설치한 BOK와 KOSIS에 실행 도구가 등록되지 않던 문제를 수정했습니다. 활성 패키지의 Python 및 Node.js 진입점을 공통 MCP에 등록하고 작업 폴더와 설치 폴더가 달라도 고정한 패키지 snapshot을 AppContainer에서 실행합니다. Python 표준 라이브러리, Node.js 내장 모듈과 등록한 로컬 의존성을 지원합니다. pip/npm/npx 설치와 임의 외부 MCP는 지원 범위에 포함하지 않습니다.

작업자의 네트워크 capability는 부여하지 않습니다. 지정한 BOK/KOSIS 공개 HTTPS GET만 목적지, DNS/IP, 리다이렉트, 헤더와 요청 예산을 검사한 호스트 중계로 제공합니다. shell_tool=false, unified_exec=false, 읽기 전용 Codex 샌드박스와 승인 정책 never를 유지합니다. 호스트 인증정보와 API 키 환경 변수를 작업자에 전달하지 않습니다.

기존 ZScaler 호환성 옵션을 전용 스킬의 호스트 네트워크 경로에 연결했습니다. 앱은 매 AI 요청마다 저장된 설정을 읽고 신뢰 manifest의 useSystemProxy에 반영합니다. 옵션을 켜면 호스트가 선택한 기본 프록시를 고정해 사용하며, 꺼져 있으면 기존 직접 연결을 유지합니다. 주소나 인증정보를 스킬 인수로 받지 않습니다. 정확히 선택한 프록시의 CONNECT 연결에만 사설 또는 loopback 주소를 허용하고 요청과 리디렉션마다 공개 원본 DNS 제한을 유지합니다.

Python 및 Node.js 작업자는 계속 네트워크 권한 없이 실행합니다. 지원하는 HTTPS 요청은 Windows TLS 신뢰를 사용하는 호스트가 처리합니다. 런타임 다운로드도 주입한 named HTTP client로 통일하고 기존 호스트 신뢰와 기본 프록시 동작을 유지했습니다. 별도 CA 묶음과 임의 프록시 환경을 작업자에 전달하거나 TLS 검증을 생략하지 않습니다. 프록시 인증과 사설 주소로 해석되는 원본은 지원한다고 확대하지 않습니다. 영어와 한국어 옵션 안내 및 스킬 네트워크 문서도 갱신했습니다.

Copilot 지적 4건을 반영했고 각 검토 스레드에 수정과 재현 방법을 답글로 남겼습니다.

  • Python 요청 ID 증가, 파일 쓰기, 응답 복사까지 전체 교환 잠금
  • 파일 Length에 의존하지 않는 16,385바이트 고정 버퍼와 요청 상한 검사
  • 패키지별 파일 및 디렉터리 합산 1,024개 예산과 정상 스킬 보호
  • KOSIS HTTP 200 외에 실제 검색 행, 유효한 표 식별자와 애플리케이션 오류 검사

실제 Setup 설치 테스트에서는 추가 결함을 발견했습니다. 기존 %LOCALAPPDATA%\TableCloth\ManagedAi가 Velopack 설치 루트 안에 있어 전체 Setup 덮어쓰기가 전용 프로필, 스킬과 런타임도 삭제했습니다. 사전 백업은 프로그램 파일만 포함해 이전 프로필 전체를 복구하지 못했습니다. 공개 스킬 7개를 고정 원본과 대조해 복원하고 전용 프로필에 다시 로그인했습니다. 원래 인증정보나 사용자 수정 전체를 복구했다는 뜻은 아닙니다.

AI 저장소를 설치 루트 밖의 %LOCALAPPDATA%\TableCloth.Data\ManagedAi로 이동했습니다. 생존한 기존 저장소는 표식, 사용자 소유권, 재분석 지점, 충돌과 작업 잠금을 검사한 뒤 이전합니다. 이전 버전에서 새 Setup을 바로 실행하면 앱 시작 전에 기존 경로를 삭제할 수 있습니다. 기존 저장소를 삭제 전에 이전하면 최초 업그레이드의 데이터를 보존할 수 있습니다. 이번 자동 이전만으로 이 경로의 보존을 보장하지 않습니다. 관련 제한을 양쪽 스킬 문서에 기재했습니다.

수정한 x64 NativeAOT 제품 22101834295f5b41622b1d1f9d7ec3b74eec91e6을 로컬 패키지 1.22.0-preview.8.local.build.22101834로 실제 설치했습니다. 게시 원본, nupkg 내부, 실제 설치본과 실행 관측의 제품 SHA-256은 모두 89a3a8ffe150791d88ec1e0c0df339e7dd2ac2372dbb110e4f82bd93a3b97a5c로 일치했습니다. 492adc33과 67c63ece는 이 설치 검사본의 제품 소스를 바꾸지 않았습니다. 아래 ZScaler 보강은 이후 커밋 58310490에서 구현했으며 새 NativeAOT 중계기로 별도 검증했습니다.

실제 설치 GUI에서 GPT-6-Sol로 BMI, BOK와 KOSIS를 요청했습니다. 독립 Win32 관찰기는 런타임 점검 6개를 제외하고 설치된 중계기 3개와 직접 자식 Python 5개를 확인했으며 작업자 토큰의 TokenIsAppContainer=true를 측정했습니다. GUI 원시 MCP를 저장하지 않았으므로 이 관측만으로 도구 인수나 UI 숫자의 대응을 확정하지 않습니다. 중간 Codex 프로세스 계보도 관찰기의 실행 중 자손 필터에 의존합니다.

별도로 실제 설치 경로에 진단 부모를 배치해 식탁보 전용 Codex CLI 0.156.1과 GPT-6-Luna의 원시 MCP를 수집했습니다. 부모는 관리형 .NET 진단 프로그램이며 자식 MCP는 실제 설치된 NativeAOT 제품입니다. GUI 자체를 이 관리형 검사로 대체했다고 표기하지 않습니다.

활성 카탈로그 스킬 직접 대조한 증거
bok-ecos-stats MCP key/limit 1/timeout 15, 실제 지표 1행, 종료 코드 0, 중계기 6212의 직접 자식 Python 26136의 커널 AppContainer 토큰
kosis-stats MCP 인구 검색 1행, ORG_ID=101 및 TBL_ID=DT_1BPA002, 종료 코드 0, 중계기 15392의 직접 자식 Python 36108의 토큰
tablecloth-calculators 자연어 요청에서 실제 BMI 입력 171cm/80kg 및 결과 27.36, 중계기 48084의 직접 자식 Python 44960의 토큰
official-report-skillset 가상 입력의 문서 초안 응답, 스크립트 실행 및 지침 파일 열람 증명과 구분
tablecloth-certificate-expiry 합성 만료 1건 및 30일 이내 2건 해석, 실제 인증서 검색 미수행
tablecloth-windows-sandbox 합성 세션 0개 해석, 실제 Sandbox 제어 미수행

모든 대화에서 command_execution, error와 turn.failed는 0건이었습니다. 생산자가 종료하고 임시 파일을 정리한 뒤 별도 읽기 전용 프로세스가 외부 기준 제품 해시로 검사 32개와 증거 파일 55개의 해시를 확인했습니다. 요약의 성공 플래그와 모델의 스킬 사용 진술만으로 통과하지 않습니다. 저장 기록의 일관성 검사는 악의적인 생산자의 전체 기록 위조를 암호학적으로 배제하지는 않습니다.

추가 실측도 같은 설치본에서 수행했습니다.

  • 계산기 22개 연산의 전체 결과 JSON 일치
  • Python import, Node.js CommonJS/ESM 및 공개 GET, 환경 변수 제외, 호스트 파일과 직접 소켓 차단 사례 7개 및 독립 OS 토큰 관측 통과
  • Python 동시 요청 및 오류 후 복구 통과, 이전 함수를 넣은 대조군에서 응답 혼선과 종료 코드 1 재현
  • 전체 Setup 반복 설치 후 전용 로그인 바이트 및 공개 스킬과 상태 파일 등 비밀정보 제외 파일 116개의 보존 확인
  • 설치본 검사 후 임시 진단 자산 90개와 디렉터리 10개 정리, 원래 제품 파일 9개의 해시 불변 확인

재현 및 검증 절차를 추가했습니다. 로컬 보고서와 원시 증거는 Artifacts/installed-aot-validation/22101834/VALIDATION.ko.md 및 그 하위 경로에 보존했습니다. 인증 내용과 인증 해시를 저장하지 않았으므로 인증 보존의 전후 비교는 당시 검사 프로세스의 메모리 내 비교 결과에 한정합니다.

앞선 도구 커밋 67c63ecea4cc2118d2199df6895b4aa27cd9f7a0의 CI #619가 최종 성공했습니다. Debug/Release 및 x64/arm64 네 조합의 테스트, NativeAOT 게시, Velopack 패키징과 산출물 업로드를 통과했습니다. 네 작업의 실제 로그에서 각각 Spork 43개, TableCloth 359개, Managed AI 413개로 총 815개 테스트 통과, 실패 0개와 건너뜀 0개를 확인했습니다. Debug 두 구성에는 기존 Avalonia.Diagnostics의 IL2104 및 IL3053 경고가 있습니다.

ZScaler 보강 커밋 58310490b17b6e20de2537cf8c6c7effc87fb717은 Managed AI 443개와 앱 366개 회귀 검사를 통과했습니다. 실제 loopback CONNECT 및 합성 CA TLS 검사 16개는 이 443개에 포함합니다. 인증서 호스트 이름 불일치, 만료와 신뢰하지 않는 발급자를 거부했고 프록시 선택 변경, 인증정보 전달, 사설 및 혼합 DNS와 변조 manifest를 검사했습니다. 최초 TLS fixture의 서버 개인 키 문제로 발생한 실패를 수정한 뒤 해당 16개와 전체 회귀 검사를 다시 실행했습니다. 제품의 TLS 검증 조건은 완화하지 않았습니다.

새 x64 NativeAOT 제품의 SHA-256은 5574b1d41028d1d6b396e45f647a7d8f33f519474691ad9d88b1bccb20c44ab3입니다. 기존 설치본과 분리한 이 제품에서 7개 fixture를 실행하고 공개 API로 이어지는 CONNECT 3개와 AppContainer 작업자 7개의 커널 토큰을 확인했습니다. 원시 MCP 요청과 응답 및 실제 이미지 해시도 별도로 대조했습니다. 이번 fixture의 실제 API 요청은 Node.js 사례에서 수행하며 Python 가져오기 및 격리 거부 사례도 포함합니다. 검사용 프록시는 TLS를 종료하지 않고 암호화된 바이트만 중계했습니다. 실제 ZScaler 인증서 검사 체인이나 기업 인증 프록시의 성공까지 입증하지는 않습니다. 로컬 증거는 Artifacts/zscaler-network-validation/58310490/VALIDATION.ko.md와 하위 TRX 및 원시 로그에 보존했습니다.

최신 커밋 58310490b17b6e20de2537cf8c6c7effc87fb717의 CI #620이 최종 성공했습니다. Debug/Release 및 x64/arm64 네 작업의 실제 로그에서 각각 Spork 43개, 앱 366개, Managed AI 443개로 총 852개 통과, 실패 0개와 건너뜀 0개를 확인했습니다. NativeAOT 게시와 Velopack 패키징 및 업로드도 성공했습니다. Debug 구성에는 기존 Avalonia.Diagnostics IL2104 및 IL3053 경고가 있습니다.

앞선 설치 검사는 미서명 로컬 패키지로 수행했습니다. 이번 ZScaler 보강의 NativeAOT 검사는 기존 설치본을 교체하지 않고 별도 경로에서 실행했습니다. 새 태그와 공개 릴리스를 생성하지 않았습니다. Windows 10 22H2 및 ARM64 실제 기기의 설치와 GUI 실행은 검증하지 않았습니다. PR은 열린 상태로 유지합니다.

@rkttu
rkttu marked this pull request as ready for review October 27, 2026 04:50
Copilot AI balanced review requested due to automatic review settings October 27, 2026 04:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved broker resource limits, concurrent response handling, package isolation, and smoke-result validation issues affect safety and correctness.

4 open issues
What changed in this PR

This PR extends TableCloth’s calculator-only integration into a shared execution path for installed Python and Node.js skills, while preserving AppContainer isolation and existing host-report workflows.

Changes:

  • Adds per-invocation package snapshots, generic MCP registration, and bounded public HTTPS transport for eligible skills.
  • Supplies pinned public instructions and references without forwarding local document bodies through the new context path.
  • Expands regression coverage, adds reproducible smoke checks, and separates current documentation from historical verification records.
File Description
tools/​managed-skill-smoke/​README.md Documents smoke checks and evidence limits.
tools/​managed-skill-smoke/​README.ko.md Provides Korean smoke-tool guidance.
tools/​managed-skill-smoke/​native-fixtures/​Invoke-NativeSkillSmoke.ps1 Exercises native execution, networking, and isolation fixtures.
tools/​managed-skill-smoke/​calculator-cases.json Defines expected results for 22 calculator operations.
tools/​managed-skill-smoke/​AllSkillsProbe.csproj Builds the diagnostic probe with product-host integration.
tools/​managed-skill-smoke/​.gitignore Excludes generated outputs and evidence.
src/​TableCloth.Test/​ManagedAiDependencyInjectionTests.cs Tests shared runtime injection and updated registrations.
src/​TableCloth.ManagedAi.Windows/​WindowsManagedAiSkillExecution.cs Discovers scripts and creates isolated package snapshots.
src/​TableCloth.ManagedAi.Windows/​ScriptRuntimeManager.cs Exposes the injectable execution-runtime contract.
src/​TableCloth.ManagedAi.Test/​WindowsSkillRegistrationTests.cs Covers generic registration, provenance, and snapshot integrity.
src/​TableCloth.ManagedAi.Test/​SkillExecutionBridgeTests.cs Tests multiple explicit tools and retained execution policies.
src/​TableCloth.ManagedAi.Test/​InstalledSkillPromptContextTests.cs Tests public-document fetching, filtering, caching, and limits.
src/​TableCloth.ManagedAi.Test/​GenericSkillExecutionTests.cs Covers broker inputs, package integrity, and network restrictions.
src/​TableCloth.ManagedAi.Test/​BadSkillIsolationTests.cs Tests incompatible-package isolation and registration budgets.
src/​TableCloth.ManagedAi.OpenAi/​OpenAiCodexProvider.cs Adds public skill context to chat prompts.
src/​TableCloth.ManagedAi.OpenAi/​Execution/​OpenAiCodexInvocationBuilder.cs Registers generic MCP tools and describes permitted execution.
src/​TableCloth.ManagedAi.OpenAi/​Execution/​OpenAiChatPromptFactory.cs Distinguishes approved skill calls from arbitrary host commands.
src/​TableCloth.ManagedAi.OpenAi/​Execution/​InstalledSkillPromptContext.cs Fetches bounded, commit-pinned public skill documents.
src/​TableCloth.ManagedAi.Core/​SkillExecution.cs Adds per-invocation snapshot cleanup.
src/​TableCloth.ManagedAi.AppContainer/​Broker/​SkillNetworkBridge.cs Implements bounded host-mediated public HTTPS requests.
src/​TableCloth.ManagedAi.AppContainer/​Broker/​SkillMcpBroker.cs Advertises generic script tools and input schemas.
src/​TableCloth.ManagedAi.AppContainer/​Broker/​SkillExecutionRegistry.cs Executes packaged scripts with optional network adapters.
src/​TableCloth.ManagedAi.AppContainer/​Broker/​EvaluationManifest.cs Validates generic registrations and package inventories.
src/​TableCloth.App/​ViewModels/​SkillSettingsItem.cs Clarifies the Korean enabled-state label.
src/​TableCloth.App/​DependencyInjection/​ManagedAiWindowsServiceCollectionExtensions.cs Wires execution runtimes and optional marketplace metadata.
docs/​SKILL_MARKETPLACE.md Documents current execution paths and boundaries.
docs/​SKILL_MARKETPLACE.ko.md Updates Korean marketplace and execution guidance.
docs/​poc/​appcontainer-product-integration.md Separates historical calculator evidence from current behavior.
docs/​poc/​appcontainer-product-integration.ko.md Makes the same historical distinction in Korean.

Review effort: Balanced

Comment thread src/TableCloth.ManagedAi.AppContainer/Broker/SkillNetworkBridge.cs Outdated
Comment thread src/TableCloth.ManagedAi.Windows/WindowsManagedAiSkillExecution.cs
Comment thread tools/managed-skill-smoke/native-fixtures/Invoke-NativeSkillSmoke.ps1 Outdated
@rkttu
rkttu merged commit 08a9370 into develop Oct 27, 2026
7 checks passed
@rkttu
rkttu deleted the fix/all-skill-appcontainer-execution branch October 27, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants