<!-- task=m-mattermost-nexo-messaging-alignment plan=3 tag=REVIEW_REVIEW_REVIEW_SMOKE -->

# Plan - REVIEW_REVIEW_REVIEW_SMOKE

## 이 파일을 읽는 구현 에이전트에게

이 계획의 구현 완료는 active `CODE_REVIEW-cloud-G07.md`의 구현 에이전트 소유 섹션을 실제 내용으로 채우는 것까지 포함한다. 검증 명령을 실행하고 실제 stdout/stderr 또는 redacted 로그 경로를 기록한 뒤 active 파일을 유지한 채 리뷰 준비를 보고한다.

외부 Android runner, private secret, 원격 sibling workspace, emulator, Mattermost API가 다시 차단되면 `CODE_REVIEW-cloud-G07.md`의 `사용자 리뷰 요청` 섹션에 정확한 결정 필요 사항, 근거, 실행한 명령과 출력, 재개 조건을 채우고 멈춘다. 구현 에이전트는 `USER_REVIEW.md`, archive log, `complete.log`를 만들지 않는다.

## 배경

`REVIEW_REVIEW_SMOKE`는 evidence redaction과 checklist 분류를 복구하려 했지만, review-agent-only finalization checklist를 구현 단계에서 수정했고, 실제 실행 증거 없이 notification action 항목을 PASS로 과대 분류했다. 또한 검증 출력이 self-match와 재복사된 Evidence Checklist 행을 포함해 계획의 verification trust 조건을 만족하지 못했다. 이 follow-up은 production code를 바꾸지 않고 task/milestone evidence를 다시 신뢰 가능한 상태로 정리한다.

## 사용자 리뷰 요청 흐름

구현 중 차단점은 active review stub의 `사용자 리뷰 요청` 섹션에 기록한다. code-review가 그 요청을 검증하고 실제 `USER_REVIEW.md` 작성 여부를 결정한다.

## 분석 결과

### 읽은 파일

- `agent-task/m-mattermost-nexo-messaging-alignment/plan_cloud_G07_2.log`
- `agent-task/m-mattermost-nexo-messaging-alignment/code_review_cloud_G07_2.log`
- `agent-task/m-mattermost-nexo-messaging-alignment/code_review_cloud_G07_1.log`
- `agent-task/m-mattermost-nexo-messaging-alignment/user_review_0.log`
- `agent-roadmap/phase/external-integration/milestones/mattermost-nexo-messaging-alignment.md`
- `docs/test-environments.md`
- `agent-ops/rules/private/rules.md`

### 테스트 커버리지 공백

- This follow-up is evidence/log correction only; no production Dart/Kotlin behavior should change.
- Live smoke evidence remains sufficient for FCM receipt, signature verification, ACK, and notification enqueue only if cited from redacted logs.
- Opened navigation, inline reply execution, dismiss/clear execution, and device token prefix must not be PASS unless direct redacted evidence is collected.

### 심볼 참조

- 변경 심볼: 없음.
- Stale reference check is limited to task and milestone text because no source symbol changes are planned.

### 분할 판단

Single plan is appropriate because the Required findings all target one evidence contract: review-state hygiene, truthful evidence classification, and trustworthy verification output. Splitting these would leave the milestone and task logs inconsistent.

### 범위 결정 근거

Do not change production source. Do not paste raw identifiers, raw payload fields, tokens, passwords, signing keys, FCM tokens, signatures, private URLs, or private hostnames. Do not mark the milestone complete while any required smoke action evidence remains PARTIAL or BLOCKED.

### 빌드 등급

Build lane: `cloud-G07`. Rationale: follow-up work is verification-trust recovery for shell/log evidence after a repeated smoke-review failure.

## 구현 체크리스트

- [ ] [REVIEW_REVIEW_REVIEW_SMOKE-1] archived review finalization state를 복구하고, `code_review_cloud_G07_2.log`와 active review stub의 `코드리뷰 전용 체크리스트`가 단일 review-agent-only block으로 남아 있음을 검증한다.
- [ ] [REVIEW_REVIEW_REVIEW_SMOKE-2] Evidence Checklist와 milestone을 실제 redacted evidence에 맞게 재분류한다. action 실행 증거가 없으면 opened/channel navigation/inline reply/dismiss-clear/device token prefix를 PASS로 두지 않는다.
- [ ] [REVIEW_REVIEW_REVIEW_SMOKE-3] self-match 없는 민감값/체크리스트 검증 명령으로 실제 stdout/stderr를 다시 기록한다.
- [ ] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다.

## [REVIEW_REVIEW_REVIEW_SMOKE-1] Restore Review Finalization Hygiene

### 문제

`code_review_cloud_G07_2.log`의 구현 결과는 review-agent-only finalization checklist를 구현 단계에서 복제 및 체크했다. 이 섹션은 code-review skill만 갱신해야 하므로, archived log와 새 active review stub 모두 단일 review-agent-only block만 가져야 한다.

### 해결 방법

`code_review_cloud_G07_2.log`에 중복되거나 잘못 체크된 PASS/USER_REVIEW 전용 항목이 남아 있으면 제거한다. 이번 FAIL 경로에서 code-review가 이미 체크한 verdict/archive/WARN-follow-up 항목은 보존한다. active `CODE_REVIEW-cloud-G07.md`의 review-only checklist는 구현 중 절대 체크하지 않는다.

### 수정 파일 및 체크리스트

- [ ] `agent-task/m-mattermost-nexo-messaging-alignment/code_review_cloud_G07_2.log`
- [ ] `agent-task/m-mattermost-nexo-messaging-alignment/CODE_REVIEW-cloud-G07.md`

### 테스트 작성

테스트 추가 없음. Review protocol log hygiene correction이다.

### 중간 검증

```bash
awk '/^## 코드리뷰 전용 체크리스트$/ {count++} END {print count}' agent-task/m-mattermost-nexo-messaging-alignment/code_review_cloud_G07_2.log agent-task/m-mattermost-nexo-messaging-alignment/CODE_REVIEW-cloud-G07.md
rg --line-number --sort path '^- \[x\] (PASS이면|PASS이고|PASS split|USER_REVIEW이면|USER_REVIEW가)' agent-task/m-mattermost-nexo-messaging-alignment/code_review_cloud_G07_2.log agent-task/m-mattermost-nexo-messaging-alignment/CODE_REVIEW-cloud-G07.md
```

Expected: first command prints `2`; second command has no matches.

## [REVIEW_REVIEW_REVIEW_SMOKE-2] Reclassify Smoke Evidence And Milestone

### 문제

Archived review 2 marks notification action outcomes PASS from wiring or unit-test evidence only. The milestone repeats those claims as completion evidence, even though the required smoke checklist demands actual redacted evidence or an explicit PARTIAL/BLOCKED/N/A classification.

### 해결 방법

Update the active review `Evidence Checklist` and milestone text. PASS is allowed only when the evidence proves the exact outcome. If no additional live evidence is collected, use this baseline:

- `FCM payload wakes / receipt`: PASS
- `valid server-generated signature`: PASS
- `invalid / unsigned drop`: N/A unless a negative control was actually run
- `notification display`: PASS only if redacted `dumpsys notification` shows enqueue
- `ACK request`: PASS
- `opened event`: PARTIAL unless the smoke notification was actually opened and routed
- `channel navigation`: PARTIAL unless live navigation from the smoke open is proven
- `thread navigation`: N/A when no `root_id` is in the smoke payload
- `inline reply`: PARTIAL unless a reply action was sent and handled
- `dismiss / clear`: PARTIAL unless dismiss/clear was triggered and handled
- `device token prefix`: PARTIAL unless the redacted evidence explicitly proves the expected prefix behavior

If any required row remains PARTIAL or BLOCKED, set milestone status to `[진행중]`, uncheck `[signed-smoke-refresh]`, and replace the completion basis with a short redacted note listing supported and missing evidence.

### 수정 파일 및 체크리스트

- [ ] `agent-task/m-mattermost-nexo-messaging-alignment/CODE_REVIEW-cloud-G07.md`
- [ ] `agent-roadmap/phase/external-integration/milestones/mattermost-nexo-messaging-alignment.md`

### 테스트 작성

테스트 추가 없음. Evidence classification and roadmap text only.

### 중간 검증

```bash
awk -F '|' '/^\| (FCM payload wakes \/ receipt|valid server-generated signature|invalid \/ unsigned drop|notification display|ACK request|opened event|channel navigation|thread navigation|inline reply|dismiss \/ clear|device token prefix) \|/ {gsub(/^ +| +$/, "", $2); gsub(/^ +| +$/, "", $3); print $2 " | " $3}' agent-task/m-mattermost-nexo-messaging-alignment/CODE_REVIEW-cloud-G07.md
rg --line-number --sort path '^\[진행중\]$|^- \[ \] \[signed-smoke-refresh\]|PARTIAL|BLOCKED|N/A' agent-roadmap/phase/external-integration/milestones/mattermost-nexo-messaging-alignment.md agent-task/m-mattermost-nexo-messaging-alignment/CODE_REVIEW-cloud-G07.md
```

Expected: first command prints exactly 11 rows with valid classifications. If any action outcome is not proven by direct redacted smoke evidence, the second command shows `[진행중]`, unchecked `[signed-smoke-refresh]`, and the corresponding PARTIAL/BLOCKED/N/A rows.

