docs(issue-5): correct the phase 2b operations note and the stale references
The important correction is an honesty one, raised independently by two reviewers. The note claimed startup recovery runs in the subscriber. It does not: nothing in production imports the gate or the recovery function, and there is no per-job opt-in path, so the flag is currently a no-op in the live loop. Phase 2b delivers a verified library and gate; wiring it in belongs to phase 3, and the note now says so and lists what wiring requires. Also records the checks that are now mandatory rather than caller-dependent, that the rollback switch disables auto-completion too, that backend keys match exactly, that bookkeeping may touch one field, that settling is conditional on the intent actually sent, and why the intent's identity travels in the payload rather than relying on the transport sequence. Fixes three stale references: task.md named the pre-move path for finalize, the loop package description still described itself as shadow-only, and a comment in mqtt_common still pointed at the engine's original location. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UrDNJkHmm18uu7n7JwV5Qd
This commit is contained in:
1 parent
cb7ed1aa38
commit
d87674679d
4 files changed
+36
-6
No files matched your search
@@ -15,12 +15,25 @@
|
||||
|
||||
확정을 선언하지 않은 에이전트는 매니페스트를 남기지 않는다. 매니페스트가 없으면 정책이 이미 `hold`한다(Phase 2a에서 구현·테스트 완료). **"미지원 경로 100% 보존"은 새 분기가 아니라 기존 동작의 귀결이다.**
|
||||
|
||||
## 2-1. ⚠️ 아직 배선되지 않았다 (정직한 현황)
|
||||
|
||||
**`autocomplete.evaluate`와 `notifier.recover`를 호출하는 프로덕션 경로는 아직 없다.** `daemon.py`/`job_subscriber.py`/`cli.py`/`service.py` 어디도 이들을 임포트하지 않으며, `register`에 `auto_complete` opt-in 옵션도 없다. 즉 **현재 라이브 셸 루프에서 `MAM_AUTO_COMPLETE=1`은 무동작(no-op)이다.**
|
||||
|
||||
Phase 2b가 제공하는 것은 **검증된 라이브러리와 게이트**이며, 이를 감시 루프에 연결하는 배선은 Phase 3의 몫이다. 초기 문서가 "기동 시 재발행이 구독자에서 수행된다"고 적었던 것은 사실이 아니었으며 여기서 정정한다(교차 리뷰 `3fa76e08` O-1, `a0de0e5e` 잔여 1·2).
|
||||
|
||||
배선 시 필요한 것:
|
||||
1. 감시 루프에서 `evaluate(...)` 호출 — **`report_dir`는 필수 인자다.**
|
||||
2. 커밋 후 `notifier.flush(...)` 호출 — `evaluate`는 intent를 남길 뿐 발행하지 않는다.
|
||||
3. 기동 시 `notifier.recover(...)` 호출.
|
||||
4. `register`에 잡별 opt-in 경로 추가.
|
||||
|
||||
## 3. 3중 게이트 (전부 참일 때만 커밋)
|
||||
|
||||
| 게이트 | 기본값 | 근거 |
|
||||
|---|---|---|
|
||||
| `MAM_AUTO_COMPLETE=1` | **`0` (OFF)** | 전역 킬 스위치 |
|
||||
| 백엔드 허용목록 | `claude,grok,codex` | 정지 상태(`idle`/`done`) **관측 증거가 있는 백엔드만**. `agy`는 `working`만 관측, `hermes`·`opencode`는 관측 0건 |
|
||||
| `MAM_ENGINE_CAS=1` | `1` | `0`이면 자동완료도 함께 중단된다. 추론 완료는 CAS 경계 위에 서 있으므로, 경계가 롤백된 상태의 커밋은 그 경계를 우회하는 것이다 |
|
||||
| 백엔드 허용목록 | `claude,grok,codex` (+ `-code`/`-build`/`-cli` 정식 키) | 정지 상태(`idle`/`done`) **관측 증거가 있는 백엔드만**. `agy`는 `working`만 관측, `hermes`·`opencode`는 관측 0건. **정확 일치**로 비교한다 — 접두 일치라면 미래의 `claude-experimental`이 수집된 적 없는 증거를 물려받는다 |
|
||||
| 잡별 opt-in | 레코드 `auto_complete: true` | 잡 단위 동의 |
|
||||
|
||||
`MAM_AUTO_COMPLETE_BACKENDS`로 목록을 **좁힐 수만** 있다. 관측된 적 없는 이름은 무시된다 — 넓히려면 설정이 아니라 증거가 필요하다.
|
||||
@@ -49,7 +62,19 @@
|
||||
|
||||
- **독립 Outbox 저장소를 만들지 않는다**(`state-transitions.md` §5 명시). 이미 쓰는 레코드에 필드 하나를 더 쓴다.
|
||||
- **발행 실패는 의도적으로 intent를 남긴다.** 보내지 않은 알림이 보낸 것처럼 보이는 편이, 재시도되는 편보다 나쁘다.
|
||||
- `notification_settled`는 **상태를 바꾸지 않는 bookkeeping 요청**이라 terminal 상태에서도 허용된다. 알림은 terminal에 *관한* 것이므로, terminal이 거부하는 요청으로는 영원히 정리할 수 없다.
|
||||
- `notification_settled`는 **상태를 바꾸지 않는 bookkeeping 요청**이라 terminal 상태에서도 허용되며, **`pending_notification` 외의 필드는 쓸 수 없다**(경계에서 거부 — 현재 호출자가 그것만 넘긴다는 사실에 의존하지 않는다).
|
||||
- 정리는 **실제로 보낸 intent와 일치할 때만** 이루어진다. 발행은 락 밖에서 일어나므로 그 사이에 새 intent가 정당하게 들어올 수 있고, 무조건 지우면 아무도 보내지 않은 알림이 사라진다.
|
||||
- 발행 payload에 intent의 `seq`/`event`/`timestamp`를 실어 보낸다. **전송 계층 seq는 같은 intent의 재시도를 식별하지 못하므로**, 소비자는 `notification_intent`로 중복을 제거한다. 알림은 terminal에 *관한* 것이므로, terminal이 거부하는 요청으로는 영원히 정리할 수 없다.
|
||||
|
||||
## 5-1. 필수 검증 (교차 리뷰 반영, 전부 미충족 시 `hold`)
|
||||
|
||||
| 검증 | 없으면 |
|
||||
|---|---|
|
||||
| `report_dir` 인자 | `hold` — **선택이 아니다.** 생략하면 디스크 대조가 통째로 건너뛰어져 수집기의 자기 신고가 다시 판단 주체가 된다 |
|
||||
| 기록된 dispatch | `hold` — 귀속시킬 대상이 없다 |
|
||||
| 증거의 **대상 일치** | `hold` — 시나리오의 `job_id`·attempt·session·pane이 기록된 dispatch와 일치해야 한다. 정책은 시나리오 **내부**의 dispatch_context와만 비교하므로 구조상 항상 자기 일관적이다 |
|
||||
| 매니페스트 재계산 대조 | `hold` |
|
||||
| Reviewer 역할의 판정 토큰 | `hold` — Phase 0 안전 계약. 판정을 아직 쓰지 않은 리뷰어는 검토를 끝내지 않은 것이다 |
|
||||
|
||||
## 6. 무판정 fail-closed
|
||||
|
||||
|
||||
Reference in new issue
Block a user