From 6791e29f270bf39c15955aa890dae181922f0007 Mon Sep 17 00:00:00 2001 From: Yun Chan Date: Fri, 20 Nov 2026 15:16:19 +0900 Subject: [PATCH] fix(ops): send apikey with push drain, read the web push public key from release/, record 2026-11-17 backlog evidence The scheduled push drain got HTTP 401 because modern Supabase service keys need the apikey header next to Bearer. NAS deploy scripts fall back to release/webpush-vapid-public.key (public key only). Map, mobile SSOT and deployment runbooks are synced with the verified operations run in docs/evidence/2026-11-17-backlog-operations.md. --- .env.example | 1 + .gitignore | 1 + docs/deployment/nas-deploy-runbook.md | 10 ++ .../push-transport-without-firebase.md | 20 ++-- .../evidence/2026-11-17-backlog-operations.md | 108 ++++++++++++++++++ docs/map/02-infrastructure.md | 11 +- docs/map/06-mobile-app.md | 10 +- docs/map/09-supabase-backend.md | 8 +- docs/map/10-feature-catalog.md | 6 +- docs/map/11-gap-backlog.md | 53 +++++---- docs/v3/MOBILE_APP_COMPLETION_SSOT.md | 24 ++-- release/webpush-vapid-public.key | 1 + scripts/deploy-nas.ps1 | 92 +++++++++------ scripts/deploy-nas.sh | 3 + .../cloudflare-worker/src/push-drain.test.ts | 1 + server/cloudflare-worker/src/push-drain.ts | 1 + 16 files changed, 254 insertions(+), 96 deletions(-) create mode 100644 docs/evidence/2026-11-17-backlog-operations.md create mode 100644 release/webpush-vapid-public.key diff --git a/.env.example b/.env.example index 4a833811..8c6e893e 100644 --- a/.env.example +++ b/.env.example @@ -77,6 +77,7 @@ WEBPUSH_VAPID_PRIVATE_KEY= WEBPUSH_SUBJECT= # Browser bundle copy of the same public key. This is public by design and must # match WEBPUSH_VAPID_PUBLIC_KEY; never expose the private key as NEXT_PUBLIC_*. +# If blank, NAS deploy scripts read release/webpush-vapid-public.key. NEXT_PUBLIC_VAPID_PUBLIC_KEY= # Apple Push Notification service transport (Firebase-free). Token-based .p8 auth. APNS_KEY_ID= diff --git a/.gitignore b/.gitignore index 92571907..bf881db2 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ release/ !/release/ /release/* !/release/product-version.json +!/release/webpush-vapid-public.key !/release/android-release-identity.json !/release/mobile-release-evidence-public.pem !/release/update-policy.json diff --git a/docs/deployment/nas-deploy-runbook.md b/docs/deployment/nas-deploy-runbook.md index 1752c042..f3a098e1 100644 --- a/docs/deployment/nas-deploy-runbook.md +++ b/docs/deployment/nas-deploy-runbook.md @@ -61,6 +61,16 @@ curl -fsSI http://127.0.0.1:3001/login | head -n 1 curl -fsSI http://127.0.0.1:3002/app/login | head -n 1 ``` +Windows에서 로컬 Docker 데몬 없이 SSH 빌드하는 현재 경로(2026-11-17 전체 빌드, 2026-11-18 선택 빌드 검증): + +```powershell +$env:DOCKER_HOST = "ssh://yunchan-nas" +pwsh -NoProfile -File scripts/deploy-nas.ps1 -BuildOnly +ssh yunchan-nas "cd /volume1/docker/d3ro && docker compose up -d" +``` + +`-BuildOnly`는 기본적으로 API·Admin·Web 이미지를 원격 Docker에 만들고 tar/배포용 `.env` 패키징은 생략한다. 이미 완료된 이미지를 유지하며 하나만 다시 빌드할 때는 `-Services web`처럼 `api`/`admin`/`web`을 선택한다(2026-11-18). Web Push 공개키는 `NEXT_PUBLIC_VAPID_PUBLIC_KEY`/`WEBPUSH_VAPID_PUBLIC_KEY`가 비어 있으면 `release/webpush-vapid-public.key`에서 읽는다. 로컬 `JWT_SECRET` 없이도 빌드할 수 있으며 NAS의 기존 `.env`는 그대로 유지한다. + --- ## 4. Rollback Procedure diff --git a/docs/deployment/push-transport-without-firebase.md b/docs/deployment/push-transport-without-firebase.md index 784ce800..9a3dd36f 100644 --- a/docs/deployment/push-transport-without-firebase.md +++ b/docs/deployment/push-transport-without-firebase.md @@ -40,7 +40,7 @@ In-app events use IPC/EventEmitter and Supabase Realtime. No push transport, no ### Web — Firebase-free, implemented in source - Standard **Web Push** with **VAPID** keys. The browser Push API + service worker handles delivery; the server signs with a VAPID private key and POSTs to the subscription endpoint. - The sidebar requests permission from an explicit user gesture, creates/checks in a stable active `platform='web'` device, and stores the serialized subscription in `push_tokens` through `register_push_registration`. Opt-out records a per-user disabled intent before bounded parallel server/local cleanup; an existing local subscription is re-registered through the server RPC before the UI may call it connected. Logout starts cleanup without waiting and always proceeds to sign-out. -- `NEXT_PUBLIC_VAPID_PUBLIC_KEY` is baked into the browser bundle and must match the Edge Function's `WEBPUSH_VAPID_PUBLIC_KEY`; a missing browser key leaves the control unavailable. +- `NEXT_PUBLIC_VAPID_PUBLIC_KEY` is baked into the browser bundle and must match the Edge Function's `WEBPUSH_VAPID_PUBLIC_KEY`; NAS deploy scripts fall back to the versioned public key `release/webpush-vapid-public.key`. A missing browser key leaves the control unavailable. - No Firebase, no Google account. APNs not involved. ### iOS — Firebase-free, implemented in source @@ -74,9 +74,7 @@ If the goal is "no Firebase at all", the decision reduces to: replace Android tr 1. **Keep Supabase as the SSOT/outbox** (already true). Do not move token/outbox logic. 2. **[done] Implement `webpush` + `apns` transports** in `send-push` (`_shared/webpush.ts`, `_shared/apns.ts`). 3. **[source done] Register web/APNs clients through the device-bound RPCs.** Keep provider configuration and real delivery as runtime gates. -4. **For Android, offer two modes behind config:** - - `fcm` (default): minimal Firebase project, push-only usage. - - `unifiedpush` (opt-in): self-hosted ntfy distributor; documented UX and battery caveats. +4. **For Android, keep FCM** (2026-11-17 decision): use a minimal push-only Firebase project. Do not add a second UnifiedPush transport without a new product review. 5. **Do not adopt OneSignal/Pusher** as a "Firebase replacement" — it does not remove the dependency. ### Effort sketch @@ -98,7 +96,7 @@ If the goal is "no Firebase at all", the decision reduces to: replace Android tr | Web Push transport | `_shared/webpush.ts` | VAPID ES256 JWT + RFC 8291 `aes128gcm` encryption; strict config/subscription validation; 200/404/410/413 mapping | | APNs transport | `_shared/apns.ts` | Token-based `.p8` ES256 JWT (cached ~50 min); production/sandbox hosts; stale (`BadDeviceToken`/`Unregistered`) and 403 handling | | Provider routing | `send-push/index.ts` | `fcm` / `webpush` / `apns` dispatched with per-delivery stale → `stale`, payload → `permanent_failure`, else retryable; unknown providers stay `push_provider_not_supported` | -| Cloudflare cron drain | `server/cloudflare-worker/src/push-drain.ts` + `scheduled()` + `wrangler.toml [triggers] crons` | POSTs `send-push?mode=drain&limit=…` with the service-role bearer every minute | +| Cloudflare cron drain | `server/cloudflare-worker/src/push-drain.ts` + `scheduled()` + `wrangler.toml [triggers] crons` | POSTs `send-push?mode=drain&limit=…` every minute with the current project secret as both Bearer and `apikey`; live scheduled success verified 2026-11-17 | | Tests | `_shared/webpush.test.ts`, `_shared/apns.test.ts`, `push-drain.test.ts`, `push-contract.test.ts` | 10 new tests incl. an RFC 8291 decrypt round-trip; CI runs the edge suite and the worker drain test | | Web client | `apps/web/public/sw.js`, `src/lib/{web-device,web-push,web-push-session}.ts`, `web-push-control.tsx` | Explicit opt-in/out, stable active device, device-bound RPCs, persistence rollback, disabled-intent reconciliation, bounded parallel cleanup, non-blocking logout; standalone image copies the service worker | | Web contract tests | `apps/web/e2e/web-push.spec.ts` | 17 tests for installation identity, revoked-device refusal, permission/VAPID gate, register/unregister RPCs, rollback, stale-subscription reconciliation, bounded cleanup, and logout independence | @@ -111,14 +109,14 @@ An ephemeral VAPID pair, throwaway user, isolated Supabase project, and throwawa ### Required configuration | Secret / var | Consumer | Purpose | |---|---|---| -| `WEBPUSH_VAPID_PUBLIC_KEY` / `WEBPUSH_VAPID_PRIVATE_KEY` / `WEBPUSH_SUBJECT` | Supabase Edge Function | VAPID signing; subject must be `mailto:` or `https:` | -| `NEXT_PUBLIC_VAPID_PUBLIC_KEY` | Web image build | Public half of the same VAPID pair, baked into the client bundle; missing means unavailable/fail-closed | -| `APNS_KEY_ID` / `APNS_TEAM_ID` / `APNS_PRIVATE_KEY` / `APNS_TOPIC` / `APNS_ENVIRONMENT` | Supabase Edge Function | APNs token auth; topic is the bundle id (`com.d3ro.voice`) | -| `SUPABASE_URL` / `SUPABASE_SERVICE_ROLE_KEY` / `PUSH_DRAIN_BATCH_LIMIT` | Cloudflare Worker | Cron drain target + auth (service role key as `wrangler secret`) | +| `WEBPUSH_VAPID_PUBLIC_KEY` / `WEBPUSH_VAPID_PRIVATE_KEY` / `WEBPUSH_SUBJECT` | Supabase Edge Function | VAPID signing; production values configured 2026-11-17 | +| `NEXT_PUBLIC_VAPID_PUBLIC_KEY` | Web image build | Public half of the same pair. If the env is blank, NAS deploy scripts use `release/webpush-vapid-public.key` | +| `APNS_KEY_ID` / `APNS_TEAM_ID` / `APNS_PRIVATE_KEY` / `APNS_TOPIC` / `APNS_ENVIRONMENT` | Supabase Edge Function | APNs token auth; topic is the bundle id (`com.d3ro.voice`), still external | +| `SUPABASE_URL` / `SUPABASE_SERVICE_ROLE_KEY` / `PUSH_DRAIN_BATCH_LIMIT` | Cloudflare Worker | Cron drain target + current project secret; Bearer and `apikey` are both sent | ### Remaining work -- **Runtime proof:** configure matching web/server VAPID values and APNs credentials, build/deploy the web image and Edge/cron code, then prove authenticated browser/iOS registration, outbox drain, and real receipt. Source and automated contract tests alone do not satisfy this gate. -- **Android decision:** keep FCM or adopt UnifiedPush (see §2/§3). +- **Runtime proof:** rebuild/deploy the web image with the public VAPID key, then prove authenticated browser/iOS registration and real receipt. The production scheduled drain is already GREEN (`claimed=1 completed=1 pending=0`, 2026-11-17). +- **Android:** FCM remains the selected Play transport; production Firebase credentials are tracked in `EXT-FIREBASE-01`. --- diff --git a/docs/evidence/2026-11-17-backlog-operations.md b/docs/evidence/2026-11-17-backlog-operations.md new file mode 100644 index 00000000..4e36ebab --- /dev/null +++ b/docs/evidence/2026-11-17-backlog-operations.md @@ -0,0 +1,108 @@ +# 2026-11-17 백로그 운영·검증 증거 + +## 전체 게이트 + +- `npm run verify:all` GREEN: desktop Vitest 212 files / 2,890 tests, mobile Jest 103 suites / 651 tests, workspace/mobile/site typecheck·lint 및 위생·계약 게이트 통과. +- `dotnet test apps/api-server.Tests` 55/55 PASS. +- Cloudflare Worker Deno 15/15, Site Bridge Deno 5/5 PASS. +- 모바일 release boundary/config/build-config self-tests, `test:hygiene`, `check:protected-tests`, `security:secrets`, `contract:check`, `check:migrations`(74), `check:i18n`, `check:ds-contract`, `check:design`, `version:check` GREEN. + +## Wave 7 운영 반영 + +- 롤백 태그 시점: NAS `20261117-173718`. +- 원격 Docker 이미지: API `12580b023110…`, Admin `2b7a31b0959a…`, Web(VAPID 포함) `cfaa99bc17f2…`. +- `scripts/deploy-nas.ps1 -BuildOnly`로 SSH 원격 빌드 후 NAS compose로 교체했다. 로컬 패키징은 로컬 `JWT_SECRET` 부재로 첫 시도에서 중단됐지만 이미지 빌드는 완료됐고, NAS의 기존 `.env`를 유지해 배포했다. +- 라이브 확인: `/`, `/app/login`, `/health`, `https://d3ro-admin.chanpaca.net/login`, Worker `/worker-health` 및 프록시 `/health` 모두 HTTP 200. +- Worker `d3ro-voice-api` 현재 코드 배포 ID `b9e68793-b061-481f-a620-dab73a91a9d8`; Site Bridge `cca39627-c96e-4164-892e-6ffb3a1b54bf`. 기존 사설 IP `BACKEND_ORIGIN`은 제거됐다. + +## Push drain 복구 + +1. 최초 scheduled 로그는 `push_drain_http_401`이었다. +2. `push-drain.test.ts`에 현대식 서비스 키의 `apikey` 계약을 먼저 추가해 RED를 확인하고, `push-drain.ts`가 Bearer + `apikey`를 모두내도록 수정했다. Deno 15/15 GREEN. +3. Worker에는 현재 Supabase 프로젝트의 default secret을 주입했다. 값이나 저장 파일 내용은 출력하지 않았다. +4. 직접 drain HTTP 200 `claimed=1 completed=1 pending=0` 및 실제 Cloudflare scheduled 로그 `claimed=1 completed=1 pending=0`을 확인했다. +5. `send-push`를 VAPID 설정 후 운영 재배포하고 drain HTTP 200 `claimed=0 completed=0 pending=0`을 재확인했다. +6. `WEBPUSH_VAPID_PUBLIC_KEY`/`WEBPUSH_VAPID_PRIVATE_KEY`/`WEBPUSH_SUBJECT`는 Supabase에만 존재 여부를 확인했다. 공개키는 `release/webpush-vapid-public.key`, 개인키는 저장소에 없다. + +## 운영 audio-purge 실제 스케줄 + +- `cron.job`: `purge-orphaned-audio` active, `*/10 * * * *`. +- 초기 Vault에는 `project_url`/`service_role_key`가 없어 cron이 no-op이었다. 현재 프로젝트 URL과 default secret으로 Vault를 복구했다. +- 고립된 임의 UUID의 queue row와 실제 WAV Storage 객체를 만들고 09:00 UTC 스케줄을 관찰했다. +- 결과: queue `1 → 0`, Storage object `1 → 0`, `net._http_response.status_code=200`. 사용자 데이터는 대상이 아니며 임시 객체는 삭제됐다. + +## 결제·레거시·App Links + +- 운영 Supabase 함수 목록에 Stripe 함수 3종이 없고 `STRIPE_*` 시크릿 5종도 모두 absent다. Stripe 대시보드의 과거 webhook 비활성화만 외부 확인으로 남는다. +- 운영 구독은 `provider=none,status=active` 6건이며 Payple 갱신·만료 대상은 0건이다. `payple-renew` 직접 호출은 실결제 없이 HTTP 200 `{renewed:0,failed:0,expired:0}`이었다. Forgejo 스케줄 이력은 기존 API 토큰 401로 미확인이다. +- `node scripts/ci/verify-android-app-links.mjs` GREEN: live `assetlinks.json`이 package `com.d3ro.voice`, Play app-signing SHA-256 `01001921…0DAB`와 정확히 일치하고 upload certificate를 포함하지 않는다. + +## 모바일 현재 소스 빌드·E2E + +- 현재 `main` + 이번 검증 스크립트 수정으로 `1.17.1-e2e.20261117.1` / `1170101` APK를 빌드했다. SHA-256 `4FAF848A04A5B77CAFB1197E31472FB60F31B379C59CFA7E802935D617F33B4A`. +- `verify-android-artifact.mjs`는 기본적으로 release/E2E cleartext를 거부하고, 로컬 E2E만 `--allow-local-cleartext true`를 명시할 때 허용한다. Self-test와 실제 universal APK 검증 GREEN. +- 다중 기기 환경에서 Maestro가 다른 기기를 선택하는 문제를 재현하고, `run-mobile-emulator-gate.sh`의 모든 Maestro 호출에 `--udid`를 적용했다. +- `emulator-5582`에서 fresh-install auth, fresh-install signup, invite deep-link가 각각 PASS했다. 작은 화면 `840x1490`도 스크롤 경합을 보정한 뒤 독립 실행에서 3분 6초 PASS했다. +- 후속 전체 실행의 small-screen 단계에서는 에뮬레이터의 `package`/`activity`/`window` 서비스가 사라지는 환경 오류가 발생했다. 앱 어설션 실패가 아니며, 동일 small-screen의 독립 PASS와 구분한다. + +## Cloud STT 경계 + +- 운영 `stt-proxy`를 임시 계정과 4.7초 로컬 TTS WAV로 호출하면 HTTP 502 `gateway/http_504`이고 direct provider는 시도되지 않았다. +- NAS Whisper 재시작 후 직접 전사는 정확한 한국어 문장을 반환했지만 콜드 로딩 포함 약 101초였다. 운영 공개 경로의 30초 경계에서는 여전히 실패한다. +- 유효한 OpenAI/Groq 키 또는 상시 GPU가 없으므로 외부 차단을 유지한다. 임시 STT 계정은 삭제 HTTP 200을 확인했다. + +## 운영 Web Push 실제 브라우저 경계 + +- VAPID 공개키를 포함한 Web 이미지를 NAS에 재빌드·배포하고 `/app/login` HTTP 200을 확인했다. +- 일반 Chrome persistent profile에서 임시 운영 사용자의 로그인·알림 권한·service worker·Push 구독·outbox 등록이 성공했다. +- Headless와 visible Chrome의 두 실행 모두 `push_deliveries.status='delivered'`를 기록했지만 `registration.getNotifications()`는 0이었다. 따라서 provider acceptance는 GREEN이지만 실제 알림 표시 수신은 계속 미검증이다. +- 두 실행 모두 임시 사용자 삭제 HTTP 200, 브라우저 임시 profile 삭제를 완료했다. + +### 모바일 취소 조작 보정 + +- 녹음 중 `record-cancel`은 광고 아래에 있어 자동 탐색이 실패했다. 광고·탭 바가 아닌 본문 내부에서 `70% → 30%`로 스와이프한 뒤 ID를 탭하니 `record-start` 복귀가 성공했다. 이 동작을 `authenticated-parity.yaml`에 적용했다. + +### Authenticated parity 최종 경계 + +- 로컬 격리 계정으로 로그인·Home·Free 테스트 광고·녹음 진입·권한 거부/허용·실제 녹음까지는 재현됐다. +- `record-cancel`은 짧은 paused-state 회복 플로우에서 한 번 성공했지만, 전체 recording 경로에서는 반복 실행 시 안정적으로 선택되지 않았다. 최종 전체 실행은 `record-cancel` 미선택으로 RED다. 이를 완료로 기록하지 않는다. +- 추가 시도에서 More의 Settings 진입까지 도달한 실행도 있었으나 전체 플로우는 완료하지 못했다. Maestro 스크롤·안정화·다중 기기 조합 문제를 추가 조사해야 한다. +- 로컬 임시 사용자는 삭제 HTTP 200, 로컬 Supabase는 중지하고 Docker Desktop도 기존 상태로 종료했다. + +## 2026-11-18 후속 모바일·보안 작업 + +### 모바일 공식 게이트 복구 + +- `record-cancel`은 광고 위의 사용 가능한 본문에서 대상 ID가 보일 때까지 스크롤하도록 바꿨다. 고정 좌표 탭이나 한 번의 스와이프에 의존하지 않는다. +- Account 로그아웃은 실제로 화면 밖에 있어 스크롤을 추가했다. More는 방문 위치가 유지되므로 Data portability → Dictionary → Commands 경로의 스크롤 방향을 실제 목록 순서에 맞춰 위로 정정했다. +- `1.17.1-e2e.20261118.1` / `1170102` 공식 실행에서 fresh auth, signup, invite, 840x1490 small-screen signup, authenticated parity가 모두 PASS했다. 인증 플로우는 2분 37초였고 fatal/Metro signature 0건, `external-gates.json`의 `authenticatedParity=PASS`다. 임시 로컬 계정은 매 실행 HTTP 200으로 삭제했다. +- `build-mobile-local-e2e.ps1`은 pinned Supabase CLI 3.2.0을 사용한다. PowerShell 5.1이 CLI의 stderr 경고를 오류로 승격하던 문제는 상태 조회 구간의 종료 코드를 별도 검사하도록 바꿨고, 이 시스템의 PowerShell 7 모듈 우선순위 때문에 `Get-FileHash`를 찾지 못한 문제는 Desktop edition에서 시스템 Utility 모듈을 명시 로드해 해결했다. 두 수정 후 스크립트 자체가 APK 생성과 SHA-256 대조까지 완료했다. +- Android `applicationId`와 iOS `PRODUCT_BUNDLE_IDENTIFIER`는 `com.d3ro.voice`, canonical auth/invite scheme은 `d3ro-voice`다. iOS의 사용하지 않는 `d3ro` 별칭을 제거하고 `verify-mobile-build-config.mjs --self-test`가 ID·scheme 변형을 거부함을 확인했다. + +### 기록 파일·원본 오디오 공유 + +- `HistoryDetailScreen`에 기존 텍스트 공유 외에 Markdown 파일 공유와 원본 오디오 공유를 연결했다. `history-share.ts`는 다듬은 전사/원문·요약을 TXT/Markdown으로 만들고, 원본 오디오는 신선한 signed URL로만 내려받는다. +- 원본 공유는 사용자의 별도 버튼 탭에서만 시작하고 50 MiB 상한·MIME 확장자·빈 파일·HTTP 오류를 검사한다. Android는 기존 `D3ROFileShareModule`의 FileProvider 임시 읽기 권한과 수명주기 정리를 사용한다. iOS는 파일 URI의 명시적 Share 시트를 사용한다. +- `history-share.test.ts` 5개와 기존 화면 테스트 확장 4개가 통과했다. 특히 준비 중 언마운트 시 늦은 공유 시트가 열리던 경로는 테스트에서 먼저 RED를 재현한 뒤 파일 정리와 미표시를 GREEN으로 확인했다. 전체 모바일 Jest는 104 suites / 658 tests였고, 언마운트 테스트 1개 추가 후 최종 게이트에서 다시 집계한다. +- 실제 외부 앱의 파일 수신은 `external-gates.json`에서 계속 `NOT_RUN_TARGET_APP_REQUIRED`다. 공급자 수신 증거 없이 `[x]`로 올리지 않는다. +- R-019의 강제 재처리는 아직 연결하지 않았다. 기존 오디오 경로는 완료된 동일 파일을 중복 제거해 기존 transcript를 반환하므로, 이를 우회하는 버튼을 실제 재처리처럼 표시하지 않았다. + +### 의존성·도구·데스크톱 경계 + +- Next.js 16.4.6, Mermaid 12.3.0, Electron 43.8.10, electron-vite 6.0.0, Vite 8.3.8, Vitest 5.1.0으로 갱신했다. Electron 44의 Clipboard 재작성은 채택하지 않고, 43에서 비동기화된 `readText`/`writeText`를 실제로 await한다. 새 비동기 원본 복원 회귀 테스트를 포함한다. +- Web/Admin의 Vite 8 OXC JSX 설정과 Admin·root의 명시적 Vitest 의존성을 정리했다. 기존 테스트의 중복 import 하나는 새 파서가 거부해 중복만 제거했다. +- Node는 `.nvmrc` 24.19.0 및 root/mobile `engines.node=24.x`로 맞췄다. 현재 기본 셸은 Node 23이므로 전역 설치를 바꾸지 않고 격리된 Node 24.19.0 실행 파일로 검증했고, `npm run rebuild:test`로 better-sqlite3 ABI 137을 맞췄다. +- `npm run build:all` GREEN(115.78초). 데스크톱 212 files / 2,891 tests, Web 52, Admin 6 tests가 포함됐다. 루트 audit은 critical 0이며 나머지 high 25 / moderate 12를 0으로 위장하지 않는다. 특히 picomatch는 현재 최신 4.0.7도 공개 권고 대상이라 안전한 상위 수정 버전이 아직 없다. +- 실행 중인 설치본 프로세스는 있었지만 모든 main window handle이 0이고 `orca` CLI도 없었다. Electron은 agent subshell에서 새로 실행하지 않았으므로 실제 GUI·제안·클립보드·긴 회의 검증은 여전히 외부 터미널 수동 게이트다. +- 후속 `npm run verify:all`은 Node 24.19.0에서 GREEN이다: desktop 212 files / 2,891 tests, mobile 104 suites / 659 tests, typecheck·lint·i18n·테스트 위생·품질·디자인 계약 포함. +- 최종 E2E APK는 `1.17.1-e2e.20261118.3` / `1170104`, SHA-256 `2AE6BAE279DD507B73D0F1DEE03C11D0649CFC554A4BDFD0FC9BCEFD94912057`다. `verify-android-artifact.mjs --mode e2e`에서 서명·bundle·model·arm64-v8a/x86_64·버전 계약 GREEN. +- 같은 최종 APK로 공식 전체 게이트를 다시 실행해 6분 15초 만에 fresh auth 34초, signup 42초, invite 15초, small-screen signup 48초, authenticated parity 2분 28초 모두 PASS했다. fatal/Metro signature 0, 임시 계정 삭제 HTTP 200이다. +- `navigation-shell-search-local.yaml`은 임시 사용자의 실제 history row와 공식 `mobile_create_meeting_workspace_v2` RPC로 만든 meeting을 사용해 1분 17초 PASS했다. 두 검색 결과, 각 상세 이동과 Markdown 파일 버튼을 확인했다. 종료 시 삭제 요청의 로컬 소켓 오류는 Node 24 정리 실행에서 해당 계정 1건을 HTTP 200으로 삭제하고 잔여 0건을 재조회해 해결했다. +- Electron 버전은 root launcher·desktop·lock·`electron-builder.yml`·`sync-version.mjs`를 모두 43.8.10으로 맞췄다. `version:check` GREEN, `release:metadata:test` 18 negative cases GREEN, root/mobile `npm ci --dry-run --ignore-scripts` PASS다. 최종 `build:all`은 113.61초 만에 GREEN이었다. + +### NAS 보안 이미지 최종 반영 + +- 첫 전체 SSH 빌드는 30분 실행 제한으로 중단됐고, 이어서 `-BuildOnly -Services web`으로 Web만 재빌드했다. Admin은 이미 완료된 이미지를 재사용했다. +- 운영 Web 이미지·실행 컨테이너: `sha256:f36c466137ff5b34fc320d3194dfae58f361ba91527e82934154e1761c3906d3`; Admin: `sha256:1a98f25dc9662aef804fa75076bc0c0dbaeae67e8ab335d407a646d77836ca58`. 둘 다 Next.js 16.4.6 빌드다. +- 롤백 태그는 Web/Admin 모두 `rollback-20261118-044054`다. NAS 기존 `.env`와 API 컨테이너는 유지했다. +- 컨테이너 시작 직후 Web localhost의 첫 curl은 connection reset이었지만, 이후 NAS Web/Admin localhost와 공개 `/app/login`, admin `/login`, `/health`가 모두 HTTP 200이다. 롤백 없이 현재 이미지를 유지한다. diff --git a/docs/map/02-infrastructure.md b/docs/map/02-infrastructure.md index 33e3350a..6bfa3f24 100644 --- a/docs/map/02-infrastructure.md +++ b/docs/map/02-infrastructure.md @@ -1,7 +1,7 @@ # 02 — Repository & Infrastructure Map > Surface: whole repo -> Last updated: 2026-11-14 — `v1.17.1` 전 표면 운영 배포 반영(Desktop/Runtime/Portable Forgejo `200`, Supabase 74 migrations + 24 Edge Functions, Site Pages `d3ro.chanpaca.net`, Worker `d3ro-voice-api`, NAS Docker `api`/`admin`/`web`), 루트 `.dockerignore` 빌드 컨텍스트 격리(대용량 `apps/desktop/`·`scratch/`·`.chrome-*` 제외), `verify-desktop-installer-smoke.mjs` ASAR Pickle 32 MiB 헤더 판독 수정(`405ae16`) +> Last updated: 2026-11-17 — `v1.17.1` + Wave 7 NAS·Worker·Site Bridge 운영 반영, Supabase 74 migrations + 24 Edge Functions, 생산 audio-purge/push drain 검증, `release/webpush-vapid-public.key` 공개키 SSOT와 NAS `-BuildOnly` 경로 추가 > Source of truth for: layout, workspaces, build/test commands, CI/CD, Docker, deploy, scripts, resources --- @@ -59,7 +59,9 @@ Note: root `package.json` is the only workspace manifest and declares npm worksp | .NET SDK | 10.0.300 (rollForward latestPatch) | `global.json` | | Deno | 2.8.1 | CI (`edge-functions`) | | JDK | 17 | mobile CI | -| Electron | 33.4.11 | `apps/desktop/electron-builder.yml` | +| Electron | 43.8.10 | `apps/desktop/package.json` — 44의 Clipboard 전면 재작성 전 마지막 지원 라인; 43의 비동기 text read/write는 await로 처리 | +| Next.js | 16.4.6 | `apps/web/package.json`, `apps/admin/package.json` | +| Vite / electron-vite / Vitest | 8.3.8 / 6.0.0 / 5.1.0 | root·desktop·web·admin `package.json`; Node 24 필요 | | koffi | 3.3.1 | `apps/desktop/package.json` — FFI into user32/kernel32 for foreground window title/pid/exe/bounds (`utils/win32-foreground.ts`). Chosen over `get-windows` because that package needs an install script this repo does not run; koffi ships N-API 8 prebuilds as optional deps. `asarUnpack` covers `koffi`/`@koromix`. | | uiautomation / comtypes | 2.0.29 / 1.4.17 | `apps/desktop/sidecar/requirements.txt` (Windows only) — UI Automation snapshot behind `GET /uia/focus` (`sidecar/uia_bridge.py`). Dev install: `apps/desktop/sidecar/.venv/Scripts/python.exe -m pip install uiautomation comtypes`. | | React Native | 0.85 | `apps/mobile-rn/package.json` | @@ -205,7 +207,7 @@ Stages `validate → test → build → e2e → package → publish → deploy`. | `docker-compose.yml` | Dev/self-host: `d3ro-api-server` (5050→5000, `./data` volume), `d3ro-admin` (3001), `d3ro-web` (3002, `@d3ro/web` basePath `/app`, Supabase/Payple keys as build args), optional `ollama` (profile `ai`, 11434) | | `docker-compose.nas.yml` | NAS: prebuilt `d3ro-voice-api:latest` / `d3ro-voice-admin:latest` / `d3ro-voice-web:latest` (3002) / `d3ro-whisper` (faster-whisper, OpenAI-compatible). No legal-doc `wwwroot` mount and no `NEXT_PUBLIC_API_URL` — both were dropped 2026-09-26 (Wave 3, b6fe588); legal pages are served only from `site/public`. Root `.dockerignore` excludes non-web/admin directories (`apps/desktop/`, `scratch/`, browser profiles, etc.) so remote `DOCKER_HOST=ssh://...` builds of `admin`/`web` skip local release artifacts; `apps/api-server` builds with `./apps/api-server` context. | -Deploy scripts: `scripts/deploy-nas.ps1`, `scripts/deploy-nas.sh`, `scripts/nas-control.sh` (start/stop/restart/status/logs/backup/update). `scripts/deploy-site-to-nas.js` was deleted 2026-09-26 (Wave 3, cd9d199) — site deploy is Cloudflare Pages only (`.forgejo/workflows/deploy-site.yml`). +Deploy scripts: `scripts/deploy-nas.ps1`, `scripts/deploy-nas.sh`, `scripts/nas-control.sh` (start/stop/restart/status/logs/backup/update). **2026-11-17:** PowerShell `-BuildOnly` builds remote images without tar/secret packaging; both NAS scripts fall back to the versioned public `release/webpush-vapid-public.key` when VAPID env is blank. **2026-11-18:** PowerShell `-Services api,admin,web` selects image builds; `-BuildOnly -Services web` preserves already-built API/Admin images during a targeted rebuild. `scripts/deploy-site-to-nas.js` was deleted 2026-09-26 — site deploy is Cloudflare Pages only. Public endpoints (production): `https://d3ro.chanpaca.net` — **랜딩/다운로드 센터**(site/, Pages `d3ro` 배포본을 Workers 라우트 브리지가 서빙), `https://d3ro.chanpaca.net/app` — **웹앱**(`apps/web`, basePath `/app`; 사이트 브리지 워커가 `WEB_APP_ORIGIN`(터널 호스트)으로 전달하며, 호스트가 비어 있으면 `/app`은 503을 반환한다 — 터널 호스트 설정 대기), `https://d3ro-admin.chanpaca.net` (admin CRM). Edge: `server/cloudflare-worker` proxying to the NAS origin, plus a **Cron Trigger** (`* * * * *`) that drains the Supabase push outbox via `send-push?mode=drain` (`src/push-drain.ts`; needs `SUPABASE_URL` var + `SUPABASE_SERVICE_ROLE_KEY` secret). Tunnel: Cloudflare Tunnel `kd-nas` (NAS 포털/API는 현재 이 호스트네임에 바인딩되어 있지 않다). @@ -213,7 +215,7 @@ Public endpoints (production): `https://d3ro.chanpaca.net` — **랜딩/다운 ## 7. `server/supabase` (backend) -- `config.toml` — project `d3ro-voice`, ports 55321-55324, DB major 17, Supabase CLI 3.x `[local_smtp]`, auth redirects (localhost, `d3ro.chanpaca.net`, `d3ro-voice://auth-callback`), providers Google/GitHub/Apple. `audio-purge` has an explicit function stanza with gateway JWT verification disabled because its handler verifies the exact pg_cron service credential. An isolated local stack proved missing/non-service key 401, service 200, and pg_cron/Vault/pg_net removal of the queue row, `audio_files` row, and Storage object; deployment and the production schedule remain unverified. +- `config.toml` — project `d3ro-voice`, ports 55321-55324, DB major 17, Supabase CLI 3.x `[local_smtp]`, auth redirects (localhost, `d3ro.chanpaca.net`, `d3ro-voice://auth-callback`), providers Google/GitHub/Apple. `audio-purge` disables gateway JWT verification because its handler verifies the exact service credential. Local proof and the 2026-11-17 production scheduled run both passed; production Vault/pg_net returned HTTP 200 and deleted an isolated real WAV object and queue row. - `migrations/` — **74 SQL migrations** (schema, RLS, auth triggers, storage, team invites, knowledge/pgvector, push outbox, Payple billing (legacy Stripe columns/provider values kept for history), admin roles, mobile platform/monetization, atomic command reorder, device revocation, content reporting, audit log, meeting documents, STT quota reservations, ad reward replay protection, team activity feed, cross-device sync parity & tombstones, and immutable `meeting_memos.revision` CAS `20261113000001`). - `functions/` — **24 Deno Edge Functions** (`stt-proxy`, `llm-proxy`, `content-report`, `generate-meeting-document`, `embed-chunks`, `search-knowledge`, `realtime-token`, `team-invite`, `team-accept`, `send-push`, `audio-purge`, `account-delete`, `admin-users`, `admin-subscriptions`, `admin-payments`, `admin-audit-log`, billing `billing-catalog`/`payple-checkout`/`payple-manage`/`payple-renew`/`payple-webhook`, `iap-verify`, `admob-ssv`, `google-play-rtdn`; Stripe functions removed 2026-09-26). Shared contracts in `functions/_shared/` — push transports now include `webpush.ts` (VAPID + RFC 8291) and `apns.ts` (.p8 token) alongside FCM. CI (`edge-functions`) runs `deno check` + `deno test` and also the Cloudflare worker drain test. - `tests/` — integration/E2E for content report, mobile platform/recording/reward-race, payments, mobile release preflight, push, team push security, STT quota. @@ -247,6 +249,7 @@ Full detail: [`09-supabase-backend.md`](./09-supabase-backend.md). | `release/android-release-identity.json` | package `com.d3ro.voice`, Play app ID, app-signing SHA-256, upload cert SHA-256, evidence keyId, AdMob unit IDs | | `release/desktop-license-public.pem` | Ed25519 public key for desktop offline licenses | | `release/mobile-release-evidence-public.pem` | Ed25519 public key for mobile release evidence | +| `release/webpush-vapid-public.key` | Base64url P-256 Web Push public key; private key exists only in Supabase secrets. NAS web builds use this file when VAPID env is blank | | `apps/desktop/electron-builder.yml` | appId `com.d3ro.voice`, NSIS x64 (forced code signing), macOS DMG/ZIP arm64, generic Forgejo publish feed, asarUnpack native modules (`better-sqlite3`, `uiohook-napi`, `koffi`, `@koromix`, `@ffmpeg-installer`; `@nut-tree-fork` unpacked on macOS only), extraResources (icons, sounds, filtered `sox.exe`+`zlib1.dll`+`LICENSE.GPL.txt`, **sidecar**, ffmpeg, ollama) | | `apps/desktop/src/main/update-feed.ts` | Auto-update feed SSOT (canonical Forgejo + legacy GitLab mirror, channels) | | `release/update-policy.json` | Update policy SSOT (channels, minimum supported version, forced update, delta/full, staged rollout, kill switch) | diff --git a/docs/map/06-mobile-app.md b/docs/map/06-mobile-app.md index 81240ec6..cf27d319 100644 --- a/docs/map/06-mobile-app.md +++ b/docs/map/06-mobile-app.md @@ -32,7 +32,7 @@ Provider stack: `GestureHandlerRootView → SafeAreaProvider → AuthProvider | `UnifiedSearchScreen` | Authenticated record+meeting search, newest-first merged results, source-aware detail navigation | | `RecordScreen` | Recording + local-whisper/cloud transcription, import audio, share; entered from the hidden Record route/FAB | | `TalkScreen` | Voice/text AI chat: STT, LLM streaming, TTS; opened from More on the root stack | -| `HistoryScreen` / `HistoryDetailScreen` | History list/detail: sync, search, filters, audio playback, edit/share/favorite/delete | +| `HistoryScreen` / `HistoryDetailScreen` | History list/detail: sync, search, filters, audio playback, edit/text·Markdown-file share/favorite/delete; explicit source-audio sharing through a fresh signed URL and the native temporary-URI grant | | `MeetingsScreen` / `MeetingDetailScreen` | Meeting workspaces: create/rename/delete, existing-audio import through the durable meeting queue, transcript (with color-coded speaker badges & multi-speaker filter chips, 2026-11-13 `GAP-MTG-02`), memos (immutable `revision` CAS conflict detection, `GAP-SYNC-08`), documents/minutes, export, content report | | `MemosScreen` | Memos: list, tags, search, share | | `TemplatesScreen` | Dictation/meeting document templates CRUD | @@ -60,7 +60,7 @@ Provider stack: `GestureHandlerRootView → SafeAreaProvider → AuthProvider | `recording/` | Durable offline recording queue, retry processing, language handling | | `audio/` | Linked recording/audio cleanup | | `import/` | Audio pick/decode/validate, local Whisper fallback, resumable multipart upload, Android share-intent intake | -| `history/` | History service + local cache + sync hook | +| `history/` | History service + local cache + sync hook + `history-share.ts` TXT/Markdown documents and bounded signed source-audio download for explicit file sharing | | `meetings/` | Meeting workspace CRUD, realtime channels, processing jobs, transcripts/memos/docs | | `memos/` | Memo CRUD, tags, search, realtime, share | | `talk/` | Streaming LLM, transcription, TTS playback | @@ -118,11 +118,11 @@ The v4 shell also removed `DashScreen` and `WorksHubScreen`. Home replaces the d ## 6. Tests & evidence -- Jest: `npm --prefix apps/mobile-rn test` — current full tree **103 suites / 651 tests PASS** (2026-11-14 Wave 7 `bd3c1a9` / `cc3f746`, post-`v1.17.1`; Wave 6 baseline was 98 suites / 625 tests). Wave 6 added `features/shared/{service-guards,owned-cache-files}.ts`, `features/import/abort-guard.ts`, `lib/locale-speech.ts`, `features/meetings/meeting-error-message.ts`, and 9 regression suites. Wave 7 added 5 async lifecycle regression suites (`abort-and-stream-guards`, `context-lifecycle-guards`, `queue-and-history-races`, `recorder-lifecycle-races`, `screen-async-lifecycle`), hardened recorder claim/generation/poll-timer cleanup (`audio-recorder.ts`, `recorder/{nitro,android-foreground}-backend.ts`), fixed `durable-processing-queue.ts` `finishCleanupItem(item)` audio-first deletion with 60 s retry on failure plus `suspendedUsers`/`discardedItems` checks and `use-history-sync.ts` guards, added pre-abort/generation-header cancellation in `chat-service`/`admin-service`/`device-service`/`llm-stream-service`, and isolated user-switch `scopeGenerationRef` + `try/catch/finally` busy guards across 4 contexts (`mobile-ads`, `billing`, `device`, `entitlement`) and 7 screens (`Commands`, `HistoryDetail`, `Home`, `Knowledge`, `Meetings`, `Record`, `Teams`). The current `.3` Fold6 APK renders the MTG-13 entry/editor; device file selection→transcription→minutes E2E and external Play/Firebase/AdMob gates remain open. -- Maestro E2E: `apps/mobile-rn/.maestro/` + evidence in `.maestro-output/`. +- Jest: `npm --prefix apps/mobile-rn test` — current full tree **104 suites / 659 tests PASS** (2026-11-18 `verify:all`; historical 2026-11-14 Wave 7 `bd3c1a9` / `cc3f746`, post-`v1.17.1`; Wave 6 baseline was 98 suites / 625 tests). Wave 6 added `features/shared/{service-guards,owned-cache-files}.ts`, `features/import/abort-guard.ts`, `lib/locale-speech.ts`, `features/meetings/meeting-error-message.ts`, and 9 regression suites. Wave 7 added 5 async lifecycle regression suites (`abort-and-stream-guards`, `context-lifecycle-guards`, `queue-and-history-races`, `recorder-lifecycle-races`, `screen-async-lifecycle`), hardened recorder claim/generation/poll-timer cleanup (`audio-recorder.ts`, `recorder/{nitro,android-foreground}-backend.ts`), fixed `durable-processing-queue.ts` `finishCleanupItem(item)` audio-first deletion with 60 s retry on failure plus `suspendedUsers`/`discardedItems` checks and `use-history-sync.ts` guards, added pre-abort/generation-header cancellation in `chat-service`/`admin-service`/`device-service`/`llm-stream-service`, and isolated user-switch `scopeGenerationRef` + `try/catch/finally` busy guards across 4 contexts (`mobile-ads`, `billing`, `device`, `entitlement`) and 7 screens (`Commands`, `HistoryDetail`, `Home`, `Knowledge`, `Meetings`, `Record`, `Teams`). The current `.3` Fold6 APK renders the MTG-13 entry/editor; device file selection→transcription→minutes E2E and external Play/Firebase/AdMob gates remain open. +- Maestro E2E: `apps/mobile-rn/.maestro/` + evidence in `.maestro-output/`. **2026-11-18 current-source `1.17.1-e2e.20261118.3` / `1170104` (SHA-256 `2ae6bae2…2057`) official full gate PASS:** fresh auth 34 s, signup 42 s, invite 15 s, small-screen signup 48 s, authenticated parity 2 m 28 s; fatal/Metro matches 0 and the temporary account was deleted. [Evidence](../evidence/2026-11-17-backlog-operations.md). - Current `.3` isolated API 34 AVD: canonical fresh auth **37 s PASS**, signup **50 s PASS**, including persistence after restart. Initial emulator failure was observed with a System UI ANR dialog; it passed after the dialog was dismissed. Both failure and retry are retained under `test-results/recovery-2026-11-01/emulator-*`. The new empty test AVD alone used `clearState`; personal Fold6 data was preserved. This does not resolve the separate Fold6 first-run failures. - Historical `.2` Fold6 physical-device gate (Android 16, `SM-F956N`): fresh auth **60 s PASS**, fresh signup **67 s PASS**, warm/cold invite **31 s PASS**, and small-screen signup **61 s PASS** on 2026-11-01. Fatal/Metro matches 0; evidence is `apps/mobile-rn/.maestro-output/fold6-20261101-fix1/`. Authenticated parity was not run because test credentials are absent. -- v4 local runtime: `apps/mobile-rn/.maestro/navigation-shell-search-local.yaml`; 320dp dark **1/1 PASS, 88 s** at `scratch/design-audit/wave45/navigation-shell-search-320-dark-verified.xml`, and 411dp light **1/1 PASS, 100 s** at `scratch/design-audit/wave45/navigation-shell-search-411-light-verified.xml`. +- v4 local runtime: `apps/mobile-rn/.maestro/navigation-shell-search-local.yaml`; 320dp dark **1/1 PASS, 88 s** at `scratch/design-audit/wave45/navigation-shell-search-320-dark-verified.xml`, and 411dp light **1/1 PASS, 100 s** at `scratch/design-audit/wave45/navigation-shell-search-411-light-verified.xml`. **2026-11-18 current-source seeded local flow PASS (77 s):** actual local history + meeting created through the canonical meeting RPC, two unified-search results, both detail destinations and the Markdown-file control were observed; the temporary account was deleted and rechecked as absent. - Current runtime APK: `com.d3ro.voice`, `1.15.4-e2e.20261101.3` / `2026110103`, 147158575 bytes, SHA-256 `937d2a0b3fb6b810516f07e91dd97ffe99d34c5885a72f21805a51e8a408027f`. Build Tools 37 verifier PASS; installed identity matches. Import entry and metadata editor rendered on Fold6 without saving new data. Earlier `.3` fresh-auth + retry both FAILED at onboarding visibility (black screenshots); those failures are retained. No data reset was performed, so `.2` historical passes are not current first-run proof. Production configuration fails with `firebase_expected_project_id_missing`, including with root `.env`. [Evidence](../evidence/2026-11-01-completion.md). - 2026-11-04 current-source E2E runtime: `1.16.1-e2e.20261104.1` / `2026110401`, SHA-256 `3d2875c74b555dbcd854468e57b9b4b3a8e6c9657f210760cbe24a77ee92cf7c`, verifier PASS, then state-preserving `adb install -r` and cold launch PASS on Fold6 Android 16 and API 34 AVD. Physical Notifications status/privacy/recent cards passed a `clearState:false` Maestro flow without a permission action. UIAutomator and AVD font-scale 2.0/rotation are automated evidence only; manual TalkBack, notification permission transitions/FCM receipt, app-wide a11y, and iOS remain. [Evidence](../evidence/2026-11-04-mobile-runtime-a11y.md). - Committed evidence summary: [`docs/evidence/wave45-mobile-shell-search-2026-09-28.md`](../evidence/wave45-mobile-shell-search-2026-09-28.md). diff --git a/docs/map/09-supabase-backend.md b/docs/map/09-supabase-backend.md index 2f396617..b4eb1f6c 100644 --- a/docs/map/09-supabase-backend.md +++ b/docs/map/09-supabase-backend.md @@ -43,7 +43,7 @@ Forgejo CI runs `check:migrations:test` and `check:migrations`. These gates vali | `realtime-token` | OpenAI Realtime ephemeral token (tier-gated, session quota) | | `generate-meeting-document` | AI document generation (minutes/report/idea-note/mindmap) | | `embed-chunks` / `search-knowledge` | RAG embeddings + semantic search. `knowledge_embedding` budgets are read from generated `PLAN_QUOTA`, whose source is `packages/core/src/plan-catalog.ts` | -| `audio-purge` | Service-only audio object purge worker invoked by pg_cron. `config.toml` sets `verify_jwt = false` so modern service keys reach the handler; the handler then authorizes the exact service credential before queue/storage work. Isolated local runtime proof on 2026-11-04 covered missing/non-service key 401, service-key 200, direct drain, and `pg_cron` → Vault → `pg_net` → Edge → Storage deletion | +| `audio-purge` | Service-only audio object purge worker invoked by pg_cron. `config.toml` sets `verify_jwt = false` so modern service keys reach the handler; the handler then authorizes the exact service credential before queue/storage work. Local proof (2026-11-04) and production proof (2026-11-17) both cover `pg_cron` → Vault → `pg_net` → Edge → Storage. In production the isolated probe queue and real WAV object changed `1 → 0`, with `net._http_response.status_code=200` at 09:00 UTC | | `content-report` | AI content reporting | | `team-invite` / `team-accept` | Team invitations | | `send-push` | Push delivery | @@ -65,7 +65,7 @@ Integration/E2E: content-report red e2e, content-reporting (ps1/sql), mobile pla ## 2. Cloudflare worker (`server/cloudflare-worker/`) -- `wrangler.toml` — worker `d3ro-voice-api`, compat 2024-04-01, `BACKEND_ORIGIN="https://d3ro.chanpaca.net"` in source (Wave 7 `c68e81e`; note live Worker `fe6d9532-0052-48f5-b62c-45c86f6aaaa5` still retains pre-Wave-7 dashboard var `http://192.168.0.39:5050` from `--keep-vars`), optional custom domain route (commented). +- `wrangler.toml` — worker `d3ro-voice-api`, compat 2024-04-01, `BACKEND_ORIGIN="https://d3ro.chanpaca.net"` in source and production (2026-11-17 deployment `b9e68793-b061-481f-a620-dab73a91a9d8`; `/worker-health` and proxied `/health` both HTTP 200), optional custom domain route (commented). - `src/index.ts`, `src/origin-policy.ts`, `src/push-drain.ts` — CORS preflight, `/worker-health`, origin policy + loop guard (`508`/`503`), null-body status handling (`204`/`205`/`304`), forwards to backend origin with `X-Forwarded-*` / `X-D3RO-Edge-Proxy` headers. - `server/cloudflare-site-bridge/` — Pages/Worker bridge hardened in Wave 7 with `508` loop guard, path smuggling `400`, and `deno.json` (`src/index.test.ts` 5/5 PASS). @@ -100,7 +100,7 @@ Shared TS types for these live in `packages/api-client` (SSOT). - Push: Supabase owns tokens/devices/outbox/retries. Transports implemented for **FCM, Web Push (VAPID + RFC 8291), and APNs (.p8 token)**; the Cloudflare Worker cron drains the outbox every minute. Android still requires FCM at the device. Details: `docs/deployment/push-transport-without-firebase.md`. - Content safety: generation receipts + `content-report` **implemented**. - Data portability (`account-delete`, export/restore): **implemented**. -- Audio purge source wiring, unit tests, and an isolated local pg_cron/Vault invocation are verified: the fixture queue, `audio_files` row, and Storage object each changed from one to zero and `net._http_response` recorded HTTP 200. Deployment and the production schedule/Vault/object path remain unverified. +- Audio purge source wiring and local/production pg_cron paths are verified. On 2026-11-17 the production Vault was populated, and the 09:00 UTC scheduled invocation deleted an isolated real Storage object and its queue row (`1 → 0`), recording `net._http_response.status_code=200`. External gates are enumerated in `docs/v3/MOBILE_APP_COMPLETION_SSOT.md` §0/§6 and mirrored in `11-gap-backlog.md` (`EXT-*`, `BE-*`). @@ -117,4 +117,4 @@ External gates are enumerated in `docs/v3/MOBILE_APP_COMPLETION_SSOT.md` §0/§6 ## Wave 7 hardening (2026-11-14, `c68e81e`, post-`v1.17.1`) - **Supabase Edge Functions (`server/supabase/functions`, Deno `273 passed | 0 failed`):** `stt-proxy/handler.ts` rejects requests whose `Content-Length` exceeds the cap with `413` before buffering; `embed-chunks/handler.ts` refunds quota only on upstream provider failures; `_shared/quota.ts` fails closed by rethrowing DB errors other than `PGRST116` (`stt-proxy/handler.test.ts`, `embed-chunks/handler.test.ts`, `_shared/quota.test.ts`). -- **Cloudflare Worker & Site Bridge (`server/cloudflare-worker`, Deno `15 passed | 0 failed`; `server/cloudflare-site-bridge`, Deno `5 passed | 0 failed`):** updated `wrangler.toml` default `BACKEND_ORIGIN` to `https://d3ro.chanpaca.net` (fixing the HTTP `403` error `1003` root cause in source; live Worker `fe6d9532-...` still holds the pre-Wave-7 dashboard var until redeployed without `--keep-vars` or updated), added `origin-policy.ts` rejecting non-HTTPS/private-IP/internal origins and proxy loops (`508`/`503`), handled null-body statuses (`204`/`205`/`304`), and applied origin validation to `push-drain.ts`; hardened `cloudflare-site-bridge` with `508` loop guard and path-smuggling `400` (`deno.json`, `src/index.test.ts`). +- **Cloudflare Worker & Site Bridge (`server/cloudflare-worker`, Deno `15 passed | 0 failed`; `server/cloudflare-site-bridge`, Deno `5 passed | 0 failed`):** added public-HTTPS origin validation, proxy-loop/path-smuggling guards and null-body handling. **2026-11-17 production:** Worker `b9e68793-...` and Site Bridge `cca39627-...` deployed; `/worker-health`, proxied `/health`, landing, `/app/login`, and admin login all return HTTP 200. `push-drain.ts` now sends both Bearer and `apikey` service credentials; the project default secret key replaced the stale Worker key, and a real scheduled run logged `claimed=1 completed=1 pending=0`. diff --git a/docs/map/10-feature-catalog.md b/docs/map/10-feature-catalog.md index 4663b846..1b8db475 100644 --- a/docs/map/10-feature-catalog.md +++ b/docs/map/10-feature-catalog.md @@ -57,7 +57,7 @@ Status quick-reference: `[x]` done+verified · `[~]` partial/unverified · `[ ]` | MEM-01 | History list + search | [x] | [x] | [x] | [x] | Desktop SQLite (`HistoryService.list`/`getAll` with SQLite `mode`, `isFavorite`, `tag`, `search`, and `beforeCreatedAt` cursor pagination — 2026-10-30 `GAP-UX-02` `[x]`); web/mobile Supabase | | MEM-02 | History detail + edit | [x] | [x] | [x] | [x] | Desktop `HistoryService.update` + `history:update` IPC + inline edit in `HistoryEntryCard.tsx` (2026-10-30 `GAP-UX-02` `[x]`); Mobile `HistoryDetailScreen` | | MEM-03 | History favorites | [~] | [x] | [x] | [x] | Desktop had **no** favorites until 2026-09-27 (the old `[x]` was wrong): `history.is_favorite` column, `HistoryService.setFavorite` + `history:setFavorite` IPC, star toggle in `HistoryEntryCard`; the value is the same Supabase `history.is_favorite` mobile filters on, so it syncs both ways (`apps/desktop/tests/main/sync/SyncEngine.test.ts` (20) + `apps/desktop/tests/integration/cross-device-sync.supabase.test.ts` (5, local Supabase stack)). `[~]` until a GUI run toggles it and mobile shows it | -| MEM-04 | History export / share | [x] | [~] | [x] | [x] | Desktop `MemoService.exportMarkdown` exports both tagged and untagged history with filter support and interactive save dialog (2026-10-30 `GAP-UX-02` `[x]`); web limited; mobile share sheet | +| MEM-04 | History export / share | [x] | [~] | [x] | [x] | Desktop `MemoService.exportMarkdown` exports both tagged and untagged history with filter support and interactive save dialog (2026-10-30 `GAP-UX-02` `[x]`); web limited; mobile text/Markdown/source-audio share (`history-share.ts`, `D3ROFileShareModule`). 외부 대상 앱 수신 증거는 SSOT R-017/R-018의 별도 게이트 | | MEM-05 | History audio playback | [~] | [x] | [x] | [x] | Signed URLs on web/mobile. **Desktop had no playback at all** (the old `[x]` was wrong); since 2026-09-27 the history card plays this device's recording from the file (`history:getAudio` → bytes → Blob) and a phone/web recording through a 5-minute signed URL of its `audio_files` row. Desktop recordings upload to the same `audio` bucket contract (`{userId}/desktop/...`, `audio_files`, ≤50 MiB, Settings > Cloud toggle `cloudSyncAudio`) so the phone plays them too (`tests/main/sync/SyncExtensions.test.ts` (9) + integration case "지식 문서·설정·녹음" against the local Supabase stack). `[~]` until a GUI run plays both kinds | | MEM-06 | Dictionary (custom vocabulary) | [x] | [x] | [x] | [x] | All surfaces CRUD; Desktop Red Team RT-02 & RT-18 fuzzed/verified | | MEM-07 | Dictionary import/export | [x] | [x] | [x] | [-] | Desktop `dictionary:import/export` JSON+CSV (file dialogs, `DictionaryService`); web `serializeDictionary`/`importDictionaryFile` + header buttons; mobile CSV/TXT export + CSV/JSON/TXT import via `data-portability` | @@ -115,12 +115,12 @@ Status quick-reference: `[x]` done+verified · `[~]` partial/unverified · `[ ]` | ACC-04 | Password reset / recovery deep link | [ ] | [ ] | [x] | [x] | Mobile ForgotPassword/UpdatePassword | | ACC-05 | Account profile / identity management | [~] | [~] | [x] | [x] | Desktop `LicenseTab`; mobile `AccountScreen` | | ACC-06 | Logout + local sensitive purge | [x] | [x] | [x] | [x] | Mobile central purge GREEN | -| ACC-07 | Account deletion (server cascade + local purge) | [ ] | [ ] | [~] | [x] | `account-delete` Edge; mobile device E2E pending. **2026-11-04 backend retention proof:** isolated local Supabase verified `audio-purge` authorization and both direct and pg_cron/Vault dispatch; the queued DB row, deleted `audio_files` row, and private Storage object were removed together. Production deployment/schedule remains `GAP-OPS-04`. | +| ACC-07 | Account deletion (server cascade + local purge) | [ ] | [ ] | [~] | [x] | `account-delete` Edge; mobile device E2E pending. `audio-purge` local proof (2026-11-04) and production scheduled proof (2026-11-17) are GREEN: Vault → pg_net → Edge returned HTTP 200 and the isolated real Storage object and queue row changed `1 → 0` (`GAP-OPS-04` resolved). | | ACC-08 | Cloud sync (per-user data) | [~] | [x] | [x] | [x] | Desktop `CloudSyncService` + `services/sync/`. The earlier `[x]` hid shipped defects fixed on 2026-09-27 (GAP-SYNC-01/02): first pull after sign-in fetched nothing, only the first meeting's memos/documents were pushed, deletions never propagated, team meetings were pulled into the personal DB and their `team_id` cleared on re-push, Realtime never connected. Anonymous local-mode data is now imported into the first account that signs in (`db/index.ts importLocalModeData`). Production deploy pending (GAP-SYNC-05) | | ACC-09 | Device registration + revocation | [~] | [~] | [x] | [x] | Mobile `DevicesScreen`. **Desktop registers itself since 2026-09-27** (`services/sync/device-registration.ts`, platform `windows`/`macos`, installation id in `AppConfig.deviceInstallationId`); revoking it from the phone signs the desktop out (Realtime on `devices` + 5-min heartbeat), signing out on desktop unregisters it. Web creates/checks in a stable `platform='web'` device only when the user opts into browser notifications, refuses to resurrect a revoked row, and revalidates an existing local Push subscription through the register RPC before showing it connected (`web-device.ts`, `web-push-session.ts`, `web-push.spec.ts`). An isolated throwaway local-browser run produced exactly one active web device and one device-bound token; no web device-management UI or production proof. Mobile parser accepts all five platforms and names them on the card. Local-stack desktop evidence exists; production pending GAP-SYNC-05 | | ACC-10 | Offline queue + retry | [~] | [ ] | [x] | [x] | Mobile durable queue | | ACC-11 | Data export/import (portability) | [~] | [ ] | [x] | [x] | Mobile canonical JSON E2E GREEN; desktop has export files. **2026-09-27 backend fix:** `export_account_portability` serialised whole rows, so columns added after the v1 archive (meeting creation metadata, meeting-document template/idempotency) made any account with meetings fail the exact-key check in both the server restore and the mobile parser; the export now projects onto v1 keys (migration `20260927000034`, integration test asserts memo/meeting keys) | -| ACC-12 | Notification / push | [ ] | [~] | [~] | [x] | Backend transports for FCM + Web Push (VAPID) + APNs (.p8) + outbox cron drain implemented. **2026-11-04 (`GAP-PUSH-03` `[~]`):** Web production sidebar calls the explicit user-gesture permission → stable web device → `subscribeWebPush` → `register_push_registration` path. Opt-out records disabled intent before bounded parallel server/local cleanup; a stale local subscription is re-registered through the server RPC before it may appear connected, and logout never waits on cleanup (`web-push.spec.ts` 17 contract tests). The standalone image copies `public/sw.js`, and missing build-time `NEXT_PUBLIC_VAPID_PUBLIC_KEY` fails closed. Isolated local evidence reached active device + token + pending outbox + completed drain + `push_deliveries.status='delivered'`; this is provider acceptance, not browser receipt. The final production-standalone browser attempt timed out at login navigation before the dashboard, so production permission/subscription/render/receipt and deployed cron/provider configuration remain open (`EXT-FIREBASE-01` for Android). | +| ACC-12 | Notification / push | [ ] | [~] | [~] | [x] | Backend transports for FCM + Web Push (VAPID) + APNs (.p8) + outbox cron drain implemented. **2026-11-17:** production VAPID/web image and scheduled drain are deployed; authenticated Chrome subscriptions succeeded and two outbox runs ended `delivered`. Browser `getNotifications()` was still 0, so visible receipt and APNs/FCM live delivery remain open. | --- diff --git a/docs/map/11-gap-backlog.md b/docs/map/11-gap-backlog.md index 7e9b9645..d71696bf 100644 --- a/docs/map/11-gap-backlog.md +++ b/docs/map/11-gap-backlog.md @@ -28,12 +28,12 @@ Legend: `[ ]` open · `[~]` in progress · `[!]` blocked externally · `[x]` res | GAP-REL-09b | Release | `d3ro.chanpaca.net`이 404였던 직접 원인: 이 Cloudflare 계정에 Pages 프로젝트 `d3ro`/`d3ro-voice`가 **존재하지 않아** 커스텀 도메인 바인딩이 없었다(빈 본문 404, `cf-ray`만 반환). Pages 커스텀 도메인은 존 DNS CNAME(`d3ro → d3ro.pages.dev`)을 요구하는데 기존 `d3ro` 레코드가 남아 있어 `CNAME record not set`으로 pending에 머물렀고, 로컬 wrangler 자격증명에는 DNS 스코프가 없다(403 Authentication error). `deploy-site.yml`은 `CF_API_TOKEN` 시크릿이 없어 마지막 게시 단계에서도 `exit 1`이다. | `server/cloudflare-site-bridge/`, `.forgejo/workflows/deploy-site.yml`, `docs/map/02-infrastructure.md` | `[x]` 2026-09-19: Pages 프로젝트 `d3ro` 생성 + `site/dist` production 배포(`d3ro.pages.dev` 200, `release-identity.json` = commit `2407f5a` / 1.3.7) + 커스텀 도메인 연결. DNS 없이 도메인을 살리기 위해 Workers 라우트 브리지(`server/cloudflare-site-bridge`, `d3ro.chanpaca.net/*` → Pages 프록시, `npx wrangler deploy`)를 배포 → 라이브 확인: `/`·`/privacy/`·`/terms/`·`/delete-account/` 200, 라이브 번들이 설치 파일명을 `1.3.7`로 계산, `/download.html` → `/#download`. 남은 정리 2건: (1) 대시보드에 CNAME을 추가한 뒤 브리지 워커 삭제, (2) CI 자동 게시를 위해 `CF_API_TOKEN`(Pages/Workers Edit) + `CF_ACCOUNT_ID`=`8e83cc130e7329c160cf2b88d6b4c20a`를 Forgejo 시크릿에 등록. **2026-09-23:** CI `deploy`(deploy-site.yml)는 `CF_API_TOKEN` 부재로 run#71까지 여전히 실패한다. 로컬 인증 wrangler(pages:write)로 `npm run build --prefix site` → release-identity 작성 → `npx wrangler pages deploy site/dist --project-name d3ro --branch main`을 수동 배포했고, 라이브 `https://d3ro.chanpaca.net/release-identity.json`이 commit `5c11ee2` / version `1.5.0`을, 라이브 번들이 설치 파일명 `D3RO-Voice-Setup-1.5.0-x64.exe`를 보고한다. 자동 게시에는 여전히 시크릿 등록이 필요하다. | | GAP-BILL-01 | Billing | 사이트 가격과 서버 청구 금액·결제 진입 URL이 제각각이었다. | `packages/core/src/plan-catalog.ts`, `packages/core/src/web-urls.ts`, `scripts/ci/sync-core-contract.mjs` | `[x]` 2026-09-26 (Wave 3, 88f24d8·b6fe588): 가격·쿼터·공개 URL 정본을 core 두 파일로 합치고 Deno는 생성 사본(`contract:check`). Payple 함수 4종+billing-catalog 운영 재배포(payple-* v9, billing-catalog v5) → 신규·갱신 모두 ₩2,900/₩8,900. 결제 진입은 `/app/billing` 하나. **2026-11-04:** `knowledge_embedding` 쿼터도 `PLAN_QUOTA`에 편입하고 `embedding-quota.ts`가 생성 계약을 소비하도록 중복 상수를 제거했다. | | GAP-BILL-02 | Billing | **Payple 정기 갱신이 한 번도 실행되지 않았다.** 갱신 cron(`payple-renew`)이 `.github/workflows`에만 있었는데 GitHub 원격이 없다. 웹 Payple 결제용 `NEXT_PUBLIC_PAYPLE_CLIENT_KEY`는 설정된 적이 없다. | `.forgejo/workflows/payple-renew.yml`, `apps/web/src/components/billing/payple-checkout-button.tsx`, `apps/web/Dockerfile` | `[~]` 2026-09-26: 워크플로 Forgejo 이식(dc43884), `CRON_SECRET` 새로 발급해 Supabase 함수 시크릿·Forgejo 시크릿에 등록, Forgejo `SUPABASE_URL` 등록 — main에 push되면 스케줄이 등록된다. **백로그(사용자 결정, 2026-09-27):** 아직 Payple 계약·계정이 없다. 웹 Payple 클라이언트 키(`NEXT_PUBLIC_PAYPLE_CLIENT_KEY`)는 계약 후 `.env`에 넣고 웹 이미지를 다시 빌드한다. 그 전까지 웹 결제 버튼은 꺼진 상태로 둔다. Stripe는 쓰지 않고(2026-09-26 저장소에서 제거, GAP-BILL-03), Google Play 가격은 스토어가 정본이라 사이트에 표시하지 않는다. | -| GAP-BILL-03 | Billing | **Stripe 결제 제거 — 운영 잔여물 정리.** 사용자 결정(2026-09-26)으로 저장소에서 Stripe 코드·설정·테스트를 모두 지웠다(함수 3종, 웹 checkout/portal 버튼, `billing-catalog`의 Stripe 가격 조회, 데스크톱 `CheckoutModal`·`payment:*` IPC, `billingUrl()`의 `success`/`canceled` 복귀 쿼리). 배포된 Supabase 함수와 시크릿은 아직 운영에 남아 있다. 과거 `provider='stripe'` 행·`stripe_*` 컬럼·마이그레이션은 이력 호환으로 유지한다. | `server/supabase/config.toml`, `server/supabase/functions/billing-catalog/index.ts`, `apps/web/src/lib/billing-catalog.ts` | `[ ]` 운영: `supabase functions delete stripe-checkout`·`stripe-portal`·`stripe-webhook`, 시크릿 `STRIPE_SECRET_KEY`·`STRIPE_WEBHOOK_SECRET`·`STRIPE_PRICE_PRO`·`STRIPE_PRICE_PRO_PLUS`·`STRIPE_PRICE_TEAM` unset, Stripe 대시보드 웹훅 엔드포인트 비활성화. `billing-catalog` 재배포는 웹앱 배포보다 먼저(웹 파서가 Stripe 가격을 거부). | +| GAP-BILL-03 | Billing | **Stripe 결제 제거 — 운영 잔여물 정리.** 저장소에서는 2026-09-26에 제거했고 과거 `provider='stripe'` 행·`stripe_*` 컬럼은 이력 호환으로 유지한다. | `server/supabase/config.toml`, `server/supabase/functions/billing-catalog/index.ts`, `apps/web/src/lib/billing-catalog.ts` | `[~]` 2026-11-17: 운영 Supabase 함수 목록에 `stripe-checkout`·`stripe-portal`·`stripe-webhook`이 없고 5개 `STRIPE_*` 시크릿도 모두 absent임을 확인했다. 남은 외부 항목은 Stripe 대시보드의 과거 웹훅 엔드포인트 비활성화 확인뿐이다. | | GAP-WEB-01 | Web | 웹앱(`apps/web`)이 공개되지 않았다(배포 경로가 없었음). | `apps/web/Dockerfile`, `docker-compose.nas.yml`, `server/cloudflare-site-bridge` | `[x]` 2026-09-26: `/app` basePath·NAS `d3ro_voice_web`(3002). 터널 `kd-nas` ingress에 `d3ro.chanpaca.net` path `^/app` → NAS 3002를 추가하고 브리지 워커가 `/app`·`/api`·`/health`를 도메인 원본(터널)으로 흘린다(4aadee8). Supabase `site_url`을 `https://d3ro.chanpaca.net/app`으로(기존 localhost:3000), 허용 목록에 `/app/**` 추가. 라이브 `/app/login` 200. 같은 수정으로 9/19부터 끊겨 있던 API(`/api`, 관리자 로그인·stt-proxy)도 복구. | | GAP-OPS-01 | Ops | NAS 운영 compose가 저장소와 어긋나 있었다(JWT 기본값 폴백, 법률 wwwroot 마운트, 필수 변수 4개 누락). | `docker-compose.nas.yml`, NAS `/volume1/docker/d3ro/.env` | `[x]` 2026-09-26: NAS `.env`에 `SUPABASE_URL`·`SUPABASE_SERVICE_ROLE_KEY`(운영 service_role)·`ADMIN_BOOTSTRAP_TOKEN`(신규)·`API_SERVER_URL` 추가, 저장소 compose로 교체 후 `docker compose up -d`. 4개 컨테이너 정상, 백업 `*.before-wave3-20260926`. | | GAP-OPS-02 | Ops | 관리자 주소가 두 개였다(`admin.chanpaca.net`, `d3ro-admin.chanpaca.net`). `admin.d3ro.chanpaca.net`은 2단계 서브도메인이라 고급 인증서(ACM, 월 $10)가 필요하다. | Cloudflare 터널 kd-nas ingress, chanpaca.net DNS | `[x]` 2026-09-26: 사용자 결정 — 관리자 주소는 `d3ro-admin.chanpaca.net` 하나(chanpaca.net에 다른 서비스가 많다). `admin.chanpaca.net` 터널 규칙·DNS 삭제로 이름을 풀었다. ACM은 지금 구독하지 않는다. 참고: `*.kite`·`*.voice` 고급 인증서는 ACM이 꺼져 2026-11-02 만료 후 갱신되지 않는다(다른 프로젝트). | -| GAP-OPS-03 | Ops | **`payple-renew` 크론이 등록 이후 한 번도 성공하지 못했다.** Forgejo 시크릿 `SUPABASE_URL`이 로컬 Supabase 주소(`127.0.0.1:55321`)로 등록돼 매일 `curl: (7) Failed to connect`. Payple 계약 전이라 청구 대상 구독은 없다(GAP-BILL-02). | `.forgejo/workflows/payple-renew.yml`, `scripts/ci/set-forgejo-secrets.mjs` | `[~]` 2026-10-11: 시크릿을 `.env` 운영 값으로 교체, 스크립트를 `.env` 정본 동기화 + 로컬 주소 거부로 확장. 남은 확인: 다음 정기 실행(10:00 KST)이 HTTP 200인지(수동 dispatch는 실결제 경로라 보류). | -| GAP-OPS-04 | Ops | `audio-purge`가 pg_cron의 service credential을 handler 안에서 검증하는 구조인데 `config.toml`에 함수 stanza가 없어 기본 gateway JWT 검증이 먼저 요청을 거부할 수 있었다. | `server/supabase/config.toml`, `server/supabase/functions/audio-purge/{index,handler}.ts`, migration `20260929000004_audio_retention_on_delete.sql` | `[~]` 2026-11-04: `[functions.audio-purge] verify_jwt = false`를 명시하고 격리 로컬 Supabase에서 실제 경로를 검증했다. 키 없음/유효한 non-service 키는 401, service 키는 200이었고 direct drain과 `pg_cron` → Vault → `pg_net` → Edge → Storage 경로 모두 `claimed=1`, `removed=1`, `failed=0`, `completed=1`; queue/`audio_files`/`storage.objects`는 `1|1|1`→`0|0|0`이었다. **2026-11-14 운영 반영:** `audio-purge` 포함 24개 Edge Function을 운영(`verify_jwt = false` `config.toml` 반영)에 재배포했으며 무인증 호출이 HTTP `401`로 거부됨을 확인했다. **남은 경계:** 운영 DB의 실제 `pg_cron`/Vault/실객체 스케줄 실행은 별도 실데이터 검증이 필요하다. | +| GAP-OPS-03 | Ops | **`payple-renew` 크론이 등록 이후 한 번도 성공하지 못했다.** Forgejo 시크릿 `SUPABASE_URL`이 로컬 Supabase 주소(`127.0.0.1:55321`)로 등록돼 매일 `curl: (7) Failed to connect`. Payple 계약 전이라 청구 대상 구독은 없다(GAP-BILL-02). | `.forgejo/workflows/payple-renew.yml`, `scripts/ci/set-forgejo-secrets.mjs` | `[~]` 2026-11-17: 운영 DB에 Payple 갱신·만료 대상 0건을 확인한 뒤 함수를 직접 호출해 HTTP 200 `{renewed:0, failed:0, expired:0}`을 확인했다(실결제 없음). Forgejo 정기 실행 기록은 기존 API 토큰 HTTP 401로 아직 읽지 못하므로 스케줄 증거는 남는다. | +| GAP-OPS-04 | Ops | `audio-purge`가 pg_cron의 service credential을 handler 안에서 검증하는 구조인데 `config.toml`에 함수 stanza가 없어 기본 gateway JWT 검증이 먼저 요청을 거부할 수 있었다. | `server/supabase/config.toml`, `server/supabase/functions/audio-purge/{index,handler}.ts`, migration `20260929000004_audio_retention_on_delete.sql` | `[x]` 2026-11-17: 로컬 경로(2026-11-04)와 운영 배포(2026-11-14)에 이어 운영 Vault의 `project_url`/`service_role_key`를 복구했다. 09:00 UTC 실제 `purge-orphaned-audio` 예약 실행이 `pg_cron` → Vault → `pg_net` → Edge → Storage를 완료했고, 격리된 실제 WAV 객체와 queue row가 `1 → 0`, `net._http_response.status_code=200`으로 확인됐다. 테스트 사용자·객체·queue 잔여물은 0이다. 증거: [`2026-11-17-backlog-operations.md`](../evidence/2026-11-17-backlog-operations.md). | | GAP-CI-02 | CI | `linux-builder` 러너가 노트북 한 대(`kd-desktop`)뿐이라 노트북이 꺼지면 CI·크론이 통째로 멈춘다(2026-09-29~10-09, run #128~#137 Canceled). | `.forgejo/workflows/*.yml` (`runs-on: linux-builder`) | `[ ]` 후보: 상시 켜진 NAS 러너에 `linux-builder`(또는 크론 전용) 라벨 추가, 최소한 `payple-renew`는 NAS로. | | GAP-CI-03 | CI | 9-28부터 `ci.yml`의 데스크톱 Vitest·모바일 Jest가 테스트 전부 통과인데도 실패했다. 데스크톱: 템플릿 테스트가 결과를 실제 TextInsertService로 넣다가 nut-js(libnut)가 X 디스플레이 없음(`Could not open main display`)으로 워커를 죽임. 모바일: `knowledge-service.test.ts`가 구독의 삭제 대조 setInterval을 끄지 않아 Jest가 끝나지 않음(잡 무한 대기). | `apps/desktop/tests/setup.ts`, `apps/mobile-rn/__tests__/knowledge-service.test.ts` | `[x]` 2026-10-11: setup.ts에 nut-js 공통 목, 테스트가 unsubscribe. 러너 호스트(vd-linux)에서 데스크톱 2539/2539 exit 0, 모바일 589/589 정상 종료 확인. | | GAP-CI-04 | CI | Forgejo build validation과 root `build:all`이 web production build를 생략했고, migration checker도 CI quality gate에 연결되지 않았다. | `.forgejo/workflows/ci.yml`, `scripts/ci/build-all.mjs`, `scripts/ci/check-supabase-migrations.mjs` | `[x]` 2026-11-04: web production build를 두 경로에 추가하고 CI quality에서 `check:migrations:test` → `check:migrations`를 실행한다. CI 자체는 73개 파일의 naming/order/metadata 검사다. 같은 날 별도 격리 로컬 스택에서 empty/reset replay 73/73과 `pg-delta --strict-coverage` shadow diff 0을 확인했지만, 이 runtime gate는 아직 CI에 자동화되지 않았고 linked remote drift도 확인하지 않았다. | @@ -44,7 +44,7 @@ Legend: `[ ]` open · `[~]` in progress · `[!]` blocked externally · `[x]` res | GAP-UX-02 | Desktop | 기록 조회에 모드·즐겨찾기 조건, 태그+검색 조합이 없어 화면이 불러온 페이지 위에서 거른다(조건이 까다로우면 여러 페이지를 불러와야 보인다). 오프셋 페이지라 사이 삽입·삭제 때 누락·중복 가능. 기록 제목·본문 편집 없음. 마크다운 내보내기는 태그 붙은 기록만·저장 위치 선택 불가. | `HistoryService`, `history-handlers.ts`, `MemoService.exportMarkdown`, `HistoryEntryCard.tsx`, `HistoryPage.tsx`, `tests/unit/records-view.test.ts`, `tests/red/memo.usecase.test.ts` | `[x]` 2026-10-30: `HistoryService.list`/`getAll`에 SQLite 직접 조건(`mode`, `isFavorite`, `tag`, `search`/`query`, `beforeCreatedAt` 커서 페이지네이션)을 추가하고, `HistoryService.update`(`history:update` IPC + `HistoryEntryCard` 인라인 편집 + 동기화 push)와 `MemoService.exportMarkdown`(무태그 기록 포함, 필터 연동, `savePath` 및 저장 대화상자 선택)을 구현했다. 검증: `records-view.test.ts` 21/21, `memo.usecase.test.ts` 15/15 통과. | | GAP-UX-03 | Desktop | 회의 요약 항목 → 전사 구간 근거 링크 없음(요약·전사를 잇는 인용 데이터가 없다). | `MeetingSummaryService`, `MarkdownRenderer.tsx`, `MeetingSummaryTab.tsx`, `MeetingDetailTabs.tsx`, `TranscriptTab.tsx`, `EditableSegment.tsx`, `tests/unit/desktop-ux-gaps.test.ts` | `[x]` 2026-10-30: `MeetingSummaryService`가 요약·결정·액션아이템에 `[MM:SS]` 타임스탬프 근거 인용을 생성·파싱(`parseCitationTimestampMs`, `extractTranscriptCitations`)하고, `MarkdownRenderer`/`MeetingSummaryTab`에서 인용 배지 클릭 시 전사 탭의 해당 `EditableSegment`(`data-timestamp-ms`)로 이동·하이라이트한다. 검증: `desktop-ux-gaps.test.ts` 13/13 통과. | | GAP-UX-04 | Mobile | 모바일 정보 구조 개편: visible Home/Records/Meetings/More 4탭, 숨은 Record route, 세 동작 FAB, Home/More, 새/전환된 v4 흐름의 `ScreenHeader`와 48dp back target. | `apps/mobile-rn/src/navigation/TabNavigator.tsx`, `components/{RecordFab,ScreenHeader}.tsx`, `screens/{Home,More}Screen.tsx` | `[x]` 2026-09-28: 전체 Jest 86 suites/589 tests, 320dp dark 1/1 PASS(88초), 411dp light 1/1 PASS(100초). Canonical 보고서는 `scratch/design-audit/wave45/navigation-shell-search-{320-dark,411-light}-verified.xml`, 추적 요약은 `docs/evidence/wave45-mobile-shell-search-2026-09-28.md`. `DashScreen`/`WorksHubScreen`은 삭제했고 WorksHub의 로컬 도구 검색·고정은 복잡도 축소를 위해 의도적으로 종료했다. 목적지는 탭/More에 보존됐고 콘텐츠 삭제는 없으며 비활성 `works-hub-pins.v1` 키는 남을 수 있다. TalkBack/font-scale/rotation은 이 셸 gap을 다시 열지 않고 Q-021 `[~]`로 추적한다. | -| GAP-UX-05 | Desktop+Mobile | 기록+회의 통합 검색. 두 원본은 분리 유지하고 결과만 `source + id`로 상세 화면에 연결한다. | `@d3ro/core/types`, desktop `UnifiedSearchService`/`UnifiedSearchPage`, mobile `features/search`/`UnifiedSearchScreen` | `[~]` 2026-09-28 → **2026-10-30 코드·테스트 보강 완료:** 모바일 `unified-search-service.ts` 및 `UnifiedSearchScreen.tsx`에 `AbortSignal`/`AbortController` 요청 취소, `transcripts` 구간 테이블 검색(`searchTranscriptSegments`), 대용량 원문 상한(`boundPayloadText`)을 추가하고, 데스크톱 `UnifiedSearchService.ts`에도 `meetingMemos` 및 전사 구간 타임스탬프 스니펫 추출·인덱스 정렬을 추가했다(검증: 모바일 `unified-search-service.test.ts` 및 데스크톱 `UnifiedSearchService.test.ts` 12/12 통과). Electron `Ctrl+K` 실앱 수동 검증만 남아 `[~]` 유지. | +| GAP-UX-05 | Desktop+Mobile | 기록+회의 통합 검색. 두 원본은 분리 유지하고 결과만 `source + id`로 상세 화면에 연결한다. | `@d3ro/core/types`, desktop `UnifiedSearchService`/`UnifiedSearchPage`, mobile `features/search`/`UnifiedSearchScreen` | `[~]` 2026-09-28 → **2026-10-30 코드·테스트 보강 완료:** 모바일 `unified-search-service.ts` 및 `UnifiedSearchScreen.tsx`에 `AbortSignal`/`AbortController` 요청 취소, `transcripts` 구간 테이블 검색(`searchTranscriptSegments`), 대용량 원문 상한(`boundPayloadText`)을 추가하고, 데스크톱 `UnifiedSearchService.ts`에도 `meetingMemos` 및 전사 구간 타임스탬프 스니펫 추출·인덱스 정렬을 추가했다(검증: 모바일 `unified-search-service.test.ts` 및 데스크톱 `UnifiedSearchService.test.ts` 12/12 통과). **2026-11-18:** 현재 모바일 APK의 local seeded history + canonical meeting RPC 데이터로 통합 검색 두 결과·두 상세 이동·Markdown 컨트롤이 77초 Maestro PASS. Electron `Ctrl+K` 실앱 수동 검증만 남아 `[~]` 유지. | | GAP-UX-06 | Desktop | main 쪽 정리 필요: `STTManager.ts:53-129` 공급자 설명 한국어 하드코딩·마케팅 문구("100% 완전 오프라인", "Industry Benchmark") — 렌더러는 더 이상 쓰지 않는다 / audio TEST_DEVICE 가 deviceId 무시 / 사전 `incrementUsage` 호출처 없음(사용 횟수 항상 0) / 사전 발음 필드가 인식 힌트·치환에 쓰이지 않음 / 대화 세션 다시 듣기 IPC 없음 / preload `instruction.getAll` 이 `unknown[]` / 지식 추가 실패 판정이 문구 비교. | `STTManager.ts`, `ipc/audio-handlers.ts`, `DictionaryService.ts`, `VoiceModeService.ts`, `VoiceConversationService.ts`, `preload/index.ts`, `ipc/rag-handlers.ts`, `KnowledgeBasePage.tsx` | `[x]` 2026-10-30: 7개 항목 전수 해결 — (1) `STTManager.ts` 중립 기술 설명으로 교체, (2) `audio-handlers.ts` `TEST_DEVICE`가 `deviceId`·`durationMs` 전달, (3) `DictionaryService` 발음 힌트(`getPromptHints`) 및 발음→표제어 치환·`incrementUsage`(`applyDictionaryCorrections`)를 `VoiceModeService._transcribe`에 연결, (4) `voiceConversation:replayMessage` IPC + `VoiceConversationPage` 다시 듣기 버튼 추가, (5) `preload` `instruction.getAll` 타입 `CustomInstruction[]` 지정, (6) `rag-handlers.ts`·`KnowledgeBasePage.tsx` 구조화 에러(`details.cancelled` / `ErrorCode`) 판정으로 전환. 검증: `desktop-ux-gaps.test.ts` 13/13 통과. | | GAP-UX-07 | Desktop | 2026-09-28 개편 문구는 ko·en 만 — 다른 8개 로케일은 en 폴백. 온보딩 Ollama 모델 크기 표기(`onboarding.llmModelSize` 9.6GB)와 안내 모달의 크기가 다르다. | `packages/i18n/src/locales/*`, `OllamaGuideModal.tsx`, `scripts/ci/sync-i18n-locales.mjs`, `tests/main/services/i18n-locale-parity.test.ts` | `[x]` 2026-10-30: `onboarding.llmModelSize`와 `OllamaGuideModal.tsx`의 기본 모델(`gemma4:e4b`) 크기 표기를 `4.0GB`로 통일하고, 12개 로케일 전체를 동기화했다. **2026-11-04:** updater dialog 16키를 추가해 현재 2,742키이며 `i18n-locale-parity.test.ts` 15/15가 이를 고정한다. | | GAP-UX-08 | Mobile | **대화면(태블릿/폴더블 펼침) 레이아웃 대응이 없다.** 825dp 폭에서도 모든 화면이 한 열로 늘어난 휴대폰 레이아웃이고, `useWindowDimensions`/breakpoint/`numColumns` 사용처가 0건이다. More/Meetings/Commands/Templates 는 2열 그리드 후보, Dictionary Edit·Delete 와 Templates Select 는 화면 절반~전체 폭 버튼이 된다. 적응형 배너(`ANCHORED_ADAPTIVE_BANNER`, `minHeight: 50`)는 로드 후 728×90↔468×60 으로 높이가 변해 탭 바가 시프트한다(콘텐츠 가림은 스크롤로 회피 확인). | `packages/ui-native/src/responsive.tsx`, `apps/mobile-rn/src/components/ads/FreeTierBanner.tsx`, `apps/mobile-rn/src/screens/*`, `apps/mobile-rn/__tests__/responsive-layout.test.tsx`, `docs/evidence/2026-11-05-tablet-layout-audit.md` | `[~]` **2026-11-13 코드·Jest 구현 완료:** `@d3ro/ui-native/responsive`(`resolveResponsiveLayout`, `useResponsiveLayout`, `useContentWidth`, `ContentColumn`)를 추가해 `>=600dp` 태블릿/폴더블에서 본문 폭 상한(`880dp`, 폼·온보딩 `520dp`), 2열 그리드(`More`/`Meetings`/`Commands`/`Templates`/`Records`), 인라인 액션 버튼 폭 제한(`Dictionary`/`Templates`), `FreeTierBanner` `90dp` 고정 슬롯 예약(레이아웃 시프트 방지)을 10개 주요 화면에 반영했다(`responsive-layout.test.tsx` 4/4 및 전체 모바일 Jest 89 suites / 605 tests PASS). 남은 게이트: 실기기 Fold6/Tab S11 `open`/`closed` Maestro 시각 확인. | @@ -77,9 +77,9 @@ Legend: `[ ]` open · `[~]` in progress · `[!]` blocked externally · `[x]` res | GAP-INFRA-04 | Quality | Desktop `typecheck` is a no-op: `tsconfig.json` is `files: []` + references, so `tsc --noEmit` checks nothing. Real `tsc -p tsconfig.node.json --noEmit` surfaces many pre-existing errors. | `apps/desktop/package.json`, `apps/desktop/tsconfig.node.json`, `apps/desktop/tsconfig.web.json` | `[x]` 2026-10-30: `apps/desktop/package.json`의 `typecheck`가 `tsc --noEmit -p tsconfig.node.json && tsc --noEmit -p tsconfig.web.json`을 실행하도록 수정하고 전체 컴파일 에러를 0건으로 해소했다 (GAP-REL-15). | | GAP-SHELL-01 | Support | Admin `/support` is a stub panel; desktop-only `SupportModal`. No shared ticket contract. | `apps/admin/src/app/(admin)/support/page.tsx` | `[x]` 2026-10-30: 어드민 `/support`를 정적 스텁에서 `content_reports` 기반의 fail-closed 고객지원·콘텐츠 신고 관리 콘솔(상태별 필터, 요약 지표 카드, 페이지네이션, 백엔드 미연결 시 명시적 오류 배너 `support-backend-error`)로 업그레이드했다 (`apps/admin` typecheck 0 에러). | | GAP-PUSH-01 | Push | `send-push` accepted `webpush`/`apns` but marked them `push_provider_not_supported`. | `_shared/webpush.ts`, `_shared/apns.ts`, `send-push/index.ts` | `[x]` 2026-09-13: VAPID Web Push (RFC 8291) + APNs `.p8` transports implemented and routed; 10 new tests incl. an encryption round-trip. Web/iOS client registration code now exists (see GAP-PUSH-03); provider secrets, deployed cron execution, and live delivery remain separate runtime gates. | -| GAP-PUSH-02 | Push | Nothing triggered `send-push?mode=drain`; enqueued notifications never left the outbox. | `server/cloudflare-worker/src/push-drain.ts`, `wrangler.toml` | `[x]` 2026-09-13: Cloudflare Cron Trigger (`* * * * *`) drains the outbox; tests in CI. Requires `SUPABASE_URL` + `SUPABASE_SERVICE_ROLE_KEY` secret on the worker. | -| GAP-PUSH-03 | Push | Web/iOS provider-specific registration paths were missing; web additionally needed a production call site that actually subscribes the signed-in device. | `apps/web/public/sw.js`, `apps/web/src/lib/{web-device,web-push,web-push-session}.ts`, `apps/web/src/components/layout/web-push-control.tsx`, `apps/web/e2e/web-push.spec.ts`, `packages/api-client/src/types.ts`, `apps/mobile-rn/src/features/notifications/*`, `apps/mobile-rn/__tests__/notifications.test.ts` | `[~]` 2026-11-04: web sidebar opt-in/out uses explicit user-gesture permission, a stable active `platform='web'` device, device-bound RPCs, rollback, disabled-intent reconciliation, bounded parallel local/server cleanup, and logout-independent sign-out; 17 Playwright contract tests cover these boundaries. An ephemeral isolated local run proved device/token/outbox/drain and a provider-accepted `delivered` row, but did not observe the service-worker notification. A production-standalone rerun built/served, then timed out during throwaway login navigation before dashboard render. Mobile APNs/FCM branching is unit-tested. Still open: matching production VAPID configuration, authenticated production permission/subscription and 1440/390/a11y render proof, deployed scheduled drain, and real Web Push/APNs receipt. | -| GAP-PUSH-04 | Push | Android still depends on FCM (`google-services.json`). | `apps/mobile-rn/android`, `send-push` | Decide: minimal Firebase project, or UnifiedPush/ntfy. See `docs/deployment/push-transport-without-firebase.md`. | +| GAP-PUSH-02 | Push | Nothing triggered `send-push?mode=drain`; enqueued notifications never left the outbox. | `server/cloudflare-worker/src/push-drain.ts`, `wrangler.toml` | `[x]` 2026-11-17: Cloudflare Cron Trigger(`* * * * *`)에 운영 Supabase URL과 현재 프로젝트 secret을 주입했다. 초기 401을 재현한 뒤 drain 요청에 Bearer + `apikey`를 모두 전달하도록 회귀 테스트를 추가했고, 실제 예약 실행 로그 `claimed=1 completed=1 pending=0`을 확인했다. | +| GAP-PUSH-03 | Push | Web/iOS provider-specific registration paths were missing; web additionally needed a production call site that actually subscribes the signed-in device. | `apps/web/public/sw.js`, `apps/web/src/lib/{web-device,web-push,web-push-session}.ts`, `apps/web/src/components/layout/web-push-control.tsx`, `apps/web/e2e/web-push.spec.ts`, `packages/api-client/src/types.ts`, `apps/mobile-rn/src/features/notifications/*`, `apps/mobile-rn/__tests__/notifications.test.ts` | `[~]` 2026-11-04: web sidebar opt-in/out uses explicit user-gesture permission, a stable active `platform='web'` device, device-bound RPCs, rollback, disabled-intent reconciliation, bounded parallel local/server cleanup, and logout-independent sign-out; 17 Playwright contract tests cover these boundaries. An ephemeral isolated local run proved device/token/outbox/drain and a provider-accepted `delivered` row, but did not observe the service-worker notification. A production-standalone rerun built/served, then timed out during throwaway login navigation before dashboard render. Mobile APNs/FCM branching is unit-tested. **2026-11-17:** production VAPID keys and web image are deployed; an authenticated temporary user obtained a real browser subscription and the scheduled outbox produced `push_deliveries.status='delivered'` twice (headless and visible Chrome). However `registration.getNotifications()` remained 0, so actual browser display receipt and APNs receipt remain open. Temp users were deleted. Evidence: `docs/evidence/2026-11-17-backlog-operations.md`. | +| GAP-PUSH-04 | Push | Android still depends on FCM (`google-services.json`). | `apps/mobile-rn/android`, `send-push` | `[!]` 2026-11-17: Play 배포·기존 RN Google 서비스 계약과 일치하도록 **FCM을 유지**한다. UnifiedPush/ntfy 이중 전송은 도입하지 않는다. 남은 것은 `EXT-FIREBASE-01`의 production Firebase project·Android app·FCM 자격증명이다. | | GAP-STT-01 | Local STT | Packaged desktop builds shipped **no** faster-whisper sidecar: `electron-builder.yml` had no `extraResources` entry for it and no pipeline job built it. Local transcription was impossible on any installed build; the app fell back to a system Python without the runtime. | `apps/desktop/electron-builder.yml`, `.gitlab-ci.yml`, `apps/desktop/scripts/build-sidecar.mjs` | `[x]` 2026-09-18: sidecar bundled via `extraResources` (`sidecar-dist/sidecar` → `resources/sidecar`), `sidecar:setup`/`sidecar:build` scripts, and `scripts/ci/verify-sidecar-bundle.mjs` fails packaging when the engine or its Silero VAD data is missing. Verified on the real 242 MB bundle. | | GAP-STT-02 | Local STT | Dev resolved the sidecar/SoX paths against the Vite output dir (`out/main`), so the sidecar ran a Python without faster-whisper and SoX recording died with `spawn sox ENOENT`. | `apps/desktop/src/main/utils/paths.ts`, `apps/desktop/tests/main/utils/paths.test.ts` | `[x]` 2026-09-18: app root is discovered by walking up for app markers; packaged mode fails loudly instead of silently falling back. Unit tests pin both branches. | | GAP-STT-03 | Local engines | On hosts where `localhost` resolves only to IPv6, every local engine call (STT sidecar and Ollama) was refused. Audio capture and local LLM appeared dead. | `apps/desktop/src/main/utils/loopback.ts`, `LocalSTTService`, `LocalLLMService`, `RAGService`, `OnlineLLMService`, `STTManager` | `[x]` 2026-09-18: loopback normalization to `127.0.0.1` for all local engine URLs; defaults updated; 9 unit tests. Verified against the live sidecar and Ollama on a host with an IPv6-only `localhost`. | @@ -129,7 +129,8 @@ Legend: `[ ]` open · `[~]` in progress · `[!]` blocked externally · `[x]` res | GAP-SYNC-08 | Sync | Meeting memo conflict detection compares mutable content plus timestamp/creation fields instead of an immutable revision. An A→B→A edit can return to the same compared values and evade stale-client detection; the shared `MeetingMemo` type has no `updated_at` or revision field. | `server/supabase/migrations/20261113000001_meeting_memos_revision_cas.sql`, `packages/api-client/src/types.ts` `MeetingMemo`, `apps/mobile-rn/src/features/meetings/meetings-service.ts`, `apps/desktop/src/main/{db/schema.ts,services/sync/sync-adapters.ts}` | `[x]` **2026-11-13 마이그레이션·클라이언트·단위 검증 완료 → 2026-11-14 운영 DB 반영:** 74번째 마이그레이션 `20261113000001_meeting_memos_revision_cas.sql`로 `meeting_memos.revision integer not null default 1 check (revision >= 1)` 및 단조 증가 트리거 `bump_meeting_memo_revision`을 추가하고, `@d3ro/api-client`, 모바일 `updateMeetingMemoConflictSafe`/`deleteMeetingMemoConflictSafe`(단조 `revision` 우선 CAS로 `A→B→A` 회피 차단, 구 스키마 폴백 유지), 데스크톱 SQLite `meeting_memos.revision`·`sync-adapters.ts`를 모두 갱신했다(`check:migrations` 74개 GREEN, 모바일 `meetings.test.ts` 18/18·데스크톱 `SyncEngine.test.ts` 20/20 PASS). **2026-11-14:** 운영 Supabase `supabase db push --remote`로 21개 보류 마이그레이션(`20260927000037`~`20261113000001`)을 반영하고 `supabase migration list --remote`에서 전체 74개 로컬=원격 일치를 확인했으며 데스크톱 `v1.17.1`도 함께 게시했다. | | GAP-OPS-01 | Ops | **Production Supabase was five migrations behind** (`0029` content reporting, `0030` profile column ACL — users could raise their own `role`/`tier` through PostgREST, `0031` audit-log actor unlink, `0032` meeting-document reporting, `0033` team activity feed) and `content-report` was never deployed, while the map listed those features GREEN from local runs. Most functions still ran the 2026-08-21 build. | `server/supabase/migrations/`, `scripts/ci/check-supabase-migrations.mjs` | `[x]` 2026-09-27: schema+data dump taken, `db push` applied `0029`–`0035`, all functions redeployed (unauthenticated calls return 401, i.e. live and gated); `authenticated` can no longer UPDATE `profiles.tier`; real-account export returns exactly the v1 keys. **2026-11-04 boundary:** file checker는 73개 파일의 self-test/order/name/duplicate/non-empty만 다룬다. 별도 격리 로컬 stack의 empty/reset replay와 `pg-delta` shadow diff는 통과했지만 linked remote migration state/drift는 재검증하지 않았다. | -| GAP-STT-01 | Cloud STT | A 5 s phone recording took ~66 s and ended on the phone's tiny local model (2026-09-27). Chain: the gateway's first endpoint (laptop GPU 192.168.0.227) is off (3 s), the NAS CPU Whisper (2 cores, load ~7) needs 30–90 s for 3 s of audio, and `stt-proxy` waited up to 60 s for the gateway. The direct OpenAI fallback **never worked**: the production `OPENAI_API_KEY` secret is not a valid header value (invisible/non-ASCII characters — `TypeError: headers … not a valid ByteString`), and whisper-1 `verbose_json` reports the language by name, which the result contract rejected. The same key backs `embed-chunks`, `search-knowledge` and `realtime-token`. | `server/supabase/functions/{stt-proxy,_shared/stt-contract.ts,_shared/provider-key.ts}` | `[!]` 2026-09-27 code fixed and deployed: gateway wait = 5 s + clip length (max 30 s) when a direct provider exists, provider language names mapped to codes, keys stripped of BOM/zero-width characters (still-invalid keys count as not configured), fail-closed responses list per-provider failures (`attempts`). **External:** re-enter a valid `OPENAI_API_KEY` (or add `GROQ_API_KEY`) in Supabase function secrets, or keep the GPU endpoint online; until then cloud STT runs on the NAS CPU (~30 s for a short clip). | +| GAP-STT-01 | Cloud STT | A 5 s phone recording took ~66 s and ended on the phone's tiny local model (2026-09-27). Chain: the gateway's first endpoint (laptop GPU 192.168.0.227) is off (3 s), the NAS CPU Whisper (2 cores, load ~7) needs 30–90 s for 3 s of audio, and `stt-proxy` waited up to 60 s for the gateway. The direct OpenAI fallback **never worked**: the production `OPENAI_API_KEY` secret is not a valid header value (invisible/non-ASCII characters — `TypeError: headers … not a valid ByteString`), and whisper-1 `verbose_json` reports the language by name, which the result contract rejected. The same key backs `embed-chunks`, `search-knowledge` and `realtime-token`. | `server/supabase/functions/{stt-proxy,_shared/stt-contract.ts,_shared/provider-key.ts}` | `[!]` 2026-09-27 code fixed and deployed: gateway wait = 5 s + clip length (max 30 s) when a direct provider exists, provider language names mapped to codes, keys stripped of BOM/zero-width characters (still-invalid keys count as not configured), fail-closed responses list per-provider failures (`attempts`). **External:** re-enter a valid `OPENAI_API_KEY` (or add `GROQ_API_KEY`) in Supabase function secrets, or keep the GPU endpoint online; until then cloud STT depends on the NAS CPU. **2026-11-17 실제 운영 probe:** 임시 계정과 4.7초 로컬 TTS WAV로 `stt-proxy`가 HTTP 502 `gateway/http_504`를 반환하고 direct provider는 시도되지 않았다. NAS를 재시작한 직접 전사는 정확히 성공했으나 콜드 로딩 포함 약 101초였다. 임시 계정은 HTTP 200으로 삭제했다. 유효한 공급자 키 또는 상시 GPU가 여전히 필요하다. | +| GAP-SEC-01 | Dependencies | Docker 빌드에서 발견한 Next.js 등의 critical 취약점과 오래된 Electron/Vitest toolchain | `apps/{web,admin,desktop}/package.json`, `package-lock.json`, `apps/mobile-rn/package.json` | `[~]` 2026-11-18: Next 16.4.6, Mermaid 12.3.0, Electron 43.8.10, electron-vite 6.0.0, Vite 8.3.8, Vitest 5.1.0으로 갱신하고 Node 24 계약·비동기 Clipboard await·전체 테스트/빌드를 통과했다. 현재 audit은 critical 0, high 25 / moderate 12다. picomatch는 최신 4.0.7도 GHSA-fc5q-39xc-vjpf 대상이므로 안전한 상위 수정판이 나오면 다시 평가한다. 운영 Web `f36c4661…3906d3`·Admin `1a98f25d…36ca58` 배포와 localhost/public health 200을 확인했다. Electron 실GUI는 외부 터미널 수동 게이트로 남긴다. 증거: `docs/evidence/2026-11-17-backlog-operations.md`. | --- ## 2. Mobile checklist roll-up (from `MOBILE_APP_COMPLETION_SSOT.md` §4) @@ -138,16 +139,16 @@ These are the mobile SSOT rows still `[ ]` / `[~]`. Do not duplicate the full te | Group | Open rows | Theme | |---|---|---| -| G (governance) | G-008..G-011; G-006/G-007 `[~]` | 2026-11-04 route/push contract typing and Talk logger improved; remaining type/error/identity consolidation, legacy bundle separation, credential rotation | +| G (governance) | G-011; G-006/G-007/G-010 `[~]` | G-008 재현 빌드와 G-009 entitlement SSOT는 해결. 남은 것은 타입/오류 정리, OAuth 운영 client 설정, credential rotation | | A (auth/account) | A-001..A-013, A-018; A-014..A-017 `[~]` | Session restore, signup, deep links, OAuth, profile, provider E2E | -| O (onboarding/a11y) | O-002..O-007, O-009, O-011; O-001 `[~]`, O-008/O-010/O-012 `[~]` | O-001 2026-11-01: `.2` Fold6 fresh auth/signup/small-screen PASS; latest `.3` fresh-auth/retry FAILED (onboarding visibility), 회귀 테스트 추가(`apps/mobile-rn/.maestro-output/fold6-20261101-fix1/`). 2026-11-04 current-source E2E upgrade/launch, inspected-route UIA labels/48dp, and AVD font-scale 2.0 + rotation/scroll passed. Remaining: permission journeys/tutorial, app-wide theme/a11y, manual TalkBack/focus order and SDK AdMob descendant, iOS, full-app ko/en audit ([evidence](../evidence/2026-11-04-mobile-runtime-a11y.md)) | +| O (onboarding/a11y) | O-002..O-007, O-009, O-011; O-001 `[~]`, O-008/O-010/O-012 `[~]` | 2026-11-18 fresh auth/signup/invite, small-screen, authenticated parity를 포함한 공식 전체 게이트 PASS. 남은 것: permission journeys/tutorial, app-wide theme/a11y, TalkBack/focus order, iOS, 실기기 로케일 ([evidence](../evidence/2026-11-17-backlog-operations.md)) | | D (data/sync/offline) | D-001..D-014 | Schema/RLS, devices, cross-surface read/write, offline queue, conflict policy | -| R (record/transcribe) | R-001..R-009, R-011..R-015, R-017..R-020; R-016 `[x]` | Permissions, recorder, FGS, upload queue, job state, sharing | +| R (record/transcribe) | R-001..R-009, R-011..R-015, R-020; R-017..R-019 `[~]`; R-016 `[x]` | Permissions, recorder, FGS, upload queue, job state, sharing; 파일/원본 공유 코드·Jest는 GREEN이나 외부 대상 수신과 강제 재처리는 남음 | | H (history/meetings) | H-001..H-005, H-007..H-010, H-012, H-013, H-015; H-014/H-017 `[~]`; H-006/H-011/H-016 `[x]` | Pagination, filters, detail, meeting timeline/docs/speaker filter chips (`H-014` `[~]`)/cross-app | | F (feature parity) | F-003..F-010, F-013, F-014; F-001 `[~]`; F-002/F-011/F-012 `[x]` | Mobile Home dashboard subset, commands/actions/chat/conversation/knowledge | | T (teams/admin/notify) | T-001..T-005, T-009..T-012; T-006..T-008, T-013 `[x]` | Team CRUD/roles, push delivery/deep links, notification settings | | M (monetization) | M-025, M-027; M-013 `[~]` | Play Billing license test, Payple webhook signature | -| Q (quality/release) | Q-012..Q-014, Q-019, Q-020, Q-022, Q-026; Q-010/Q-011/Q-021/Q-023/Q-027/Q-028 `[~]` | Current-source Fold6/API 34 state-preserving install, cold launch, Notifications cards, and bounded crash/UIA/font-scale/rotation automation are GREEN. Remaining: OAuth/billing/full journey; manual TalkBack and permission/FCM transitions, app-wide visual coverage, iOS, env unification, production AAB ([evidence](../evidence/2026-11-04-mobile-runtime-a11y.md)) | +| Q (quality/release) | Q-012..Q-014, Q-019, Q-022; Q-010/Q-011/Q-020/Q-021/Q-023/Q-026/Q-027/Q-028 `[~]` | Current-source Fold6/API 34 state-preserving install, cold launch, Notifications cards, bounded crash/UIA/font-scale/rotation 및 2026-11-18 공식 모바일 전체 게이트는 GREEN. Remaining: OAuth/billing/추가 실패 journey, manual TalkBack/FCM, app-wide visual/iOS, production AAB | --- @@ -162,7 +163,7 @@ These are the mobile SSOT rows still `[ ]` / `[~]`. Do not duplicate the full te | EXT-PLAY-03 | Production AAB + CI secret injection + recovery backups | Inject Firebase/AdMob/signing/evidence CI secrets | SSOT EXT-008 | | EXT-PLAY-04 | Closed test 0/12 members, 14 days; production access disabled | Run closed test, request production | SSOT EXT-010 | | EXT-OAUTH-01 | GitHub/Apple provider secrets; real mobile Google consent→callback | Configure providers, verify consent | SSOT EXT-001 | -| EXT-APPSIGN-01 | Live App Links still old certificate | Deploy updated `assetlinks.json`, re-verify live | SSOT App Links row | +| EXT-APPSIGN-01 | ~~Live App Links still old certificate~~ | `[x]` 2026-11-17: live `/.well-known/assetlinks.json` HTTP 200, package `com.d3ro.voice`와 Play app-signing SHA-256이 source와 정확히 일치 | SSOT App Links row | | EXT-PHYS-01 | Physical Fold6 share/OAuth/purchase and production-artifact evidence | Current-source E2E upgrade install/cold launch passed on 2026-11-04 without clearing data. Run real file share, OAuth, purchase/restore, and later the signed production artifact on device | SSOT EXT-009; [2026-11-04 evidence](../evidence/2026-11-04-mobile-runtime-a11y.md) | | EXT-PAY-01 | Payple live history + webhook signature verification | Provider contract + signature scheme | SSOT M-027 | | EXT-STRIPE-01 | ~~Production Stripe/Payple cross-verification~~ | **삭제됨 2026-09-26** — Stripe 제거. Payple 라이브 검증은 EXT-PAY-01 | SSOT M-013 | @@ -213,15 +214,15 @@ Actionable checklist for the work started this session. Fields to fill are blank **Push — server (code done, config pending)** - [ ] Set Supabase Edge secrets for the transports you deploy: `WEBPUSH_VAPID_PUBLIC_KEY`, `WEBPUSH_VAPID_PRIVATE_KEY`, `WEBPUSH_SUBJECT` (web); `APNS_KEY_ID`, `APNS_TEAM_ID`, `APNS_PRIVATE_KEY`, `APNS_TOPIC`, `APNS_ENVIRONMENT` (iOS); `FCM_SERVICE_ACCOUNT_JSON`, `FCM_PROJECT_ID` (Android). Bake the same public VAPID value into the web image as `NEXT_PUBLIC_VAPID_PUBLIC_KEY`; never expose the private key as `NEXT_PUBLIC_*`. -- [ ] Deploy the updated `send-push` (`supabase functions deploy send-push`). -- [ ] Generate a VAPID keypair (P-256) and store the private/public pair; subject must be `mailto:` or `https:`. +- [x] `send-push` was redeployed to production on 2026-11-17 after VAPID configuration. +- [x] 2026-11-17: P-256 VAPID pair generated; private key is in Supabase secrets, public key is `release/webpush-vapid-public.key`, subject is `https://d3ro.chanpaca.net`. - [ ] Create the APNs `.p8` key in the Apple Developer portal and record Key ID + Team ID. **Push — Cloudflare cron drain** -- [ ] Set worker vars: `SUPABASE_URL` (`wrangler secret`/`[vars]`) and batch limit. -- [ ] Set worker secret: `wrangler secret put SUPABASE_SERVICE_ROLE_KEY`. -- [ ] `wrangler deploy` from `server/cloudflare-worker` and confirm the `scheduled` runs (Cloudflare dashboard → Cron Triggers). -- [ ] Verify end-to-end: enqueue a test event (e.g. team invite) → drain → delivery row `delivered`. +- [x] 2026-11-17: Set worker `SUPABASE_URL` and default batch limit 20. +- [x] 2026-11-17: Set the current project secret through `wrangler secret put SUPABASE_SERVICE_ROLE_KEY`. +- [x] 2026-11-17: `wrangler deploy` 완료, 실제 scheduled run `claimed=1 completed=1 pending=0` 확인. +- [ ] Verify provider end-to-end: enqueue a test event → drain → real browser/device receipt. (Provider 키는 여전히 외부 게이트) **Push — clients** - [~] Web: production sidebar opt-in/out uses the packaged service worker, a stable active web device, `pushManager.subscribe`, device-bound RPCs, disabled-intent reconciliation, bounded local/server cleanup, and non-blocking logout. Isolated local provider acceptance is proven; production authenticated permission/subscription, rendered desktop/mobile accessibility/hit-target evidence, scheduled drain, and browser receipt remain open. (GAP-PUSH-03 — `apps/web/public/sw.js`, `apps/web/src/lib/{web-device,web-push,web-push-session}.ts`, `apps/web/src/components/layout/web-push-control.tsx`) @@ -319,4 +320,16 @@ Evidence: [2026-11-02 verification](../evidence/2026-11-02-verification.md). - **Desktop Shell (`fc5d453`, `3f9e412`):** `WindowManager` 팝업 숨김 타이머/커서 초기화, `CaptionService` 보조모델/중복 stop/epoch 리셋, `VoiceModeService`/`LlmGateway`/`LocalLLMService` signal 전파 및 `/api/pull` dispose `D3ROError(LLM_ERROR)` 래핑, `LocalSTTService` 모델 다운로드 dispose `D3ROError(STTModelDownloadCancelled)` 래핑, `VoiceConversationService`/`AudioCaptureService`/`caption-handlers.ts` fail-closed 정리(`@d3ro/desktop` Vitest **212 files / 2,890 tests PASS**, Python sidecar `33/33 PASS`, `electron-vite build` + `check:desktop-renderer` **7 page(s)** PASS). - **Mobile RN (`bd3c1a9`, `cc3f746`):** 레코더 claim/generation/pollTimer, 내구성 큐 `finishCleanupItem(item)`(파일 선삭제+60초 실패 재시도) 및 `suspendedUsers`/`discardedItems`, `chat`/`admin`/`device`/`llm-stream` abort/세대 헤더 가드, 4개 컨텍스트 및 7개 화면 `scopeGenerationRef`+`try/catch/finally` 적용 + 신규 스위트 5종(**103 suites / 651 tests PASS**). - **Cloud Surfaces (`c68e81e`, `4bf0f0d`):** Cloudflare Worker `BACKEND_ORIGIN` `https://d3ro.chanpaca.net`·`origin-policy.ts`·`push-drain.ts`(`Deno 15/15`), `cloudflare-site-bridge` loop/path 가드(`Deno 5/5`), `.NET` `EndpointUrlPolicy.cs`+`"UpstreamNoRedirect"`(`xUnit 55/55`), Edge `stt-proxy` 413 선차단·`embed-chunks` 환불 경계·`_shared/quota.ts` fail-closed(`Deno 273/273`), Web `edge-fetch.ts`·`safeReturnPath`·`sw.js`·OAuth callback·`chat-panel`/`auth-provider`/`mic-recorder`(`10 files / 52 tests PASS`), Admin `admin-url-safety.ts`·`proxy.ts`·Vitest 도입(`1 file / 6 tests PASS`). - - **유지된 경계 (`[~]` / `[!]` / `RED`):** Wave 7 코드는 `v1.17.1` 운영 배포(`6c6875b`) 이후 `main`에 통합되었으므로 실운영 바이너리·컨테이너 및 라이브 Worker(`fe6d9532-...`, 대시보드 `BACKEND_ORIGIN = http://192.168.0.39:5050` 잔존 -> `1003`/`403`)에는 아직 미반영. Electron 실GUI(`GAP-INPUT-08/09/10/11`), Fold6/iOS 실기기/TalkBack, `EXT-*` 스토어 게이트는 변동 없이 유지. 상세: [`docs/REFACTOR_WAVE7_REPORT.md`](../REFACTOR_WAVE7_REPORT.md). + - **2026-11-17 운영 반영:** NAS API/Admin/Web을 Wave 7 이미지로 재빌드·교체했고 공개 `/health`, `/app/login`, admin login이 모두 200이다. Worker `b9e68793-...`·Site Bridge `cca39627-...`도 배포돼 기존 사설 IP `1003/403`을 해소했다. **남은 경계:** 데스크톱 설치본은 아직 `v1.17.1`이며 Electron 실GUI(`GAP-INPUT-08/09/10/11`), Fold6/iOS 실기기/TalkBack, `EXT-*` 스토어 게이트는 남는다. 상세: [`docs/REFACTOR_WAVE7_REPORT.md`](../REFACTOR_WAVE7_REPORT.md). + +--- + +## 2026-11-17 — 백로그 실행 및 운영 검증 + +- `[x]` **Wave 7 운영 반영:** NAS API/Admin/Web, Cloudflare Worker, Site Bridge를 재배포하고 공개 health/login 경로를 HTTP 200으로 확인했다. +- `[x]` **Push drain:** 현재 프로젝트 secret과 Bearer + `apikey` 계약을 수정하고 실제 scheduled 성공을 확인했다. Web Push는 실제 구독과 `delivered`까지 확인했으나 알림 표시는 미검증이다. +- `[x]` **audio-purge:** 운영 Vault/pg_cron/pg_net/Storage의 실제 객체·queue 삭제를 검증했다. +- `[x]` **모바일 검증 도구:** 로컬 E2E cleartext 명시 예외, Supabase CLI 3.2.0 고정, 다중 기기 `--udid` 고정, 작은 화면 스크롤·키보드 경합 보정을 추가했다. 현재 소스 APK의 fresh auth/signup/invite와 small-screen 개별 실행은 PASS다. +- `[~]` **외부 경계 유지:** Forgejo API 토큰 401, Firebase/Play/AdMob/OAuth/Payple/APNs, 데스크톱 실GUI, Fold6/iOS, SmartScreen 인증서는 외부 조치가 필요하다. + +증거: [`docs/evidence/2026-11-17-backlog-operations.md`](../evidence/2026-11-17-backlog-operations.md). diff --git a/docs/v3/MOBILE_APP_COMPLETION_SSOT.md b/docs/v3/MOBILE_APP_COMPLETION_SSOT.md index da0ad5fc..b8bed4e5 100644 --- a/docs/v3/MOBILE_APP_COMPLETION_SSOT.md +++ b/docs/v3/MOBILE_APP_COMPLETION_SSOT.md @@ -25,7 +25,7 @@ | App Signing | Play SHA-256 `01:00:19:21:DB:4F:33:40:85:CE:21:E4:B8:DE:CC:BD:71:DA:87:67:C5:6E:3B:59:83:2A:A1:C8:29:EA:0D:AB` | Play identity 확인; upload certificate 대조는 첫 AAB 후 | | upload key | external PKCS12·user-only ACL·Credential Manager·private-key readback GREEN; SHA-256 `4F:AC:69:24:...:15:2B:54` | local key GREEN; CI secret·복구 백업·AAB signer/Console 대조는 RED | | release evidence key | Ed25519 external private/public pair roundtrip GREEN; public SSOT·keyId `2797d3e6...4a890b7f` | local pair GREEN; CI private-key secret·복구 백업·실제 signed evidence는 RED | -| App Links | source `assetlinks.json` 3개는 Play SHA-256으로 갱신 | live는 구 certificate라 배포·public 재검증 전까지 RED | +| App Links | source/live `assetlinks.json`이 Play SHA-256과 일치 | 2026-11-17 live HTTP 200·정확한 package/fingerprint 확인 GREEN | | Firebase | Console `u/0`, `u/1` 모두 D3RO project 없음 | 사용자 승인 후 project·Android app 생성 필요; RED | | AdMob | App/Banner/Rewarded ID·SSV SSOT 확정 | `검토 필요`·`광고 게재 제한`·store 미연결·결제 프로필 미완료; RED | | production inputs | production Firebase config·AdMob/upload/evidence CI secret 주입 증거·AAB 없음 | RED | @@ -133,9 +133,9 @@ - [x] G-005 하드코딩된 release signing 자격 증명을 로컬/CI secret 주입으로 이동 - [~] G-006 공용 API·DB 타입을 `packages/api-client`에서 소비하고 화면별 임시 타입 제거 — 2026-11-04: push token/provider와 register/unregister RPC·quota period 계약을 공용 타입에 맞추고, 11개 화면의 `useNavigation`/`useRoute`를 `RootStackParamList`로 교체했다. 프로필 등 화면별 임시 DB DTO와 나머지 feature-local 계약은 계속 정리해야 한다. - [~] G-007 오류 코드·사용자 메시지·관찰 가능 로그를 공용 규약으로 통일 — 2026-11-04: `TalkScreen`의 직접 `console.warn`을 공용 `createLogger('Talk')`로 전환했다. 앱 전체 오류 코드·번역 메시지·구조화 로그 계약 감사와 통합은 남아 있다. -- [ ] G-008 legacy bundle/APK 생성물을 소스 변경과 분리하고 재현 가능한 build script 확정 -- [ ] G-009 Supabase Auth/profile/subscription을 단일 사용자·entitlement SSOT로 확정하고 .NET 계정은 제거 또는 명시적 매핑 -- [ ] G-010 Android application ID, iOS bundle ID, OAuth client, 딥링크 scheme을 하나의 제품 식별자로 통일 +- [x] G-008 legacy bundle/APK 생성물을 소스 변경과 분리하고 재현 가능한 build script 확정 — 2026-11-17 `build-mobile-local-e2e.ps1`이 `npx --yes supabase@3.2.0`으로 CLI를 고정하고, 출력 APK를 `scratch/mobile-e2e`에 분리한다. 현재 소스 `1.17.1-e2e.20261117.1` / `1170101` 빌드·서명·dual-ABI·bundle·model 검증 GREEN (`docs/evidence/2026-11-17-backlog-operations.md`). +- [x] G-009 Supabase Auth/profile/subscription을 단일 사용자·entitlement SSOT로 확정하고 .NET 계정은 제거 또는 명시적 매핑 — `@d3ro/core/entitlement`의 `resolveEntitlement`를 Web/Mobile/Desktop이 사용하고 .NET은 별도 계정 원본이 아닌 명시적 레거시/엔터프라이즈 매핑으로 유지한다(`docs/map/11` GAP-ID-01/02) +- [~] G-010 Android application ID, iOS bundle ID, OAuth client, 딥링크 scheme을 하나의 제품 식별자로 통일 — 2026-11-18 Android/iOS `com.d3ro.voice`, auth/invite `d3ro-voice`로 통일하고 `verify-mobile-build-config.mjs` 음성 자체 검사 GREEN. 운영 OAuth client/consent는 EXT-OAUTH-01에 남는다. - [ ] G-011 노출된 signing/Forgejo/OAuth/JWT 자격 증명을 폐기·회전하고 CI secret으로 이동 - [x] G-012 .NET 고정 관리자 seed·정적 salt SHA-256 비밀번호·fallback JWT secret 제거 @@ -162,7 +162,7 @@ ### O — 온보딩·튜토리얼·테마·접근성 -- [~] O-001 첫 실행 welcome과 기존 사용자/신규 사용자 분기 — 2026-11-01 `.2` Fold6 fresh auth/signup/small-screen PASS; 이후 `.3` Fold6 fresh-auth와 retry는 onboarding visibility 실패. 동일 `.3` APK는 새 격리 API 34 AVD에서 canonical auth 37초 / signup 50초 PASS(재시작 유지 포함). Fold6 실패는 별도로 남아 있다. 신규 사용자 목적지 준비 순서 회귀 테스트: `apps/mobile-rn/__tests__/onboarding-fresh-route.test.tsx`; 현재 증거: `test-results/recovery-2026-11-01/emulator-*.junit.xml` +- [~] O-001 첫 실행 welcome과 기존 사용자/신규 사용자 분기 — 2026-11-01 `.2` Fold6 fresh auth/signup/small-screen PASS; 이후 `.3` Fold6 fresh-auth와 retry는 onboarding visibility 실패. 동일 `.3` APK는 새 격리 API 34 AVD에서 canonical auth 37초 / signup 50초 PASS(재시작 유지 포함). **2026-11-18 `1.17.1-e2e.20261118.3`:** `emulator-5582`에서 fresh auth/signup/invite, 840x1490 small-screen 및 authenticated parity를 포함한 공식 전체 게이트 PASS. `record-cancel`·Account·More 스크롤 문제를 해소했고 Fold6/iOS 실기기는 남는다. 증거: `docs/evidence/2026-11-17-backlog-operations.md`. 신규 사용자 목적지 준비 순서 회귀 테스트: `apps/mobile-rn/__tests__/onboarding-fresh-route.test.tsx` - [ ] O-002 로그인 전 개인정보·클라우드 처리·녹음 권한 설명 - [ ] O-003 마이크 권한 요청/거부/다시 묻지 않음/설정 이동 - [ ] O-004 알림 권한은 가치 설명 뒤 요청하고 거부 시 기능 저하 안내 @@ -173,7 +173,7 @@ - [ ] O-009 테마·언어·햅틱·자동 교정·STT 옵션 저장 및 기기간 동기화 - [~] O-010 글자 확대, TalkBack label/role, focus order, 48dp 터치 영역, 색 대비 검증 — touched controls/ScreenHeader 48dp와 theme contrast source tests GREEN. 2026-11-04 physical Home/API 34 Login의 inspected app-owned action label·48dp와 AVD font scale 2.0 portrait/landscape scroll는 자동 검사 GREEN. AdMob SDK WebView 한 개는 clickable label이 UIA에 노출되지 않았고, 실제 TalkBack announcement/activation·focus order·앱 전체 경로·iOS는 대기 ([evidence](../evidence/2026-11-04-mobile-runtime-a11y.md)) - [ ] O-011 reduced motion과 애니메이션 비활성 경로 -- [~] O-012 한국어/영어 및 12개 로케일 번역 정합성·하드코딩 문자열 제거 — **2026-11-13 (`GAP-I18N-03`):** 12개 카탈로그 `2,500`키 정합성(`check:i18n`·`locale-contract.test.ts` 15/15 PASS) 고정 및 `index.native.tsx` 12개 로케일 로더 + `Onboarding`/`Settings`/`Account` 12개 언어 선택기 + Android 12개 `localeFilters` 반영(`mobile-i18n-locales.test.tsx` PASS); 실기기 비-한/영 로케일 화면 눈 확인 대기 +- [~] O-012 한국어/영어 및 12개 로케일 번역 정합성·하드코딩 문자열 제거 — **2026-11-13 (`GAP-I18N-03`):** 12개 카탈로그 `2,502`키 정합성(2026-11-18 기록 공유 라벨 포함)(`check:i18n`·`locale-contract.test.ts` 15/15 PASS) 고정 및 `index.native.tsx` 12개 로케일 로더 + `Onboarding`/`Settings`/`Account` 12개 언어 선택기 + Android 12개 `localeFilters` 반영(`mobile-i18n-locales.test.tsx` PASS); 실기기 비-한/영 로케일 화면 눈 확인 대기 ### D — 데이터 가져오기·동기화·오프라인 @@ -210,9 +210,9 @@ - [ ] R-014 `content://`, cloud provider, 한글/공백 파일명, MIME 불일치 안전 처리 - [ ] R-015 대용량 파일 크기·시간 제한, 청크 업로드, 진행률, 취소, 재개 - [x] R-016 다른 앱 공유 시트 `ACTION_SEND`/`ACTION_VIEW` 오디오·비디오 수신 — native instrumentation 3/3와 별도 UID Android ContentProvider APK의 실제 `ACTION_SEND`→Record→durable queue→cancel cleanup E2E GREEN -- [ ] R-017 transcript/요약/회의록을 텍스트·Markdown·파일로 공유 -- [ ] R-018 원본 오디오 공유는 사용자가 명시 선택한 경우에만 임시 URI 권한으로 제공 -- [ ] R-019 전사 결과 복사·편집·저장·재처리·삭제 +- [~] R-017 transcript/요약/회의록을 텍스트·Markdown·파일로 공유 — 2026-11-18 기존 텍스트/회의 문서 공유에 `history-share.ts`의 TXT/Markdown 파일 생성과 HistoryDetail 버튼을 추가. `history-share.test.ts` 5개 + 화면 버튼 테스트 GREEN; 외부 대상 앱의 실제 수신은 별도 게이트 +- [~] R-018 원본 오디오 공유는 사용자가 명시 선택한 경우에만 임시 URI 권한으로 제공 — 별도 버튼→신선한 signed URL→50 MiB/MIME/empty 검사→기존 FileProvider 임시 읽기 권한을 연결. 실패 시 파일 정리와 언마운트 RED→GREEN 테스트 완료; 실제 대상 앱 수신은 미검증 +- [~] R-019 전사 결과 복사·편집·저장·재처리·삭제 — HistoryDetail의 selectable 복사·revision-safe 편집/저장/삭제는 기존 구현·테스트 사용. 완료된 동일 오디오를 durable queue가 중복 제거하므로 강제 재처리 경로는 아직 연결하지 않았다. - [ ] R-020 녹음/파일 전사 정상·실패·취소·오프라인·재시작 E2E - [x] R-021 Supabase/.NET STT provider 전체 실패 시 합성 transcript 성공을 제거하고 fail-closed — 502/503만 반환, 합성 성공 경로 0, Deno/.NET 계약 테스트 GREEN - [x] R-022 .NET STT endpoint 인증·사용자 quota를 강제하고 익명 user fallback 제거 — 사용자 경로는 Supabase JWT+원자 quota SSOT, .NET provider endpoint는 32-byte service token 전용. anonymous 401, direct authenticated legacy 410, exact internal token만 provider orchestration @@ -323,13 +323,13 @@ - [x] Q-017 Web seeded 데이터→모바일 조회/편집→Web 확인 sync E2E - [x] Q-018 Free banner/rewarded test ad와 Pro 광고 미요청 E2E — official Google test ad 실측, ordinary Free 광고 노출과 manager/admin Pro 광고 비노출·미요청 API 34 PASS - [ ] Q-019 Play Billing test purchase/restore/manage E2E -- [ ] Q-020 모든 탭·설정·팀·관리·실패 복구 journey E2E — v4 4탭/FAB/More/통합 검색의 320dp dark·411dp light 부분 journey만 GREEN; 전체 범위를 대신하지 않음 +- [~] Q-020 모든 탭·설정·팀·관리·실패 복구 journey E2E — 2026-11-18 공식 authenticated parity가 Account/Paywall/Devices/Meetings/Templates/Memos/Teams/Notifications/Data portability/Dictionary/Commands/Knowledge/Actions까지 PASS. 관리자·Play/OAuth·실제 provider 실패 경로는 전체 범위를 대신하지 않음 - [~] Q-021 회전·폰트 확대·TalkBack·dark/light·작은/큰 화면 visual gate — v4 journey의 320dp dark·411dp light와 2026-11-04 API 34 Login font scale 2.0 portrait/landscape scroll는 GREEN. 후자는 자동 AVD route proof이며 physical TalkBack/focus order, app-wide 확대/회전, SDK ad, iOS는 대기 - [ ] Q-022 airplane mode·process kill·token expiry·server 5xx·중복 tap 회복 E2E - [~] Q-023 앱 로그 crash/ANR/React error/민감정보 0건 확인 — exact `.9` auth/signup/invite/small-screen 및 admin role journeys에서 fatal/ANR/React fatal 0. 2026-11-04 current-source Fold6/API 34 cold launch 뒤 bounded recent logcat도 crash/React fatal signature 0; 장시간 ANR·production provider journey·민감정보 로그 감사는 대기 - [x] Q-024 APK package/version/signature/SHA-256와 설치된 앱 버전 증거 — 2026-11-04 E2E `1.16.1-e2e.20261104.1` / `2026110401`, SHA-256 `3d2875c7…cf7c`, verifier 및 Fold6/API 34 installed identity 일치. Production artifact 증거로 재사용하지 않음 - [x] Q-025 최종 증거 표에 명령·결과·artifact·스크린샷/영상 경로 기록 -- [ ] Q-026 Node 24 LTS/JDK 17/Gradle 환경을 로컬·CI에서 통일 +- [~] Q-026 Node 24 LTS/JDK 17/Gradle 환경을 로컬·CI에서 통일 — `.nvmrc` 24.19.0, root/mobile `engines.node=24.x`, Docker/CI Node 24.19.0·JDK 17 정합. 실제 검증은 기본 Node 23 셸과 분리한 Node 24.19.0으로 실행; 사용자의 전역 기본 Node 전환은 별도 조치 - [~] Q-027 debug x86_64+arm64, release arm64 APK/AAB ABI 정책과 에뮬레이터 호환성 검증 — universal E2E APK 정책 GREEN, 실제 production arm64 APK/AAB CI 검증 대기 - [~] Q-028 공식 배포가 `assembleRelease` 비-debuggable artifact만 허용하도록 fail-closed — signed evidence·hash/version/package/cert/prod AdMob·create-only 경계와 negative self-test GREEN, 실제 production AAB/CI/secrets 대기 @@ -384,7 +384,7 @@ | Public Forgejo distribution | 최신 E2E TEST-DEMO 고유 asset upload + anonymous redownload hash 대조 | PENDING; `.11` SHA-256 `74035B69…380C2B` 공개 업로드·anonymous redownload 검증은 수행하지 않음 | Forgejo release asset | 2026-08-21 | | Mobile release boundary | `npm run release:mobile:boundary:test` + source-contract/security/syntax/YAML checks | GREEN; release mode·expected version/package/cert/prod AdMob·Ed25519 signed evidence와 artifact hash 일치, immutable snapshot, hardlink/reparse/path-swap/static APK 우회·overwrite·test AdMob/debug signer/nonrelease 거부를 검증. 실제 production APK/AAB에는 아직 실행하지 않음 | `scripts/ci/mobile-release-evidence-lib.mjs`, `scripts/ci/verify-mobile-release-boundary.mjs`, `.github/workflows/release.yml` | 2026-08-21 | | Production Android release gate | release/config/artifact/provenance self-tests + Play/Firebase/AdMob live 재확인 | release identity `1.2.0`/`1020001`, Play app ID `4976102237698469110`, package `com.d3ro.voice`, app-signing SHA-256, local upload/evidence key, AdMob identity를 확인했다. Play는 `임시`, 설정 0/11, AAB 0건, closed tester 0/12명, production access disabled다. Firebase project·CI secret 주입·AAB가 없으므로 현재 판정은 RED다 | `release/product-version.json`, `release/android-release-identity.json`, `scripts/ci/verify-mobile-release-config.mjs`, `scripts/ci/verify-android-artifact.mjs`, live consoles | 2026-08-29 | -| App Links release identity | source/live exact certificate 대조 | `site/public`, `apps/web/public`, `apps/api-server/wwwroot`의 source 3개는 Play app-signing SHA-256으로 갱신. live는 아직 폐기된 과거 certificate를 반환하므로 deploy·public 재검증 전까지 RED. **2026-09-26 Wave 3 갱신(cd9d199):** `apps/web/public`과 `apps/api-server/wwwroot` 사본은 삭제됐고, `site/public`이 유일한 source가 됐다(`scripts/ci/verify-android-app-links.mjs`도 `site/public`만 검사) — live 재검증 필요성은 그대로다 | `site/public/.well-known/assetlinks.json`, `scripts/ci/verify-android-app-links.mjs`, live `d3ro.chanpaca.net` | 2026-08-29 | +| App Links release identity | source/live exact certificate 대조 | **2026-11-17 GREEN:** `site/public/.well-known/assetlinks.json`이 유일한 source이고 live `https://d3ro.chanpaca.net/.well-known/assetlinks.json`이 HTTP 200으로 package `com.d3ro.voice`와 Play app-signing SHA-256 `01:00:19:21:...:AB`를 정확히 반환한다 | `site/public/.well-known/assetlinks.json`, `scripts/ci/verify-android-app-links.mjs`, live `d3ro.chanpaca.net` | 2026-11-17 | | Public legal and deletion resources | scoped NAS host/container deploy + anonymous HTTPS render | 개인정보처리방침, 이용약관, 앱 외부 계정 삭제 요청 경로를 기존 사이트 전체와 분리해 배포했다. host와 running container 4개 파일 SHA 일치; `/privacy/`, `/terms/`, `/delete-account/` 모두 외부 HTTPS 200·정확한 title, privacy→deletion 링크 visible. 실서버 본문 운영자는 `YUN CHAN`, Cloudflare email-protection 복호화 연락처는 `yunchan8804@gmail.com`, `TWENTYOZ` 잔존은 0건이다. Google Play 정책상 필요한 앱 식별·개발자 문의·수집/공유·보관/삭제·외부 삭제 요청 경로를 포함하고 모바일 Settings/Paywall에도 canonical link를 노출 | `site/public/legal.css`, `site/public/privacy/index.html`, `site/public/terms/index.html`, `site/public/delete-account/index.html`, `apps/mobile-rn/src/screens/SettingsScreen.tsx`, live `d3ro.chanpaca.net` | 2026-08-21 | | Android upload signing identity | create-only 3072-bit RSA PKCS12 + Windows credential vault + certificate readback | 2026-08-21에 생성한 local upload-key 후보 SHA-256은 `4F:AC:69:24:82:1C:50:DA:AB:ED:76:49:32:A5:3C:48:6F:8C:6C:5F:34:B9:F1:8D:B9:20:AA:40:99:15:2B:54`다. 다만 production CI secret·오프라인 복구 백업·실제 AAB signer 증거는 없다. Play Console upload certificate는 첫 AAB 업로드 후 표시되며, 현재 확인한 Play app-signing SHA-256과 분리해 대조해야 한다 | `release/android-release-identity.json`, `scripts/gen-keystore.js`, Windows Credential Manager | 2026-08-29 | | Release evidence signing identity | Ed25519 keypair creation + public-key fingerprint + sign/verify roundtrip | private key는 `C:\Users\encep\.d3ro\release\d3ro-mobile-evidence-ed25519-private.pem` user-only ACL, public key는 `release/mobile-release-evidence-public.pem`이다. keyId `2797d3e63affd2348941bc2871b57e520c958f7f5da1a4bbe8aa46904a890b7f`, pair/roundtrip GREEN. CI private-key secret·오프라인 복구 백업·실제 signed evidence는 대기 | `release/mobile-release-evidence-public.pem`, `release/android-release-identity.json`, `scripts/ci/verify-release-evidence-key-pair.mjs` | 2026-08-29 | diff --git a/release/webpush-vapid-public.key b/release/webpush-vapid-public.key new file mode 100644 index 00000000..7adef382 --- /dev/null +++ b/release/webpush-vapid-public.key @@ -0,0 +1 @@ +BAQA7onAItf1Exdf_UwpYAi_T98ITy-MThrcxsNVrrsj011zOiZH-zujdVk39DstwlUZ566JWM1mVjzOdc6ymfY diff --git a/scripts/deploy-nas.ps1 b/scripts/deploy-nas.ps1 index 9382ee08..d0ccc338 100644 --- a/scripts/deploy-nas.ps1 +++ b/scripts/deploy-nas.ps1 @@ -9,7 +9,10 @@ param ( [int]$NasSshPort = 0, [string]$NasPath = "", [int]$Port = 0, + [ValidateSet("api", "admin", "web")] + [string[]]$Services = @("api", "admin", "web"), [switch]$SkipBuild = $false, + [switch]$BuildOnly = $false, [switch]$DeploySsh = $false ) @@ -58,56 +61,71 @@ if (-not (Test-Path $nasPkgDir)) { # 2. Build Docker Image if (-not $SkipBuild) { - Write-Host "`n[1/4] Building D3RO Voice API Image..." -ForegroundColor Yellow - docker build -t d3ro-voice-api:latest ./apps/api-server - if ($LASTEXITCODE -ne 0) { - Write-Error "API Docker image build failed!" - exit 1 + if ($Services -contains "api") { + Write-Host "`n[1/4] Building D3RO Voice API Image..." -ForegroundColor Yellow + docker build -t d3ro-voice-api:latest ./apps/api-server + if ($LASTEXITCODE -ne 0) { + Write-Error "API Docker image build failed!" + exit 1 + } + Write-Host " Docker image built: d3ro-voice-api:latest" -ForegroundColor Green } - Write-Host " Docker image built: d3ro-voice-api:latest" -ForegroundColor Green - Write-Host "`n[1.5/4] Building D3RO Voice Next.js Admin CRM Image..." -ForegroundColor Yellow - docker build -t d3ro-voice-admin:latest -f apps/admin/Dockerfile . - if ($LASTEXITCODE -ne 0) { - Write-Error "Admin Docker image build failed!" - exit 1 + if ($Services -contains "admin") { + Write-Host "`n[1.5/4] Building D3RO Voice Next.js Admin CRM Image..." -ForegroundColor Yellow + docker build -t d3ro-voice-admin:latest -f apps/admin/Dockerfile . + if ($LASTEXITCODE -ne 0) { + Write-Error "Admin Docker image build failed!" + exit 1 + } + Write-Host " Docker image built: d3ro-voice-admin:latest" -ForegroundColor Green } - Write-Host " Docker image built: d3ro-voice-admin:latest" -ForegroundColor Green - # Web app (@d3ro/web, served at /app). NEXT_PUBLIC_* values are baked in at build time. - Write-Host "`n[1.6/4] Building D3RO Voice Next.js Web App Image..." -ForegroundColor Yellow - $webBuildArgs = @() - foreach ($name in @("NEXT_PUBLIC_SUPABASE_URL", "NEXT_PUBLIC_SUPABASE_ANON_KEY", "NEXT_PUBLIC_PAYPLE_CLIENT_KEY", "NEXT_PUBLIC_VAPID_PUBLIC_KEY")) { - $value = if ($envDict.ContainsKey($name)) { $envDict[$name] } else { [Environment]::GetEnvironmentVariable($name) } - if ($name -eq "NEXT_PUBLIC_VAPID_PUBLIC_KEY" -and [string]::IsNullOrWhiteSpace($value)) { - $value = if ($envDict.ContainsKey("WEBPUSH_VAPID_PUBLIC_KEY")) { $envDict["WEBPUSH_VAPID_PUBLIC_KEY"] } else { [Environment]::GetEnvironmentVariable("WEBPUSH_VAPID_PUBLIC_KEY") } - } - if ([string]::IsNullOrWhiteSpace($value)) { - if ($name -eq "NEXT_PUBLIC_PAYPLE_CLIENT_KEY") { - Write-Warning "$name is empty: the web app will build with Payple checkout disabled." - continue + if ($Services -contains "web") { + # Web app (@d3ro/web, served at /app). NEXT_PUBLIC_* values are baked in at build time. + Write-Host "`n[1.6/4] Building D3RO Voice Next.js Web App Image..." -ForegroundColor Yellow + $webBuildArgs = @() + foreach ($name in @("NEXT_PUBLIC_SUPABASE_URL", "NEXT_PUBLIC_SUPABASE_ANON_KEY", "NEXT_PUBLIC_PAYPLE_CLIENT_KEY", "NEXT_PUBLIC_VAPID_PUBLIC_KEY")) { + $value = if ($envDict.ContainsKey($name)) { $envDict[$name] } else { [Environment]::GetEnvironmentVariable($name) } + if ($name -eq "NEXT_PUBLIC_VAPID_PUBLIC_KEY" -and [string]::IsNullOrWhiteSpace($value)) { + $value = if ($envDict.ContainsKey("WEBPUSH_VAPID_PUBLIC_KEY")) { $envDict["WEBPUSH_VAPID_PUBLIC_KEY"] } else { [Environment]::GetEnvironmentVariable("WEBPUSH_VAPID_PUBLIC_KEY") } } - if ($name -eq "NEXT_PUBLIC_VAPID_PUBLIC_KEY") { - Write-Warning "$name is empty: browser notifications will stay unavailable and fail closed." - continue + if ($name -eq "NEXT_PUBLIC_VAPID_PUBLIC_KEY" -and [string]::IsNullOrWhiteSpace($value)) { + $publicKeyPath = Join-Path $PSScriptRoot "..\release\webpush-vapid-public.key" + if (Test-Path -LiteralPath $publicKeyPath) { $value = (Get-Content -LiteralPath $publicKeyPath -Raw).Trim() } } - throw "$name is required to build the web app image." + if ([string]::IsNullOrWhiteSpace($value)) { + if ($name -eq "NEXT_PUBLIC_PAYPLE_CLIENT_KEY") { + Write-Warning "$name is empty: the web app will build with Payple checkout disabled." + continue + } + if ($name -eq "NEXT_PUBLIC_VAPID_PUBLIC_KEY") { + Write-Warning "$name is empty: browser notifications will stay unavailable and fail closed." + continue + } + throw "$name is required to build the web app image." + } + if ($value.Contains("`r") -or $value.Contains("`n")) { + throw "$name must be a single-line value." + } + $webBuildArgs += @("--build-arg", "$name=$value") } - if ($value.Contains("`r") -or $value.Contains("`n")) { - throw "$name must be a single-line value." + docker build -t d3ro-voice-web:latest -f apps/web/Dockerfile @webBuildArgs . + if ($LASTEXITCODE -ne 0) { + Write-Error "Web Docker image build failed!" + exit 1 } - $webBuildArgs += @("--build-arg", "$name=$value") + Write-Host " Docker image built: d3ro-voice-web:latest" -ForegroundColor Green } - docker build -t d3ro-voice-web:latest -f apps/web/Dockerfile @webBuildArgs . - if ($LASTEXITCODE -ne 0) { - Write-Error "Web Docker image build failed!" - exit 1 - } - Write-Host " Docker image built: d3ro-voice-web:latest" -ForegroundColor Green } else { Write-Host "`n[1/4] Skipping Docker build (-SkipBuild specified)" -ForegroundColor Gray } +if ($BuildOnly) { + Write-Host "Remote/local Docker image build completed (-BuildOnly)." -ForegroundColor Green + return +} + # 3. Export Docker Image Archives $tarPath = Join-Path $nasPkgDir "d3ro-voice-api.tar" $adminTarPath = Join-Path $nasPkgDir "d3ro-voice-admin.tar" diff --git a/scripts/deploy-nas.sh b/scripts/deploy-nas.sh index 391cda7c..1e9f26a5 100644 --- a/scripts/deploy-nas.sh +++ b/scripts/deploy-nas.sh @@ -81,6 +81,9 @@ if [ -z "${NEXT_PUBLIC_PAYPLE_CLIENT_KEY:-}" ]; then echo -e "${YELLOW}NEXT_PUBLIC_PAYPLE_CLIENT_KEY is empty: Payple checkout will be disabled in the web app.${NC}" fi WEB_VAPID_PUBLIC_KEY="${NEXT_PUBLIC_VAPID_PUBLIC_KEY:-${WEBPUSH_VAPID_PUBLIC_KEY:-}}" +if [ -z "$WEB_VAPID_PUBLIC_KEY" ] && [ -f "$ROOT_DIR/release/webpush-vapid-public.key" ]; then + IFS= read -r WEB_VAPID_PUBLIC_KEY < "$ROOT_DIR/release/webpush-vapid-public.key" +fi if [ -z "$WEB_VAPID_PUBLIC_KEY" ]; then echo -e "${YELLOW}NEXT_PUBLIC_VAPID_PUBLIC_KEY is empty: browser notifications will stay unavailable and fail closed.${NC}" fi diff --git a/server/cloudflare-worker/src/push-drain.test.ts b/server/cloudflare-worker/src/push-drain.test.ts index 5182b38e..895ce329 100644 --- a/server/cloudflare-worker/src/push-drain.test.ts +++ b/server/cloudflare-worker/src/push-drain.test.ts @@ -44,6 +44,7 @@ Deno.test('drain posts to the drain endpoint with the service role bearer', asyn assert(calls[0].url === 'https://example.supabase.co/functions/v1/send-push?mode=drain&limit=20', 'drain url') const headers = calls[0].init.headers as Record assert(headers.Authorization === `Bearer ${env.SUPABASE_SERVICE_ROLE_KEY}`, 'service role bearer') + assert(headers.apikey === env.SUPABASE_SERVICE_ROLE_KEY, 'modern service role apikey') assert(headers['Content-Type'] === 'application/json', 'json content type') assert(calls[0].init.body === '{}', 'empty json body') assert(calls[0].init.method === 'POST', 'post method') diff --git a/server/cloudflare-worker/src/push-drain.ts b/server/cloudflare-worker/src/push-drain.ts index cc70844d..8786fe16 100644 --- a/server/cloudflare-worker/src/push-drain.ts +++ b/server/cloudflare-worker/src/push-drain.ts @@ -56,6 +56,7 @@ export async function drainPushDispatches( method: 'POST', headers: { Authorization: `Bearer ${serviceRoleKey}`, + apikey: serviceRoleKey, 'Content-Type': 'application/json', }, body: '{}',