Skip to content

docs(db): operating-model 단일 진입점 추가 (#371)#375

Merged
thxforall merged 3 commits into
devfrom
feature/371-db-operating-model
Apr 30, 2026
Merged

docs(db): operating-model 단일 진입점 추가 (#371)#375
thxforall merged 3 commits into
devfrom
feature/371-db-operating-model

Conversation

@thxforall
Copy link
Copy Markdown
Contributor

Summary

  • DB 운영을 1페이지로 정리한 docs/database/operating-model.md 신규
  • 04-supabase-cli-setup.md PRD ref 갱신 + warehouse 드롭 반영
  • agent/database-summary.mdCLAUDE.md 가 operating-model 을 1순위로 가리키도록 업데이트

Closes part of #371

배경

PRD→dev 시드 작업 중 post_magazines.status='failed' drift (#372) 발견. SeaORM 단독 변경이 prod 에 흘러들어가 다른 SOT 와 어긋나는 패턴이 반복 발생. 운영 모델이 여러 문서에 흩어져 "어디 추가하나" 판단이 어려웠던 게 근본 원인 중 하나.

상위 spec: docs/superpowers/specs/2026-04-30-db-operating-model-design.md (dev6883a2c 에 단독 커밋, 본 PR 분기 직전)

변경 파일

파일 변경
docs/database/operating-model.md 신규 — 진입점 (사람용). 영역/시스템 매트릭스, "어디 추가하나" 결정 트리, drift 회피, dev 시드 절차
docs/database/04-supabase-cli-setup.md PRD ref womgfycekpzodibauiyltdchmitwczlwydzkyczu, warehouse 드롭(#335) 반영, dev=self-hosted 명시, link 명령 정리
docs/agent/database-summary.md operating-model 을 1순위 canonical source 로 표시, recent changes 추가
CLAUDE.md 참조 인벤토리 표 최상단에 operating-model 추가 (README 다음, environments 위)

Acceptance (#371)

  • 새 변경에 직면한 개발자가 본 문서 1장만 읽고 어디에 추가할지 판단 가능 — operating-model.md 의 결정 트리 + 시나리오 가이드
  • CLAUDE.md 에서 본 문서가 1순위로 링크됨 — 참조 인벤토리 표 최상단
  • docs/agent/database-summary.md 가 본 문서를 가리키도록 업데이트 — canonical sources 1순위 + 권장 진입점 명시

후속 (별도 이슈)

Out of scope

  • docs/database/01-schema-usage.md / 03-data-flow.md 의 outdated 내용 (image/item/postposts/spots/solutions) 은 별도 정리 필요. 본 PR 범위 밖.

Test plan

  • CLAUDE.md 인벤토리 표가 정상 렌더링 (GitHub markdown table)
  • operating-model.md 의 모든 상대 링크가 valid (관련 문서 7개)
  • agent/database-summary.md 가 operating-model 을 진입점으로 가리킴

🤖 Generated with Claude Code

thxforall and others added 2 commits April 30, 2026 15:02
PRD→dev 시드 작업 중 발견된 post_magazines.status='failed' drift를
계기로, dev/prod/assets 3 영역과 Supabase CLI / SeaORM / TS 상수
3종 사실상 SOT 의 운영 모델 정리 로드맵을 4단계로 분해.

GitHub 이슈 등록:
- #371 DB 운영 모델 SOT 문서화 (P0)
- #372 post_magazines.status='failed' drift 정합화 (P1)
- #373 drift 검증 CI 게이트 (P2)
- #374 [Epic] SeaORM ↔ Supabase 마이그레이션 통합 B.3 (P3)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
DB 운영을 1페이지로 정리한 docs/database/operating-model.md 추가.
PRD→dev 시드 작업 중 발견된 post_magazines.status='failed' drift
(#372) 가 보여준 것처럼, 마이그레이션이 SeaORM/Supabase CLI/TS 상수
세 SOT 에 분산돼 drift 가 반복 발생. 본 문서가 영역/시스템 매트릭스 +
"어디 추가하나" 결정 트리 + drift 회피 가이드를 한 장에 모음.

변경:
- docs/database/operating-model.md 신규 — 진입점 (사람용)
- docs/database/04-supabase-cli-setup.md — PRD ref 갱신
  (womgfycekpzodibauiyl → tdchmitwczlwydzkyczu), warehouse
  드롭 (#335) 반영, dev=self-hosted 명시
- docs/agent/database-summary.md — operating-model 을 1순위
  canonical source 로 표시
- CLAUDE.md — 참조 인벤토리 표 최상단에 operating-model 추가

Closes part of #371

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
decoded-app Ready Ready Preview, Comment Apr 30, 2026 6:28am

- 2026-04-30-db-operating-model-design.md: `date` → `updated` 필드명, tags
  를 허용 어휘 [db, ops, architecture] 로 교체 (이전 [database,
  migration, supabase, seaorm, drift, documentation] — 어휘 외 6건).
- 2026-04-23-e2e-hardening-reprioritization-design.md: `title` 더블쿼트로
  감싸 `#170)` 의 YAML comment 절단 해소 → H1_TITLE_MISMATCH 제거. tags
  를 [testing, ops] 로 정합화 (이전 infrastructure/hardening 어휘 외).

`bun run wiki:lint` 결과: 10 errors → 0 errors (TOO_MANY_RELATED 1건은
warning, CI 통과).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thxforall thxforall merged commit 3da7526 into dev Apr 30, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in decoded-monorepo Apr 30, 2026
thxforall added a commit that referenced this pull request Apr 30, 2026
) (#379)

#371 PR #375 의 operating-model.md 후속. 동시기 머지될 #372/#373/#377/#378
의 산출물을 진입점 문서에 cross-reference 한다.

변경:
- 'dev → prod 동기화 (시드)' 섹션의 13줄 bash 블록을 `just seed-from-prod`
  (#377) 한 줄로 단축. 자세한 동작은 scripts/seed-from-prod.sh 로 위임.
- drift 패턴 표의 'SeaORM 만 변경' 행에 `post_magazines.status='failed'`
  (#372) 사례 inline 인용 (commit 6351e7c, 2026-04-22 → 45 row → 2026-04-30
  발견). nightly drift CI (#373) 도 같은 패턴 자동 감지로 안내.
- '관련 문서' 표에 nightly drift CI (#373, #378) 와 PRD→dev 시드 스크립트
  (#377) 추가.
- 변경 이력에 후속 항목 기록.

검증: bun run wiki:lint 통과 (0 errors, 1 warning).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
thxforall added a commit that referenced this pull request Apr 30, 2026
#374 epic 의 design spec — 본 PR 은 spec 작성만, 실행 X. 채택된 방향 +
sub-issue 4개 후보를 정의하며, 실행은 #373 (PR #378) 의 1주 0-error 검증
후 시작.

분석 결과:
- 현재 SeaORM 62개 vs Supabase CLI 6개 (RawSql 미사용 → SeaORM-native DDL)
- dev 는 SKIP_DB_MIGRATIONS=1 로 이미 Supabase 단일, prod 만 두 시스템 공존
- → Option B (SeaORM 폐기) 채택

Phase 분해:
1. baseline — prod schema dump → 1개 idempotent Supabase 마이그레이션
2. 검증 — drift CI 1주 0-error + 수동 dump diff
3. cutover — prod SKIP_DB_MIGRATIONS=1
4. cleanup — migration/ 디렉토리 + main.rs Migrator + env 제거

본 PR 의 wiki:lint 는 #375 의 frontmatter 정합 commit (81aeabe) 의존
(e2e-hardening-reprioritization-design.md 의 기존 에러). 본 PR 머지 후
e2e 파일 에러는 #375 머지로 해소됨.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
thxforall added a commit that referenced this pull request Apr 30, 2026
) (#386)

#371 PR #375 의 operating-model.md 후속. 동시기 머지될 #372/#373/#377/#378
의 산출물을 진입점 문서에 cross-reference 한다.

변경:
- 'dev → prod 동기화 (시드)' 섹션의 13줄 bash 블록을 `just seed-from-prod`
  (#377) 한 줄로 단축. 자세한 동작은 scripts/seed-from-prod.sh 로 위임.
- drift 패턴 표의 'SeaORM 만 변경' 행에 `post_magazines.status='failed'`
  (#372) 사례 inline 인용 (commit 6351e7c, 2026-04-22 → 45 row → 2026-04-30
  발견). nightly drift CI (#373) 도 같은 패턴 자동 감지로 안내.
- '관련 문서' 표에 nightly drift CI (#373, #378) 와 PRD→dev 시드 스크립트
  (#377) 추가.
- 변경 이력에 후속 항목 기록.

검증: bun run wiki:lint 통과 (0 errors, 1 warning).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant