feat(loop): complete Issue #5 Phase 4 immutable runtime and freeze removal
- Implement eager module loading (lib_py.loop.eager) to preload all framework dependencies into sys.modules and enforce PYTHONDONTWRITEBYTECODE=1. - Synchronize runtime protocol version with MAM_VERSION constant (4.3.0). - Bypass /tmp/mam-loop-freeze.XXXXXX copy overhead by default in Python mode while preserving legacy rollback fallback (MAM_LOOP_PY=0 / MAM_LOOP_FREEZE=1). - Add tests/test_issue5_phase4_runtime.py verifying eager import completeness, mid-flight code modification immunity (B-13), and freeze bypass. - Pass full test suite (749 tests, 0 failures).
This commit is contained in:
1 parent
8cd256cc7a
commit
f413f6ada6
6 files changed
+390
-11
No files matched your search
@@ -129,7 +129,11 @@
|
||||
|
||||
---
|
||||
|
||||
## Phase 4: 불변 런타임 검증 및 Freeze 제거 (후속)
|
||||
- [ ] **P4-01** eager import+child/helper/template 실행 버전 정책 구현/검증.
|
||||
- [ ] **P4-02** 실행 중 코드 교체와 늦은 재심/승격/rollback 스트레스 검증.
|
||||
- [ ] **P4-03** gate 통과 후에만 Freeze 제거 및 운영 문서 갱신.
|
||||
## Phase 4: 불변 런타임 검증 및 Freeze 제거 (완료)
|
||||
- [x] **P4-01** eager import+child/helper/template 실행 버전 정책 구현/검증.
|
||||
- *증거*: `.agents/skills/lib_py/loop/eager.py` 구현 및 `runner.LoopRunner.__init__`에서 최우선 호출. 모든 표준/프레임워크 코어 모듈(47개+)을 기동 시점에 `sys.modules`에 상주시킴. `sys.dont_write_bytecode = True` 및 `PYTHONDONTWRITEBYTECODE=1` 환경 설정으로 `.pyc` 디스크 오염 원천 차단. `FRAMEWORK_VERSION="4.3.0"`과 `MAM_VERSION` 불일치 시 fail-closed 검증 (`test_p4_01`).
|
||||
- [x] **P4-02** 실행 중 코드 교체와 늦은 재심/승격/rollback 스트레스 검증.
|
||||
- *증거*: `tests/test_issue5_phase4_runtime.py::test_p4_02_midflight_code_replacement_stress`. 실행 중인 서브프로세스의 디스크 상 소스 파일 및 워커 모듈을 문법 오류(`INVALID SYNTAX`, `unexpected EOF`)로 치환/파괴한 상태에서도 메모리 상주 바이트코드와 AST를 통해 판정 파싱(`parser.parse_verdict`), 체크포인트 원자적 기록/복구(`checkpoint.save_checkpoint`/`load_checkpoint`)가 무결하게 완결됨을 실증.
|
||||
- [x] **P4-03** gate 통과 후에만 Freeze 제거 및 운영 문서 갱신.
|
||||
- *증거*: `run_loop.sh`의 기본 Freeze 스냅샷 생성(`/tmp/mam-loop-freeze.XXXXXX`)을 우회(Python 모드 `MAM_LOOP_PY=1` 기본값 시 복사 I/O 완전 제거). 긴급 롤백 경로(`MAM_LOOP_FREEZE=1` 또는 `MAM_LOOP_PY=0`) 정상 보존. 전체 회귀 테스트 스위트 749개(744개 유닛/통합 + 5개 Tier 4 E2E) 100% 0-Fail 통과.
|
||||
|
||||
Reference in new issue
Block a user