Skip to content

페르소나별 싱크로율 임계값 연결 + DB 초기화 순서/탈퇴 버그 수정#46

Merged
Khyojae merged 1 commit into
mainfrom
feat/persona-threshold-and-db-fixes
Jul 21, 2026
Merged

페르소나별 싱크로율 임계값 연결 + DB 초기화 순서/탈퇴 버그 수정#46
Khyojae merged 1 commit into
mainfrom
feat/persona-threshold-and-db-fixes

Conversation

@Khyojae

@Khyojae Khyojae commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary

  • 페르소나별(헬린이/헬창/다이어트/재활) 싱크로율 임계값을 Spring↔AI 실제로 연결 (기존엔 문서에만 있고 두 곳에서 따로 놀던 죽은 값)
  • data.sqlschema.sql보다 먼저 실행되던 초기화 순서 버그 수정 (새 볼륨에서 파티셔닝·낙관적 락 등이 통째로 사라지는 문제)
  • 검증 중 발견한 회원 탈퇴 500 에러 버그 수정 (refresh_token FK에 ON DELETE CASCADE 누락)
  • PRD/유스케이스 문서, AI서버 변경 핸드오프 문서, 구현 갭 정리 문서 추가
  • CodeRabbit 리뷰 설정 추가

Test plan

  • ./gradlew compileJava / compileTestJava clean
  • AI서버 모듈 import 확인 (pytest 미설치라 직접 실행은 못 함)
  • docker compose down -v 로 새 볼륨 생성 후 스키마(파티션·version·JSON 컬럼) 정상 확인
  • 실제 API 플로우로 검증: 회원가입→로그인→온보딩(REHAB)→세션 시작 → AI 로그에 persona=REHAB 확인
  • 관리자 임계값 API 4개 필드 정상 동작
  • 회원가입→로그인→탈퇴 사이클 204 확인 (수정 전엔 500)

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

Summary by CodeRabbit

  • 새 기능
    • 사용자 페르소나(초보자·고급자·다이어트·재활)에 맞춰 운동 동기화 판정 기준과 실시간 피드백이 적용됩니다.
    • 관리자 화면에서 네 가지 페르소나별 임계값을 조회하고 수정할 수 있습니다.
  • 버그 수정
    • 운동 분석 요청에 선택한 페르소나가 누락되지 않도록 개선했습니다.
    • 로컬 MySQL 초기화 시 스키마가 데이터보다 먼저 적용되도록 실행 순서를 고정했습니다.
  • 문서
    • 제품 요구사항, 주요 사용 사례, 페르소나별 임계값 연동 및 구현 현황 문서를 추가·보완했습니다.

@Khyojae

Khyojae commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Spring의 persona를 gRPC와 AI 세션 상태로 전달하고, 페르소나별 싱크로율 임계값을 적용한다. 관리자 임계값에 diet·rehab을 추가하며, 리뷰 설정·MySQL 초기화 설정·제품 및 구현 문서를 확장한다.

Changes

페르소나 기반 분석 임계값