## [REVIEW_REVIEW_REVIEW_SMOKE-3] Repair Verification Trust

### 문제

The previous verification commands self-matched instructions and copied Evidence Checklist rows into their own output, so the recorded "no matches" and "exactly once" claims were not trustworthy.

### 해결 방법

Replace broad text searches with commands that target actual value shapes and anchored evidence rows. Record real stdout/stderr in the active review. Do not report "No matches found" unless the command actually exits without matches.

### 수정 파일 및 체크리스트

- [ ] `agent-task/m-mattermost-nexo-messaging-alignment/CODE_REVIEW-cloud-G07.md`
- [ ] `agent-task/m-mattermost-nexo-messaging-alignment/code_review_cloud_G07_2.log`
- [ ] `agent-roadmap/phase/external-integration/milestones/mattermost-nexo-messaging-alignment.md`

### 테스트 작성

테스트 추가 없음. Verification command contract only.

### 중간 검증

```bash
rg --line-number --sort path '(userId|sessionId|channelId|ackId|ACK)=[a-z0-9]{20,}' agent-task/m-mattermost-nexo-messaging-alignment agent-roadmap/phase/external-integration/milestones/mattermost-nexo-messaging-alignment.md
rg --line-number --sort path '(password|token|signing key|FCM token|push signature|private URL)\s*[:=]\s*[^<\s][^\s`]{11,}' agent-task/m-mattermost-nexo-messaging-alignment agent-roadmap/phase/external-integration/milestones/mattermost-nexo-messaging-alignment.md
```

Expected: both commands have no matches.

## 수정 파일 요약

| 파일 | 항목 |
|------|------|
| `agent-task/m-mattermost-nexo-messaging-alignment/code_review_cloud_G07_2.log` | REVIEW_REVIEW_REVIEW_SMOKE-1, REVIEW_REVIEW_REVIEW_SMOKE-3 |
| `agent-task/m-mattermost-nexo-messaging-alignment/CODE_REVIEW-cloud-G07.md` | REVIEW_REVIEW_REVIEW_SMOKE-1, REVIEW_REVIEW_REVIEW_SMOKE-2, REVIEW_REVIEW_REVIEW_SMOKE-3 |
| `agent-roadmap/phase/external-integration/milestones/mattermost-nexo-messaging-alignment.md` | REVIEW_REVIEW_REVIEW_SMOKE-2, REVIEW_REVIEW_REVIEW_SMOKE-3 |

## 최종 검증

```bash
awk '/^## 코드리뷰 전용 체크리스트$/ {count++} END {print count}' agent-task/m-mattermost-nexo-messaging-alignment/code_review_cloud_G07_2.log agent-task/m-mattermost-nexo-messaging-alignment/CODE_REVIEW-cloud-G07.md
rg --line-number --sort path '^- \[x\] (PASS이면|PASS이고|PASS split|USER_REVIEW이면|USER_REVIEW가)' agent-task/m-mattermost-nexo-messaging-alignment/code_review_cloud_G07_2.log agent-task/m-mattermost-nexo-messaging-alignment/CODE_REVIEW-cloud-G07.md
awk -F '|' '/^\| (FCM payload wakes \/ receipt|valid server-generated signature|invalid \/ unsigned drop|notification display|ACK request|opened event|channel navigation|thread navigation|inline reply|dismiss \/ clear|device token prefix) \|/ {gsub(/^ +| +$/, "", $2); gsub(/^ +| +$/, "", $3); print $2 " | " $3}' agent-task/m-mattermost-nexo-messaging-alignment/CODE_REVIEW-cloud-G07.md
rg --line-number --sort path '(userId|sessionId|channelId|ackId|ACK)=[a-z0-9]{20,}' agent-task/m-mattermost-nexo-messaging-alignment agent-roadmap/phase/external-integration/milestones/mattermost-nexo-messaging-alignment.md
rg --line-number --sort path '(password|token|signing key|FCM token|push signature|private URL)\s*[:=]\s*[^<\s][^\s`]{11,}' agent-task/m-mattermost-nexo-messaging-alignment agent-roadmap/phase/external-integration/milestones/mattermost-nexo-messaging-alignment.md
git diff --check
```

Expected: checklist heading count is `2`; no checked PASS/USER_REVIEW finalization items; Evidence Checklist prints exactly 11 classified rows; sensitive-value searches have no matches; whitespace check passes.

모든 코드 변경 완료 후 반드시 `CODE_REVIEW-*-G??.md`의 구현 에이전트 소유 섹션을 채운다. 이 파일 작성이 구현의 마지막 단계다.
