Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 연관된 이슈
🎯 의도
📝 작업 내용
📌 요약
api-v2에POST /api/goals/{goalId}/complete추가completed전환completed직접 저장 차단/api/goals/**rewrite 추가🔍 상세
nestjs-api/src/development-goalsDevelopmentGoalsController: Firebase ID token의 UID와goalId만 사용하고 요청 본문 없음, 공백이거나/를 포함한goalId는400invalid-argumentDevelopmentGoalsService: 완료 조건 판정 함수를 한 곳에 두고 transaction 결과를 응답으로 변환DevelopmentGoalsRepository:users/{uid}/developmentGoals/{goalId}와 하위records를 같은 transaction에서 읽고 조건 충족 시status,completedAt,updatedAt기록UpdateDevelopmentGoalStatusUseCaseImpl과 동일(createdAt, recordId)기준 마지막 개발 기록에 현재 확정 버전 존재inProgress목표만 완료 대상,completed목표의 재요청은 쓰기 없이200,archived목표는409404not-found: 인증된 UID 경로에 목표 없음409development-goal-completion-requires-record,development-goal-completion-needs-version,development-goal-completion-has-draft: 완료 조건 미충족409development-goal-not-in-progress: 보관된 목표409aborted: 동시 변경으로 transaction 재시도 소진500internal:status값이 없거나 알 수 없는 목표,createdAt이 없거나 확정 버전 필드가 한쪽만 있는 개발 기록 등 그 밖의 오류nestjs-api/src/app.module.tsDevelopmentGoalsModule등록nestjs-api/testdevelopment-goals.e2e.test.ts: 인증,goalId검증, Service 오류 응답 전달development-goals.emulator.test.ts: 완료 기록, 초안이 남은 목표의 미변경, 다른 사용자 경로, 동시 완료 요청, 완료 요청과 초안 저장의 동시 실행jest-emulator.json과test:emulator스크립트 추가.github/workflows/ci.ymlnestjs-apijob에 Java 21 설정,firebase-tools@15.24.0설치,npm run test:emulator단계 추가firestore.rulesdevelopmentGoals/{goalId}의 create, update에request.resource.data.get('status', null) != 'completed'조건 추가inProgress복귀만 가능하고completed상태를 유지한 다른 필드 수정은 거부functions/testfirestore-rules.emulator.test.js: 클라이언트의completed생성·갱신, 완료 목표의 필드 수정 거부와inProgress복귀 허용 확인 추가firestore-rules.test.js: 차단 조건 문자열 확인 추가firebase-hosting.test.js: rewrite 순서에/api/goals/**추가firebase.jsondevlog-staging의/api/auth/github/**뒤,/api/**앞에/api/goals/**→ Cloud Runapi-v2rewrite 추가docs/cloud-run-staging.md,docs/firebase-hosting-staging.md: 개발 목표 완료 요청의 직접 호출과 Hosting 경로 확인 단계 추가docs/firestore-rules-staging.md: Staging Firestore rules 단독 배포, 선행 조건, 복구 절차와 Production 배포 선행 조건 추가README.md: 요청 구조의 경로와api-v2책임, 로컬 검증과 CI 절 갱신