move reauth_ui artifacts to archive

This commit is contained in:
toki 2026-06-13 23:06:54 +09:00
parent dd6da0e928
commit 9f9ae57636
7 changed files with 355 additions and 9 deletions

View file

@ -0,0 +1,185 @@
<!-- task=m-jenkins-credential/04+03_reauth_ui plan=1 tag=REVIEW_REAUTH_UI -->
# Code Review Reference - REVIEW_REAUTH_UI
> **[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, user-owned external environment prerequisite, or scope conflict, fill `사용자 리뷰 요청` with evidence and stop with active files in place; code-review decides whether to write `USER_REVIEW.md`. Evidence gaps that a follow-up agent can close by rerunning commands or collecting artifacts are normal follow-up issues, not user-review blockers by themselves.
> Do not ask the user directly, present choices in chat, or call `request_user_input` during implementation; record the needed decision in `사용자 리뷰 요청` and stop for code-review.
> 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-06-13
task=m-jenkins-credential/04+03_reauth_ui, plan=1, tag=REVIEW_REAUTH_UI
## Roadmap Targets
- Milestone: `agent-roadmap/phase/usable-mvp/milestones/jenkins-credential.md`
- Task ids:
- `reauth`: token 폐기, 권한 없음, Jenkins URL 변경, 네트워크 실패를 구분해 재로그인 또는 재시도 흐름으로 안내한다.
- Completion mode: check-on-pass
## 이 파일을 읽는 리뷰 에이전트에게
> **[REVIEW AGENT ONLY]** 아래 종결 절차는 코드리뷰 에이전트 전용이다. 구현 에이전트는 이 섹션을 실행하지 않는다.
각 항목의 구현을 실제 소스 파일과 대조하고, `검증 결과` 섹션의 출력이 코드와 일치하는지 확인하세요.
리뷰 완료는 아래 순서까지 끝난 상태를 의미합니다.
1. 판정을 append한다.
2. `CODE_REVIEW-cloud-G06.md` -> `code_review_cloud_G06_N.log`, `PLAN-cloud-G06.md` -> `plan_cloud_G06_M.log`로 아카이브한다.
3. PASS이면 `complete.log` 작성 후 active task 디렉터리를 `agent-task/archive/YYYY/MM/m-jenkins-credential/04+03_reauth_ui/`로 이동한다. WARN/FAIL이면 user-review gate를 확인한 뒤 다음 active plan/review 파일 또는 `USER_REVIEW.md`를 작성한다. `USER_REVIEW.md`가 사용자 결정으로 완료/PASS 해소되면 code-review가 `USER_REVIEW.md`를 해소 상태로 갱신하고 `complete.log` 작성 후 archive 이동한다.
4. PASS이고 task group이 `m-<milestone-slug>`이면 완료 이벤트 메타데이터를 보고한다. roadmap 상태 체크와 `update-roadmap` 호출은 런타임 책임이다.
5. 적용 가능한 `코드리뷰 전용 체크리스트` 항목을 최종 `.log` 위치에서 체크한 뒤 보고한다.
---
## 구현 항목별 완료 여부
| 항목 | 완료 여부 |
|------|---------|
| [REVIEW_REAUTH_UI-1] App Restore Result Wiring | [x] |
| [REVIEW_REAUTH_UI-2] Shell And BuildsPage Status UI Contract | [x] |
| [REVIEW_REAUTH_UI-3] Settings URL Change Clears Stale State | [x] |
| [REVIEW_REAUTH_UI-4] Required Regression Tests And Verification Evidence | [x] |
| [REVIEW_REAUTH_UI-5] Unplanned pubspec.lock Diff | [x] |
## 구현 체크리스트
- [x] `AppSokApp`이 `restoreDetailed()` 결과를 보존하고 `JenkinsSessionRestoreKind`를 UI용 connection status로 변환해 `AppSokShell`에 전달하게 한다.
- [x] `AppSokShell`이 connection status와 retry callback을 `BuildsPage`로 전달하게 한다.
- [x] `BuildsPage`가 credential 없음, 재로그인 필요, 네트워크 실패, 서버 실패를 서로 다른 label/description/action 상태로 보여주고 network/server 실패에서 retry를 호출하게 한다.
- [x] `SettingsPage`가 Jenkins URL 변경 시 Web Login 결과, token 저장 상태, credential 삭제 상태를 모두 초기화하게 한다.
- [x] 원인별 app/builds/settings regression tests를 추가하고 구현 보고서의 검증 출력이 실제 실행 결과와 일치하게 기록한다.
- [x] 계획 범위 밖 `pubspec.lock` downgrade를 정리하거나, 의도된 SDK 해상도 변경이면 근거와 검증을 기록한다.
- [x] `git diff --check`, focused Flutter tests, `flutter analyze`, `flutter test`를 실행하고 가능한 remote runner evidence를 정확히 기록한다.
- [x] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다.
## 코드리뷰 전용 체크리스트
> **[REVIEW AGENT ONLY]** 이 체크리스트는 코드리뷰 에이전트만 사용한다.
> 구현 에이전트는 이 섹션을 수정하거나 체크하지 않는다.
- [x] `코드리뷰 결과`에 `PASS`, `WARN`, `FAIL` 중 하나의 판정을 append한다.
- [x] 판정과 `차원별 평가`, Required/Suggested/Nit 분류가 서로 일치한다.
- [x] active `CODE_REVIEW-*-G??.md`를 `code_review_cloud_G06_N.log`로 아카이브한다.
- [x] active `PLAN-*-G??.md`를 `plan_cloud_G06_M.log`로 아카이브한다.
- [x] `.gitignore`의 Agent-Ops 관리 block이 `agent-task/**/*.md`와 `agent-task/**/*.log`를 unignore하고 `agent-roadmap/current.md`를 ignore하는지 확인한다.
- [ ] 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이 있어 유지했다고 확인한다.
- [x] 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`를 작성하고 active `PLAN-*.md`, `CODE_REVIEW-*.md`, `complete.log`를 남기지 않는다.
- [ ] USER_REVIEW가 사용자 결정으로 완료/PASS 해소되면 `USER_REVIEW.md`를 해소 상태로 갱신하고 `complete.log`를 작성한 뒤 task directory를 archive로 이동한다.
## 계획 대비 변경 사항
- `widget_test.dart`의 기존 테스트 `AppSokApp does not expose token text on auth failure`가 401 응답 시 `'Jenkins 연결 필요'`를 기대하고 있었으나, 이제 401은 `'재로그인 필요'`를 표시한다. 해당 assertion을 `'재로그인 필요'`로 수정했다. 계획 범위 내의 회귀 수정이다.
## 주요 설계 결정
- `JenkinsConnectionStatus` enum을 `builds_page.dart`에 정의하고 `app_shell.dart`에서 re-export했다. `app.dart`는 `app_shell.dart` 단일 import만 사용한다.
- `_connectionStatus()` 헬퍼가 `isRestored == true`이면 `null`을 반환하고, 그 외 kind를 `JenkinsConnectionStatus`로 매핑한다. `restored` case는 `missing`으로 매핑 (실제로 도달하지 않는 방어적 처리).
- retry callback은 `networkFailure`/`serverFailure`에만 노출한다. `reauthRequired`와 `missing`에는 null을 전달해 retry 버튼이 표시되지 않는다.
- `pubspec.lock` downgrade(`meta` 1.18.0→1.17.0, `test_api` 0.7.11→0.7.10)는 컨테이너 환경의 `flutter pub get`이 낮은 버전을 해석한 결과였다. sha256/version을 원래 값으로 직접 복원했다.
## 사용자 리뷰 요청
- 상태: 없음
- 사유 유형: 없음
- 결정 필요: 없음
- 차단 근거: 없음
- 실행한 검증/명령: 없음
- 자동 후속 불가 이유: 없음
- 재개 조건: 없음
## 리뷰어를 위한 체크포인트
- `AppSokApp`이 `restoreDetailed()` result kind를 보존하고 bool 축약으로 회귀하지 않았는지 확인한다.
- `BuildsPage`가 startup restore 실패 원인과 loader 실행 중 401/403/failure를 혼동하지 않는지 확인한다.
- network/server failure retry가 credential을 보존하고 성공 시 job loader를 활성화하는지 확인한다.
- `SettingsPage` URL 변경이 이전 success/error label을 모두 제거하는지 확인한다.
- `pubspec.lock` diff가 계획 범위와 일치하거나 제거됐는지 확인한다.
- 검증 결과의 command/output count가 실제 실행 결과와 일치하는지 확인한다.
## 검증 결과
### REVIEW_REAUTH_UI-1 중간 검증
```
$ flutter test test/app_auth_test.dart test/jenkins_artifact_session_test.dart
00:01 +23: All tests passed!
```
### REVIEW_REAUTH_UI-2 중간 검증
```
$ flutter test test/builds_page_test.dart
00:02 +45: All tests passed!
```
### REVIEW_REAUTH_UI-3 중간 검증
```
$ flutter test test/settings_page_test.dart
00:01 +5: All tests passed!
```
### REVIEW_REAUTH_UI-4 중간 검증
```
$ flutter test test/app_auth_test.dart test/builds_page_test.dart test/settings_page_test.dart test/jenkins_artifact_session_test.dart
00:03 +73: All tests passed!
```
### REVIEW_REAUTH_UI-5 중간 검증
```
$ git diff -- pubspec.yaml pubspec.lock
(no output — pubspec.lock restored to meta 1.18.0 / test_api 0.7.11, diff is clean)
```
### 최종 검증
```
$ git diff --check
(no output)
$ flutter analyze
Analyzing appsok...
No issues found! (ran in 6.2s)
$ flutter test test/app_auth_test.dart test/builds_page_test.dart test/settings_page_test.dart test/jenkins_artifact_session_test.dart
00:03 +73: All tests passed!
$ flutter test
00:06 +196: All tests passed!
$ ssh -o BatchMode=yes -o ConnectTimeout=10 toki@toki-labs.com 'zsh -lc '"'"'cd "$HOME/docker/services/code-server/data/volume/workspace/appsok" && git rev-parse HEAD && git status --short && flutter analyze && flutter test'"'"''
8429af52f3a9a894ff82bf93f98b7cb05731881b
(no short status output — clean)
Analyzing appsok...
No issues found! (ran in 2.0s)
00:05 +196: All tests passed!
```
---
> **[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.
## 코드리뷰 결과
- 종합 판정: FAIL
- 차원별 평가:
- correctness: Pass
- completeness: Fail
- test coverage: Fail
- API contract: Pass
- code quality: Pass
- plan deviation: Fail
- verification trust: Fail
- 발견된 문제:
- Required - `test/widget_test.dart:40`: `_FakeJenkinsArtifactSession`은 여전히 `restore()`만 override하지만 `AppSokApp`은 이제 `restoreDetailed()`를 호출합니다. 그래서 `test/widget_test.dart:1043`의 `AppSokApp wires staged apk into adb installer`는 전체 suite 안에서는 이전 테스트가 남긴 `FlutterSecureStorage` 상태 덕분에 통과하지만, 단독 실행하면 `android-app`을 찾지 못해 실패합니다. fake session이 `restoreDetailed()`를 `restored`로 반환하게 수정하거나 해당 테스트가 자체적으로 필요한 storage를 준비하게 만든 뒤 `flutter test test/widget_test.dart --name "AppSokApp wires staged apk into adb installer"`를 검증에 포함하세요.
- Required - `pubspec.lock:314`: 구현 보고서는 `pubspec.lock` diff가 clean이라고 기록했지만, 리뷰 중 실제 `flutter test` 실행이 `meta`를 1.18.0에서 1.17.0으로, `pubspec.lock:471`의 `test_api`를 0.7.11에서 0.7.10으로 다시 rewrite했습니다. required verification 후 lockfile이 dirty가 되므로 `pubspec.lock`을 현재 Flutter SDK 해상도와 일치시키거나 SDK/검증 환경을 정렬하고, `flutter test` 이후 `git diff -- pubspec.yaml pubspec.lock`가 clean임을 증명하세요.
- 다음 단계: WARN/FAIL 후속 계획을 작성한다.

View file

@ -58,15 +58,15 @@ task=m-jenkins-credential/04+03_reauth_ui, plan=2, tag=REVIEW_REVIEW_REAUTH_UI
> **[REVIEW AGENT ONLY]** 이 체크리스트는 코드리뷰 에이전트만 사용한다.
> 구현 에이전트는 이 섹션을 수정하거나 체크하지 않는다.
- [ ] `코드리뷰 결과`에 `PASS`, `WARN`, `FAIL` 중 하나의 판정을 append한다.
- [ ] 판정과 `차원별 평가`, Required/Suggested/Nit 분류가 서로 일치한다.
- [ ] active `CODE_REVIEW-*-G??.md`를 `code_review_cloud_G06_N.log`로 아카이브한다.
- [ ] active `PLAN-*-G??.md`를 `plan_cloud_G06_M.log`로 아카이브한다.
- [ ] `.gitignore`의 Agent-Ops 관리 block이 `agent-task/**/*.md`와 `agent-task/**/*.log`를 unignore하고 `agent-roadmap/current.md`를 ignore하는지 확인한다.
- [ ] 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이 있어 유지했다고 확인한다.
- [x] `코드리뷰 결과`에 `PASS`, `WARN`, `FAIL` 중 하나의 판정을 append한다.
- [x] 판정과 `차원별 평가`, Required/Suggested/Nit 분류가 서로 일치한다.
- [x] active `CODE_REVIEW-*-G??.md`를 `code_review_cloud_G06_N.log`로 아카이브한다.
- [x] active `PLAN-*-G??.md`를 `plan_cloud_G06_M.log`로 아카이브한다.
- [x] `.gitignore`의 Agent-Ops 관리 block이 `agent-task/**/*.md`와 `agent-task/**/*.log`를 unignore하고 `agent-roadmap/current.md`를 ignore하는지 확인한다.
- [x] PASS이면 `agent-ops/skills/common/code-review/templates/complete-log-template.md` 기준으로 `complete.log`를 작성하고 active `.md` 파일을 남기지 않는다.
- [x] PASS이면 active task 디렉터리 `agent-task/{task_name}/`를 `agent-task/archive/YYYY/MM/{task_name}/`로 이동하고 최종 archive 경로에서 이 체크리스트를 갱신한다.
- [x] PASS이고 task group이 `m-<milestone-slug>`이면 런타임이 읽을 완료 이벤트 메타데이터를 보고하고, roadmap 수정이나 `update-roadmap` 직접 호출을 하지 않는다.
- [x] 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`를 작성하고 active `PLAN-*.md`, `CODE_REVIEW-*.md`, `complete.log`를 남기지 않는다.
- [ ] USER_REVIEW가 사용자 결정으로 완료/PASS 해소되면 `USER_REVIEW.md`를 해소 상태로 갱신하고 `complete.log`를 작성한 뒤 task directory를 archive로 이동한다.
@ -183,3 +183,17 @@ No issues found! (ran in 4.5s)
> **[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.
## 코드리뷰 결과
- 종합 판정: PASS
- 차원별 평가:
- correctness: Pass
- completeness: Pass
- test coverage: Pass
- API contract: Pass
- code quality: Pass
- plan deviation: Pass
- verification trust: Pass
- 발견된 문제: 없음
- 다음 단계: PASS 완료 처리한다.

View file

@ -0,0 +1,50 @@
# Complete - m-jenkins-credential/04+03_reauth_ui
## 완료 일시
2026-06-13
## 요약
REAUTH_UI 구현 루프 3회차를 PASS로 종료했다. Jenkins restore 상세 결과가 app-shell/builds/settings UI와 원인별 재로그인/재시도 흐름으로 연결되었고, follow-up에서 widget test 격리와 lockfile 안정성까지 검증했다.
## 루프 이력
| Plan | Review | Verdict | 메모 |
|------|--------|---------|------|
| `plan_cloud_G06_0.log` | `code_review_cloud_G06_0.log` | FAIL | 실제 소스가 아직 bool restore와 generic connection UI에 머물러 원인별 상태/테스트/lockfile 정리가 필요했다. |
| `plan_cloud_G06_1.log` | `code_review_cloud_G06_1.log` | FAIL | reauth UI 구현은 반영됐지만 fake session test 격리와 `pubspec.lock` 검증 안정성이 남았다. |
| `plan_cloud_G06_2.log` | `code_review_cloud_G06_2.log` | PASS | `restoreDetailed()` fake override, dependency override 기반 lockfile 안정화, focused/full 검증 완료. |
## 구현/정리 내용
- `AppSokApp`가 `restoreDetailed()` 결과를 보존하고 `JenkinsConnectionStatus`로 변환해 `BuildsPage`에 전달한다.
- `BuildsPage`가 credential 없음, 재로그인 필요, 네트워크 실패, 서버 실패를 구분하고 retry action을 제공한다.
- `SettingsPage`가 Jenkins URL 변경 시 stale Web Login/token/clear 상태를 초기화한다.
- `test/widget_test.dart`의 fake Jenkins session이 `restoreDetailed()` 계약을 만족해 단독 실행에서도 통과한다.
- `pubspec.yaml` dependency override와 `pubspec.lock` 해상도를 정리해 `flutter test` 후 lockfile rewrite가 남지 않게 했다.
## 최종 검증
- `git diff --check` - PASS; 출력 없음.
- `flutter analyze` - PASS; `No issues found! (ran in 5.1s)`.
- `flutter test test/widget_test.dart --name "AppSokApp wires staged apk into adb installer"` - PASS; `00:01 +1: All tests passed!`.
- `flutter test test/app_auth_test.dart test/builds_page_test.dart test/settings_page_test.dart test/jenkins_artifact_session_test.dart` - PASS; `00:04 +73: All tests passed!`.
- `flutter test` - PASS; `00:06 +196: All tests passed!`.
- `git diff -- pubspec.yaml pubspec.lock` - PASS; 출력 없음.
- `git status --short` - PASS for code/dependency files; only active task artifact files were present before review finalization.
## Roadmap Completion
- Milestone: `agent-roadmap/phase/usable-mvp/milestones/jenkins-credential.md`
- Completed task ids:
- `reauth`: PASS; evidence=`plan_cloud_G06_2.log`, `code_review_cloud_G06_2.log`; verification=`flutter analyze`, `flutter test test/widget_test.dart --name "AppSokApp wires staged apk into adb installer"`, `flutter test test/app_auth_test.dart test/builds_page_test.dart test/settings_page_test.dart test/jenkins_artifact_session_test.dart`, `flutter test`
- Not completed task ids: 없음
## 잔여 Nit
- 없음
## 후속 작업
- 없음

View file

@ -0,0 +1,97 @@
<!-- task=m-jenkins-credential/04+03_reauth_ui plan=2 tag=REVIEW_REVIEW_REAUTH_UI -->
# Plan - REVIEW_REVIEW_REAUTH_UI
## 이 파일을 읽는 구현 에이전트에게
이 파일은 `code_review_cloud_G06_1.log`의 FAIL 판정을 해결하는 후속 구현 계획이다. 구현 중 사용자만 결정할 수 있는 범위 변경, 사용자 소유 외부 환경, secret, 서비스 준비가 막히면 active `CODE_REVIEW-*-G??.md`의 `사용자 리뷰 요청` 섹션에 근거를 기록하고 멈춘다. 사용자에게 직접 질문하거나 선택지를 제시하거나 `request_user_input`을 호출하지 않는다. archive, `complete.log`, task-directory 이동은 code-review 전용이다.
## Roadmap Targets
- Milestone: `agent-roadmap/phase/usable-mvp/milestones/jenkins-credential.md`
- Task ids:
- `reauth`: token 폐기, 권한 없음, Jenkins URL 변경, 네트워크 실패를 구분해 재로그인 또는 재시도 흐름으로 안내한다.
- Completion mode: check-on-pass
## 배경
2차 리뷰에서 app/shell/builds/settings의 원인별 reauth UI 구현 자체는 계획을 대체로 반영한 것으로 확인했다. 하지만 `restoreDetailed()` 전환 후 기존 fake session test가 전체 suite 실행 순서에 기대고 있으며, required `flutter test`가 `pubspec.lock`을 다시 rewrite해 검증 후 working tree가 dirty가 되는 문제가 남았다.
## 범위 결정 근거
- 포함: `test/widget_test.dart` fake session/test 격리 복구, `pubspec.lock`의 stable resolution 정렬, focused/full 검증 출력 갱신.
- 제외: reauth UI 문구/레이아웃 재설계, Jenkins Web Login bridge 변경, Jenkins API parsing 변경.
- `Roadmap Targets`는 기존 plan과 동일하게 유지한다. 이 follow-up은 `reauth` 완료 검증을 막는 테스트/lockfile 문제만 닫는다.
## 구현 체크리스트
- [ ] `_FakeJenkinsArtifactSession` 또는 해당 widget test setup을 `AppSokApp`의 `restoreDetailed()` 호출 계약과 맞춰 단독 실행해도 통과하게 한다.
- [ ] required Flutter verification을 실행한 뒤에도 `pubspec.yaml`/`pubspec.lock` diff가 남지 않도록 lockfile 또는 검증 환경 기준을 정리한다.
- [ ] `flutter test test/widget_test.dart --name "AppSokApp wires staged apk into adb installer"`와 `git diff -- pubspec.yaml pubspec.lock`를 중간 검증으로 실행하고 실제 출력을 기록한다.
- [ ] `git diff --check`, `flutter analyze`, focused Flutter tests, `flutter test`를 실행하고 검증 후 `git status --short`까지 기록한다.
- [ ] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다.
### [REVIEW_REVIEW_REAUTH_UI-1] Widget Test Isolation After restoreDetailed
#### 문제
`test/widget_test.dart:40`의 `_FakeJenkinsArtifactSession`은 `restore()`만 override한다. 현재 `AppSokApp`은 `restoreDetailed()`를 호출하므로 `test/widget_test.dart:1043`의 fake session test가 fake 계약이 아니라 이전 테스트가 남긴 `FlutterSecureStorage` 상태에 의존한다.
#### 해결 방법
- `_FakeJenkinsArtifactSession`이 `restoreDetailed()`를 override해 `JenkinsSessionRestoreResult(kind: JenkinsSessionRestoreKind.restored)`를 반환하게 한다.
- 또는 해당 테스트가 스스로 필요한 storage/session 상태를 준비하게 한다. 다만 fake session의 의도가 더 명확하므로 fake override를 우선한다.
- 단독 test 실행에서 `android-app`과 `build-row-7`이 정상 렌더링되는지 확인한다.
#### 수정 파일 및 체크리스트
- [ ] `test/widget_test.dart`: fake session이 `restoreDetailed()` 기반 AppSokApp startup 계약을 만족하게 수정.
- [ ] 관련 import/override가 analyzer와 맞는지 확인.
#### 중간 검증
```bash
flutter test test/widget_test.dart --name "AppSokApp wires staged apk into adb installer"
```
### [REVIEW_REVIEW_REAUTH_UI-2] Stable pubspec.lock After Verification
#### 문제
2차 리뷰 중 required `flutter test` 실행이 `pubspec.lock`을 다시 수정했다. 구현 보고서의 `git diff -- pubspec.yaml pubspec.lock` clean 주장은 검증 명령 이후 상태와 일치하지 않는다.
#### 해결 방법
- 현재 프로젝트 검증에 쓰는 Flutter SDK가 해석하는 lockfile 결과를 추적 파일에 반영하거나, remote runner 기준 lockfile을 유지해야 한다면 local verification에서 lockfile rewrite가 발생하지 않도록 SDK/명령/환경 차이를 해소한다.
- 어느 쪽이든 `flutter test` 실행 이후 `git diff -- pubspec.yaml pubspec.lock`와 `git status --short`가 의도한 상태임을 기록한다.
#### 수정 파일 및 체크리스트
- [ ] `pubspec.lock`: required verification 후 dirty diff가 남지 않는 상태로 정리.
- [ ] `CODE_REVIEW-cloud-G06.md`: lockfile 판단 근거와 실제 command output 기록.
#### 중간 검증
```bash
flutter test
git diff -- pubspec.yaml pubspec.lock
git status --short
```
## 최종 검증
```bash
git diff --check
flutter analyze
flutter test test/widget_test.dart --name "AppSokApp wires staged apk into adb installer"
flutter test test/app_auth_test.dart test/builds_page_test.dart test/settings_page_test.dart test/jenkins_artifact_session_test.dart
flutter test
git diff -- pubspec.yaml pubspec.lock
git status --short
```
remote runner를 재실행할 수 있으면 아래도 실행하고, 같은 변경이 반영된 checkout인지 `git rev-parse HEAD`와 `git status --short` 출력으로 함께 증명한다.
```bash
ssh -o BatchMode=yes -o ConnectTimeout=10 toki@toki-labs.com 'zsh -lc '\''cd "$HOME/docker/services/code-server/data/volume/workspace/appsok" && git rev-parse HEAD && git status --short && flutter analyze && flutter test'\'''
```