docs(issue-5): phase 2a contracts, scenarios and task checklist
Records what phase 2a actually delivers and, as importantly, what it does not: the shadow runner decides and logs, and nothing commits an inferred completion until 2b. state-transitions.md gains an implementation mapping so each contract row names the code and the test that hold it up, with the inferred-completed row marked as judged-but-not-committed. phase2a-shadow.md is the operations note: the rollback switch, the lock discipline and why transition_seq exists, the herdr wait rules that are easy to get wrong (milliseconds, always name --until, errors on stderr, a timeout is a healthy answer), the fail-closed decision order, and the 2b handoff. task.md records P2A-00..04 with commit evidence, including two corrections to my own plan: pick_pending was already a correct swap rather than a hole, and the engine had to live with the registry writers because putting it in lib_py/loop would have made delegation import a sibling and mix trees under a frozen loop. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UrDNJkHmm18uu7n7JwV5Qd
This commit is contained in:
1 parent
964abc6965
commit
17a2dcd988
4 files changed
+95
-9
No files matched your search
@@ -1,8 +1,8 @@
|
||||
# 📑 Issue #5 Task Checklist & Verification Evidence
|
||||
|
||||
- **Document Version**: Rev.6 (Phase 1 실행 완료 — P1-01~P1-03 증거 기록)
|
||||
- **Document Version**: Rev.7 (Phase 2a 실행 완료 — P2A-01~P2A-04 증거 기록)
|
||||
- **Issue**: [Gitea Issue #5](https://git.godopu.com/tmpl/multi-agent-mux/issues/5)
|
||||
- **Status**: Phase 0 Complete / **Phase 1 Complete (v4.3.0)** / Phase 2–4 Staged
|
||||
- **Status**: Phase 0 Complete / **Phase 1 Complete (v4.3.0)** / **Phase 2a Complete (shadow-only)** / Phase 2b–4 Staged
|
||||
|
||||
---
|
||||
|
||||
@@ -73,11 +73,20 @@
|
||||
|
||||
---
|
||||
|
||||
## Phase 2a: `lib_py/loop/` 코어 & Shadow Watcher (후속)
|
||||
- [ ] **P2A-01** 단일 engine/checkpoint와 모든 writer 공통 CAS 경계 구현.
|
||||
- [ ] **P2A-02** 4중 귀속/dispatch 증거/재연결 resnapshot/timeout/queue cancellation 처리.
|
||||
- [ ] **P2A-03** shadow-only watcher가 어떤 terminal도 쓰지 않음을 검증.
|
||||
- [ ] **P2A-04** race/attempt 재사용/부분 report/도구 실행/blocked/unknown/재시작 fixture 시나리오 실행.
|
||||
## Phase 2a: `lib_py/loop/` 코어 & Shadow Watcher (완료, shadow-only)
|
||||
|
||||
- [x] **P2A-00** 이동 전 writer 특성화 선행 (X-01~X-04, `MAM_ENGINE_CAS` 0/1 parametrize).
|
||||
- *증거*: 커밋 `9389d7e`. X-02가 계획서의 초기 가정을 정정한다 — `pick_pending`은 락 안에서 `pending`을 필터하므로 **이미 올바른 CAS**이며, 문제는 정확성이 아니라 **중복**이다.
|
||||
- [x] **P2A-01** 단일 전이 경계 구현 및 writer 2종 라우팅.
|
||||
- *증거*: 커밋 `2532e78`. `engine.transition`이 유일한 상태 writer. `state-transitions.md` §3 표 전 항목(claim/비terminal/explicit terminal/멱등 재수신/상충 거부+감사/stale attempt/deadline) 테스트. `MAM_ENGINE_CAS=0` 레거시 본체 보존.
|
||||
- *계획 대비 구조 정정*: 계획서는 `engine.py`를 `lib_py/loop/`에 두었으나, 그러면 `lib_py.delegation`이 **형제 패키지를 임포트**하게 되어 freeze 하에서 트리가 섞인다(Phase 1이 명문화한 규칙). Phase 1의 기존 가드 테스트가 이를 즉시 검출했고, 엔진을 레지스트리 writer들이 있는 `lib_py/delegation/`으로 옮겼다.
|
||||
- *락 규율*: 락은 판정 + 레코드 1회 쓰기만 덮고, 감사 mirror는 큐잉 후 락 해제 뒤 flush한다. 순서는 `transition_seq`로 복원한다. 락 보유 중 `subprocess`/`socket`/`sleep` 호출 0건을 테스트로 감시한다.
|
||||
- [x] **P2A-02** watcher·귀속·dispatch 증거·재연결 백오프.
|
||||
- *증거*: 커밋 `b49af56`. `--timeout`은 **밀리초**(파라미터명 `timeout_ms`), `--until` 항상 명시(생략 시 `working` 누락), exit 1은 **stderr**에서 파싱. 백오프 1→2→4→8→16s 상한, 실패 시 캐시 스냅샷 폐기. 귀속 증거는 **레지스트리가 아닌 shadow 전용 저장소**(`.mam/shadow/`)에 둔다 — 레코드에 3개 필드가 전부 없고 Phase 1이 스키마를 동결했기 때문.
|
||||
- [x] **P2A-03** shadow-only가 terminal을 쓰지 않음을 검증.
|
||||
- *증거*: 커밋 `964abc6`. `ShadowRunner`는 engine 참조를 **갖지 않는다**(구조적 차단, AST 단정). 측정: 전체 시나리오 실행 전후 **레지스트리 디렉터리 전 파일 SHA-256 동일**.
|
||||
- [x] **P2A-04** race/attempt 재사용/부분 report/도구 실행/blocked/unknown/재시작 시나리오.
|
||||
- *증거*: 신규 5종(`race_double_dispatch`, `attempt_reuse`, `partial_report`, `unknown_status`, `restart_midflight`)을 Phase 0 스키마로 작성해 **Phase 0의 `validate_watcher_scenario`를 통과**시켰고, 기존 7종과 합쳐 **12종 전부 `expected_policy.decision`과 일치**함을 단정한다.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user