Skip to content

[S15P31E102-138] GMS 호출 절감: 개발 결과 재사용, 코드 발췌, 10회 상한 - #25

Merged
thisis-joe merged 1 commit into
mainfrom
feat(be)/138-GMS_호출_절감
Oct 27, 2026

Hidden character warning

The head ref may contain hidden characters: "feat(be)/138-GMS_\ud638\ucd9c_\uc808\uac10"
Merged

thisis-joe merged 1 commit into
mainfrom
feat(be)/138-GMS_호출_절감

Conversation

@thisis-joe

Copy link
Copy Markdown
Owner

요약

S15P31E102-138의 GMS 호출 절감입니다. 2026-10-27 오전의 기준값을 보면, 한도를 가장 많이 쓴 것은 실행당 호출 수가 아니라 개발 검증이었습니다. 80분 동안 실행 135회, 요청 493건이었고, 실행당 요청은 최대 6번이었습니다. 운영은 0건이었습니다.

  1. 개발 검증 호출 줄이기
    • 로컬에서 Gms를 실행할 때 모델·phase·프롬프트·지시문·스냅샷 파일이 모두 같으면 .local/gms-cache/에 저장된 결과를 재사용합니다. 요청은 0건이고 cache_hit로 기록합니다. GMS_CACHE=refresh로 새로 부르고, GMS_CACHE=off로 끕니다.
    • 개발 요청은 KST 기준 하루 200건(GMS_DEV_DAILY_LIMIT, 0이면 무제한)에서 GMS를 부르기 전에 멈춥니다.
    • 샘플 2개·반복 1회 규칙은 docs/connections.md에 있습니다. 운영은 캐시와 한도를 쓰지 않습니다.
  2. 코드 미리 넣기
    • 모든 출제·심화·면접·@hey 프롬프트에 sourceExcerpts(변경 줄 앞뒤 20줄, 줄 번호 포함, 60KB 이하)를, 채점 프롬프트에 질문 위치 앞뒤 30줄을 넣습니다.
    • 공통 코드 읽기 안내 문장은 "발췌를 먼저 읽고, 부족한 코드만 한 번에 함께 요청"으로 바꿨습니다.
  3. 실행당 상한 64 → 10
    • 마지막 요청에서 tool_choice: none으로 도구를 막아, 실패 대신 그때까지 읽은 내용으로 답하게 합니다.

검증

  • npm test 197/197, node scripts/integration.mjs 71/71.
  • 새 테스트: 10번 상한과 마지막 차례 답변 강제, 캐시 재사용·새로 부르기·끄기와 운영 미적용, 하루 한도와 운영 예외, 발췌 범위·병합·크기 한도, 채점 프롬프트 발췌 포함.
  • 면접 프롬프트 해시를 고정한 테스트는 새 해시로 갱신했습니다. 옛 프롬프트와 비교해 바뀐 것은 공통 안내 문장 한 줄뿐입니다.
  • 실모델 확인은 요청에 따라 생략했습니다. 실제 GMS에서 실행당 호출이 줄었는지는 배포 후 운영 gms-usage 로그로 확인합니다.

🤖 Generated with Claude Code

…nd cap (S15P31E102-138)

The baseline showed dev verification, not per-run rounds, dominates the
shared per-key quota (135 runs, 493 requests in 80 minutes; at most 6
requests per run).

- Development runs reuse the stored answer when the model, phase,
  prompt, instructions and snapshot files are identical, and stop at a
  daily budget (GMS_DEV_DAILY_LIMIT, default 200 requests per KST day).
  Production never caches or budgets.
- Every prompt carries sourceExcerpts: numbered code around changed
  lines, or around the graded anchor, so the model needs fewer tool
  rounds; the shared source-reading line asks for missing code in one
  turn.
- A run makes at most 10 requests; the last one refuses tools, so the
  model answers from what it has read instead of failing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thisis-joe
thisis-joe merged commit 6afd0d1 into main Oct 27, 2026
2 checks passed
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