[HOLD] 맵기 부정어 방어를 걷어냅니다 — 백엔드 #138 배포 후 머지 - #139
Closed
Yena07 wants to merge 1 commit into
Closed
Conversation
■ 머지 전에 확인할 것 (중요) 이 PR 은 **운영 백엔드에 #138 이 배포된 뒤에만** 머지해야 합니다. 먼저 머지되면, 매운 것을 못 드시는 분이 "안 매운 거" 라고 말했을 때 되물음 없이 매운맛이 들어갑니다. 확인은 한 줄입니다. curl -s -X POST https://api.hyunwoocha.site/internal/spicy-level/match \ -H 'content-type: application/json' -d '{"text":"안 매운 거"}' # confident:false 여야 합니다. true/HOT 이면 아직입니다. (이 글을 쓰는 시점의 실측은 아직 confident:true, HOT 입니다. #138 은 dev 에만 있고 백엔드 CD 는 main 푸시에서 돕니다.) ■ 무엇을 걷어내나 서버가 임베딩 유사도로 맵기를 고르는데 그 방식이 부정을 못 읽어서, 프론트에서 우리 부정어 표로 서버 답을 되거르는 겹을 두고 있었습니다. 팀 #138 이 서버에서 고쳤으므로 그 겹을 뺍니다. 같은 판단이 두 곳에 있으면, 어긋났을 때 어느 쪽이 옳은지 알기 어려워집니다. · spicy.ts 서버 답 되거르기 제거. 영어인가 인자도 뺐습니다 (부정 판정에만 쓰던 것이라 쓸 데가 없어졌습니다) · voice.ts 아니라고했나() 삭제 — spicy.ts 전용으로 뽑았던 것이고 부르는 곳이 없어졌습니다. 부정어 표 자체는 말했나() 가 계속 씁니다 · App.tsx 호출부에서 두 번째 인자 제거 ■ 시험 부정 시험 3건을 빼고 2건을 넣었습니다(438 → 437). 주석에 적어 뒀지만 여기에도 남깁니다 — **이 시험들은 서버 회귀를 못 잡습니다.** fetch 를 흉내 내므로 서버가 무엇을 답하든 초록입니다. 지키는 것은 '서버가 이렇게 답하면 우리는 이렇게 옮긴다' 뿐이고, 되거르는 겹이 없어진 지금은 서버 답이 곧 사용자가 보는 것입니다. 서버 쪽은 위 curl 로만 알 수 있습니다. typecheck · 437 tests · build 통과. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
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.
머지 전 확인 (한 줄)
node -e "fetch('https://api.hyunwoocha.site/internal/spicy-level/match',{method:'POST',headers:{'content-type':'application/json'},body:JSON.stringify({text:'안 매운 거'})}).then(r=>r.json()).then(console.log)"confident: false여야 합니다.true/HOT이면 아직 배포 전입니다.작성 시점 실측:
confident=true, matchedLevel=HOT— 아직 배포 전입니다. #138 은dev에만 있고 백엔드 CD 는main푸시에서 돕니다.무엇을 걷어내나
서버가 임베딩 유사도로 맵기를 고르는데 그 방식이 부정을 못 읽었습니다.
"안 매운 거"안에"매운"이 들어 있어 매운맛 앵커와 가깝다고 봤고, 되묻지도 않았습니다(confident=true). 그래서 프론트에서 우리 부정어 표로 서버 답을 되거르는 겹을 두고 있었습니다.팀 #138 이 서버에서 고쳤으므로 그 겹을 뺍니다. 같은 판단이 두 곳에 있으면, 어긋났을 때 어느 쪽이 옳은지 알기 어려워집니다. 판단은 서버 한 곳에서 합니다.
src/api/spicy.ts영어인가인자도 제거 — 부정 판정에만 쓰던 것이라 쓸 데가 없어졌습니다src/api/voice.ts아니라고했나()삭제.spicy.ts전용으로 뽑았던 것이고 부르는 곳이 없어졌습니다. 부정어 표 자체는말했나()가 계속 씁니다src/app/App.tsxsrc/api/spicy.test.ts시험이 못 하는 것
주석에도 적었지만 여기에도 남깁니다 — 이 시험들은 서버 회귀를 못 잡습니다.
fetch를 흉내 내므로 서버가 무엇을 답하든 초록입니다. 지키는 것은 "서버가 이렇게 답하면 우리는 이렇게 옮긴다" 는 우리 쪽 약속뿐이고, 되거르는 겹이 없어진 지금은 서버 답이 곧 사용자가 보는 것입니다.서버 쪽이 되돌아갔는지는 위 명령으로만 알 수 있습니다. 그래서 그 명령을
spicy.test.ts주석에 같이 남겨 뒀습니다.브랜치
fix/focus-after-load(#136) 위에 얹은 스택 브랜치입니다. #136 이 머지되면 base 를dev로 바꿔 주세요 — 그러면 diff 가 위 4개 파일만 남습니다.검증
typecheck ✅ · 437 tests ✅ · build ✅