# task-2775+3 보고서 — STOP_REPORT (구현 미진행, PR #255 무변경)

- 작업 ID: task-2775+3
- 팀: dev2-team (오딘 / 토르·헤임달 분석 보조)
- 상태: **STOP_REPORT** — task 명시 STOP 조건 발동, 우회 0. **+3 코드 미push, PR #255 open 유지.**
- 결과 한 줄: **expected_files(driver) 변경을 push하지 않음.** task의 STOP 조건
  ("test-2760에 `main()` 직접 호출 케이스 발견 시 즉시 STOP")이 **실측으로 충족**되었고,
  audit의 안전 전제("test-2760 main() 미경유")가 **거짓**임을 코드+실행으로 확인. 회장 판단 필요.

---

## S (Situation)
+2(`20875ef6`)는 epoch 부재/손상 fail-closed를 `activation_intended=True`에서만 발동하도록
`is_activated_fn`을 조건부 주입한다. 운영 경로(`python3 -m dispatch.anu_pickup_driver` → `main()`)는
`activation_intended=False`로 돌아 안전장치가 미발동(`ACTIVATION_INTENDED_WIRING_GAP`).
+3 지시: `main()`의 `limited_activation_bound_gate()` 호출부에서 `is_activated_fn`을
`lambda: is_activated(CANONICAL_ROOT) and read_callback_launch_enabled(CANONICAL_ROOT)`로
**무조건(activation_intended 가드 제거) 재결선**하여 운영 경로에도 fail-closed가 걸리게 하는 것.

## C (Complication) — STOP 조건 실측 충족
task 파일 STOP 조건(명시): **"test-2760에 `main()` 직접 호출 케이스가 발견되는 경우(현 audit상
부재 추정이나 구현 중 발견 시 즉시 STOP)."**

구현 직전 재확인 결과, **부재 추정이 거짓**이었다:

- `tests/regression/test_p0b_event_strategy_wiring_2760.py`는 **`drv.main()`을 직접 호출**한다
  (라인 159·168·175·183·190, 총 5개 테스트). 호출 전 `drv.is_activated`를 `_set_flags(driver_on=...)`로
  **monkeypatch**한다 (라인 148–150).
- audit(`task2775p3_..._readonly_audit_260626.md` §5)의 안전 근거는 **"test-2760은 main()을 경유하지
  않음(함수 직접 호출만)"** 이었고, "+3 구현 시 test-2760의 main() 직접 호출 부재 재확인 필요"를
  자기조건으로 명시했다. 그 **재확인이 FAIL**.

### 왜 이것이 실질적 회귀 위험인가 (irreducible 설계 충돌)
+3는 `if activation_intended` 가드를 제거해 `is_activated_fn`을 **무조건** 주입한다. test-2760 wiring은
바로 그 default `main()`(activation_intended=False)을 호출하므로, +3 적용 후 test-2760 wiring 테스트의
bound-gate 평가가 **실제 flag/epoch 파일 상태에 결합**된다:

- combo = `is_activated(CANONICAL_ROOT)` (test가 patch → True) **AND**
  `read_callback_launch_enabled(CANONICAL_ROOT)` (**test가 patch 안 함** — lazy import, 실 FS read).
- `CANONICAL_ROOT = /home/jay/workspace` (실측). 현재 `p0b_callback_launch_enabled` **부재** → False.
- 따라서 **현재는** combo=False → bound gate pass-through → test-2760 통과(우연한 안전).
- 그러나 **activation 시(=이 flag의 존재 목적)** callback flag ON → combo=True →
  `p0b_activation_epoch` 부재 순간 bound gate가 `NOOP_ACTIVE_EPOCH_MISSING_AUTO_DISABLED`로 트립 →
  `main()`이 `scan_live` **이전에 return 0** → `test_both_flags_on_uses_live_not_scan_once`·
  `test_live_branch_reuses_owner_and_callback_contract`가 **scan_live_calls==0으로 FAIL**.

즉 +3의 목적(activation_intended=False 운영 경로에 fail-closed 결선)은 test-2760 wiring이 쓰는
**동일한 default main() 진입점**을 공유하고, test-2760이 `is_activated`를 True로 patch하므로,
두 경로를 가르는 판별자가 없다. callback flag OFF(현재)에선 우연히 안전하나 **ON(activation)에서 깨진다.**
이는 test-2760의 hermeticity를 깨는 것 = forbidden(test-2760 무수정/무손상) 위배.

## Q (Question)
+3를 audit 1줄 골자대로 push해도 되는가? → **아니오.** STOP 조건 실측 충족 + activation 시점 회귀.

