Repository navigation
test: Server·Brain 로컬 실행 연동과 S07 경합 인수 [1.87] - #240
Merged
Merged
Conversation
- RunPathEndToEndPostgresTest: 빈 baseline에서 HTTP 접수→coordinator→BrainRunClient(loopback 가짜) →terminal transaction→POST SSE→GET replay 바이트 동일, 순사용량·row 수, 구형 테이블·route 없음 - LegacyExecutionPathGuardTest: ChatSession·thread ID·구형 stream/client·토큰 누적·기능별 사후 차감· 브라우저 임의 차감·구형 내부 token 진입점·Brain 경로의 사용자 identity 읽기 회귀 금지 - 구형 agent → Server 내부 API token filter(X-Internal-Token, /internal/**)와 internal.api 설정 제거 (대상 controller는 1.74에서 제거됨) - support/http: 실제 HTTP 브라우저 run client·SSE reader (단계 4와 공용) Refs #226 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ServerBrainIntegrationTest: 같은 DB의 빈 제품 baseline(proovy_server)·Brain schema(bootstrap)·role 경계 위에서 실제 HTTP 접수→coordinator→BrainRunClient→proovy-brain testkit(7b8608e) 내부 API·graph→terminal transaction→SSE. 중복·같은 Note 충돌, 결과 분류별 순사용량, 브라우저 재접속·내부 SSE 유실·저장 후 유실, Server 재시작, Brain 저장 전 SIGKILL, RUNNING/PENDING 취소, deadline 경합·Brain fake clock, fingerprint·fixture sha256 일치, scope 밖 출처·변조 envelope(scripted) 거부, JWT 비전달·서비스 인증 거부·브라우저 비노출·역할별 DB 격리 - BrainTestkit: supervisor·control client. 미구성 시 "NOT EXECUTED" 이유로 skip, PROOVY_REQUIRE_BRAIN_IT=true면 실패 - scripts/brain-integration/run-local.sh: 격리 Postgres→testkit supervisor→Gradle→정리 (Server CI는 skip, 사용자 결정) - CI: real-Brain 연동 미실행을 warning으로 드러내는 step - docs/contracts/brain-integration.md: Verification 대응표, fake·scripted·미검증 구분, S08 외부 계약·S13 복구 경계 인계 - README: 연동 테스트 실행·CI skip 명시 Closes #226 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 tasks done
Member
Author
|
CI (run 39193762845, head 05c0553): |
- 차단: run-local.sh가 `test --rerun`으로 항상 실제 실행하고, 이번 실행의 TEST-com.proovy.integration.brain.*.xml이 tests>0·skipped/failures/errors=0이 아니면 실패한다(UP-TO-DATE·skip을 통과로 위장하지 않음) - 정리: supervisor를 setsid로 띄워 /brain/stop 뒤 프로세스 그룹 전체 종료, 남은 child도 정리, readiness 루프 60s 초과 시 실패 - 테스트: coordinator 켠 두 클래스에 @DirtiesContext, hold 해제·SSE close를 finally로, 요청별 차감액으로 잔액 단언, 저장 전 소실 provider_error 단언, coordinator 재시작은 같은 JVM stop/start로 명시 - SseClient: reader 판독 오류를 test thread로 전달, 여러 data 줄을 SSE 규칙대로 결합 - JwtAuthenticationFilter의 /internal JWT 우회 제거(대상 endpoint 없음) + 회귀 검사, internal-run-v1.md 잔여 서술 정정 Refs #226 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
리뷰 r187 반영 push: head |
9 tasks done
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.
📌 관련 이슈
7b8608ee345761526aee0c76186ca984b496f41e) — 이 PR은 그 commit으로 연동했다🏷️ PR 타입
📝 작업 내용
단계 3 (9b5953f) — 빈 DB Java 경로와 구형 경로 잔여 참조 제거
RunPathEndToEndPostgresTest: 빈 baseline → 실제 HTTP 접수 → coordinator →BrainRunClient(loopback 가짜) → terminal transaction → POST SSE → GET replay 바이트 동일, row 수·순사용량, session/thread 열 없음, 실행·사용량 route는 신규 경로뿐LegacyExecutionPathGuardTest: ChatSession·thread ID·/stream/v2·구형 AI client·토큰 누적·/api/credits/use|costs|estimate·X-Internal-Token회귀 금지,deductCredit호출자는RequestUsageService뿐, Brain 호출 경로가 사용자 identity를 읽지 않음/internal/**)와internal.api.*설정단계 4 (05c0553) — 실제 Python Brain 연동 인수, 리뷰 r187 반영 (9173b1b)
com.proovy.integration.brain.ServerBrainIntegrationTest(18): 한 Postgres database에 빈 제품 baseline(proovy_serverFlyway)·Brain schema(Braindb bootstrap·migrate)·role-boundary.sql, Server는 production bean 그대로, Brain은 testkit 실제 내부 API·run driver·PgRuntimeBackend·graphBrainTestkit(supervisor·control client),scripts/brain-integration/run-local.sh(격리 Postgres → supervisor → warm-up → Gradle → 정리)docs/contracts/brain-integration.md: Verification 대응표, fake·scripted·미검증 구분, S08 외부 계약, S13 복구 경계S07 Verification 대응 (실제 HTTP/SSE/DB, Brain 7b8608e)
stop()/start(), 프로세스 재시작 아님), Brain 저장 전 SIGKILLexecuting(재개 없음)·Serverprovider_error한 번 보상. 실측(승자 고정 안 함): deadline 경합은 Server sweep이 확정ai_runs.request_fingerprint, Brain fixture sha256 = Server PIN 전부(manifest·파일), scope 밖 asset(scripted) → FAILED internal_error·출처/solution 없음, 다른 run envelope(stream+status, scripted) → FAILED·미저장, 이전 fence(stream, scripted) → 버리고 저장 terminal 회수보안: Brain이 받은 호출 전부 shared token, body에 사용자 JWT·
Bearer·grant·read_url없음 / token 없음·사용자 JWT·틀린 token은 Brain 401·403 / 브라우저 frame·대화 조회에 fence·grant·read URL·서비스 token 없음 / 같은 DB에서brain_runtime→public.ai_runs42501,proovy_server→brain_runtime.run_records42501.r187 r2 권고 확인:
out_of_scope_source·rewrite_terminal(+rewrite_status)이 Pg 경로(PgRuntimeBackend)에서 동작함을 위 V5 테스트로 확인했다(scripted terminal은 Brain Postgres store에 저장되고 status로도 회수된다).📸 스크린샷
실행 명령 (로컬, 격리 자원
proovy-postgres-t187:26432, supervisor 26081, Brain API 26080)9173b1bfaee9ed89c7e2c4c768f96e39a9059b50× Brain7b8608ee345761526aee0c76186ca984b496f41e(clean),PROOVY_REQUIRE_BRAIN_IT=trueServerBrainIntegrationTest18/18,RunPathEndToEndPostgresTest3/3,LegacyExecutionPathGuardTest5/5 — skip 0,> Task :test실행build/test-results를 지우지 않고 재실행,testClasses UP-TO-DATE):> Task :test실제 실행 18/18 skip 0 —test --rerunTEST-com.proovy.integration.brain.*.xml이 tests>0·skipped/failures/errors=0이 아니면 실패. 음성 확인: skipped=18 XML → 실패, 실행 전 시각의 stale XML → 실패/brain/stop+ setsid 프로세스 그룹 종료)NOT EXECUTED — …+ CI warning step. 전체./gradlew test는 CI로 확인.리뷰 r187 반영 (9173b1b)
run-local.sh:test --rerun으로 UP-TO-DATE 0건 실행을 막고, 결과 XML(이번 실행·tests>0·skip 0)을 검사해 아니면 exit 1/brain/stop→ 프로세스 그룹 종료 → 남은 child 정리, pg_isready·supervisor 대기 60s 초과 시 실패ServerBrainIntegrationTest·RunPathEndToEndPostgresTest에@DirtiesContextrunningCancel·deadlineRace·brainLostBeforeStorage·serverRestart의 hold 해제·SSE close를finally로JwtAuthenticationFilter의/internalJWT 우회 제거 +LegacyExecutionPathGuardTest.securityHasNoInternalPathCarveOut,internal-run-v1.md잔여 서술 정정SseClientreader 판독 오류를 test thread로 다시 던지고 여러data:줄을 결합provider_error단언 추가, deadline 승자는 실측으로 표기, coordinator 재시작은 같은 JVM으로 명시.SseClient·newUser seed 중복 정리는 후속✅ 체크리스트
docs/contracts/brain-integration.md, README)📎 기타 참고사항
no_match_notice·out_of_scope_source·rewrite_terminal은 testkit scripted(실제 Brain store·SSE 경유).did not become ready일 때만 start·restart를 최대 3번 재시도한다. Brain 쪽 readiness 설정화는 후속 메모.executing으로 남는다(Brain lease sweep·cleanup호출은 S13). Server는runtime_cleanup_at예약까지.deploy.yml의 미사용 secretPROOVY_AI_HOST·INTERNAL_API_TOKEN(S14 정리 후보, 파일 미변경), browser-run-v1 다음 consumer_version 이월 항목(대화 조회 before/limit·superseded 표시·U+0000·viewerFocus.page상한), internal-run fingerprint latex·viewer 없는 케이스, SafeMarkdown CR, FINAL_CHECK 전 Brain cancel용 CancelCause — 모두 이 PR은 계약을 바꾸지 않았다..github/workflows/ci.ymlwarning step 추가,application.yaml·application-test.yaml에서internal.api.*제거(읽는 코드 없음). migration 추가 없음.🤖 Generated with Claude Code