Repository navigation
feat: 실제 로컬 Server·Brain 연결 텍스트 대화 인수 검증 — local stack 스크립트·실행 문서 (1.96) - #316
Merged
Merged
Conversation
- scripts/local-stack/local-stack.sh: 격리 Postgres·Redis(-t196, 29632·29679), Server(local profile bootJar), proovy-brain testkit(실제 Brain API·graph·store·SSE, offline seat), role 경계, 검증용 사용자·access token 발급, down 정리. - README: 로컬 stack 실행법, localhost로 접속(Server local CORS는 http://localhost:*만 허용), token 로그인, 요청 한도·scenario 재현, dev proxy 소켓 끊김 한계. - vite.config.ts: proxy가 브라우저 Origin을 그대로 넘긴다는 주석 정정. Closes #306 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 tasks done
…d, env 저장·SUFFIX 검증·pkill 경계, Brain warm-up, KST seed, README 빌드·token 안내 - up: jar·SQL·포트·컨테이너 사전 검사, ERR trap(errtrace)으로 실패 시 로그 끝부분을 보여 주고 down, Server 기동 중 프로세스 종료를 바로 감지, /brain/start 응답 본문 보존(--fail-with-body), Brain import warm-up(60초 readiness 대비). - Server SERVER_ADDRESS=127.0.0.1(외부 interface 비노출), ready 안내의 proxy target을 127.0.0.1로. - up 값을 STATE_DIR/env에 저장해 token·status·down이 읽는다. SUFFIX는 ^[a-z0-9_]+$만, Brain child pkill 패턴에 port 끝 경계. - seed 사용자 시각을 Asia/Seoul 기준(Server hibernate time_zone)으로. - README: git archive + flock Gradle bootJar, token 1시간·재발급, auth-storage 최소 예시, 포트 변경·env 공유, 실패 정리, 하네스·요청 기록 위치. Refs #306 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.
📌 관련 이슈
b576af3— local profile CORShttp://localhost:*)🏷️ PR 타입
📝 작업 내용
scripts/local-stack/local-stack.sh(up·token·status·down): 격리 Postgres·Redis(proovy-postgres-t196:29632,proovy-redis-t196:29679, tmpfs) → Server(local profile bootJar, :8080, Server 연동 테스트와 같은 DB 형태: proovy_server Flyway + Brain schema +role-boundary.sql) → proovy-brain testkit supervisor(실제 Brain API·graph·store·SSE, 모델은 offline seat) → 검증용 사용자·access token. 운영 API·DB·GCS·OAuth 미사용, token·password는 실행마다 새로 만드는 개발 전용 값.vite.config.ts: proxy가 브라우저 Origin을 그대로 넘긴다는 주석 정정(코드 변경 없음).src/)는 바꾸지 않았다 — 텍스트 경로만으로 완료 검증, source viewer·업로드(S09)·출처 chip(S11) 선행 구현 없음.🔬 인수 검증 (스펙 08 Verification)
기준: Front
f8a6e30(= dev 306c55a + 이 PR), Serverorigin/devb576af3(#243 merge commit,git archive→ bootJar), Brain proovy-braindev1be0945 testkit. Front pin(browser-run-fixtures-v1 @303a9e4) 154개 파일 sha256이 Brain testkitcontract_files와 전부 일치(차이 0). 브라우저: Playwright 1.60 headless Chromium, 시나리오마다 새 사용자. Brain scenario·hold는 브라우저POST /api/conversations의requestId(= internalrequest_id)로 하네스가 testkit control route에 등록 — 브라우저는 Server(dev proxy)만 호출.POST /api/conversations(noteId 없음) →/app/chat/{noteId}→ Activity(풀이 작성 완료·단계 검증 진행 중) → hold 동안AI 응답0개 → release 뒤 검증된 풀이·step 마커·검증 요약. network 6개 시나리오 전체:POST /api/notes·/api/credits/use·v2(/api/conversations/{id}비-messages)·Brain 포트(2968x)·운영 도메인 0건. 호출된 API는POST /api/conversations·GET /api/conversations/{id}/messages·GET /api/ai-runs/{runId}/events·POST /api/ai-runs/{runId}/cancel과 notes/users 조회뿐AI 응답0. 브라우저↔dev server SSE 소켓 강제 단절(5초 차단) → "연결이 끊겨 다시 연결하는 중이에요" → backoff 재시도 2회 실패 뒤GET /eventsLast-Event-ID: {runId}:4로 재접속 → 완료 뒤 박스 1개·응답 1개·Activity 2행. 완료 뒤 새로고침도 응답 1개run.canceled뒤 풀이 작성 완료 유지·단계 검증 취소됨·"중단됨 · 답변 생성을 중단했습니다.", draft "다음 질문 초안" 유지, 6초 대기 동안 POST 추가 0. (Server→Brain 취소는 실제로 ~0.8초: curl로run.canceling→run.canceled확인)aria-expandedtrue→false), 상태 문구(진행 중·완료·중단 중·취소됨·중단됨), unsupported_only 고정 안내, 미검증 공개(inconclusive), 혼합 notice(mixed), 추가 정보 요청(clarification), direct 검증 요약. fixture 근거(offline seat가 만들지 않음): supporting 요약AssistantResponseView.test.tsx"검증 요약 direct/supporting", thread_like page 접기/펼치기 "fixture 응답 substantive: main은 펼치고 thread_like는…", 정답 숨기기 "정답 숨기기" — Front CI testsrc/무변경. 위 검증은 텍스트 질문만으로 수행시나리오별 /api 요청 집계 (원자료: network/A~F.tsv)
GET /api/ai-runs/{runId}/events (200)×1GET /api/conversations/{id}/messages (200)×1GET /api/notes (200)×9GET /api/notes/tools (200)×1GET /api/notes/{id} (200)×8GET /api/users/me (200)×6POST /api/conversations (200)×2GET /api/ai-runs/{runId}/events (200)×2GET /api/conversations/{id}/messages (200)×3GET /api/notes (200)×10GET /api/notes/tools (200)×3GET /api/notes/{id} (200)×10GET /api/users/me (200)×7POST /api/conversations (200)×1GET /api/ai-runs/{runId}/events (200)×1GET /api/conversations/{id}/messages (200)×1GET /api/notes (200)×7GET /api/notes/tools (200)×1GET /api/notes/{id} (200)×4GET /api/users/me (200)×4POST /api/ai-runs/{runId}/cancel (200)×1POST /api/conversations (200)×1GET /api/ai-runs/{runId}/events (200)×1GET /api/conversations/{id}/messages (200)×1GET /api/notes (200)×13GET /api/notes/tools (200)×1GET /api/notes/{id} (200)×16GET /api/users/me (200)×10POST /api/conversations (200)×4GET /api/ai-runs/{runId}/events (200)×1GET /api/conversations/{id}/messages (200)×1GET /api/notes (200)×9GET /api/notes/tools (200)×1GET /api/notes/{id} (200)×8GET /api/users/me (200)×6POST /api/conversations (200)×2GET /api/ai-runs/{runId}/events (200)×1GET /api/conversations/{id}/messages (200)×1GET /api/notes (200)×13GET /api/notes/tools (200)×1GET /api/notes/{id} (200)×16GET /api/users/me (200)×10POST /api/conversations (200)×4POST /api/conversations (429)×1금지 호출(
POST /api/notes·/api/credits/use·v2·Brain 포트·운영 도메인) 0건. B~F의 originlocalhost:5197은 SSE 단절용 TCP 중계(뒤는 같은 Vite dev server). Playwright 하네스: harness/task success-criteria 추가 항목
/app/chat/1에 응답 2개409→ "이 노트에서 진행 중인 답변이 있어요 / 진행 중인 답변을 이어서 보여 드려요. 보낸 질문은 입력창에 남겨 두었어요." + 탭 1 run의 Activity 진행 표시·정지 버튼, 완료 뒤 두 탭 모두 응답 2개RATE_LIMIT_MAX_REQUESTS=4(사용자당 1분)로 띄워 POST 200×4 → 429 → "요청이 많아 잠시 기다려야 해요 / 44초 뒤에 다시 보낼 수 있어요." draft 유지, 전송 버튼aria-disabled, 대기 중 클릭해도 POST 없음hold_at=verification5초 동안 앞 frame이 즉시 도착(curl 타임스탬프)-t196컨테이너 0, 8080·5196·2963x·2967x·2968x·2969x listen 0, Server·testkit·vite·브라우저 프로세스 0📸 스크린샷 (실제 로컬 Server·Brain 연결)
✅ 체크리스트
공통
pnpm tsc --noEmit타입 체크를 통과했습니다 —pnpm run build(tsc -b 포함) 로컬 통과, CI 결과 아래type/이슈번호-작업명) — 오케스트레이션 지정worktree-task-1.96인증 관련 변경 시
📎 기타 참고사항
https://proovy.ai.kr만 허용) → 게이트 [2] 결정 B로 Server #243에서 해결. (2) dev proxy가 upstream 소켓 단절을 브라우저에 전달하지 않아 SSE가 무한 대기 + Front에 heartbeat 무응답 감지 없음 → [Feat] run SSE 무응답(half-open) 감지 — heartbeat watchdog 재접속 #315. (3) 기본 활성 profile local로 localhost CORS가 열릴 수 있음([Refactor] Spring v2 스트리밍에 맞게 프론트 코드 수정 #243 리뷰) → Server#244.pr-assets/task-1.96branch(코드 아님, 73d3d6f — 스크린샷은 2dfacc1)./brain/start본문 보존, R3STATE_DIR/env·SUFFIX 검증·pkill 경계, R4 Brain warm-up, R5 token 1시간·재발급·auth-storage 예시·KST seed, R6 README git archive+flock Gradle·포트 변경, R7 Server127.0.0.1bind, R8bash -c제거. 재확인:bash -n, 사전 검사 실패(jar 없음·SUFFIXt-196) 자원 0, 중간 실패(깨진 role-boundary) 로그 출력 뒤 자원 0, 정상 up → 8080은127.0.0.1만 listen·token/api/users/me200·Vite proxy 경유 run 완료·status → env로 down 뒤 자원 0.🤖 Generated with Claude Code