diff --git a/AGENTS.md b/AGENTS.md index e20d5eb9..644c9101 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -174,11 +174,13 @@ Rules: `npm run version:sync` when syncing surfaces; `npm run version:check` must be clean. - **Channels.** `latest` (stable), `beta`, `alpha`. Stable clients never receive a prerelease unless their channel allows it. -- **Major vs incremental.** `release/update-policy.json` decides whether an update - is mandatory (`minimumSupportedVersion`, `forceInstallBelow`) and whether to use a - full installer instead of a blockmap delta (`fullInstallOnMajorChange`, - `fullInstallVersionGap`). `stagingPercentage` limits rollout; `killSwitch` stops - update checks remotely. +- **Mandatory updates & rollout.** `release/update-policy.json` decides whether an + update is mandatory (`minimumSupportedVersion`, `forceInstallBelow`). + `stagingPercentage` limits rollout; `killSwitch` stops update checks remotely. +- **Windows full installers.** `nsis.differentialPackage: false` keeps the installer + within Cloudflare's 100 MiB upload limit, so Windows has no `.blockmap` delta and + `fullInstallVersionGap: 0` requests the full installer even for a patch. macOS + packaging is unchanged. The build/smoke gates require exactly that artifact set. - **Secrets stay fail-closed.** Publishing needs `FORGEJO_TOKEN` (`write:package` + `write:repository`) and `D3RO_UPDATE_SIGNING_KEY`; a missing or mismatched signing key fails before any upload. `WIN_CSC_*` Authenticode material is diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c2993cb..15fd82fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,12 +13,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Plugin system for custom pipelines -## [1.18.2] - 2026-11-20 +## [1.18.3] - 2026-11-20 -> Supersedes the unpublished `1.18.0`/`1.18.1` installers and ships everything listed under `1.18.0`. +> Supersedes the unpublished `1.18.0`–`1.18.2` installers and ships everything listed under `1.18.0`. ### Fixed -- Remove duplicate renderer packages and unused SQLite sources from the Windows package and use maximum installer compression so it stays below the update feed's 100 MiB upload limit. +- Keep the Windows installer below the feed's 100 MiB upload limit by removing duplicate renderer/workspace packages, non-Windows native binaries, unused SQLite sources and the Windows copy of nut-js. + +### Changed +- Windows updates now download a full installer instead of blockmap deltas. This is required to use maximum solid compression within the feed's upload limit; macOS packaging is unchanged. + +## [1.18.2] - 2026-11-20 + +> Not published: the 120,821,907-byte installer exceeded the feed's 100 MiB upload limit; a full-only packaging probe was still too large at 108,504,875 bytes. Superseded by `1.18.3`. ## [1.18.1] - 2026-11-20 diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml index 0263825f..30f27dc5 100644 --- a/apps/desktop/electron-builder.yml +++ b/apps/desktop/electron-builder.yml @@ -7,7 +7,7 @@ copyright: Copyright © 2026 D3RO # 자동 감지가 실패하는 문제를 피하려고 명시적으로 버전 고정. electronVersion: "43.8.10" # 설치 크기 절감 — 지원 로케일만 포함한다 -# 설치본 압축을 최대로 — 빌드는 느려지지만 업로드 한도(100MiB) 안에 들어야 한다 +# Windows full-only 패키지는 차분용 1MiB 사전/비-solid 제약 없이 최대 압축을 사용한다 compression: maximum electronLanguages: - ko @@ -28,6 +28,8 @@ files: - "!node_modules/better-sqlite3/prebuilds/linux*" # 런타임에 쓰지 않는 SQLite 소스(amalgamation) · C++ 소스 - "!node_modules/better-sqlite3/{deps,src}/**" + # shared packages는 main/preload/renderer에 번들됐고 main locale도 out/main/locales에 복사됐다 + - "!node_modules/@d3ro/**" # 렌더러 전용 패키지 — Vite 가 out/renderer 번들에 이미 넣었다. 메인/프리로드는 require 하지 않는다 # (out/main · out/preload 의 require 목록으로 확인). Electron 43 으로 실행 파일이 47MB 커져 # 설치본이 Cloudflare 업로드 한도(100MiB)를 넘었기 때문에 중복 사본을 뺀다. @@ -67,6 +69,10 @@ asarUnpack: # ──────────────────────────────────────────────────────────────────── win: icon: build/icon.ico + files: + # Windows는 koffi SendInput을 사용하므로 nut-js/Jimp의 macOS·Linux 입력 경로는 제외한다 + - "!node_modules/@nut-tree-fork/**" + - "!node_modules/better-sqlite3/prebuilds/{darwin*,win32-arm64.node}" # Stable artifacts must never silently fall back to an unsigned build. forceCodeSigning: true target: @@ -156,6 +162,8 @@ extraResources: to: ollama/ nsis: + # Cloudflare 100MiB 한도 안에서 최대 solid 압축을 쓴다. Windows는 .blockmap 없이 전체 설치본을 받는다. + differentialPackage: false # 파일명 공백 금지 — mac.artifactName 주석과 동일한 이유 (latest.yml url 정합) artifactName: "D3RO-Voice-Setup-${version}-${arch}.${ext}" # oneClick=false + perMachine=false 조합이 System.dll 0xc0000005 크래시 사례(#7921). diff --git a/apps/desktop/tests/main/update-policy.test.ts b/apps/desktop/tests/main/update-policy.test.ts index 3f18df0e..9a16e3dc 100644 --- a/apps/desktop/tests/main/update-policy.test.ts +++ b/apps/desktop/tests/main/update-policy.test.ts @@ -77,6 +77,11 @@ describe('decideUpdate', () => { expect(decision.forceFull).toBe(true) }) + it('full-only 정책이면 작은 패치도 전체 설치 파일을 받는다', () => { + const fullOnly = { ...policy, fullInstallVersionGap: 0 } + expect(decideUpdate(fullOnly, '1.18.2', '1.18.3').forceFull).toBe(true) + }) + it('major 정책이 꺼져 있으면 major 승격도 차분 가능', () => { const relaxed = { ...policy, fullInstallOnMajorChange: false } expect(decideUpdate(relaxed, '1.9.0', '2.0.0').forceFull).toBe(false) diff --git a/docs/deployment/update-system-assessment.md b/docs/deployment/update-system-assessment.md index eb7f904c..716ca904 100644 --- a/docs/deployment/update-system-assessment.md +++ b/docs/deployment/update-system-assessment.md @@ -120,6 +120,7 @@ fail-closed 서명 검증, 명시적 publish) 방향으로 설정을 정렬**한 - **full로 강제해야 하는 경우**: (a) 현재 버전을 신뢰할 수 없음/손상, (b) major 승격(스키마·ABI 변경), (c) minor 갭이 임계 이상, (d) 서버가 Range 미지원. - 구현: `autoUpdater.disableDifferentialDownload`를 위 조건에서 켠다. +- **2026-11-20 현재 Windows 적용:** Electron 43 설치본이 Cloudflare의 100 MiB 업로드 한도를 넘어 `nsis.differentialPackage: false`와 최대 solid 압축을 사용한다. Windows는 `.blockmap` 차분 없이 항상 전체 설치본을 받도록 `fullInstallVersionGap: 0`을 게시하며, macOS 패키징은 유지한다. 상세한 게시 중단·복구 증거는 `docs/evidence/2026-11-17-backlog-operations.md`에 있다. ### 4.3 채널과 staged rollout diff --git a/docs/evidence/2026-11-17-backlog-operations.md b/docs/evidence/2026-11-17-backlog-operations.md index c1e430ae..31271aae 100644 --- a/docs/evidence/2026-11-17-backlog-operations.md +++ b/docs/evidence/2026-11-17-backlog-operations.md @@ -113,3 +113,6 @@ - 공개 `latest/latest.yml`은 무인증 HTTP 200으로 `version: 1.17.1`을 반환한다. 로컬 소스는 `1.18.1`(`bed83f7`)이지만 canonical remote에 해당 태그가 없고 공개 피드에도 게시되지 않았다. - 미게시 `1.18.1` 설치본은 `120,821,996 bytes`(115.2 MiB), `.blockmap`과 `latest.yml`이 생성된 후 `build-desktop-installer.mjs`의 100 MiB 제한에서 중단됐다. `release-artifacts.json` 체크포인트가 없으므로 임의로 재빌드·재게시하지 않고 원본 산출물을 보존한다. - `apps/desktop/electron-builder.yml`의 최대 압축, 번들된 renderer 전용 의존성 및 미사용 SQLite 소스 제외를 정식 `1.18.2` 빌드로 검증한다. 앱을 종료하거나 개인 설정·DB를 바꾸지 않고 공개 피드와 기존 설치본의 제안을 확인한다. +- `1.18.2`도 동일한 패키징에서 `120,821,907 bytes`라 업로드 전 크기 게이트가 중단했다. `release:metadata`, `version:check`, 전 workspace typecheck와 네이티브 DB 열기·질의는 GREEN이었고, 태그만 로컬에 있고 원격 push·upload는 실행되지 않았다. +- 차분 친화적 archive는 빌더가 compression을 normal로 재설정하므로 `compression: maximum`만으로는 줄지 않았다. 분리된 `differentialPackage=false` 시험 설치본은 `108,504,875 bytes`였고 `.blockmap`을 만들지 않았다. 이것만으로는 부족해 게시하지 않았다. +- `1.18.3`은 Windows full-only(`nsis.differentialPackage=false`, `fullInstallVersionGap=0`)로 전환하고 Windows에서 사용하지 않는 nut-js, 다른 플랫폼의 SQLite 바이너리, 번들된 shared packages의 중복 복사본을 제외한다. macOS 패키지는 변경하지 않는다. 기존 차분 모드의 기본 smoke 검사는 유지하면서 full-only의 `.blockmap` 부재를 명시적 계약으로 검사한다. diff --git a/docs/map/00-index.md b/docs/map/00-index.md index 454cf0db..653c73f0 100644 --- a/docs/map/00-index.md +++ b/docs/map/00-index.md @@ -2,7 +2,7 @@ > Status: ACTIVE > Last full audit: 2026-09-13 -> Last update: 2026-11-20 — **데스크톱 자동 업데이트 미표시 원인 확인 및 `v1.18.2` 게시 복구.** 설치 앱과 공개 피드가 모두 `1.17.1`이며 업데이트 정책은 활성(kill switch=false, staging=100%)인 것을 실제 로그와 HTTP 응답으로 확인했다. 미게시 `1.18.1` 설치본은 115.2 MiB라 100 MiB 업로드 게이트에서 중단됐다. `1.18.2`는 중복 renderer 패키지와 미사용 SQLite 소스를 제외하고 최대 압축을 적용한다. 실제 공개 피드·설치 앱 제안 검증은 `11` GAP-REL-17에 기록한다. +> Last update: 2026-11-20 — **데스크톱 자동 업데이트 미표시 원인 확인 및 `v1.18.3` 게시 복구.** 설치 앱과 공개 피드가 모두 `1.17.1`이며 업데이트 정책은 활성(kill switch=false, staging=100%)인 것을 실제 로그와 HTTP 응답으로 확인했다. 미게시 `1.18.1` 설치본은 115.2 MiB라 100 MiB 업로드 게이트에서 중단됐다. `1.18.3`는 중복 renderer 패키지와 미사용 SQLite 소스를 제외하고 최대 압축을 적용한다. 실제 공개 피드·설치 앱 제안 검증은 `11` GAP-REL-17에 기록한다. > > Previous update: 2026-11-14 — **전 표면 프로덕션 `v1.17.1` 배포 완결.** 데스크톱(`v1.17.1`, 커밋 `6c6875b`, 서명 매니페스트 `1.17.1/latest.yml`·`.sig` 및 `latest/latest.yml`, 런타임 `runtime-1.17.1`/`runtime-latest`, 포터블 `portable-1.17.1`/`portable-latest` 모두 Forgejo HTTP `200`, 태그 `v1.17.1` canonical/mirror 푸시; Human Release #339 ~91MB 바이너리 첨부만 Cloudflare HTTP 524/`ECONNRESET` `GAP-REL-16` 예외), Supabase 운영 DB(`db push --remote`, 전체 74개 마이그레이션 일치) 및 Edge Functions 24종(`--import-map deno.json --use-api`) 재배포, 랜딩 사이트(`site/` → Cloudflare Pages `d3ro`, `https://d3ro.chanpaca.net/release-identity.json` = `1.17.1`/`6c6875b` & `assetlinks.json` 검증 GREEN), Cloudflare Worker(`d3ro-voice-api` `--keep-vars`, Version ID `fe6d9532-0052-48f5-b62c-45c86f6aaaa5`), NAS Docker 스택(`d3ro_voice_api` `v1.17.1` `/health` `200`, `d3ro_voice_admin` `:3001`/`d3ro-admin.chanpaca.net/login` `200`, `d3ro_voice_web` `:3002/app/login`·`d3ro.chanpaca.net/app/login` `200`) 반영 완료. > @@ -41,7 +41,7 @@ > Previous update: 2026-09-22 — **Gemma/Ollama 폭주 방어 계약을 기록했다.** 19:14:12 부팅 워밍업이 `keep_alive: 30m`으로 `gemma4:e4b`를 19:44:12까지 VRAM 3,226,342,521 bytes / context 4096으로 강제 상주시킨 것이 관측됐으며, 같은 시점 Windows GPU Engine PID 표본에는 Ollama의 활성 compute가 없었다. 즉 당시 상태는 무한 추론이 아니라 강제 residency였다. 19:11:17~19:11:58의 자동 제안 연속 생성은 기존 900 ms·12/min·5 candidates·128 tokens·한 글자 재생성 정책이 허용한 burst였다. 현재 구현 계약은 부팅 warmup 제거, `keep_alive: 2m`, 제안 600 ms / 최소 5 s 간격 / 기본 6회·hard max 12회 per min / 3 candidates / 64 tokens / 12-char growth / 8 s timeout, 그리고 요청별 취소·상한·종료 정리다. 독립 표적 검증은 6 test files / 69 tests passed / 0 failed, 변경 코드·테스트 ESLint와 `git diff --check`도 exit 0이다. Raw Ollama에서는 cold bounded 요청이 client hard timeout 15.044 s에 취소된 뒤 `/api/ps`가 비었고 `/api/version`은 80 ms에 회복했다. 명시 warmup은 HTTP 200 / 16.639 s, 후속 warm 요청은 body `options.num_predict=1`, `keep_alive='2m'`로 553 ms HTTP 200 / `done:true` / `eval_count:1` / `done_reason:length`였고 `/api/ps` expiry는 약 119.9 s였다. **19:48:59 +09:00에는 새 generate/unload/kill/retry 없이 충분히 지난 뒤 한 번의 `/api/ps`가 HTTP 200 / 45.8 ms / `{models:[]}`였고 `/api/version`은 HTTP 200 / 7.3 ms / `0.32.13`이었다.** 이는 raw API 수준의 expiry 뒤 unload 확인일 뿐 앱 재시작·GUI·실제 타이핑 증거는 아니므로 상태는 `[~]`로 유지한다 (`11` GAP-LLM-04, GAP-INPUT-06). > > Previous update: 2026-09-21 — **Input intelligence (입력 레메트리 + 다음 문장 제안) 신규**. 데스크톱에 입력 수집기(`InputTelemetryService`), UIA 컨텍스트 브리지(사이드카 `GET /uia/focus`), 제안 서비스(`SuggestionService`), 어렛 커 오버레이, 설정 > 입력 탭(동의·정책·주간 인사이트·개인 문구)을 추가했다. 카탈로그에 `INPUT-01`~`INPUT-08`(전부 데스크톱 `[~]` — 유닛 48건은 GREEN 이지만 **실앱 타이핑 검증 전**), 백로그에 GAP-INPUT-01~05 + GAP-LLM-03, §7 에 CONSTRAINT-INPUT-01(키 내용 미저장 — ActivityWatch 정책 채택)을 기록. 설계 근거는 조사 기반이다: 어렛은 `GetGUIThreadInfo` 가 아니라 UIA `TextPattern.GetSelection`(Chromium 은 `TextPattern2` 미구현), 타이핑 스트는 키코드 복원이 아니라 UIA 스냅샷 diff(한/일 IME 대응), 디바운스/토큰 한도는 인라인 컴플리션 실측값(Continue 350 / Tabby 250 / twinny 300 ms, 출력 64~256 토큰). 의존성: `koffi` 3.3.1(포그라운드 창 FFI), 사이드카 `uiautomation` 2.0.29 + `comtypes`. 데스크톱 유닛 총계 1409(+49), Electron ABI 실행에서 신규 실패 0건. 당시의 24.7초/4.9초 지연 설명과 `keep_alive: 30m`·부팅 워밍업 처방은 **현재 상태가 아닌 과거 가설/완화 이력**이며, 최신 운영 결론은 위 2026-09-22 항목과 `11` GAP-LLM-04를 따른다. 직전: LLM instruction-prompt fix (`9c2b4d4`): the custom-instruction path inserted the instruction's own wording instead of the processed result and had **never worked in any shipped release** (`v0.1.0-alpha`..`v1.4.0`, introduced `fea923d` 2026-04-05, not a regression). `llm-prompts.ts` is now the SSOT for prompt resolution and placeholder substitution, shared by `VoiceModeService` / `ChainService` / `LLM.PROCESS`. AI-04/05/06/07 are demoted to `[~]` on desktop — fixed with unit tests, but **not verified in a running app** and the four related `tests/red/*.usecase.test.ts` could not execute (`better-sqlite3` ABI). New: GAP-LLM-01 (no target-language setting), GAP-LLM-02 (this fix unverified); GAP-INFRA-06 amended (the ABI masks verification, not just dev-env switching cost); GAP-I18N-01 amended (`popup.error.default` missing in 10 locales). Earlier the same day: CAP-16 (desktop key bindings rebuilt on one `@d3ro/core/keybinding` SSOT — multiple bindings per action, mouse buttons, `HOTKEY` → `KEYBINDING` IPC group), verified on Windows by a manual run, so CAP-16 and CAP-02 are `[x]` and GAP-KEY-01 is closed. Still open: GAP-KEY-02/03, GAP-QA-02, GAP-I18N-01/02, GAP-INFRA-06, GAP-LLM-01/02, GAP-INPUT-01~05; `11` §7 holds accepted design constraints (things deliberately kept, not gaps) -> Scope: entire monorepo `D:/workspace/D3ROVoice` at product version `1.18.2` (`release/product-version.json`) +> Scope: entire monorepo `D:/workspace/D3ROVoice` at product version `1.18.3` (`release/product-version.json`) > Purpose: let any agent (or human) answer two questions in under a minute: > 1. **What infrastructure exists?** (build, CI, services, APIs, data, packages, deploy) > 2. **How far is each feature developed?** (per surface, with file anchors and status) diff --git a/docs/map/02-infrastructure.md b/docs/map/02-infrastructure.md index d2549cf2..accd1862 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-20 — `v1.18.2` 데스크톱 업데이트 피드 복구: Electron 43 패키지의 100 MiB 업로드 한도 초과를 패키지 중복 제거·최대 압축으로 해소하고 실제 설치본·서명 매니페스트를 검증 +> Last updated: 2026-11-20 — `v1.18.3` 데스크톱 업데이트 피드 복구: Electron 43 패키지의 100 MiB 업로드 한도 초과를 패키지 중복·미사용 플랫폼 바이너리 제거와 Windows full-only 최대 압축으로 해소하고 실제 설치본·서명 매니페스트를 검증 > Source of truth for: layout, workspaces, build/test commands, CI/CD, Docker, deploy, scripts, resources --- @@ -245,14 +245,14 @@ Full detail: [`09-supabase-backend.md`](./09-supabase-backend.md). | File | Purpose | |---|---| -| `release/product-version.json` | version `1.18.2`, `androidVersionCode`/`iosBuildNumber` `1180200`, desktop license keyId | +| `release/product-version.json` | version `1.18.3`, `androidVersionCode`/`iosBuildNumber` `1180300`, desktop license keyId | | `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`, Electron `43.8.10`, NSIS x64 (forced code signing when material exists), macOS DMG/ZIP arm64, generic Forgejo publish feed, maximum compression. asarUnpack native modules (`better-sqlite3`, `uiohook-napi`, `koffi`, `@koromix`; `@nut-tree-fork` on macOS only); renderer bundles and unused SQLite sources are excluded from duplicate package copies. extraResources (icons, sounds, filtered `sox.exe`+`zlib1.dll`+`LICENSE.GPL.txt`, ollama); sidecar/ffmpeg remain in the on-demand runtime feed so the installer stays below 100 MiB | +| `apps/desktop/electron-builder.yml` | appId `com.d3ro.voice`, Electron `43.8.10`, NSIS x64 (forced code signing when material exists), macOS DMG/ZIP arm64, generic Forgejo publish feed. Windows는 `nsis.differentialPackage=false` + 최대 solid 압축의 full-only 설치본이며 `.blockmap`을 만들지 않는다. Windows 전용 nut-js·다른 플랫폼 SQLite, 번들된 renderer/workspace package, 미사용 SQLite 소스의 중복 복사본을 제외한다. asarUnpack native modules (`better-sqlite3`, `uiohook-napi`, `koffi`, `@koromix`; `@nut-tree-fork` on macOS only). extraResources (icons, sounds, filtered `sox.exe`+`zlib1.dll`+`LICENSE.GPL.txt`, ollama); sidecar/ffmpeg remain in the on-demand runtime feed | | `apps/desktop/src/main/update-feed.ts` | Auto-update feed SSOT (canonical Forgejo + channels); the GitLab mirror was retired in 2026-10 | -| `release/update-policy.json` | Update policy SSOT (channels, minimum supported version, forced update, delta/full, staged rollout, kill switch) | +| `release/update-policy.json` | Update policy SSOT (channels, minimum supported version, forced update, staged rollout, kill switch). Windows full-only 패키지에 맞춰 `fullInstallVersionGap: 0`; macOS 패키징은 변경하지 않는다 | | `site/src/release.ts` | Download-center desktop release contract (installer filename + release date); version and date are kept on the SSOT by `npm run version:sync` (drifted to 1.2.0 once — GAP-REL-08). `apps/web/src/lib/desktop-release.ts` and the `apps/web` download/releases pages were deleted 2026-09-26 (Wave 3, cd9d199) — `site/` is the only download surface, and `/download`/`/releases` on `apps/web` now redirect to it | | `apps/desktop/src/main/update-policy.ts` | Policy parsing/decision logic | | `scripts/ci/publish-forgejo-release.mjs` | Canonical Forgejo registry + Release + feed publisher | diff --git a/docs/map/10-feature-catalog.md b/docs/map/10-feature-catalog.md index edcd2622..9dc96fb4 100644 --- a/docs/map/10-feature-catalog.md +++ b/docs/map/10-feature-catalog.md @@ -234,7 +234,7 @@ end-to-end behaviour has **not been verified by typing in a real app** (`11` GAP | INFRA-12 | Cloudflare edge + tunnel | [x] | `server/cloudflare-worker`, Cloudflare Tunnel `kd-nas` | | INFRA-13 | Site deploy (Cloudflare Pages) | [x] | `.forgejo/workflows/deploy-site.yml`; the unused GitHub Pages workflow was removed in Wave 3 | | INFRA-17 | Test hygiene & TDD v2.0 gates | [x] | `scripts/ci/check-test-hygiene.mjs` (`test:hygiene`), `check-protected-tests.mjs` (`check:protected-tests`), `check-test-quality.mjs` (`test:quality`), `check-i18n-contract.mjs` (`check:i18n`), `check-ds-contract.mjs` (`check:ds-contract`), `run-affected-tests.mjs` (`test:affected`), `verify-desktop-installer-smoke.mjs` (`release:installer:smoke`), and `@d3ro/core/ports` (`Clock`/`Random` deterministic ports) — all equipped with `--self-test` and wired into `verify:all`, `.forgejo/workflows/ci.yml`, `release-desktop.mjs`, and `.forgejo/workflows/release.yml`. Applied policy: `docs/tdd-red/06-repo-application.md`, `07-revamp-plan.md`. | -| INFRA-15 | Update & release system | [~] | Canonical Forgejo feed + channels/policy (`release/update-policy.json`, `src/main/update-policy.ts`), canonical publisher `scripts/ci/publish-forgejo-release.mjs`; `npm run release:metadata:test`. 2026-11-20 설치본과 로그는 정상적으로 업데이트를 확인했으나 공개 피드가 1.17.1에 머물렀고 미게시 1.18.1의 115.2 MiB 설치본이 업로드 한도를 초과했다. 1.18.2 패키지 축소·게시·실제 설치본 제안은 `11` GAP-REL-17에서 추적한다. | +| INFRA-15 | Update & release system | [~] | Canonical Forgejo feed + channels/policy (`release/update-policy.json`, `src/main/update-policy.ts`), canonical publisher `scripts/ci/publish-forgejo-release.mjs`; `npm run release:metadata:test`. 2026-11-20 설치본과 로그는 정상적으로 업데이트를 확인했으나 공개 피드가 1.17.1에 머물렀고 미게시 1.18.1·1.18.2의 115.2 MiB 설치본이 업로드 한도를 초과했다. 1.18.3은 Windows full-only 패키지(`fullInstallVersionGap=0`)로 피드 한도를 맞춘다. 게시·실제 설치본 제안은 `11` GAP-REL-17에서 추적한다. | | INFRA-16 | Desktop STT engine packaging | [x] | `apps/desktop/scripts/setup-sidecar.mjs` + `build-sidecar.mjs`, `electron-builder.yml` `extraResources` (`sidecar-dist/sidecar` → `resources/sidecar`, `resources/ffmpeg`), and `scripts/ci/verify-sidecar-bundle.mjs` run in `package-windows`/`package-macos` before electron-builder. Verified on the real bundle: `sidecar.exe` + `_internal` including `faster_whisper/assets/silero_vad_v6.onnx`, plus a packaged-engine transcription round-trip on GPU. | | INFRA-17 | 서명 없는 배포 채널 (portable + Scoop) | [x] | `scripts/ci/build-portable.mjs` (95MiB 7z 분할 볼륨 + Scoop 매니페스트), `scripts/ci/publish-portable-release.mjs`, `scripts/local/install-d3ro-voice.ps1`, `bucket/` 버킷, `.forgejo/workflows/portable.yml`; 7z 분할 볼륨(Scoop, 162MiB) + zip 분할 부품(수동 설치, 243MiB, 7-Zip 불필요); updater feed와 분리. 2026-09-18 `portable-1.3.1` 게시 + 실제 설치 검증. | | INFRA-18 | 로컬 런타임 온디맨드 설치 | [x] | `RuntimeProvisioner`(부품 다운로드 + SHA-256 검증 + tar 해제, `%APPDATA%/d3ro-voice/runtime`), `POST runtime:ensure` / `runtime:progress` IPC, 설정 > STT 상태/내려받기 UI. 설치본에서 엔진/ffmpeg를 분리해 189MB → 90.6MiB, 업데이트 피드 게시 복구. 검증은 전부 디스크에 기록된 파일 기준이며(부품 크기·해시 → 결합본 크기·해시), 부품 다운로드는 최대 3회 재시도한다. 2026-09-18 실제 feed 통합 검증(엔진 94.4MiB/18초, ffmpeg 21.7MiB/5초). | diff --git a/docs/map/11-gap-backlog.md b/docs/map/11-gap-backlog.md index 1be6cda4..96b7b56e 100644 --- a/docs/map/11-gap-backlog.md +++ b/docs/map/11-gap-backlog.md @@ -72,7 +72,7 @@ Legend: `[ ]` open · `[~]` in progress · `[!]` blocked externally · `[x]` res | GAP-MTG-03 | Meetings | Existing recordings could become plain transcription history, but not a meeting with linked audio and minutes. | desktop `MeetingModeService`, `meeting/imported-recording.ts`, `meeting-mode-handlers.ts`; mobile `MeetingsScreen` → `RecordScreen`; MTG-13 | `[~]` 2026-11-02: installed Windows 1.16.0 passed native picker→timestamped transcript→local summary/action item with a real WAV (`2026-11-02-verification.md`). Desktop GUI gate is complete; authenticated Android picker→upload→transcript→minutes on Fold6 remains. | | GAP-MTG-04 | Meetings | Learned typing vocabulary never reached meeting transcription: STT used a hardcoded Korean hint, refine had no glossary, refined lines stopped inside `CaptionService`, and the stored transcript was raw segments. | `packages/core/src/transcript-correction.ts`, `apps/desktop/src/main/services/TranscriptGlossaryService.ts`, `CaptionService.ts`, `meeting/MeetingRecordingSession.ts`, `MeetingModeService.ts`, `FileTranscriptionService.ts`, `VoiceModeService.ts`; MTG-14 | `[~]` 2026-11-05: one glossary SSOT wired into caption, meeting, file transcription and dictation; refined lines now propagate to the meeting transcript and renderer (`meetingMode:segmentUpdated`). **Direct measurement against the real local database** (`users/_local/d3ro.db`: 1,952 learned phrases / 2,522 typing samples / 3 meeting transcripts) exposed that the first cut also rewrote ordinary Korean (286 of 3,005 words: 하면→라면, 이제→이게, 매일→메일, 정보→정도), and v1.16.3 restricts deterministic correction to dictionary pronunciations plus typed Latin identifiers — re-measured **0 of 3,005**. Real-engine check with the local sidecar (`large-v3-turbo`): a Korean TTS fixture containing the user term transcribes as 하람로그에 with no hint and haramlog에 with the learned hint; a dictionary pronunciation entry maps 디에로 → D3RO. Hangul-layout artifacts (dkssudgktpdy) are excluded from the hint. Evidence: `packages/core/__tests__/transcript-correction.test.ts` 16/16, `apps/desktop/tests/main/services/transcript-glossary.test.ts` 10/10, core 589/589, desktop offline suite, workspace typecheck, touched-file ESLint, `test:hygiene`. **Remaining:** a live meeting with real names/jargon by voice, and a packaged-install check of the new IPC event. | | GAP-REL-16 | Release | Forgejo release-page asset attachment for the ~91 MB installer times out through Cloudflare (HTTP 524), although the package registry upload and the signed manifest succeed. | `scripts/ci/publish-forgejo-release.mjs`, `scripts/ci/lib/immutable-package-guard.mjs` | `[~]` 2026-11-06: reproduced on v1.16.2, v1.16.3 and v1.16.4. **2026-11-14 (`v1.17.1`):** `v1.17.1` (`6c6875b`) also reproduced `write ECONNRESET` at Human Release #339 asset attachment due to Cloudflare ~91 MB proxy limit, while Forgejo generic registry (`1.17.1/latest.yml`, `.sig`, `latest/latest.yml`, `runtime-1.17.1`, `portable-1.17.1`) and public signed-manifest verification completed with HTTP `200`, so installed apps can auto-update cleanly. To retry only this step locally without Cloudflare proxy timeout or check detached tag: check out `v1.17.1` before `npm run release -- --resume`. | -| GAP-REL-17 | Release | 설치된 1.17.1은 자동 업데이트를 정상 확인하지만 공개 피드도 1.17.1이라 1.18.x 제안이 나오지 않았다. 미게시 1.18.1 설치본이 120,821,996 bytes(115.2 MiB)라 100 MiB 업로드 게이트에서 중단됐고, 버전 태그와 원격 피드가 어긋났다. | `apps/desktop/electron-builder.yml`, `scripts/ci/{build-desktop-installer,release-desktop,publish-forgejo-release}.mjs`, `docs/evidence/2026-11-17-backlog-operations.md` | `[~]` 2026-11-20: 원인 재현. 실행 앱·피드·로그가 모두 `1.17.1`이며 kill switch=false, staging=100%다. `1.18.1`은 덮어쓰지 않고 `1.18.2`로 중복 renderer 패키지·미사용 SQLite 소스 제거 및 최대 압축을 적용한다. 실제 빌드·smoke·서명 공개 피드와 설치본의 업데이트 제안까지 확인한다. | +| GAP-REL-17 | Release | 설치된 1.17.1은 자동 업데이트를 정상 확인하지만 공개 피드도 1.17.1이라 1.18.x 제안이 나오지 않았다. 미게시 1.18.1·1.18.2 설치본이 각각 120,821,996·120,821,907 bytes(115.2 MiB)라 100 MiB 업로드 게이트에서 중단됐고, 버전 태그와 원격 피드가 어긋났다. | `apps/desktop/electron-builder.yml`, `scripts/ci/{build-desktop-installer,release-desktop,publish-forgejo-release}.mjs`, `docs/evidence/2026-11-17-backlog-operations.md` | `[~]` 2026-11-20: 원인 재현. 실행 앱·피드·로그가 모두 `1.17.1`이며 kill switch=false, staging=100%다. full-only 시험도 108,504,875 bytes라 `1.18.3`에서 Windows nut-js·다른 플랫폼 SQLite·번들된 shared package 중복 사본을 제외한다. Windows는 `.blockmap` 대신 최대 압축 전체 설치본을 받는다(`fullInstallVersionGap=0`). 실제 빌드·smoke·서명 공개 피드와 설치본 제안까지 확인한다. | | GAP-INFRA-01 | Build | `apps/mobile-rn` is outside npm workspaces, so root `typecheck`/`test`/`lint` skip it. `typecheck:mobile`/`lint:mobile`/`test:mobile`/`verify:all` root scripts added 2026-09-13 (`package.json`), but membership/CI integration is still open. | `package.json`, `.forgejo/workflows/ci.yml`, `.gitlab-ci.yml` | `[x]` 2026-10-30: React Native Metro/Gradle 네이티브 오토링킹 격리를 위해 `apps/mobile-rn`은 독립 `node_modules`로 유지하고, 루트 `verify:all` 및 `.forgejo/workflows/ci.yml`·`.gitlab-ci.yml`의 `mobile-quality` 잡이 모바일 `lint`·`typecheck`·`test:ci`를 필수 게이트로 실행하도록 정본화했다. **2026-11-04:** root `test:mobile`도 watch-capable 기본 Jest가 아니라 mobile `test:ci`(`jest --runInBand`)를 호출하도록 고정했다. | | GAP-MOB-01 | Legacy | `apps/mobile` Expo skeleton duplicated auth/data code and got version-sync edits. | SSOT G-002 | `[x]` 2026-09-13: deleted `apps/mobile`, removed from `sync-version.mjs` and `package-lock.json`; `version:check` GREEN. | | GAP-INFRA-02 | CI | GitLab admin NAS deploy job is disabled; admin deploy is manual/GHCR. | `.gitlab-ci.yml`, `docs/deployment/nas-deploy-runbook.md` | `[x]` 2026-10-30: 임시 CI DinD 데몬만 바꾸던 구 잡 대신 `docker-compose.nas.yml` 기반의 정본 배포·헬스체크·롤백 절차를 `docs/deployment/nas-deploy-runbook.md`로 문서화하고 `.gitlab-ci.yml` 및 `02-infrastructure.md`에 연결했다. | diff --git a/release/update-policy.json b/release/update-policy.json index 85acbe3d..21b86c75 100644 --- a/release/update-policy.json +++ b/release/update-policy.json @@ -9,7 +9,7 @@ "minimumSupportedVersion": "1.0.0", "forceInstallBelow": "1.11.0", "fullInstallOnMajorChange": true, - "fullInstallVersionGap": 3, + "fullInstallVersionGap": 0, "stagingPercentage": 100, "killSwitch": false } diff --git a/scripts/ci/build-desktop-installer.mjs b/scripts/ci/build-desktop-installer.mjs index 856ad4f8..50431240 100644 --- a/scripts/ci/build-desktop-installer.mjs +++ b/scripts/ci/build-desktop-installer.mjs @@ -15,6 +15,7 @@ import { spawnSync } from 'node:child_process' import { existsSync, readFileSync, readdirSync, rmSync, statSync } from 'node:fs' import { dirname, join } from 'node:path' import { fileURLToPath } from 'node:url' +import { supportsWindowsDifferentialDownload } from './lib/desktop-installer-mode.mjs' const root = join(dirname(fileURLToPath(import.meta.url)), '..', '..') const desktopDir = join(root, 'apps', 'desktop') @@ -24,6 +25,9 @@ const MAX_UPLOAD_BYTES = 100 * 1024 * 1024 const version = JSON.parse(readFileSync(join(root, 'release', 'product-version.json'), 'utf8')).version const releaseDir = join(desktopDir, 'release', version) const appDir = join(releaseDir, 'win-unpacked') +const differentialDownload = supportsWindowsDifferentialDownload( + readFileSync(join(desktopDir, 'electron-builder.yml'), 'utf8'), +) const builderFlags = ['--config', 'electron-builder.yml', '--publish', 'never', '-c.win.forceCodeSigning=false', '-c.npmRebuild=false'] // 같은 버전을 다시 빌드할 때 이전 산출물(휴대용 zip 등)이 섞여 게시되지 않게 비운다. @@ -39,9 +43,10 @@ run('npx', ['electron-builder', '--prepackaged', appDir, '--win', 'nsis', '--x64 const installer = readdirSync(releaseDir).find((name) => /-Setup-.*\.exe$/.test(name)) if (!installer) fail(`설치본이 없습니다: ${releaseDir}`) -for (const required of [`${installer}.blockmap`, 'latest.yml']) { - if (!existsSync(join(releaseDir, required))) fail(`${required} 가 없습니다: ${releaseDir}`) -} +const blockmap = `${installer}.blockmap` +if (differentialDownload && !existsSync(join(releaseDir, blockmap))) fail(`${blockmap} 가 없습니다: ${releaseDir}`) +if (!differentialDownload && existsSync(join(releaseDir, blockmap))) fail(`full-only 패키지에 ${blockmap} 가 있습니다.`) +if (!existsSync(join(releaseDir, 'latest.yml'))) fail(`latest.yml 가 없습니다: ${releaseDir}`) if (!existsSync(join(appDir, 'resources', 'app-update.yml'))) fail('app-update.yml 누락') if (!readFileSync(join(releaseDir, 'latest.yml'), 'utf8').includes(`version: ${version}`)) { fail('latest.yml 의 버전이 product-version.json 과 다릅니다.') diff --git a/scripts/ci/lib/desktop-installer-mode.mjs b/scripts/ci/lib/desktop-installer-mode.mjs new file mode 100644 index 00000000..5130bbb2 --- /dev/null +++ b/scripts/ci/lib/desktop-installer-mode.mjs @@ -0,0 +1,4 @@ +export function supportsWindowsDifferentialDownload(builderSource) { + const nsisBlock = /^nsis:\r?\n((?:[ \t]+[^\r\n]*(?:\r?\n|$))*)/m.exec(builderSource)?.[1] ?? '' + return !/^[ \t]+differentialPackage:[ \t]*false[ \t]*(?:#.*)?$/m.test(nsisBlock) +} diff --git a/scripts/ci/lib/release-artifacts.mjs b/scripts/ci/lib/release-artifacts.mjs index 108471e0..696ed77b 100644 --- a/scripts/ci/lib/release-artifacts.mjs +++ b/scripts/ci/lib/release-artifacts.mjs @@ -23,11 +23,12 @@ async function fingerprint(directory, name) { return { name, size: info.size, sha256: hash.digest('hex') } } -export async function saveReleaseArtifacts(directory, { version, tagCommit, withRuntime }) { +export async function saveReleaseArtifacts(directory, { version, tagCommit, withRuntime, differentialDownload = true }) { const names = await readdir(directory) const installers = names.filter((name) => /-Setup-.*\.exe$/.test(name)) if (installers.length !== 1) throw new Error('Expected exactly one release installer') - const files = [installers[0], `${installers[0]}.blockmap`, 'latest.yml'] + const files = [installers[0], 'latest.yml'] + if (differentialDownload) files.splice(1, 0, `${installers[0]}.blockmap`) if (withRuntime) { const portable = JSON.parse(await readFile(join(directory, 'portable.json'), 'utf8')) const runtime = JSON.parse(await readFile(join(directory, 'runtime', 'runtime.json'), 'utf8')) @@ -40,7 +41,7 @@ export async function saveReleaseArtifacts(directory, { version, tagCommit, with } const artifacts = [] for (const name of new Set(files)) artifacts.push(await fingerprint(directory, name)) - const checkpoint = { version, tagCommit, withRuntime, artifacts } + const checkpoint = { version, tagCommit, withRuntime, differentialDownload, artifacts } const path = join(directory, CHECKPOINT) await writeFile(`${path}.tmp`, `${JSON.stringify(checkpoint, null, 2)}\n`) await rename(`${path}.tmp`, path) @@ -51,7 +52,11 @@ export async function verifyReleaseArtifacts(directory, expected) { for (const field of ['version', 'tagCommit', 'withRuntime']) { if (checkpoint[field] !== expected[field]) throw new Error(`Release checkpoint ${field} mismatch`) } - if (!Array.isArray(checkpoint.artifacts) || checkpoint.artifacts.length < 3) { + if (expected.differentialDownload !== undefined && checkpoint.differentialDownload !== expected.differentialDownload) { + throw new Error('Release checkpoint differentialDownload mismatch') + } + const minimumArtifacts = checkpoint.differentialDownload === false ? 2 : 3 + if (!Array.isArray(checkpoint.artifacts) || checkpoint.artifacts.length < minimumArtifacts) { throw new Error('Release checkpoint has no complete artifact set') } for (const entry of checkpoint.artifacts) { diff --git a/scripts/ci/release-desktop.mjs b/scripts/ci/release-desktop.mjs index e9d5815f..4ff22fa3 100644 --- a/scripts/ci/release-desktop.mjs +++ b/scripts/ci/release-desktop.mjs @@ -26,6 +26,7 @@ import { dirname, join } from 'node:path' import { fileURLToPath } from 'node:url' import { loadSigningKey, publicPemOf } from './lib/update-manifest-signature.mjs' import { saveReleaseArtifacts, verifyReleaseArtifacts } from './lib/release-artifacts.mjs' +import { supportsWindowsDifferentialDownload } from './lib/desktop-installer-mode.mjs' const root = join(dirname(fileURLToPath(import.meta.url)), '..', '..') const args = process.argv.slice(2) @@ -122,7 +123,14 @@ if (resume) { const tag = `v${version}` const tagCommit = git(['rev-parse', `${tag}^{commit}`]) const releaseDir = join(root, 'apps', 'desktop', 'release', version) -const artifactIdentity = { version, tagCommit, withRuntime } +const artifactIdentity = { + version, + tagCommit, + withRuntime, + differentialDownload: supportsWindowsDifferentialDownload( + readFileSync(join(root, 'apps', 'desktop', 'electron-builder.yml'), 'utf8'), + ), +} const hasCheckpoint = existsSync(join(releaseDir, 'release-artifacts.json')) // 태그가 생긴 뒤의 실패는 --resume 으로 이어 간다. diff --git a/scripts/ci/verify-desktop-installer-smoke.mjs b/scripts/ci/verify-desktop-installer-smoke.mjs index 3d7651c3..bc1baac6 100644 --- a/scripts/ci/verify-desktop-installer-smoke.mjs +++ b/scripts/ci/verify-desktop-installer-smoke.mjs @@ -7,7 +7,7 @@ // // 검증 항목: // 1. *-Setup-*.exe 존재, 크기(4KiB ~ 100MiB), DOS MZ + PE\0\0 헤더 정합성 -// 2. *.exe.blockmap 존재 및 gzip 매직 바이트(0x1f 0x8b) +// 2. 차분 모드는 *.exe.blockmap 존재·gzip 매직(0x1f 0x8b), full-only 모드는 부재 확인 // 3. latest.yml 버전 일치, 설치본 파일명 참조 일치, 실제 설치본 SHA-512 재계산 일치 // 4. win-unpacked/*.exe x86_64 PE64(0x8664) 헤더, resources/app-update.yml 정본 피드 URL, // resources/app.asar Chromium Pickle JSON("files") 헤더 정합성 @@ -31,6 +31,7 @@ import { tmpdir } from 'node:os' import { dirname, join } from 'node:path' import { fileURLToPath } from 'node:url' import { gzipSync } from 'node:zlib' +import { supportsWindowsDifferentialDownload } from './lib/desktop-installer-mode.mjs' const root = join(dirname(fileURLToPath(import.meta.url)), '..', '..') const CANONICAL_UPDATE_FEED = @@ -99,7 +100,8 @@ export function verifyInstallerReleaseDir({ releaseDir, expectedVersion, publicKeyPem, - requireSignature = false + requireSignature = false, + expectBlockmap = true }) { const errors = [] const fail = (cond, code) => { @@ -127,8 +129,9 @@ export function verifyInstallerReleaseDir({ const blockmapPath = join(releaseDir, `${installerName}.blockmap`) if (!existsSync(blockmapPath)) { - errors.push('blockmap_missing') + if (expectBlockmap) errors.push('blockmap_missing') } else { + fail(expectBlockmap, 'unexpected_blockmap_for_full_only') const blockmapBytes = readFileSync(blockmapPath) fail( blockmapBytes.length >= 10 && blockmapBytes[0] === 0x1f && blockmapBytes[1] === 0x8b, @@ -275,6 +278,17 @@ function runSelfTest() { return dir } + const fullOnlyDir = createValidFixture('full-only') + rmSync(join(fullOnlyDir, `${installerName}.blockmap`)) + const fullOnlyResult = verifyInstallerReleaseDir({ + releaseDir: fullOnlyDir, + expectedVersion: version, + publicKeyPem, + requireSignature: true, + expectBlockmap: false + }) + if (!fullOnlyResult.ok) throw new Error('self_test_full_only_case_failed') + const validDir = createValidFixture('valid') const okResult = verifyInstallerReleaseDir({ releaseDir: validDir, @@ -373,7 +387,7 @@ function runSelfTest() { 'manifest_signature_invalid' ) - process.stdout.write('[release:installer:smoke] self-test GREEN (2 valid + 8 negative cases)\n') + process.stdout.write('[release:installer:smoke] self-test GREEN (3 valid + 8 negative cases)\n') } finally { rmSync(sandbox, { recursive: true, force: true }) } @@ -397,6 +411,9 @@ const summary = verifyInstallerReleaseDir({ releaseDir: targetDir, expectedVersion: productVersion, publicKeyPem, - requireSignature: args.includes('--verify-signature') + requireSignature: args.includes('--verify-signature'), + expectBlockmap: supportsWindowsDifferentialDownload( + readFileSync(join(root, 'apps', 'desktop', 'electron-builder.yml'), 'utf8') + ) }) process.stdout.write(`${JSON.stringify(summary, null, 2)}\n`) diff --git a/scripts/ci/verify-release-metadata.mjs b/scripts/ci/verify-release-metadata.mjs index 5d16c4d2..a356a8ec 100644 --- a/scripts/ci/verify-release-metadata.mjs +++ b/scripts/ci/verify-release-metadata.mjs @@ -2,6 +2,7 @@ import { existsSync, readFileSync } from 'node:fs' import { createHash, createPublicKey } from 'node:crypto' import { dirname, join } from 'node:path' import { fileURLToPath } from 'node:url' +import { supportsWindowsDifferentialDownload } from './lib/desktop-installer-mode.mjs' const root = join(dirname(fileURLToPath(import.meta.url)), '..', '..') // canonical updater feed: Forgejo Generic Package Registry @@ -186,6 +187,10 @@ function validate(surfaces) { 'update_policy_staging_invalid', ) fail(typeof policy?.killSwitch === 'boolean', 'update_policy_kill_switch_missing') + fail( + supportsWindowsDifferentialDownload(surfaces.builder) || policy?.fullInstallVersionGap === 0, + 'windows_full_only_policy_mismatch', + ) fail( surfaces.updatePolicySource.includes('decideUpdate') && surfaces.updatePolicySource.includes('fullInstallVersionGap') && @@ -430,6 +435,13 @@ if (process.argv.includes('--self-test')) { }, 'forgejo_portable_unsupported_upload_artifact', ) + expectRejected( + surfaces, + (candidate) => { + candidate.updatePolicy.fullInstallVersionGap = 3 + }, + 'windows_full_only_policy_mismatch', + ) let missingDesktopKeyRejected = false try { loadSurfaces((path) => { @@ -445,7 +457,7 @@ if (process.argv.includes('--self-test')) { if (!missingDesktopKeyRejected) { throw new Error('release_metadata_self_test_failed:desktop_license_public_key_missing') } - result.negativeCases = 18 + result.negativeCases = 19 } process.stdout.write(`${JSON.stringify(result, null, 2)}\n`)