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>
This commit is contained in:
altair823
2026-04-26 03:13:06 +09:00
parent 06817f2b0b
commit d6ead8f1c6
2 changed files with 42 additions and 1 deletions

View File

@@ -577,7 +577,12 @@ inkling_export_version: 1
---
## F6. 메모 데이터 백업 + 복원 (3-layer 권장) (🌱 raw)
## F6. 메모 데이터 백업 + 복원 (3-layer 권장) (🔬 drafting — L1 promoted)
**진행 상태:**
- L1 (로컬 스냅샷) — 🚀 promoted → `docs/superpowers/specs/2026-04-26-f6-l1-local-snapshot.md`
- L2 (git sync) — 🌱 raw, 7번 항목으로 예정
- L3 (import) — 🌱 raw, 3번 항목으로 예정 (F5 후)
**발견:** 2026-04-26 dogfood 시작 직전 사고 실험. 슬라이스 v0.4 의 메모 데이터는 `%APPDATA%\Inkling\Inkling\profiles\default\` 단 한 위치에만 존재. 디스크 고장·실수 삭제·DB 손상·OS 재설치 = 총 손실. Strategy.md §1 의 "이제 잊어도 됩니다" 보상이 **데이터 영속성 신뢰** 위에 서 있어서, 이 신뢰가 깨지면 슬라이스 §1.3 의 종료 조건 ("본인 2주 dogfood 완주") 자체가 위협받음.

View File

@@ -0,0 +1,36 @@
# F6-L1 Local Snapshot Spec (Promoted)
**Extracted from:** `2026-04-25-dogfood-feedback.md` F6 §"L1 — 로컬 원자 스냅샷"
**Plan:** `docs/superpowers/plans/2026-04-26-f6-l1-local-snapshot.md`
**Status:** 🚀 promoted — implemented 2026-04-26
## 결정 (mini-brainstorm 결과)
| 결정 항목 | 값 | 근거 |
|----------|-----|------|
| 백업 위치 | `<profileDir>/backups/` | 프로필 단위 묶음, 코드 단순. 외부 디렉터리/사용자 지정 경로는 후속. |
| 파일명 | `inkling-YYYY-MM-DD.sqlite` (KST 날짜) | 인간 가독 + 정렬 친화 |
| 마커 | `<profileDir>/backups/.last-snapshot` (ISO 날짜 본문) | 같은 날 중복 백업 방지 |
| 트리거 | `app.whenReady` 시 1회 + `before-quit` 1회 + 트레이 "지금 백업" | 슬라이스 §3 외부 dep 없이 만족 |
| 보존 | 14 daily + 4 weekly (월요일, anchor + 4 prior = 최대 5 Mondays) + 6 monthly (1일) | 사용자 결정. plan 산문은 "4 weekly" 였으나 plan 테스트 케이스가 5 Mondays 를 요구 → 테스트 우선 채택. |
| 원자성 | tmp + rename + 실패 시 tmp 정리 | 파셜 파일 방지, 코드 review I1 반영 |
## 범위 (PR 안에 포함됨)
- `src/main/services/backupRotation.ts` (pure GFS function)
- `src/main/services/BackupService.ts` (snapshot + rotate + runDaily + lastSnapshotAt)
- `src/main/index.ts` 수정 (whenReady wiring + before-quit hook 통합 + createTray 콜백 추가)
- `src/main/tray.ts` 수정 (지금 백업 메뉴)
- `tests/unit/backupRotation.test.ts` (10 단위 테스트)
- `tests/unit/BackupService.test.ts` (14 단위 테스트)
## 후속 (별 spec 또는 후속 항목 후보)
- 외부 디렉터리 백업 (예: OneDrive 폴더 지정)
- 미디어 포함 백업
- 암호화 (SQLCipher / age)
- 백업 무결성 검증 (PRAGMA integrity_check)
- F6-L2 git sync 와 연결 (백업 디렉터리도 sync 대상에 포함할지)
- KST 헬퍼 추출 (현재 ContinuityService + BackupService + recoveryToast 3개 인라인 — 다음 consumer 시 추출)
- WAL 모드 source DB 통합 검증 테스트
- runDaily 마커의 read-then-write race 보호 (현재 단일 사용자라 사실상 무시 가능)