19 KiB
Code Review Reference - REVIEW_SMOKE_RUN
[IMPLEMENTING AGENT — READ FIRST] Filling in this file is the mandatory final step of implementation. The task is NOT complete until every implementation-owned section below is filled in. Complete the
구현 체크리스트; the final checklist item is mandatory before saving. Fill implementation-owned sections, then stop with active files in place and report ready for review. If implementation is blocked by a user-only decision, external environment prerequisite, or scope conflict, fill사용자 리뷰 요청with evidence and stop with active files in place; code-review decides whether to writeUSER_REVIEW.md. Finalization (코드리뷰 결과, log rename,complete.log, archive moves,코드리뷰 전용 체크리스트) is review-agent-only, even after compaction/resume. Follow the ownership table at the bottom of this file for which sections you own.
개요
date=2026-05-29 task=m-client-validation/04+03_fcm_ack_smoke, plan=1, tag=REVIEW_SMOKE_RUN
이 파일을 읽는 리뷰 에이전트에게
[REVIEW AGENT ONLY] 아래 종결 절차는 코드리뷰 에이전트 전용이다. 구현 에이전트는 이 섹션을 실행하지 않는다.
각 항목의 구현을 실제 소스 파일과 대조하고, 검증 결과 섹션의 출력이 코드와 일치하는지 확인하세요.
리뷰 완료는 아래 순서까지 끝난 상태를 의미합니다.
- 판정을 append한다.
CODE_REVIEW-cloud-G07.md→code_review_cloud_G07_N.log,PLAN-cloud-G07.md→plan_cloud_G07_M.log로 아카이브한다.- PASS이면
complete.log작성 후 active task 디렉터리를agent-task/archive/YYYY/MM/m-client-validation/04+03_fcm_ack_smoke/로 이동한다. WARN/FAIL이면 user-review gate를 확인한 뒤 다음 active plan/review 파일 또는USER_REVIEW.md를 작성한다.USER_REVIEW.md가 사용자 결정으로 완료/PASS 해소되면 code-review가USER_REVIEW.md를 해소 상태로 갱신하고complete.log작성 후 archive 이동한다. - PASS이고 task group이
m-<milestone-slug>이면 완료 이벤트 메타데이터를 보고한다. roadmap 상태 체크와update-roadmap호출은 런타임 책임이다. - 적용 가능한
코드리뷰 전용 체크리스트항목을 최종.log위치에서 체크한 뒤 보고한다.
구현 항목별 완료 여부
| 항목 | 완료 여부 |
|---|---|
| [REVIEW_SMOKE_RUN-1] Preflight와 remote readiness 승계 | [x] |
| [REVIEW_SMOKE_RUN-2] Android app 실행과 FCM token evidence | [x] |
| [REVIEW_SMOKE_RUN-3] Real push와 ACK evidence 수집 | [ ] |
| [REVIEW_SMOKE_RUN-4] Manual smoke checklist evidence 정리 | [ ] |
구현 체크리스트
- [REVIEW_SMOKE_RUN-1] Archived preflight evidence와 원격 Android/trigger readiness를 확인하고 smoke 실행 변수를 정한다.
- [REVIEW_SMOKE_RUN-2] 원격 Android target에서
apps/flutter-test를 실행하고 FCM device token evidence를 수집한다. - [REVIEW_SMOKE_RUN-3] 실제 push trigger 또는 push-proxy
/api/v1/send_push를 실행하고 FCM receipt, notification display, ACK/log evidence를 수집한다. - [REVIEW_SMOKE_RUN-4] opened-routing, inline reply, dismiss, device-token prefix evidence를 redact해서 review stub에 기록한다.
- CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다.
코드리뷰 전용 체크리스트
[REVIEW AGENT ONLY] 이 체크리스트는 코드리뷰 에이전트만 사용한다. 구현 에이전트는 이 섹션을 수정하거나 체크하지 않는다.
코드리뷰 결과에PASS,WARN,FAIL중 하나의 판정을 append한다.- 판정과
차원별 평가, Required/Suggested/Nit 분류가 서로 일치한다. - active
CODE_REVIEW-*-G??.md를code_review_{review_lane}_GNN_N.log로 아카이브한다. - active
PLAN-*-G??.md를plan_{build_lane}_GNN_M.log로 아카이브한다. - PASS이면
agent-ops/skills/common/code-review/templates/complete-log-template.md기준으로complete.log를 작성하고 active.md파일을 남기지 않는다. - PASS이면 active task 디렉터리
agent-task/{task_name}/를agent-task/archive/YYYY/MM/{task_name}/로 이동하고 최종 archive 경로에서 이 체크리스트를 갱신한다. - PASS이고 task group이
m-<milestone-slug>이면 런타임이 읽을 완료 이벤트 메타데이터를 보고하고, roadmap 수정이나update-roadmap직접 호출을 하지 않는다. - PASS split 작업이면 이동 후 빈 active parent
agent-task/{task_group}/를 제거하거나, 남은 sibling/file이 있어 유지했다고 확인한다. - WARN/FAIL이고 user-review gate가 트리거되지 않았으면 다음 active
PLAN-{build_lane}-GNN.md와CODE_REVIEW-{review_lane}-GNN.md를 작성하고complete.log를 작성하지 않는다. - USER_REVIEW이면
agent-ops/skills/common/code-review/templates/user-review-template.md기준으로USER_REVIEW.md를 작성하고 activePLAN-*.md,CODE_REVIEW-*.md,complete.log를 남기지 않는다. - USER_REVIEW가 사용자 결정으로 완료/PASS 해소되면
USER_REVIEW.md를 해소 상태로 갱신하고complete.log를 작성한 뒤 task directory를 archive로 이동한다.
계획 대비 변경 사항
- 사용자 추가 지시("너가 일단 진행해봐")에 따라 plan의 기본 범위를 확장해 repo-owned test host 초기화 누락을 직접 수정했다.
apps/flutter-test/lib/main.dart에WidgetsFlutterBinding.ensureInitialized(),Firebase.initializeApp(),NexoMessagingPlugin.instance.initialize()호출을 추가했다.onDeviceTokenReadycallback이 등록된 뒤 plugin 초기화가 실행되도록MyAppinitState에서 비동기로 호출했다.- Widget/integration tests가 Firebase/FCM 환경에 묶이지 않도록
MyApp(initializePlugin: false)옵션을 추가하고 기존 tests는 이 옵션을 사용하게 했다. firebase_core를apps/flutter-test/pubspec.yaml의 direct dependency로 추가했다.firebase_coreimport가 app source에 직접 생겼기 때문이다.- 원격 smoke는 계속
ORG_GRADLE_PROJECT_nexoSmokeApplicationId=com.tokilabs.mattermostoverride로 진행했다. 기본com.tokilabs.nexo_client는 원격google-services.json에 client가 없어:app:processDebugGoogleServices에서 실패한다. - REVIEW_SMOKE_RUN-3은 부분 진행됐다. raw token 확보 후 push-proxy
/api/v1/send_push는{"status":"OK"}를 반환했고 device logcat에서NexoFCMreceipt와ReceiptDeliveryACK POST를 확인했다. 그러나 placeholder/unsigned signature는Notification skipped: signature verification failed로 막혀 notification display, opened-routing, inline reply, dismiss evidence는 아직 없다.
주요 설계 결정
- 원격 readiness(REVIEW_SMOKE_RUN-1)는 archived preflight 승계 전제하에 통과: 원격 flutter/adb 존재,
emulator-5554연결,NEXO_SMOKE_TRIGGER_CMDnon-empty,push_proxy_url=http://localhost:18066. - 앱 초기화 수정 후 remote Android에서
FirebaseInitProvider initialization successful,Permission: AuthorizationStatus.authorized,DatabaseHelper: Device token saved,[PushNotification] Device token saved를 확인했다. Raw token 값은 출력하지 않고 remote/tmp/nexo_global.db에서 env로만 추출했다. - token prefix는
android_rn-v2:가 맞다(packages/messaging_flutter/lib/src/nexo_messaging_plugin.dart:14,211→'$_kDeviceTokenPrefix-v2:$token', prefixandroid_rn). Device token DB row length는 156이고 raw token은 review stub에 남기지 않았다. - Actual push evidence는 두 단계로 나뉜다. FCM receipt/ACK path는 PASS: push-proxy response
{"status":"OK"}, logcatNexoFCM : >>> onMessageReceived ENTER,ReceiptDelivery: Send ACK=...,NomadNetwork: POST .../api/v4/notifications/ack. Notification display/routing path는 BLOCKED: valid signed payload가 없어Notification skipped: signature verification failed.
사용자 리뷰 요청
기본값은 없음이다. 구현 중 사용자 결정, 외부 환경 준비, 또는 계획 범위 변경 없이는 안전하게 진행할 수 없으면 아래 항목을 실제 내용으로 교체하고, 구현을 중단한 뒤 active 파일을 그대로 둔 채 리뷰를 요청한다. code-review가 이 내용을 검증해 USER_REVIEW.md를 작성한다.
- 상태: 차단(BLOCKED)
- 사유 유형: 외부 signed push payload 또는 signing material 부재
- 진행 경과: repo-owned test host 초기화 누락은 수정했고, raw FCM token 확보와 실제 FCM receipt/ACK evidence까지 수집했다. 남은 차단은 valid signature 단계다.
- 결정 필요:
- 실제 server-generated valid signature가 포함된 push trigger를 제공할지.
- 또는 smoke 범위를 이번 loop에서는 FCM receipt + ACK까지로 축소하고 notification display/opened/reply/dismiss/signature 항목을 후속으로 분리할지.
- 차단 근거:
- REVIEW_SMOKE_RUN-3: placeholder signature push와 unsigned push 모두 FCM receipt + ACK POST까지 도달했지만
Notification skipped: signature verification failed로 notification display 전에 중단됐다. - 원격 app shared preferences에
signing_key_https://mattermost.toki-labs.com가 존재한다. 따라서 bogus/non-server signature는 정상적으로 reject된다. NEXO_SMOKE_TRIGGER_CMDhelper는 현재 valid signed payload를 만들어 보내지 않는다.
- REVIEW_SMOKE_RUN-3: placeholder signature push와 unsigned push 모두 FCM receipt + ACK POST까지 도달했지만
- 실행한 검증/명령(실제 출력):
- Local:
flutter analyzePASS,flutter testPASS. - Remote:
flutter pub get && flutter analyze && flutter testPASS. - Remote integration:
flutter test integration_test -d emulator-5554built and installed the app, then produced no runner output for over 40s; the local ssh wrapper was killed. Treat as inconclusive, not PASS. - Remote run after init fix:
FirebaseInitProvider initialization successful,[PushNotification] Permission: AuthorizationStatus.authorized,DatabaseHelper: Device token saved,[PushNotification] Device token saved. - Remote push with placeholder signature: push-proxy response
{"status":"OK"}; logcatNexoFCM : >>> onMessageReceived ENTER,ReceiptDelivery: Send ACK=nexo-smoke-1780028173,NomadNetwork: POST https://mattermost.toki-labs.com/api/v4/notifications/ack, thenNotification skipped: signature verification failed. - Remote push without signature: push-proxy response
{"status":"OK"}; logcatNexoFCM : >>> onMessageReceived ENTER,ReceiptDelivery: Send ACK=nexo-smoke-nosig-1780028205, thenNotification skipped: signature verification failed. - Archived preflight
agent-task/archive/2026/05/m-client-validation/03_smoke_preflight/complete.log: localtest -fPASS. - 미완: valid signature PASS, invalid/unsigned drop, notification display, opened-routing, inline reply, dismiss.
- Local:
- 환경 정리: override 빌드는 emulator-5554의 기존
com.tokilabs.mattermost(Detox 자산)를 교체했다(사용자 승인). Detox 재사용이 필요하면 Mattermost 앱 재설치가 필요할 수 있음을 명시한다. - 재개 조건:
- Valid server-generated signature가 포함된 push trigger를 준비한다.
- 같은 remote app/token 상태에서 trigger를 재실행한다.
- Notification display 이후 tap/opened, inline reply, dismiss evidence를 수집한다.
리뷰어를 위한 체크포인트
- Preflight dependency가 active-only path가 아니라 archived
complete.log로 확인되었는지 본다. smoke_trigger_ready=1readiness output을 actual FCM send evidence로 오인하지 않았는지 본다.- Raw token, auth token, signing key, private endpoint values가 tracked file에 남지 않았는지 본다.
- Manual checklist 항목이 PASS/BLOCKED/FAIL로 과장 없이 분류되었는지 본다.
- Real push evidence와 ACK evidence가 stdout/stderr, logcat, server/push-proxy log, screenshot/recording path 중 재검토 가능한 형태인지 본다.
검증 결과
구현 에이전트가 각 중간 검증 및 최종 검증 명령 실행 후 출력을 여기에 붙여 넣는다.
필수 규칙:
- 검증 명령은 고정된 계약이다. 임의로 대체하지 않는다.
- 대체가 필요하면
계획 대비 변경 사항에 이유와 대체 명령을 기록한다. 검증 결과에는 실제 stdout/stderr를 붙여 넣는다.- 사용자 리뷰 요청으로 명령을 끝까지 실행하지 못했다면
사용자 리뷰 요청에 실행한 명령, 실제 출력, 미실행 명령의 사유를 기록한다.
REVIEW_SMOKE_RUN-1 중간 검증
$ test -f agent-task/archive/2026/05/m-client-validation/03_smoke_preflight/complete.log
exit=0
$ ssh toki@toki-labs.com 'zsh -lc '...'
set -e
command -v flutter -> /Users/toki/SDK/flutter/bin/flutter
command -v adb -> /Users/toki/Library/Android/sdk/platform-tools/adb
test -n "${NEXO_SMOKE_TRIGGER_CMD:-}" -> (set -e 통과 = non-empty)
adb devices:
List of devices attached
emulator-5554 device
push_proxy_url=http://localhost:18066
remote_exit=0
PASS: 원격 readiness 충족.
REVIEW_SMOKE_RUN-2 중간 검증
$ flutter analyze
Analyzing flutter-test...
No issues found! (ran in 4.2s)
$ flutter test
00:00 +4: All tests passed!
$ ssh toki@toki-labs.com 'zsh -lc "cd ~/works/nexo/apps/flutter-test && flutter pub get && flutter analyze && flutter test"'
Analyzing flutter-test...
No issues found! (ran in 5.5s)
00:00 +4: All tests passed!
$ ssh toki@toki-labs.com 'zsh -lc "cd ~/works/nexo/apps/flutter-test && flutter test integration_test -d emulator-5554"'
✓ Built build/app/outputs/flutter-apk/app-debug.apk
Installing build/app/outputs/flutter-apk/app-debug.apk...
# 이후 테스트 runner 출력 없이 40초 이상 대기. local ssh wrapper kill, exit=255. Inconclusive.
$ ssh toki@toki-labs.com 'zsh -lc "... flutter run -d emulator-5554 --no-resident ..."'
✓ Built build/app/outputs/flutter-apk/app-debug.apk
Installing build/app/outputs/flutter-apk/app-debug.apk...
FirebaseInitProvider: FirebaseApp initialization successful
[PushNotification] Permission: AuthorizationStatus.authorized
DatabaseHelper: Device token saved
[PushNotification] Device token saved
PASS: app initialization fix works locally and on remote. Remote app stores an FCM token. Raw token was not printed; screenshot path /tmp/nexo-smoke-screen-after-init.png, run log path /tmp/nexo-flutter-test-run-after-init.log, token log path /tmp/nexo-token-logcat-after-init.txt.
REVIEW_SMOKE_RUN-3 중간 검증
$ ssh toki@toki-labs.com 'zsh -lc "... curl -fsS -X POST http://localhost:18066/api/v1/send_push ..."'
{"status":"OK"}
# placeholder signature push, ack_id=nexo-smoke-1780028173
NexoFCM : >>> onMessageReceived ENTER, dataSize=20
NexoFCM : onMessageReceived type=message channelId=nexo-smoke-channel ackId=nexo-smoke-1780028173 serverUrl=https://mattermost.toki-labs.com
ReceiptDelivery: Send ACK=nexo-smoke-1780028173 TYPE=message to URL=https://mattermost.toki-labs.com ID-LOADED=false
NomadNetwork: POST https://mattermost.toki-labs.com/api/v4/notifications/ack
NexoFCM : Notification skipped: signature verification failed
$ ssh toki@toki-labs.com 'zsh -lc "... curl -fsS -X POST http://localhost:18066/api/v1/send_push ..."'
{"status":"OK"}
# unsigned push, ack_id=nexo-smoke-nosig-1780028205
NexoFCM : >>> onMessageReceived ENTER, dataSize=20
NexoFCM : onMessageReceived type=message channelId=nexo-smoke-channel ackId=nexo-smoke-nosig-1780028205 serverUrl=https://mattermost.toki-labs.com
ReceiptDelivery: Send ACK=nexo-smoke-nosig-1780028205 TYPE=message to URL=https://mattermost.toki-labs.com ID-LOADED=false
NomadNetwork: POST https://mattermost.toki-labs.com/api/v4/notifications/ack
NexoFCM : Notification skipped: signature verification failed
PARTIAL: FCM receipt and ACK request evidence collected. Notification display and downstream opened/reply/dismiss evidence remain BLOCKED by signature verification. Remote evidence paths: /tmp/nexo-send-response.json, /tmp/nexo-after-send-logcat.txt, /tmp/nexo-send-response-nosig.json, /tmp/nexo-after-send-logcat-nosig.txt.
REVIEW_SMOKE_RUN-4 중간 검증
Manual smoke checklist 분류:
| 항목 | 판정 | 사유 |
|---|---|---|
| FCM payload wakes / receipt | PASS | NexoFCM : >>> onMessageReceived ENTER, onMessageReceived ... ackId=... |
| valid signature 처리 | BLOCKED | server-generated valid signature가 없음. Placeholder signature rejected. |
| invalid/unsigned drop | PASS | placeholder and unsigned attempts both ended at Notification skipped: signature verification failed. |
| notification display | BLOCKED | signature verification 단계에서 skip되어 system notification evidence 없음. |
| ACK request success | PASS | ReceiptDelivery: Send ACK=..., NomadNetwork: POST .../api/v4/notifications/ack; no failure log observed. |
| onNotificationOpened (opened event) | BLOCKED | notification display가 없어 tap/open evidence 수집 불가. |
| onNavigateToChannel / onNavigateToThread routing | BLOCKED | notification display/open blocked. |
| Inline reply | BLOCKED | notification display blocked. |
| Dismiss action | BLOCKED | notification display blocked. |
Device token prefix(android_rn-v2:) |
PASS | app code formats prefix and remote DB stored token length 156 after stripping prefix for push; raw token not printed. |
$ rg --sort path -n "FCM payload wakes|ACK request|onNotificationOpened|onNavigateToChannel|onNavigateToThread|Inline reply|Dismiss action|Device token|BLOCKED|FAIL" agent-task/m-client-validation/04+03_fcm_ack_smoke/CODE_REVIEW-cloud-G07.md
# 위 표/근거로 매칭됨.
최종 검증
$ test -f agent-task/archive/2026/05/m-client-validation/03_smoke_preflight/complete.log
exit=0
$ cd apps/flutter-test && flutter analyze
No issues found! (ran in 4.2s)
$ cd apps/flutter-test && flutter test
00:00 +4: All tests passed!
$ rg --sort path -n "FCM payload wakes|ACK request|onNotificationOpened|onNavigateToChannel|onNavigateToThread|Inline reply|Dismiss action|Device token|BLOCKED|FAIL" agent-task/m-client-validation/04+03_fcm_ack_smoke/CODE_REVIEW-cloud-G07.md
# REVIEW_SMOKE_RUN-4 표와 검증 결과 전반에서 PASS/BLOCKED evidence가 매칭됨.
종합: REVIEW_SMOKE_RUN-1 PASS, REVIEW_SMOKE_RUN-2 PASS, REVIEW_SMOKE_RUN-3 PARTIAL(FCM receipt + ACK PASS, notification display BLOCKED), REVIEW_SMOKE_RUN-4 PARTIAL. 구현 미완료 상태로 사용자 리뷰 요청 작성 후 중단. active 파일 유지.
[IMPLEMENTING AGENT — BEFORE SAVING] Have you filled in every implementation-owned section: completion table, implementation checklist, changes from plan, design decisions, and verification output? If anything is blank, go back and fill it in before saving this file. Leave review-agent-only sections unchanged.