fix: API 사용량 마커 정규식이 배열 포맷을 매칭하도록 수정 (#36)#40
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
github | ada38f8 | Commit Preview URL | Apr 27 2026, 12:47 PM |
USAGE_DATA_RE 가 `({.*?})` 로 객체 패턴만 캡처하던 탓에, 실제 저장
포맷인 객체 배열 `[{prompt,completion}, ...]` 에서 첫 객체만 잡혔고
Array.isArray 분기에서 항상 빈 배열로 떨어져 직전 누적 호출 기록이
사라졌다. 결과적으로 PR 갱신 시 `🔢 API 사용량` 표가 항상 최근 1행만
표시되었다 (#36).
- USAGE_DATA_RE 를 `(\[.*?\])` 로 변경하고 문서 주석을 실제 포맷에 맞춤
- tests/learningComment.test.js 추가: 누적 동작 / 손상된 마커 폴백 /
usage 미제공 시 섹션 생략 회귀 테스트
- AGENTS.md 에 디버깅 기록 추가
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: sounmind <37020415+sounmind@users.noreply.github.com>
9f48203 to
8d2f7a0
Compare
incident log 형태는 시간이 지나며 무관해지기 쉬워, 코멘트 숨김 마커 직렬화 포맷 변경 시의 일반화된 주의사항 한 항목만 `코드 수정 시 주의사항`에 남긴다. 구체적 사건 서사는 커밋 메시지/PR/코드 주석에 이미 보존돼 있다. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: sounmind <37020415+sounmind@users.noreply.github.com>
sounmind
approved these changes
Apr 27, 2026
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.
Summary
USAGE_DATA_RE가 객체 패턴({.*?})만 캡처하던 탓에 실제 저장 포맷인 객체 배열에서 첫 객체만 잡혀,Array.isArray분기에서 항상 빈 배열로 떨어져 누적이 사라졌습니다. 정규식을(\[.*?\])로 수정하고 문서 주석을 실제 포맷에 맞춰 갱신했습니다.tests/learningComment.test.js에 누적 / 손상된 마커 폴백 / usage 미제공 케이스 회귀 테스트 4개 추가.AGENTS.md에 이번 버그의 증상·원인·수정·교훈을## 디버깅 기록섹션으로 정리.Closes #36
Test plan
bun test tests/learningComment.test.js— 4 passbun test handlers/— 56 pass (회귀 없음)bun test tests/— 7 pass (기존 + 신규)🔢 API 사용량표가 댓글로 PR 승인 기능 추가 #1, 유닛 테스트 추가 #2, Add PR approval request handling and enhance mention extraction logic #3 누적되고합계행이 노출되는지 확인🤖 Generated with Claude Code