Layer / File(s) Summary
페르소나 요청 계약과 세션 전달
ai-server/app/proto/exercise.proto, backend/src/main/proto/exercise.proto, backend/src/main/java/com/shadowfit/service/Exercise/ExerciseAnalysisService.java, ai-server/app/grpc/*
AnalyzeRequestpersona를 추가하고, Spring 요청에서 AI 세션 상태까지 persona를 전달하며 기본값 BEGINNER를 적용한다.
페르소나별 싱크로율 판정
ai-server/app/utils/constants.py, ai-server/app/core/squat_analyzer.py
SYNC_THRESHOLDS를 0~100 스케일로 변경하고 rep 피드백 분기에 페르소나별 임계값을 사용한다.
페르소나 연결 문서
docs/handoff/ai-persona-threshold-connection.md
Spring-gRPC-AI persona 연결과 임계값 변경 및 제외 항목을 문서화한다.

관리자 운동 임계값 관리

Layer / File(s) Summary
임계값 엔터티와 DTO 확장
backend/src/main/java/com/shadowfit/model/exercise/Exercise.java, backend/src/main/java/com/shadowfit/dto/admin/*
운동 엔터티와 관리자 DTO에 diet·rehab 임계값을 추가하고 0~100 범위 검증 및 응답 매핑을 확장한다.
관리자 임계값 갱신
backend/src/main/java/com/shadowfit/service/Exercise/AdminExerciseService.java, backend/src/main/java/com/shadowfit/controller/AdminExerciseController.java
관리자 임계값 갱신 시 diet·rehab 값을 엔터티와 변경 로그에 반영하고 API 설명을 갱신한다.

프로젝트 설정과 문서

Layer / File(s) Summary
리뷰 자동화 설정
.coderabbit.yaml
한국어 출력, 자동 리뷰, 경로 필터와 경로별 리뷰 지침을 설정한다.
MySQL 초기화 순서
docker-compose.yml, docs/13-docker-setup.md
초기화 스크립트 마운트 이름을 01-schema.sql, 02-data.sql로 변경한다.
제품 요구사항과 유스케이스
docs/PRD.md, docs/USE-CASES.md
제품 요구사항, UC-01~UC-20 흐름, 예외 처리 및 구현 상태를 문서화한다.
구현 갭과 실험 기록
docs/tasks/27-implementation-gaps.md, docs/portfolio/*
백엔드·DB 구현 갭과 DB 설계 및 MySQL 실험 결과의 측정 조건을 갱신한다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Spring
  participant AnalyzeRequest
  participant AI_Server
  participant SessionState
  Spring->>AnalyzeRequest: 선택한 persona 설정
  AnalyzeRequest->>AI_Server: gRPC 분석 요청 전달
  AI_Server->>SessionState: persona 저장
  SessionState->>AI_Server: persona별 임계값으로 rep 피드백 판정
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 페르소나별 임계값 연결, DB 초기화 순서 수정, 회원 탈퇴 버그 수정이라는 핵심 변경을 정확히 요약합니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/persona-threshold-and-db-fixes

Comment @coderabbitai help to get the list of available commands.

@Khyojae
Khyojae merged commit 3c4cd72 into main Jul 21, 2026
1 of 2 checks passed
@Khyojae
Khyojae deleted the feat/persona-threshold-and-db-fixes branch July 21, 2026 16:57

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
backend/src/main/java/com/shadowfit/service/Exercise/ExerciseAnalysisService.java (1)

149-160: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

@Async 호출을 프록시를 통해 넘겨야 합니다. this.sendAnalysisRequestToFastApi(...)는 self-invocation이라 별도 스레드로 실행되지 않고, @Transactional(readOnly = true)도 적용되지 않습니다. 주입된 프록시(self)나 별도 빈으로 호출하세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@backend/src/main/java/com/shadowfit/service/Exercise/ExerciseAnalysisService.java`
around lines 149 - 160, Update the caller around sendAnalysisRequestToFastApi so
it invokes the `@Async` method through the injected Spring proxy (self) or a
separate bean instead of this. Preserve the existing arguments and return flow,
ensuring the proxied call applies both asynchronous execution and the read-only
transaction.
🧹 Nitpick comments (2)
ai-server/app/core/squat_analyzer.py (1)

320-328: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

페르소나별 경계값 테스트를 추가하세요.

BEGINNER/ADVANCED/DIET/REHAB의 pass 경계, 비정수 low 경계, 알 수 없는 persona의 BEGINNER fallback을 각각 검증해야 피드백 분기 회귀를 방지할 수 있습니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ai-server/app/core/squat_analyzer.py` around lines 320 - 328, 음성 피드백 분기 로직에
대한 페르소나별 경계값 테스트를 추가하세요. `SYNC_THRESHOLDS`와 `_LOW_CUT_RATIO`를 사용하는 해당 분석 함수에서
BEGINNER, ADVANCED, DIET, REHAB의 pass 경계와 비정수로 계산되는 low 경계의 양쪽 조건을 검증하고, 알 수 없는
persona가 BEGINNER 임계값으로 fallback되는 경우도 확인하세요.
docker-compose.yml (1)

18-22: 🗄️ Data Integrity & Integration | 🔵 Trivial

초기화 파일명 변경은 새 MySQL 볼륨에만 적용됩니다.

MySQL 공식 엔트리포인트는 기존 데이터 디렉터리에서 초기화 스크립트를 다시 실행하지 않으므로, 기존 mysql_data 볼륨은 이전 상태로 남을 수 있습니다. (raw.githubusercontent.com)

  • docker-compose.yml#L18-L22: 기존 환경을 위한 마이그레이션/복구 절차를 추가하거나 새 볼륨 전용 변경임을 명시해 주세요.
  • docs/13-docker-setup.md#L37-L39: 기존 볼륨에는 자동 적용되지 않는다는 점과 백업을 포함한 안전한 재초기화 절차를 문서화해 주세요.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docker-compose.yml` around lines 18 - 22, The renamed MySQL initialization
files only affect newly initialized volumes. In docker-compose.yml lines 18-22,
explicitly state that this is new-volume-only or add the required
migration/recovery procedure; in docs/13-docker-setup.md lines 37-39, document
that existing mysql_data volumes are not updated automatically and provide a
safe reinitialization procedure including backup steps.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.coderabbit.yaml:
- Line 20: `.coderabbit.yaml`의 `mysql/**` 제외 패턴을 제거하거나 `mysql/*.cnf`처럼 비-SQL 파일만
제외하도록 좁혀 `mysql/schema.sql`과 `mysql/data.sql`에 대한 기존 리뷰 지침이 적용되게 수정하세요.

In `@backend/src/main/java/com/shadowfit/dto/admin/ThresholdUpdateDto.java`:
- Around line 20-28: Update ThresholdUpdateDto fields beginner, advanced, diet,
and rehab to add `@Digits`(integer = 3, fraction = 2) alongside their existing
validation annotations, ensuring values match the Exercise.syncThreshold*
columns’ two-decimal scale.

In `@docs/13-docker-setup.md`:
- Line 37: Update the date in the comment describing the 01-/02- execution-order
prefix so it matches the current application date, changing 2026-07-22 to
2026-07-21 or removing the date if it is unnecessary.

In `@docs/handoff/ai-persona-threshold-connection.md`:
- Around line 3-5: 문서 메타데이터의 날짜를 리뷰 기준일에 맞춰 `2026-07-21`로 통일하세요. `작성` 항목과 문서 내
`2026-07-22 대화` 표기를 모두 수정하고, 다른 변경 내용은 유지하세요.

In `@docs/PRD.md`:
- Around line 3-4: 두 문서의 작성일을 현재 기준일인 2026년 7월 21일로 통일하세요. docs/PRD.md 3-4행은 실제
작성일 또는 미래 초안임을 명시하는 방향으로 수정하고, docs/USE-CASES.md 3-4행도 동일한 기준일로 변경하세요.

In `@docs/tasks/27-implementation-gaps.md`:
- Around line 14-17: Update the Redis 도입 entry in
docs/tasks/27-implementation-gaps.md so its section placement and
checklist/status marker consistently represent the stated CLOSED decision. Keep
the existing decision text and trigger references unchanged, and ensure it no
longer appears as an unresolved item.

In `@docs/USE-CASES.md`:
- Line 130: UC-11의 관리자 임계값 변경 설명을 네 페르소나(beginner, advanced, diet, rehab) 모두를
포함하도록 갱신하세요. 각 값의 허용 범위와 값들 사이의 상호 제약을 실제 관리자 API 검증 로직과 동일하게 명시하고, 기존 beginner
< advanced 조건만 남기지 마세요.

---

Outside diff comments:
In
`@backend/src/main/java/com/shadowfit/service/Exercise/ExerciseAnalysisService.java`:
- Around line 149-160: Update the caller around sendAnalysisRequestToFastApi so
it invokes the `@Async` method through the injected Spring proxy (self) or a
separate bean instead of this. Preserve the existing arguments and return flow,
ensuring the proxied call applies both asynchronous execution and the read-only
transaction.

---

Nitpick comments:
In `@ai-server/app/core/squat_analyzer.py`:
- Around line 320-328: 음성 피드백 분기 로직에 대한 페르소나별 경계값 테스트를 추가하세요. `SYNC_THRESHOLDS`와
`_LOW_CUT_RATIO`를 사용하는 해당 분석 함수에서 BEGINNER, ADVANCED, DIET, REHAB의 pass 경계와 비정수로
계산되는 low 경계의 양쪽 조건을 검증하고, 알 수 없는 persona가 BEGINNER 임계값으로 fallback되는 경우도 확인하세요.

In `@docker-compose.yml`:
- Around line 18-22: The renamed MySQL initialization files only affect newly
initialized volumes. In docker-compose.yml lines 18-22, explicitly state that
this is new-volume-only or add the required migration/recovery procedure; in
docs/13-docker-setup.md lines 37-39, document that existing mysql_data volumes
are not updated automatically and provide a safe reinitialization procedure
including backup steps.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b1bc43c8-55d9-492f-a562-eeb58165213c

📥 Commits

Reviewing files that changed from the base of the PR and between 4300b4c and 8b91e17.

⛔ Files ignored due to path filters (3)
  • ai-server/exercise_pb2.py is excluded by !ai-server/exercise_pb2.py
  • mysql/data.sql is excluded by !mysql/**
  • mysql/schema.sql is excluded by !mysql/**
📒 Files selected for processing (21)
  • .coderabbit.yaml
  • ai-server/app/core/squat_analyzer.py
  • ai-server/app/grpc/exercise_servicer.py
  • ai-server/app/grpc/session_state.py
  • ai-server/app/proto/exercise.proto
  • ai-server/app/utils/constants.py
  • backend/src/main/java/com/shadowfit/controller/AdminExerciseController.java
  • backend/src/main/java/com/shadowfit/dto/admin/ExerciseThresholdResponseDto.java
  • backend/src/main/java/com/shadowfit/dto/admin/ThresholdUpdateDto.java
  • backend/src/main/java/com/shadowfit/model/exercise/Exercise.java
  • backend/src/main/java/com/shadowfit/service/Exercise/AdminExerciseService.java
  • backend/src/main/java/com/shadowfit/service/Exercise/ExerciseAnalysisService.java
  • backend/src/main/proto/exercise.proto
  • docker-compose.yml
  • docs/13-docker-setup.md
  • docs/PRD.md
  • docs/USE-CASES.md
  • docs/handoff/ai-persona-threshold-connection.md
  • docs/portfolio/db-deep-dive.md
  • docs/portfolio/realmysql-experiments.md
  • docs/tasks/27-implementation-gaps.md

Comment thread .coderabbit.yaml
- "!ai-server/exercise_pb2_grpc.py"
- "!ai-server/app/proto/exercise_pb2.py"
- "!ai-server/app/proto/exercise_pb2_grpc.py"
- "!mysql/**"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== .coderabbit.yaml =="
cat -n .coderabbit.yaml

echo
echo "== Search for CodeRabbit config docs or related mentions =="
rg -n "coderabbit|exclude|include|path guidance|guidance|mysql/\*" -S . \
  --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' || true

Repository: Shadowfit/init

Length of output: 4826


🌐 Web query:

CodeRabbit path_filters path_instructions exclude include order documentation

💡 Result:

CodeRabbit provides two distinct path-based configuration mechanisms in the.coderabbit.yaml file: path_filters and path_instructions [1][2]. These settings are used to control which files are reviewed and how they are reviewed [1][3]. Path Filters The path_filters setting determines which files CodeRabbit includes in or excludes from the review process [1][3]. - Mechanism: It uses standard glob patterns to manage the scope of reviews [3]. - Exclusion: Patterns prefixed with an exclamation mark (!) are excluded from review (e.g.,!/dist/) [1][3]. - Inclusion: Patterns without the prefix explicitly include files [1][3]. If explicit inclusion patterns are used, CodeRabbit limits its review scope to only those matching patterns, effectively ignoring everything else [3]. - Purpose: These filters are primarily used to exclude irrelevant files like binaries, lock files, generated code, and assets, ensuring the AI focuses on meaningful code [1][2][3]. Path Instructions The path_instructions setting applies targeted, free-text guidance to specific paths [1][4]. - Mechanism: It maps a glob pattern (path) to specific instructions [1][2]. - Purpose: This allows you to enforce custom rules or provide context-specific guidance based on the location of the file [1][2]. For example, you can require specific security checks for API controllers, enforce testing best practices for a test directory, or ensure clarity in documentation [1][2]. Configuration Order The documentation specifies these as separate fields under the reviews configuration block [1][3]. While CodeRabbit uses a hierarchical configuration system (combining repository YAML, central configuration, and defaults), explicit settings in your local.coderabbit.yaml file take precedence [5]. You can verify your resolved configuration at any time by using the @coderabbitai configuration command on a pull request [5]. Top Results: [1] https://docs.coderabbit.ai/configuration/path-instructions [2] https://coderabbit.mintlify.app/configuration/path-instructions [3] https://aicodereview.cc/blog/coderabbit-configuration/

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== mysql-related files =="
fd -t f '^' mysql . 2>/dev/null || true

echo
echo "== paths under mysql at repo root =="
find mysql -maxdepth 3 -type f 2>/dev/null | sed 's#^\./##' | sort || true

Repository: Shadowfit/init

Length of output: 19240


mysql/** 제외와 mysql/*.sql 지침이 서로 무력화됩니다.

mysql/**가 리뷰 대상에서 빠지면 mysql/schema.sqlmysql/data.sql에 적용하려는 지침도 함께 적용되지 않습니다. 스키마/시드까지 검토할 의도라면 제외 범위를 mysql/*.cnf 같은 비-SQL 파일로 좁히세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.coderabbit.yaml at line 20, `.coderabbit.yaml`의 `mysql/**` 제외 패턴을 제거하거나
`mysql/*.cnf`처럼 비-SQL 파일만 제외하도록 좁혀 `mysql/schema.sql`과 `mysql/data.sql`에 대한 기존
리뷰 지침이 적용되게 수정하세요.

Comment on lines +20 to +28
@NotNull
@DecimalMin(value = "0.0", message = "다이어트 임계값은 0 이상이어야 합니다")
@DecimalMax(value = "100.0", message = "다이어트 임계값은 100 이하여야 합니다")
BigDecimal diet,

@NotNull
@DecimalMin(value = "0.0", message = "재활 임계값은 0 이상이어야 합니다")
@DecimalMax(value = "100.0", message = "재활 임계값은 100 이하여야 합니다")
BigDecimal rehab

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

sed -n '1,160p' backend/src/main/java/com/shadowfit/dto/admin/ThresholdUpdateDto.java
printf '\n---\n'
sed -n '1,140p' backend/src/main/java/com/shadowfit/model/exercise/Exercise.java
printf '\n---\n'
rg -n "DecimalMin|DecimalMax|Digits|scale = 2|diet|rehab|beginner|advanced" backend/src/main/java/com/shadowfit -S

Repository: Shadowfit/init

Length of output: 8304


ThresholdUpdateDto의 소수 자릿수를 scale=2와 맞추세요
beginner/advanced/diet/rehab 모두 @DecimalMin/@DecimalMax만 있어서 70.999 같은 값이 통과합니다. Exercise.syncThreshold* 컬럼은 precision = 5, scale = 2라 저장 시 반올림되거나 거부될 수 있으니, 네 필드에 @Digits(integer = 3, fraction = 2)를 추가하세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/src/main/java/com/shadowfit/dto/admin/ThresholdUpdateDto.java` around
lines 20 - 28, Update ThresholdUpdateDto fields beginner, advanced, diet, and
rehab to add `@Digits`(integer = 3, fraction = 2) alongside their existing
validation annotations, ensuring values match the Exercise.syncThreshold*
columns’ two-decimal scale.

Source: Path instructions

Comment thread docs/13-docker-setup.md
- mysql_data:/var/lib/mysql
- ./mysql/schema.sql:/docker-entrypoint-initdb.d/schema.sql
- ./mysql/data.sql:/docker-entrypoint-initdb.d/data.sql
# 01-/02- 접두어로 실행 순서 강제 (data.sql은 순수 시드, schema.sql이 먼저 돌아야 함. 2026-07-22)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

문서 날짜를 실제 적용일과 맞춰 주세요.

현재 기준일은 2026년 7월 21일인데, 문서에는 2026-07-22가 기록되어 있습니다. 실제 적용일이 아니라면 2026-07-21로 수정하거나 날짜를 제거해 주세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/13-docker-setup.md` at line 37, Update the date in the comment
describing the 01-/02- execution-order prefix so it matches the current
application date, changing 2026-07-22 to 2026-07-21 or removing the date if it
is unnecessary.

Comment on lines +3 to +5
작성: 2026-07-22
대상: **AI(FastAPI) 담당자** — 본인(Backend) + Claude가 [`feedback_minimize_python_changes`] 완화 방침(2026-07-22)에 따라 AI 서버까지 직접 수정. 팀원은 이 문서로 변경 내용만 확인.
배경: 페르소나별 싱크로율 기준(헬린이 60%/헬창 85%/다이어트 70%/재활 50%)이 `12-persona-difficulty.md`에는 있었지만, 실제로는 **Spring DB 컬럼 2개(beginner/advanced만), AI서버 `constants.py`의 죽은 dict(4개, 0~1 스케일)로 따로 놀고 있었고, 세션 판정에 쓰이는 실제 로직은 페르소나 무관 고정값(`sync_rate >= 70/40`)** 이었음. 이번 작업으로 실제로 연결.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

문서 날짜를 현재 기준과 맞춰 주세요.

작성: 2026-07-222026-07-22 대화는 리뷰 기준일인 2026-07-21보다 하루 뒤입니다. 미래 날짜가 의도된 것이 아니라면 2026-07-21로 수정하거나 예정 문서임을 명시하세요.

리뷰 기준일과 문서 메타데이터를 대조한 결과입니다.

Also applies to: 74-74

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/handoff/ai-persona-threshold-connection.md` around lines 3 - 5, 문서
메타데이터의 날짜를 리뷰 기준일에 맞춰 `2026-07-21`로 통일하세요. `작성` 항목과 문서 내 `2026-07-22 대화` 표기를 모두
수정하고, 다른 변경 내용은 유지하세요.

Comment thread docs/PRD.md
Comment on lines +3 to +4
작성: 2026-07-22
상태: 초안 — 기존 코드/문서(`REQUIREMENTS.md`, `01-project-overview.md`, `tasks/20-feature-roadmap.md`, `tasks/27-implementation-gaps.md`)와 캡스톤 발표자료 원본 "요구사항 정의"(HO-PT 6쪽, 바탕화면 `남은거.PNG`)를 근거로 역작성. 신규 요구사항이 아니라 **현재 프로젝트를 PRD 형식으로 정리**한 문서.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

두 문서의 작성일을 현재 기준일에 맞춰 통일해 주세요.

현재 기준일은 2026년 7월 21일인데 두 문서 모두 2026년 7월 22일로 기록되어 있습니다.

  • docs/PRD.md#L3-L4: 실제 작성일 또는 미래 초안임을 명시합니다.
  • docs/USE-CASES.md#L3-L4: docs/PRD.md와 동일한 기준일로 수정합니다.
📍 Affects 2 files
  • docs/PRD.md#L3-L4 (this comment)
  • docs/USE-CASES.md#L3-L4
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/PRD.md` around lines 3 - 4, 두 문서의 작성일을 현재 기준일인 2026년 7월 21일로 통일하세요.
docs/PRD.md 3-4행은 실제 작성일 또는 미래 초안임을 명시하는 방향으로 수정하고, docs/USE-CASES.md 3-4행도 동일한
기준일로 변경하세요.

Comment on lines +14 to +17
## 2. 판단 완료, 착수 여부만 미결정

- [ ] **다운샘플링(1초 다운샘플)** — 위치(A: AI서버 / B: Spring / C: 안 함)도, 착수 여부도 미결정. 효과는 실측 완료(R≈5에서 RPS +126%, p99 −70%, 저장 5배↓). [`pose-ingest-downsampling.md §7`](../decisions/pose-ingest-downsampling.md).
- [ ] **Redis 도입** — "MVP 단계 MySQL 부족 미증명"으로 보류 확정(CLOSED). T1~T5 트리거 발생 시 재검토. [`redis-introduction.md`](../decisions/redis-introduction.md).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Redis 항목의 상태 표기를 일관되게 수정해 주세요.

Redis 도입은 본문에서 “보류 확정(CLOSED)”이라고 했지만, 미결정 섹션과 [ ] 항목으로 표시되어 있습니다. 섹션을 “판단 완료”로 옮기거나, CLOSED 상태에 맞는 체크/상태 표기로 통일해 주세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/tasks/27-implementation-gaps.md` around lines 14 - 17, Update the Redis
도입 entry in docs/tasks/27-implementation-gaps.md so its section placement and
checklist/status marker consistently represent the stated CLOSED decision. Keep
the existing decision text and trigger references unchanged, and ensure it no
longer appears as an unresolved item.

Comment thread docs/USE-CASES.md
| UC-08 캘린더/주간 요약 조회 | `GET /reports/calendar?year&month`, `GET /reports/weekly-summary` | 읽기 전용 |
| UC-09 일일 메모 작성 | `POST /reports/daily-logs`로 메모/기분(`Mood`) upsert | 같은 날짜 재작성 시 덮어쓰기(upsert) |
| UC-10 TTS 설정 변경 | `PATCH /preferences/tts`로 on/off, 속도(0.5~2.0) 변경 | 범위 밖 값 → 검증 실패 |
| UC-11 싱크로율 임계값 변경 | 관리자가 `PATCH /admin/exercises/{exerciseId}/thresholds` 호출 | `beginner < advanced` 제약 위반 시 거부, `ROLE_ADMIN` 아니면 403 |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

네 개 페르소나의 임계값 검증 규칙을 문서화해 주세요.

PR 범위에서 dietrehab 임계값이 추가됐는데, 현재 예외 조건은 beginner < advanced만 설명합니다. 네 값의 허용 범위와 상호 제약을 실제 관리자 API 검증 로직과 일치하게 명시해야 Spring·AI 간 계약 누락을 방지할 수 있습니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/USE-CASES.md` at line 130, UC-11의 관리자 임계값 변경 설명을 네 페르소나(beginner,
advanced, diet, rehab) 모두를 포함하도록 갱신하세요. 각 값의 허용 범위와 값들 사이의 상호 제약을 실제 관리자 API 검증
로직과 동일하게 명시하고, 기존 beginner < advanced 조건만 남기지 마세요.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant