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
Owner

요약

v0.2.1 dogfood-feedback 로드맵의 첫 항목 F6-L1 (로컬 스냅샷) 구현 + 그 전 단계의 로드맵 준비 작업.

포함 작업

인프라 / 패키징 (1 commit)

  • 62a13eb — electron-builder NSIS 인스톨러 + Windows autostart hook

Dogfood 피드백 수집 (4 commits)

  • 0cd9b99 — F3: "구출" 카피의 한국어 어색함
  • aa51df9 — F4: 떠오른 순간 → Inkling 자동 연상 (6 메커니즘)
  • 830c2be — F5: 마크다운 일괄 export (RAG 활용)
  • 2e70965 — F6: 메모 데이터 백업 + 복원 (3-layer)

로드맵 + 계획 (2 commits)

  • 6d3df02 — F1~F6 로드맵 v0.2.1 설계 (8 항목 순차, 데이터 안전 우선)
  • 7973ea5 — F6-L1 구현 계획 (TDD, 5 tasks)

F6-L1 구현 (9 commits)

  • 5e8e652 — GFS retention 순수 함수 (14 daily + 4 weekly + 6 monthly)
  • 902bc30 — WEEKLY_WINDOW 상수명·코멘트 정직화 (anchor + 4 prior = 최대 5 Mondays)
  • 603588c — polish: 경계값 테스트 + roundtrip lock-in + today precompute
  • 714dd3f — BackupService.snapshot() (KST 날짜, tmp+rename 원자성)
  • a728434 — orphan .tmp cleanup + 동시성 JSDoc (code review I1+I2 fix)
  • 4898e13 — runDaily() + .last-snapshot 마커 + lastSnapshotAt
  • 06817f2 — main/index.ts wiring (whenReady + before-quit) + 트레이 "지금 백업"
  • d6ead8f — F6-L1 spec extracted, dogfood-feedback.md F6 status 갱신
  • 9d63e95 — final code review 결과 후속 항목 4개 추가

핵심 결정

결정 근거
백업 위치 <profileDir>/backups/ 프로필 단위 묶음 (외부 경로는 후속)
보존 정책 14 daily + anchor + 4 prior Mondays + 6 monthly 1sts plan 테스트가 5 Mondays 요구 → 테스트 우선
트리거 whenReady + before-quit + 트레이 "지금 백업" 외부 dep 0
원자성 tmp + rename + 실패 시 cleanup code review I1 반영

게이트

  • typecheck: 0 errors
  • 단위 테스트: 76/76 (52 기존 + 24 신규)
  • e2e smoke: 1/1
  • 스키마 변경: 0
  • 신규 dependency: 0 (electron-builder 는 별도 commit 62a13eb)

Final code reviewer 결론

Ship it. v0.2.1 cut 안전. 4개 forward-looking polish 는 spec 의 "후속" 리스트로 기록 (가장 의미있는 건 #4: F1 마이그레이션 직전 강제 스냅샷 권장).

다음 항목

로드맵 2번: F5 Export — F4-H5 측정·F6-L3·F6-L2 의 dependency 라 가성비 1위.

🤖 Generated with Claude Code

## 요약 v0.2.1 dogfood-feedback 로드맵의 첫 항목 **F6-L1 (로컬 스냅샷)** 구현 + 그 전 단계의 로드맵 준비 작업. ## 포함 작업 ### 인프라 / 패키징 (1 commit) - `62a13eb` — electron-builder NSIS 인스톨러 + Windows autostart hook ### Dogfood 피드백 수집 (4 commits) - `0cd9b99` — F3: "구출" 카피의 한국어 어색함 - `aa51df9` — F4: 떠오른 순간 → Inkling 자동 연상 (6 메커니즘) - `830c2be` — F5: 마크다운 일괄 export (RAG 활용) - `2e70965` — F6: 메모 데이터 백업 + 복원 (3-layer) ### 로드맵 + 계획 (2 commits) - `6d3df02` — F1~F6 로드맵 v0.2.1 설계 (8 항목 순차, 데이터 안전 우선) - `7973ea5` — F6-L1 구현 계획 (TDD, 5 tasks) ### F6-L1 구현 (9 commits) - `5e8e652` — GFS retention 순수 함수 (14 daily + 4 weekly + 6 monthly) - `902bc30` — WEEKLY_WINDOW 상수명·코멘트 정직화 (anchor + 4 prior = 최대 5 Mondays) - `603588c` — polish: 경계값 테스트 + roundtrip lock-in + today precompute - `714dd3f` — BackupService.snapshot() (KST 날짜, tmp+rename 원자성) - `a728434` — orphan .tmp cleanup + 동시성 JSDoc (code review I1+I2 fix) - `4898e13` — runDaily() + .last-snapshot 마커 + lastSnapshotAt - `06817f2` — main/index.ts wiring (whenReady + before-quit) + 트레이 "지금 백업" - `d6ead8f` — F6-L1 spec extracted, dogfood-feedback.md F6 status 갱신 - `9d63e95` — final code review 결과 후속 항목 4개 추가 ## 핵심 결정 | 결정 | 값 | 근거 | |------|-----|------| | 백업 위치 | `<profileDir>/backups/` | 프로필 단위 묶음 (외부 경로는 후속) | | 보존 정책 | 14 daily + anchor + 4 prior Mondays + 6 monthly 1sts | plan 테스트가 5 Mondays 요구 → 테스트 우선 | | 트리거 | whenReady + before-quit + 트레이 "지금 백업" | 외부 dep 0 | | 원자성 | tmp + rename + 실패 시 cleanup | code review I1 반영 | ## 게이트 - typecheck: 0 errors - 단위 테스트: 76/76 (52 기존 + 24 신규) - e2e smoke: 1/1 - 스키마 변경: 0 - 신규 dependency: 0 (electron-builder 는 별도 commit `62a13eb`) ## Final code reviewer 결론 **Ship it.** v0.2.1 cut 안전. 4개 forward-looking polish 는 spec 의 "후속" 리스트로 기록 (가장 의미있는 건 #4: F1 마이그레이션 직전 강제 스냅샷 권장). ## 다음 항목 로드맵 2번: **F5 Export** — F4-H5 측정·F6-L3·F6-L2 의 dependency 라 가성비 1위. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
altair823 added 16 commits 2026-04-26 01:22:07 +00:00
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
KST date filename, tmp+rename atomic write, mkdir on demand.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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>
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>
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>
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>
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>
altair823 merged commit 9d63e95173 into main 2026-04-26 01:31:56 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: altair823-org/inkling#2