Sanctum LLM 운영 리스크와 가드레일 강화 보고서
보고서 목적
이 보고서는 Sanctum LLM 운영 모델의 핵심 실패 모드와 최소 가드레일을 의사결정 가능한 형태로 정리한다. 범위는 Graphify drift, stale SSOT, scope invasion, contract duplication, Codex App boundary limit, weak runtime enforcement다.
핵심 결론
Sanctum의 주요 위험은 LLM이 context를 적게 읽는 문제가 아니라 derived artifact를 canonical truth처럼 취급하거나 service worker가 repo-wide write 권한으로 경계를 침범하는 문제다.
contracts/를 engineering contract SSOT로 명시한다.- Graphify와 RAG를 derived navigation/retrieval layer로 라벨링한다.
- 각 서비스에
AGENTS.md와llm-context/를 둔다. llm-context/contracts.md는 canonical contract mapping만 포함한다.- Codex App은 personal exploration/review lane으로 제한한다.
- enforced worker는 discord-codex-bot runtime에서 실행한다.
- runtime write allowlist와 diff guard를 필수화한다.
- cross-service 변경은 handoff와 root/e2e agent를 통해 처리한다.
- Graphify graph에는 freshness metadata와 stale condition을 둔다.
- Derived Knowledge에는 source, confidence, validation state, stale condition을 기록한다.
원본 문서의 주요 내용
원본은 여섯 가지 위험을 정리한다. Graphify drift는 rename/delete/move, branch switch, merge/rebase, ignore rule change, shared file, semantic extraction failure로 graph가 실제 repo와 어긋나는 문제다. stale SSOT와 derived knowledge confusion은 Graphify graph, RAG DB, generated summary, LLM wiki, Notion, contracts/, service context pack이 뒤섞이는 문제다. scope invasion은 worker가 자기 서비스 밖 파일을 직접 수정하는 문제이며 주 원인은 Graphify가 아니라 repo-wide write access다. contract duplication은 llm-context/contracts.md가 contracts/ 내용을 복사해 drift를 만드는 문제다. Codex App boundary limit은 workspace separation을 hard boundary로 과신하는 문제다. weak runtime enforcement는 문서 규칙이 있어도 runtime allowlist, diff guard, approval scope가 없으면 강제력이 없다는 문제다.
Sanctum 적용 해석
| 대상 | 위험 | 운영 해석 |
|---|---|---|
wallet-api | downstream mismatch를 직접 고치려는 유혹 | kms-api, hd-manager, rust-mpc는 propose-only로 두고 handoff한다. |
kms-api | key lifecycle/auth boundary 손상 | 보안 민감 변경은 root/e2e 또는 owner approval이 필요하다. |
hd-manager | derivation 책임 경계 혼동 | wallet/KMS/MPC 영향이 있으면 local 변경으로 취급하지 않는다. |
rust-mpc/mpc-manager-rs | party coordination/protocol 변경의 외부 영향 | party-node-rs, API services, contracts 영향도를 root/e2e가 검토한다. |
rust-mpc/party-node-rs | local optimization과 protocol change 혼동 | protocol-level change는 manager와 contracts 영향 검토가 필요하다. |
contracts/ | contract fact 중복과 drift | canonical field/enum/schema truth는 이곳에만 둔다. |
| root/e2e agent | repo-wide super-worker화 | integration과 handoff coordination 중심으로 제한한다. |
운영 판단
리스크 대응의 우선순위는 SSOT와 derived layer 분리, runtime write boundary 강제, contract duplication 금지, Codex App personal lane 분리, root graph 우선 도입, root/e2e agent 역할 제한이다. context는 판단 품질을 높이지만 write boundary는 runtime에서 강제해야 한다.
리스크와 가드레일
1. Graphify drift
Graphify graph는 derived index다. branch switch, merge/rebase, rename/delete/move, ignore rule 변화, shared file 변경, semantic extraction failure 후 오래된 relation을 보여줄 수 있다.
- graph metadata에 branch, commit, generatedAt, scan root, ignore policy를 기록한다.
- graph 결과는 읽을 후보로만 사용한다.
- graph가 지목한 파일은 실제 파일을 직접 읽는다.
- stale condition 발생 시 decision source로 사용하지 않는다.
- service worker는 Graphify 추천 파일을 write allowlist와 propose-only rule로 다시 필터링한다.
2. stale SSOT와 derived knowledge 혼동
Notion human SSOT, contracts/, RAG DB, Graphify graph, service context pack, generated report가 같은 신뢰 등급처럼 취급될 수 있다.
- Product/operation SSOT와 engineering contract SSOT를 분리한다.
contracts/는 contract fact owner로 둔다.- RAG DB와 Graphify graph는 derived index/cache로 라벨링한다.
- Derived Knowledge에는 conclusion, reasoning, confidence, validation state, stale condition, source links를 포함한다.
- operational decision 전 canonical source를 직접 확인한다.
3. scope invasion
service worker가 테스트를 맞추거나 dependency mismatch를 해결하려고 다른 서비스 파일을 직접 수정할 수 있다.
- worker별 write allowlist를 runtime metadata로 둔다.
- propose-only path를 명시한다.
- diff guard가 실제 변경 파일을 검사한다.
- allowlist 밖 diff는 실패 또는 operator review로 격리한다.
- cross-service 변경은 handoff artifact로 전환한다.
4. contract duplication
llm-context/contracts.md가 canonical contracts/ 내용을 복사하면 stale contract truth가 생긴다.
- contract field, enum, endpoint truth는
contracts/에만 둔다. - service context에는 canonical path, producer/consumer 관계, usage point, test impact, handoff owner만 둔다.
- contract 변경 시 관련 service context mapping을 갱신한다.
- generated summary나 RAG answer가 contract fact를 말해도 변경 전
contracts/원문을 확인한다.
5. Codex App boundary limit
workspace separation을 hard boundary로 믿으면 out-of-workspace edit 가능성을 놓친다.
- Codex App은 개인 탐색, 리뷰, 설계 비교, 초안 작성에 사용한다.
- enforced service worker 실행은 discord-codex-bot runtime에서 수행한다.
- Codex App patch는 runtime guard가 있는 lane에서 재검토하거나 propose-only artifact로 취급한다.
- hard enforcement가 필요하면 sparse worktree, container/read-only mount, runtime write allowlist와 diff guard 중 하나를 사용한다.
6. weak runtime enforcement
좋은 문서와 context pack이 있어도 runtime 강제가 없으면 worker는 repo-wide 변경을 만들 수 있다.
- cwd allowlist, write allowlist, read boundary, propose-only boundary를 분리한다.
- approval scope는 자연어가 아니라 server-side structured metadata로 저장한다.
- approval button custom id에는 approval id만 두고 action/scope는 서버에서 조회한다.
- handoff에는 requesting worker, target owner, reason, evidence files, proposed change, expected tests, contract impact, e2e 필요 여부를 포함한다.
실행 체크리스트
- 현재 worker identity와 service scope를 확인한다.
- write allowlist와 propose-only path를 확인한다.
- Graphify graph metadata와 stale condition을 확인한다.
- 필요한 canonical
contracts/파일을 직접 읽는다. - RAG/summary 결과를 SSOT로 취급하지 않는다.
- Codex App 분석 결과인지 runtime worker 결과인지 lane을 구분한다.
- allowlist 밖 파일은 읽기 또는 handoff만 수행한다.
- contract fact를 service context에 복제하지 않는다.
- dependency service 구현 변경 필요성은 handoff로 기록한다.
- 변경 후 diff guard로 allowlist 밖 변경을 검사한다.
- contract 영향이 있으면 contract owner 또는 root/e2e agent 검토를 요청한다.
- Derived Knowledge validation state와 stale condition을 갱신한다.
관련 주제 연결
이 리스크 문서는 adoption roadmap의 모든 phase에 적용되는 공통 guardrail이다. 첫 파일럿 체크리스트는 이 리스크 문서를 실제로 검증하는 절차이며, topic-level 최종 통합 지식에서는 이 문서의 판단이 최종 운영 원칙으로 승격된다.