fix(loop): resolve B-13 by implementing runtime freeze snapshot and dual-root isolation

- Add Stage 2 runtime freeze snapshot at run_loop.sh bootstrap to prevent in-flight tooling mutations
- Implement dual-root architecture separating code execution (frozen snapshot) and workspace state (real repo)
- Ensure original argv preservation and safe cleanup of freeze directories in exit traps
- Add 5 regression guards in tests/test_o3_scoped_guard.py (271/271 PASS)
- Update IMPROVEMENTS.md, VERSIONS.md, and include peer review report
This commit is contained in:
2026-08-17 11:49:37 +09:00
parent 40576c44ab
commit 8cee9374b1
5 changed files with 332 additions and 30 deletions
+9
View File
@@ -78,6 +78,15 @@
- 회귀 가드 3종 신설 — 읽기 경로 부활 차단, `import yaml` AST 검사(지연 import 포함), 실행 경로 검증.
- 회귀 및 계약 테스트: **266/266 PASS (100%)** 달성.
#### 8. 셀프 호스팅 루프 런타임 프리즈 스냅샷 (B-13 / Stage 2)
- 루프 기동 시 `.agents/skills/``$TMPDIR` 에 1회 동결하고 스냅샷에서 재실행하여, 턴 도중 프레임워크 스킬 편집이 진행 중인 루프를 깨뜨리지 못하도록 차단.
- 코드 루트(스냅샷)와 상태 루트(`MAM_REAL_ROOT`)를 분리해 레지스트리·루프 락·diff 수집은 실제 저장소를 계속 사용.
- 재실행 시 원본 argv 를 배열로 보존해 인자 유실을 방지(파서가 `$@` 를 소비하므로 필수).
- 스냅샷 생성 실패 시 `log_*` 정의 이전 구간임을 고려해 `echo` 로 경고하고 미동결 진행.
- `MAM_LOOP_NO_FREEZE=1` 로 비활성화 가능. 스냅샷 생성 실패는 경고 후 기존 동작으로 폴백.
- 회귀 가드 5종 신설 — argv 보존, 파손 래퍼 면역, 스킬 트리 무오염(B-6 경계), 락 해제 및 스냅샷 정리(B-12 경계), 비활성화 스위치.
- 회귀 및 계약 테스트: **271/271 PASS (100%)** 달성.
---
### 🛠️ `v1.4.0` — Stability, Cleanup & Safe Job Delegation (2026-08-16)