## A (Answer) — STOP, 회장 판단 위임
- **+3 코드 미push.** PR #255(`task/task-2775-dev2`) **무변경, open 유지.**
- driver/테스트 **수정 0**. worktree clean.
- 회장 결정 옵션(보고만, 자동 진행 0):
  1. **재설계**: bound gate의 fire-capable 판별을 test-2760이 patch하지 않는 신호로 (예: 별도 운영
     전용 sentinel/env, 혹은 entrypoint(`__main__`)에서만 `activation_intended=True` 전달) 결선 →
     test-2760 default main() 경로 불변. (단 이는 audit "1줄 골자"를 벗어남 → 신규 승인 필요.)
  2. **test-2760 hermeticity 보정 동반 승인**: wiring 테스트가 `read_callback_launch_enabled`도
     patch하도록 — 단 **test-2760 수정은 본 task forbidden**이므로 별도 task/승인 필요.
  3. **+3 보류/철회**: gap을 운영 entrypoint 측(`__main__`에서 activation_intended 전달)으로 옮기는
     별도 task로 분리.

## 실측 증거 (직접 관찰)
- STOP 트리거: `grep "drv.main()" test_p0b_event_strategy_wiring_2760.py` → 라인 159/168/175/183/190.
- patch 지점: 동 파일 148–150 `_set_flags` → `drv.is_activated = lambda: driver_on`.
- 영향 실증(scratch, 실 flag/repo 무변경 — `plus3_impact_demo.py`):
  - driver patched True + epoch 부재 + `callback=False` → bound gate **tripped=False** (pass-through).
  - driver patched True + epoch 부재 + `callback=True`  → bound gate **tripped=True**
    (`NOOP_ACTIVE_EPOCH_MISSING_AUTO_DISABLED`) → main() scan_live 이전 return 0 → **test-2760 FAIL**.
- 환경 상태: `CANONICAL_ROOT=/home/jay/workspace`, `p0b_driver_enabled=disabled`,
  `p0b_callback_launch_enabled` **부재**, `p0b_activation_epoch` **부재**.
- `read_callback_launch_enabled`는 fire-capable 최종 게이트와 **일치**
  (`anu_callback_launch_audit.py:125` 정의, `:317`에서 실발사 차단 게이트로 사용, `__all__` export).
  → STOP 사유는 "게이트 불일치"가 아니라 **"test-2760 main() 직접 호출"** 항목.

## L1 스모크테스트 결과
- 서버 재시작: 해당없음 (코드 변경 0 — STOP, push 미진행).
- API 응답 확인: 해당없음 (driver entrypoint 미실행 — real fire 0 유지).
- 스크린샷: 해당없음 (백엔드/non-UI).
- 대체 실측(기준선, 현 HEAD `20875ef6`):
  - `test_limited_activation_bounds_2775.py` → **24 passed**.
  - `test_p0b_event_strategy_wiring_2760.py` + `test_p0b_event_strategy_2760.py` → **36 passed**.
  - `python3 -m py_compile dispatch/anu_pickup_driver.py` → **OK**.
  - +3 영향 실증(scratch) → callback ON 시 test-2760 wiring FAIL 재현(위 증거).

## 결과 보고 (task 요구 항목)
- PR #255 유지 여부: **유지(open), 무변경.**
- base SHA: `e8925d91` (origin/main) / head SHA: `20875ef6` (**갱신 없음**).
- expected_files 2개 내 diff 증거: **diff 0** (driver·테스트 무수정). STOP으로 미구현.
- flag 조합별 L1: 위 "영향 실증" — callbackOFF=pass-through(무손상) / callbackON+epoch부재=트립
  (단 이는 test-2760도 동반 트립시켜 FAIL → STOP 근거).
- test-2760 결과: **36 passed (현 HEAD 무손상)**. +3 적용 시 activation 시점 FAIL 위험(STOP 사유).
- 2775 bounds 결과: **24 passed (현 HEAD)**.
- ACTIVE=false / systemd disabled / flags OFF / real fire 0 / canary 0: **모두 유지** (코드/flag 무변경).
- **MERGE_CANDIDATE 가능 여부: 불가(NO).** 변경 없음 + STOP. 회장 재설계/승인 판단 대상.

## 금지사항 준수
merge 0 / activation 0 / real fire 0 / `systemctl enable·start` 0 / activation flag 생성 0 /
canary 0 / recurring 0 / backlog consumption 0 / test-2760 수정 0 / 새 PR 0. ACTIVE=false 유지.

## 모델 사용 기록
- 팀장(오딘, Opus): 분석·STOP 판정·보고서. 코드 변경 0(STOP)이라 팀원 코딩 위임 없음.
- haiku 미사용.

## ANU callback
- executor는 callback cron을 자가 등록하지 않음(`callback_schedule_created:false`, OS-level pickup
  runner가 owner-proof 후 closeout 소유). result.json에 `relay_hints.consolidated_report=true`로
  STOP 에스컬레이션 relay 표식. self-key 발사 0.
- result.json: `memory/events/task-2775+3.result.json`.
