F6-L2 Git Sync MVP (v0.2.1 dogfood-feedback Track #7) #8

Merged
altair823 merged 4 commits from feat/f6-l2-git-sync into main 2026-04-26 02:43:30 +00:00
Owner

요약

로드맵 7번째 — F6-L2 Git Sync (MVP): 트레이 "지금 동기화" 가 F5 export 트리를 <profileDir>/sync/ 에 쓰고 git add/commit/push. 앱 종료 시 자동 1회.

MVP 범위 (전체 spec 의 일부만)

결정 근거
Sync 형식 F5 export tree 형식 재사용
Working tree <profileDir>/sync/ 격리
초기 설정 사용자 수동 (git init + git remote add) MVP 단순화
자격증명 OS git credential helper safeStorage 도입 회피
트리거 트레이 + 종료 시 1회 5분 debounce 후속
Conflict 토스트 + 로그, 수동 해결 단일 디바이스 가정
Settings UI 미포함 후속
암호화 미포함 후속

구현 (4 commits)

  • 32c7bec GitClient — 얇은 git CLI async 래퍼 (8 단위 테스트)
  • eaf66e6 SyncService — F5 export → git add → commit → push (5 단위 테스트, bare repo 통한 push 검증)
  • 66725da 트레이 6번째 콜백 + on-quit drain
  • 5b6003b promotion + README 원격 백업 섹션

게이트

  • typecheck: 0 errors
  • 단위: 193/193 (180 → +13 신규)
  • e2e: 1/1
  • 스키마 변경: 0
  • 신규 npm dependency: 0
  • 시스템 dependency: git CLI (이미 README 사전 요구에 명시)

사용법 (README 신규 섹션)

# 1. 빈 사적 repo 생성
# 2. <profileDir>/sync/ 에서:
git init && git remote add origin <url>
# 3. Windows Credential Manager 가 자동 처리
# 4. 트레이 → "지금 동기화"

첫 push 시 push -u <remote> <branch> 자동 (no-upstream 감지).

다음

로드맵 8번 (마지막): F4-C·F cue 강화 (트레이 뱃지 + 정체성 카운트).

🤖 Generated with Claude Code

## 요약 로드맵 7번째 — **F6-L2 Git Sync (MVP)**: 트레이 "지금 동기화" 가 F5 export 트리를 `<profileDir>/sync/` 에 쓰고 `git add/commit/push`. 앱 종료 시 자동 1회. ## MVP 범위 (전체 spec 의 일부만) | 결정 | 값 | 근거 | |------|-----|------| | Sync 형식 | F5 export tree | 형식 재사용 | | Working tree | `<profileDir>/sync/` | 격리 | | 초기 설정 | 사용자 수동 (`git init` + `git remote add`) | MVP 단순화 | | 자격증명 | OS git credential helper | safeStorage 도입 회피 | | 트리거 | 트레이 + 종료 시 1회 | 5분 debounce 후속 | | Conflict | 토스트 + 로그, 수동 해결 | 단일 디바이스 가정 | | Settings UI | 미포함 | 후속 | | 암호화 | 미포함 | 후속 | ## 구현 (4 commits) - `32c7bec` GitClient — 얇은 git CLI async 래퍼 (8 단위 테스트) - `eaf66e6` SyncService — F5 export → git add → commit → push (5 단위 테스트, bare repo 통한 push 검증) - `66725da` 트레이 6번째 콜백 + on-quit drain - `5b6003b` promotion + README 원격 백업 섹션 ## 게이트 - typecheck: 0 errors - 단위: 193/193 (180 → +13 신규) - e2e: 1/1 - 스키마 변경: 0 - 신규 npm dependency: 0 - 시스템 dependency: git CLI (이미 README 사전 요구에 명시) ## 사용법 (README 신규 섹션) ```bash # 1. 빈 사적 repo 생성 # 2. <profileDir>/sync/ 에서: git init && git remote add origin <url> # 3. Windows Credential Manager 가 자동 처리 # 4. 트레이 → "지금 동기화" ``` 첫 push 시 `push -u <remote> <branch>` 자동 (no-upstream 감지). ## 다음 로드맵 8번 (마지막): **F4-C·F** cue 강화 (트레이 뱃지 + 정체성 카운트). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
altair823 added 4 commits 2026-04-26 02:43:25 +00:00
얇은 git CLI 래퍼. F6-L2 sync MVP 의 빌딩 블록.

- run/isRepo/hasRemote/addAll/commit/push/currentBranch
- commit() 은 "nothing to commit" 을 changed=false 로 구분 (정상 path)
- 그 외 실패는 throw, exitCode + stderr 보존
- 8 vitest cases — empty file 로 GIT_CONFIG_GLOBAL/SYSTEM 격리

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
F6-L2 MVP 의 오케스트레이터.

- isConfigured(): syncDir 가 git repo + origin remote 있을 때만 true
- sync():
    1) ExportService.export(<syncDir>, includeMedia: true) — F5 트리 그대로 덮어쓰기
    2) git add -A
    3) git commit -m "chore(notes): sync <ts>"
    4) "nothing to commit" 이면 changed=false 로 정상 반환
    5) git push (upstream 미설정이면 -u origin <branch> 자동)
- GitClient.push() 에 hasUpstream() + 자동 -u 추가 (첫 push 케이스)
- 5 vitest cases — bare local remote 로 push 검증, 두 번째 sync 는 변경 없음 확인

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- src/main/index.ts: SyncService instantiate with paths.profileDir + exportSvc
- 트레이 6번째 콜백 — 토스트로 not_configured / done / unchanged / failed 안내
- before-quit 훅에 sync drain 추가 (backup 완료 후, syncSvc.isConfigured() 인 경우만)
- src/main/tray.ts: 6번째 callback runSync, '지금 동기화' 메뉴 (내보내기/복원 다음)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- 신규 spec docs/superpowers/specs/2026-04-26-f6-l2-git-sync.md
    결정 표 + 범위 + 시스템 의존 + 동작 요약 + 후속 후보
- 2026-04-25-dogfood-feedback.md F6 진행 상태 line 갱신:
    L2 — 🌱 raw → 🚀 promoted (MVP)
- README.md '원격 백업 (선택, F6-L2)' 섹션:
    일회 설정 (git init + remote add + 자격증명) + 사용법

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
altair823 merged commit 5b6003bdcd into main 2026-04-26 02:43:30 +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#8