fix(desktop): upgrade better-sqlite3 to 13 so the Electron 43 installer builds and opens its database

better-sqlite3 12.8.0 has no prebuild for Electron 43 (ABI 148) and does not compile against
its V8 API, so the v1.18.0 installer build stopped in fix-native-abi and was never published.
13.2.0 ships Node-API prebuilds in the package; one binary runs on Node and Electron.

- fix-native-abi.mjs: nothing to swap when the packaged module is a Node-API prebuild.
- verify-native-abi.mjs: require the target prebuild, fail on a shadowing build/Release binary,
  and open a database through the packaged module.
- electron-builder: leave out the linux prebuilds we do not ship.

Verified: desktop 2,933 tests on Node 24, and WAL/transaction/FTS5 queries in an Electron
43.8.10 main process.
This commit is contained in:
Yun Chan 2026-11-20 15:30:08 +09:00
parent a117bc0d09
commit fb5f76f57f
9 changed files with 88 additions and 255 deletions

View file

@ -132,7 +132,7 @@ Legend: `[ ]` open · `[~]` in progress · `[!]` blocked externally · `[x]` res
| 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 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`. |
| 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`. **2026-11-20:** 이 상태의 Electron 43 은 설치본을 만들 수 없었다 — better-sqlite3 12.8.0 은 Electron 43(ABI 148) 프리빌드가 없고 소스 빌드도 V8 API 변경으로 실패해 `v1.18.0` 빌드가 `fix-native-abi` 에서 멈췄다(미게시). better-sqlite3 13.2.0(Node-API 프리빌드 내장)으로 올리고 `fix-native-abi.mjs`/`verify-native-abi.mjs` 를 그 구조에 맞췄다: 데스크톱 2,933 테스트 GREEN, Electron 43.8.10 메인 프로세스에서 WAL·트랜잭션·FTS5 질의 확인. `npm run rebuild:test`/`rebuild:app` 은 더 이상 필요 없다. |
---
## 2. Mobile checklist roll-up (from `MOBILE_APP_COMPLETION_SSOT.md` §4)