Repository navigation
Terminal-Bench 2.1 측정 도구(Harbor 어댑터·agy bridge) 추가 - #172
Merged
Merged
Conversation
약한 모델로 높은 성능을 내는 하네스 연구의 측정 기반. 공식 러너 Harbor 0.27.0으로 Terminal-Bench 2.1(89개)을 xgen에 돌린다. - agy_bridge.py: 호스트에서 agy Flash Low를 OpenAI 호환(/v1/models, 비스트리밍 chat/completions)으로 노출. xgen agy transport와 같은 planner-only agent·deny 설정·환경 격리를 쓰고 요청별 기록을 남긴다. 키가 없으므로 loopback과 Docker 서브넷에서 온 연결만 받는다. - forward/: xgen이 평문 HTTP를 loopback에만 보내므로 컨테이너의 127.0.0.1을 기본 게이트웨이(호스트)로 넘기는 정적 TCP forwarder. - xgen_agent.py, xgen_run.sh: 정적 musl xgen을 컨테이너에 올려 headless xgen run을 돌리고, 복구 정지(exit 30)면 xgen resume을 최대 5회 부른다. 시험 3회: openssl-selfsigned-cert 1/1, fix-git 2/3. 실패 1건은 agy가 deny 목록 밖의 내장 도구 manage_task를 호출해 transport가 닫힌 경우. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
xgen은 전송 결과를 모르는 모델 호출을 복구 경계로 남기고 resume만으로는 재전송하지 않는다. 첫 기준선에서 2개 과업이 resume 5회 모두 같은 지점 (rc=30)에 멈췄다. 사용자 절차와 같게 xgen recover로 상태를 확인하고 해당 call ID와 journal head를 지정해 폐기한 다음 resume한다. effect 복구가 필요한 경우는 건드리지 않고 멈춘다. 복사한 Run 상태로 폐기 후 active_call=null을 확인했다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
recover 적용 기준선 첫 39회 호출 중 9회(23%)가 agy 내장 도구 manage_task (백그라운드 작업 목록 조회) 실행으로 실패했다. planner-only agent의 tools: []와 deny 목록 어디에도 걸리지 않고, 최종 응답은 9회 모두 SUCCESS 상태의 정상 제안이었다. 이대로면 기준선이 모델·하네스 품질이 아니라 이 버릇을 측정하므로 --tolerate-tool로 지정한 도구만 실행된 응답은 받아들이고 요청 기록에 tolerated_tools로 남긴다. 기본값은 꺼짐이라 xgen agy transport와 같이 엄격하다. agy에서 막을 수 있게 되거나 xgen transport의 처리 방침이 정해지면 제거한다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
실패를 전달 관점으로 분류하려면 과업마다 reward, xgen 시도별 exit code, 마지막 XGEN_ 종료 줄, journal의 모델 호출 결과(거절 이유별)를 한 줄로 봐야 한다. 어댑터가 복사한 Run 상태(sqlite)와 로그만 읽는다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
기준선 4과업 중 schemelike-metacircular-eval에서 관찰이 쌓인 프롬프트가 agy -p 인자의 OS 한계(인자당 128 KiB)를 넘어 실행 자체가 6번 실패했고, xgen은 이를 unknown 호출로 보고 복구를 반복했다. xgen agy transport는 같은 상황을 prompt_limit 100,000바이트에서 request_too_large로 거절하므로, 기준선이 실제 xgen+agy 동작을 재도록 bridge도 같은 한도에서 413을 낸다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 89개 기준선은 3.5시간·호출 700여 회 뒤 agy 개인 할당량(429 RESOURCE_EXHAUSTED)에 걸려 50개 과업이 첫 호출부터 실패했다. bridge는 이제 이를 502가 아니라 429로 넘겨 xgen이 rate_limited로 기록하게 한다. - --tolerate-tool 플래그를 없애고 xgen agy transport에 넣을 규칙(ADR-0096 예정)과 같게, manage_task의 Action=list 단독 호출만 받아들인다. - rerun.sh: 과업마다 bridge에 작은 요청으로 할당량을 확인하고 막혀 있으면 10분씩 기다린 뒤 한 과업씩 실행한다. rate_limited로 끝난 과업은 최대 3번까지 다시 넣는다. - summarize.py가 여러 job 디렉터리를 함께 집계한다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ADR-0097 빌드가 컨테이너 안에서 bridge의 agy prompt 한도(100,000바이트)를 알도록 XGEN_OPENAI_MAX_PROMPT_BYTES로 넘긴다. 비우면 기존과 같다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
배경
약한 모델 하네스 연구는 공식 실행기 Harbor로 Terminal-Bench 2.1(89과업)을 돌려 측정한다. 이 PR은 그 측정 도구를 저장소에 남겨 결과를 재현할 수 있게 한다. 제품 코드는 바꾸지 않는다(
bench/harbor/추가만).구성
agy_bridge.py: agy를 OpenAI 호환 endpoint로 노출한다.forward/: 컨테이너 loopback에서 호스트로 잇는 정적 TCP forwarder다. 루트 workspace와 분리된 독립 crate다.xgen_agent.py,xgen_run.sh: Harbor custom agent다. unknown 호출은recover로 폐기한 뒤resume한다.rerun.sh: 할당량을 확인하며 과업을 하나씩 돈다.summarize.py: 과업별 보상, 종료 이유, journal 호출 집계를 낸다.README.md: 실행 절차와 기준선을 적었다.기준선 (ADR-0096 적용)
89과업 중 34개 통과(38%). 실패 55개의 종료 이유는 다음과 같다.
request_too_largerequest_too_large는 #171(ADR-0097)에서 다루고, 지금 실측 중이다.검증
diff-model-requests대상이 아니다.🤖 Generated with Claude Code