Repository navigation
[Feat/#72] 내부 API 동기화와 서버 안 주기 인덱스 갱신 - #73
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This was referenced Nov 16, 2026
Closed
seungbye
approved these changes
Nov 17, 2026
seungbye
left a comment
Contributor
There was a problem hiding this comment.
sync.py 변환이랑 search.py의 use_index 봤어요. 승인할게요 👍
확인한 것
- 문서ID 접두어·메타데이터 키가
build_index.py로더와 같아서 골든셋 재매핑할 때 그대로 쓸 수 있어요 - 행사 날짜·장소를 본문에 넣은 것 좋아요. "언제야/어디서 해" 질문이 메타데이터만으로는 안 잡히거든요
- 시드·FAQ는 매번 넣고
test_data가짜 공지·행사는 뺀 것도 동의해요 use_index는 새 인덱스를 다 읽은 뒤 한 번에 바꿔서, 질문 중간에 반쯤 바뀐 인덱스를 볼 일이 없어요BACKEND_BASE_URL·INTERNAL_TOKEN이 없으면 갱신이 꺼질 뿐이라, #312 배포 전에 들어가도 챗봇은 멈추지 않아요
나중에 같이 볼 것 (이 PR에서 고칠 필요는 없음)
- 공지의
유효기간이 항상 빈 값이에요. AGENTS.md에서 "지난 학기 공지가 올해 답으로 나가는 사고"를 유효기간으로 거르기로 했는데, 공지는 지금 이 필터가 안 걸려요. 백엔드가 줄 값이 없으면 게시일 기준으로 오래된 공지를 뒤로 미는 식이라도 골든셋 재매핑할 때 같이 볼게요
머지 시점
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.
#️⃣연관된 이슈
📝작업 내용
sync.py(신규): 내부 API 4개를X-Internal-Token으로 불러 인덱싱 문서 모양으로 변환. 문서ID 접두어·메타데이터는 기존build_index.py로더와 같습니다. 행사·아카이빙은 날짜·장소를 본문에 넣었습니다refresh.py(신규): 동기화 → 새 폴더(index/build_YYYYMMDD_HHMMSS/)에 빌드 → 검사 → 메모리 인덱스·index/current링크 교체 → 이전 빌드 3개만 남김 (AGENTS.md 「인덱스 갱신」)search.py(공용): 인덱스를 바꿔 끼우는use_index(path)추가. 기존search(query)사용법은 그대로입니다app.py: 서버가 켜질 때 주기 갱신 시작(lifespan).BACKEND_BASE_URL과INTERNAL_TOKEN이 없으면 꺼짐(로컬 개발·평가)deploy.md「인덱스 주기 갱신」·막히는 곳,.env.example의INDEX_REFRESH_SECONDS로컬 확인 (가짜
/v1/ai/**백엔드, 갱신 주기 4초):current가 최신을 가리킴💬리뷰 요구사항(선택)