F6-L1 local snapshot + roadmap prep (v0.2.1 dogfood-feedback Track #1) #2

Merged
altair823 merged 16 commits from feat/f6-l1-roadmap-prep into main 2026-04-26 01:31:56 +00:00

16 Commits

Author SHA1 Message Date
altair823
9d63e95173 docs(spec): F6-L1 후속 항목 4개 추가 (final code review 반영)
final reviewer 가 식별한 forward-looking polish 4건을 후속 리스트에
명시. 4번째는 F1 (Due Date 마이그레이션 v2) PR 시 즉시 반영 권장:
openDb() 가 마이그레이션을 BackupService 인스턴스화 전 호출하므로
마이그레이션 결함 시 첫 실행 직전 상태 회수 불가.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 03:17:13 +09:00
altair823
d6ead8f1c6 docs(spec): promote F6-L1 local snapshot
Extracted to its own spec, dogfood-feedback.md F6 header reflects
L1 promoted status while L2/L3 remain raw.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 03:13:06 +09:00
altair823
06817f2b0b feat(backup): wire BackupService — whenReady + before-quit + tray
Instantiate BackupService at app.whenReady, run daily snapshot then
again before quit (synchronous-blocking via preventDefault). Tray menu
gets '지금 백업' entry that triggers manual runDaily with native
toast feedback.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 03:10:49 +09:00
altair823
4898e13308 feat(backup): runDaily() with .last-snapshot marker + rotate after snapshot
Skips when marker matches today's KST date. Marker written after
successful snapshot, before rotation. lastSnapshotAt() exposed for UI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 03:08:30 +09:00
altair823
a728434b2e fix(backup): cleanup orphan .tmp on db.backup() failure + concurrency note
Code review I1: wrap snapshot's backup+rename in try/catch, unlink
orphan tmp file on failure so the next run does not encounter a
confusing 'existing file is not a database' error from sqlite.

Code review I2: JSDoc note that snapshot() is not safe for concurrent
calls — callers should serialize via runDaily()'s marker.

New unit test injects a fake db whose backup() rejects after a partial
write, asserts no .tmp / .sqlite remains.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 02:49:01 +09:00
altair823
714dd3fc9f feat(backup): atomic SQLite snapshot to inkling-YYYY-MM-DD.sqlite
KST date filename, tmp+rename atomic write, mkdir on demand.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 02:44:28 +09:00
altair823
603588cc4f chore(backup): polish — boundary test, roundtrip lock-in, precompute today
Code reviewer minor nitpicks:
- Add test for inkling-2026-02-30.sqlite (locks roundtrip-validation contract)
- Add test for weekly window inclusive at oldest boundary
- Precompute today=startOfDayUtc(now) once outside the loop, pass to helpers

No behavior change; tests added cover existing semantics.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 02:13:47 +09:00
altair823
902bc30adc chore(backup): rename WEEKLY_WINDOW_COUNT, document anchor+4 semantic
Spec reviewer flagged the weekly window keeps 5 Mondays (anchor + 4
prior), not 4 as the plan prose said. Code preserved (tests pass);
constant renamed and comment made honest about the actual semantic.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 02:10:37 +09:00
altair823
5e8e652ee0 feat(backup): GFS retention policy (pure)
14 daily + 4 weekly (Mondays) + 6 monthly (1st). Future-dated files
preserved (clock skew). Unrecognized filenames ignored (no delete).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 02:07:09 +09:00
altair823
7973ea5046 docs(plan): F6-L1 local snapshot 구현 계획 (TDD, 5 tasks)
Task 1: 순수 GFS retention 함수 + 7 단위 테스트
Task 2: BackupService.snapshot() — KST 날짜·tmp+rename 원자성 + 6 단위 테스트
Task 3: runDaily() — .last-snapshot 마커 + lastSnapshotAt + 7 단위 테스트
Task 4: main/index.ts wiring (whenReady + before-quit) + tray '지금 백업'
Task 5: F6-L1 promotion (별 spec 분기 + dogfood-feedback.md 상태 갱신)

backup 위치: <profileDir>/backups/ (mini-brainstorm 결과 A 채택).
스키마 변경 0, 외부 dep 0. better-sqlite3.backup() API 가정.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 01:51:27 +09:00
altair823
6d3df0273e docs(spec): F1~F6 dogfood 피드백 로드맵 v0.2.1 설계
8개 항목 순차 작업 (F6-L1 → F5 → F6-L3 → F1 → F2 → F3+F4-E →
F6-L2 → F4-C·F) + 데이터 안전 우선 + 머지+테스트 게이트 + 단일
v0.2.1 cut 후 dogfood 재설치 + 1주 soak. F4-A·D 는 측정 후
별 brainstorm 으로 deferred. 항목별 mini-brainstorm 에서
decision-pending 답변하는 라이프사이클.

본 spec 은 순서·범위·게이트만 정의, 항목 내부 설계는 per-item.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 01:42:46 +09:00
altair823
2e709652fe docs(feedback): add F6 — 메모 데이터 백업 + 복원 (3-layer)
L1 로컬 원자 스냅샷 (db.backup + GFS 로테이션) + L2 git remote 마크다운
동기화 (F5 형식 그대로 추적, SQLite 바이너리 push 회피) + L3 F5+import.
gitea 자체 호스팅 인프라 활용 가능. L2 는 별 spec, L1+L3 은 슬라이스 후속.
'데이터 손실 0회' 를 slice §1.3 silent invariant 후보로 제안.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 00:29:49 +09:00
altair823
830c2beed3 docs(feedback): add F5 — 마크다운 일괄 export (RAG 활용)
dogfood 외부 회수 채널 부재. RAG 친화 형식으로
notes/{date}-{id8}-{slug}.md (frontmatter+본문) +
index.jsonl + manifest.json + media/ 트리 권장. 스키마는
현행으로 충분, ExportService 신규 + 트레이 메뉴 1개. F4-H5
(외부 회수) 측정의 dependency 가 됨.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 00:23:43 +09:00
altair823
aa51df9b41 docs(feedback): add F4 — 떠오른 순간 → Inkling 자동 연상 만들기
slice + strategy.md §3 가 회의·퇴근 같은 강한 contextual cue 만 다루고
샤워·산책·자기 직전 같은 ambient 떠오름은 사각지대. 6개 심리 메커니즘
(habit stacking, ambient if-then, 환경 앵커, variable interval prompt,
Zeigarnik, 정체성 고리) 후보 + 슬라이스 내/후속 분류 + H1~H5 가설.
권장 순서: E (카피 priming) → 데이터 → C·F → A·D.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 00:19:37 +09:00
altair823
0cd9b99659 docs(feedback): add F3 — '구출' 카피의 한국어 어색함
dogfood 첫 알림 노출에서 '구출' 표현이 일상 한국어로 부자연스럽다는
피드백. 5개 UI 표면 + e2e 단언 + strategy.md §1·§3·§7 의 어휘 결정에
함께 묶임. drafting 시 결정 대기 #1(strategy 재검토 동반 여부)이
promoted 경로 좌우.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 00:14:00 +09:00
altair823
62a13ebf9f feat(packaging): add electron-builder NSIS installer + Windows autostart
- electron-builder 26.8.1 (devDep, exact pin) with NSIS x64 target
- moved electron 41.3.0 to devDependencies (electron-builder requirement)
- new scripts: dist, dist:dir, predist runs rebuild:electron + build
- main: detect --hidden arg, skip inbox window on hidden launch
- main: first-run autostart enable on packaged Windows (.autostart-init flag)
- tray: 'Windows 시작 시 자동 실행' checkbox (packaged only)
- README: packaging section + Dev Mode requirement

Build verified: dist/Inkling Setup 0.2.0.exe (100MB), dist/win-unpacked/
runs better-sqlite3 native module from app.asar.unpacked.

Note: requires Windows Developer Mode ON (winCodeSign cache extraction
contains darwin symlinks that need SeCreateSymbolicLinkPrivilege).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 23:45:56 +09:00