<!-- task=m-mattermost-nexo-messaging-alignment plan=2 tag=REVIEW_REVIEW_SMOKE -->

# Plan - 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_SMOKE`는 원격 signed push 일부를 실행했지만, task log redaction과 evidence classification 계약을 충족하지 못했다. 또한 milestone은 notification/opened/reply/dismiss evidence가 부족한 상태에서 완료 후보로 올라갔다. 이 follow-up은 새 smoke 구현이 아니라, 기존 redacted remote evidence와 필요한 추가 확인만으로 기록을 안전하고 정확한 상태로 복구한다.

## 사용자 리뷰 요청 흐름

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

## 분석 결과

### 읽은 파일

- `agent-task/m-mattermost-nexo-messaging-alignment/plan_cloud_G07_1.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`
- `apps/client/lib/src/integrations/mattermost/mattermost_auth_service.dart`
- `apps/client/lib/src/integrations/mattermost/mattermost_push_host_integration.dart`
- `../nexo/packages/messaging_flutter/android/src/main/kotlin/com/tokilabs/nexo/messaging/NexoFirebaseMessagingService.kt`

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

- Local Flutter tests still cover interface/bootstrap behavior only.
- Evidence checklist correctness depends on remote smoke logs, dumpsys output, and any emulator interaction evidence.
- Current archived review log has only FCM receipt, ACK, and Flutter event evidence. Missing opened/reply/dismiss/clear evidence must be either collected or explicitly marked `PARTIAL`, `BLOCKED`, or `N/A`.

### 심볼 참조

- 변경 심볼: 없음.
- Stale reference check required only for task/milestone text and evidence notes.

### 분할 판단

Split decision policy was evaluated before choosing plan files. Single plan is appropriate because the required work is a narrow evidence-record correction across one archived review log, one active review stub, and one milestone file. Splitting redaction, classification, and milestone correction would risk inconsistent evidence.

### 범위 결정 근거

Do not change production Dart/Kotlin behavior in this follow-up. Do not rerun a handcrafted positive push. Do not paste raw identifiers, raw payload fields, tokens, passwords, signing keys, FCM tokens, signatures, or private URLs. Do not mark the milestone complete unless the evidence checklist justifies it.

### 빌드 등급

Build lane: `cloud-G07`. Rationale: this recovers verification trust after a real external smoke review failure and requires shell/remote-log evidence handling plus redaction.

## 구현 체크리스트

- [ ] [REVIEW_REVIEW_SMOKE-1] `code_review_cloud_G07_1.log`와 새 review stub에서 raw Mattermost user/session/channel/ACK identifiers and raw payload fields를 redacted placeholders로 교체한다.
- [ ] [REVIEW_REVIEW_SMOKE-2] `docs/test-environments.md#mattermost-server-generated-push-smoke` Evidence Checklist의 각 항목을 PASS/PARTIAL/BLOCKED/N/A로 분류하고, 각 판정에 redacted evidence 또는 redacted remote log path를 붙인다.
- [ ] [REVIEW_REVIEW_SMOKE-3] `agent-roadmap/phase/external-integration/milestones/mattermost-nexo-messaging-alignment.md`를 실제 evidence와 일치하도록 고친다. missing opened/reply/dismiss/clear evidence가 남으면 `[진행중]`과 unchecked `[signed-smoke-refresh]`로 되돌린다.
- [ ] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다.

## [REVIEW_REVIEW_SMOKE-1] Redact Archived Evidence

### 문제

`code_review_cloud_G07_1.log` contains unredacted Mattermost identifiers in the app auth and push evidence. The plan explicitly forbids raw private values and raw payload fields in task logs.

### 해결 방법

Edit only task evidence text, replacing raw values with placeholders such as `<redacted-user-id>`, `<redacted-session-id>`, `<redacted-channel-id>`, and `<redacted-ack-id>`. Keep timestamps and event names intact.

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

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

### 테스트 작성

테스트 추가 없음. This is evidence redaction.

### 중간 검증

```bash
rg --sort path 'userId=[a-z0-9]+|sessionId=[a-z0-9]+|channelId=[a-z0-9]+|ackId=[a-z0-9]+|ACK=[a-z0-9]+' agent-task/m-mattermost-nexo-messaging-alignment agent-roadmap/phase/external-integration/milestones/mattermost-nexo-messaging-alignment.md
```

Expected: no matches.

## [REVIEW_REVIEW_SMOKE-2] Evidence Checklist Classification

### 문제

`code_review_cloud_G07_1.log` marks REVIEW_SMOKE-3 complete but does not classify the required evidence checklist. Missing evidence cannot be inferred as PASS.

### 해결 방법

Add an `Evidence Checklist` subsection to the active review stub. Use only `PASS`, `PARTIAL`, `BLOCKED`, or `N/A`. For each item, cite redacted log lines or redacted `/tmp` paths. If additional emulator interaction is run, paste only redacted output.

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

- [ ] `agent-task/m-mattermost-nexo-messaging-alignment/CODE_REVIEW-cloud-G07.md`
- [ ] Optional remote redacted evidence path references under `/tmp`

### 테스트 작성

테스트 추가 없음. This is smoke evidence classification.

### 중간 검증

```bash
rg --sort path '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' agent-task/m-mattermost-nexo-messaging-alignment/CODE_REVIEW-cloud-G07.md
```

Expected: every Evidence Checklist item appears exactly once with a PASS/PARTIAL/BLOCKED/N/A classification.

## [REVIEW_REVIEW_SMOKE-3] Correct Milestone Evidence

### 문제

The milestone currently marks `[signed-smoke-refresh]` complete and claims full notification/action wiring PASS, but the archived evidence does not prove all required outcomes.

### 해결 방법

If the completed evidence checklist still has `PARTIAL` or `BLOCKED` for notification display, opened event, inline reply, dismiss/clear, or device token prefix, keep milestone status `[진행중]`, uncheck `[signed-smoke-refresh]`, and add a short redacted `작업 컨텍스트` note with the actual classification. If all required outcomes are supported, keep `[검토중]` and replace broad claims with concise evidence.

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

- [ ] `agent-roadmap/phase/external-integration/milestones/mattermost-nexo-messaging-alignment.md`
- [ ] No raw private values in roadmap text.

### 테스트 작성

테스트 추가 없음. Roadmap evidence text only.

### 중간 검증

```bash
rg --sort path '완벽히|raw|token|password|signature|FCM token|ackId=[a-z0-9]+|channelId=[a-z0-9]+|userId=[a-z0-9]+|sessionId=[a-z0-9]+' agent-roadmap/phase/external-integration/milestones/mattermost-nexo-messaging-alignment.md agent-task/m-mattermost-nexo-messaging-alignment
git diff --check
```

Expected: no unredacted sensitive evidence; no overbroad `완벽히` claim unless every checklist item has supporting evidence; whitespace check passes.

## 수정 파일 요약

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

## 최종 검증

```bash
rg --sort path 'userId=[a-z0-9]+|sessionId=[a-z0-9]+|channelId=[a-z0-9]+|ackId=[a-z0-9]+|ACK=[a-z0-9]+' agent-task/m-mattermost-nexo-messaging-alignment agent-roadmap/phase/external-integration/milestones/mattermost-nexo-messaging-alignment.md
rg --sort path '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' agent-task/m-mattermost-nexo-messaging-alignment/CODE_REVIEW-cloud-G07.md
git diff --check
```

Expected: first `rg` returns no matches; second `rg` shows all checklist rows with classifications; `git diff --check` is clean.

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