Repository navigation
feat: 확장 terminal(배지·응답 종류·단계 검산·Read-back) 저장·전달과 계약 pin 6b237b8 [2.15] - #247
Merged
Merged
Conversation
- 2.07 계약 사본 교체: browser-run-fixtures-v1.1·terminal-fixtures-v2.1·activity-fixtures-v1.1 (proovy-brain 6b237b8), PIN 3종 갱신 - V6: chat_messages response_kind·assurance_scope·solution_checks와 CHECK(v2 행에만 필수, 배지 집계·재설명 규칙) - CompletionExtension: Brain browser_solution_check 규칙으로 terminal 확장 검사, 안내 응답 검산 거부 - verified 검산은 새 Verified Solution과 순서대로 짝지어 step_marks·verification_summary.solution_check에 저장 - TerminalReplay 한 함수로 SSE replay·대화 조회에 responseKind·assuranceScope·solutionChecks 전달 - Activity Kind read_back(problems[]) 수락·저장 → SSE replay 포함 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iB [2.15] - M1: verified_solutions.step_marks는 artifact chain mark 그대로, 검산(disclosure 적용 view)은 verification_summary.solution_check에 - M2: 새 artifact 1·verified 검산 1·기존 참조 0일 때만 짝짓는다 - M3: read_back 완료 Activity만 ai_run_events 저장 상한 256KiB(V6 CHECK·SourceActivities), 경계 테스트 - m1: 재설명의 새 Verified Solution, 풀이 수를 넘는 verified 검산 거부 - m2: step_index 0..n-1 강제(2.06 규칙) - m3: ChatMessage.responseKind 초기값 standard - m6·m7·m8: SafeMarkdown 제어 문자 패턴 공유, 확장 세 필드만 닫힌 목록으로 읽기, 대화 조회 solutionChecks JsonNode 그대로 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
리뷰 r2.15 반영 (
|
…gned URL 차단 [2.15]
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.
개요
Task 2.15 — proovy-brain 2.07(PR #198, dev
6b237b8)의 확장 terminal을 Server가 저장하고 브라우저로 넘긴다. 새로고침·대화 다시 열기 뒤에도 배지와 단계 검산이 같은 값으로 보인다.[2.15]이슈 없음(2026-11-11·작업 시작 시 재조회)tasks/phase-2-redesign/15-server-v2-terminal-storage.md(수정하지 않음)계약 pin
PIN.json6b237b82f4de0af34fdd9ee1d7b4a7147f002f4ebrowser-run-fixtures-v1.1PIN-terminal-v2.jsonterminal-fixtures-v2.1PIN-activity-v1.jsonactivity-fixtures-v1.1git archive로 세 디렉터리를 복사했고, 모든 파일 sha256을 Brain commit blob과 대조했다(불일치 0).src/main/resources/contracts/browser-run-v1/은 존재하지 않는다. plan 28·PR [Fix] canvas 이미지 presigned URL 변환 버그 수정 #198 가이드가 확인한 실제 위치src/test/resources/contracts/brain/을 썼다.저장 위치 매핑 (2026-11-11 결정 기준)
assurance_scopechat_messages.assurance_scope(V6, CHECK verified·unverified·not_applicable)response_kindchat_messages.response_kind(V6, 기본standard, CHECK)solution_checks(전부, source snake_case)chat_messages.solution_checksJSONB (V6) — 아래 "결정과 다른 점" 참고verified_solutions.verification_summary.solution_check(기존 JSONB) — 새 artifact 1·verified 검산 1·기존 참조 0일 때만verified_solutions.step_marksai_run_events의activity.*kindread_back(다른 Activity와 같음)V6__v2_terminal_fields.sql(기존 마지막 V5 + 1).response_kind = 'standard', 배지·검산 NULL. 필수 제약은assurance_scope IS NOT NULL인 행(확장 terminal로 저장한 행)에만 건다: 완료 assistant만, 세 값 함께, 검산 ≤ 20, 재설명은 not_applicable·검산 없음, 응답 배지 = not_applicable을 뺀 집계(오케스트레이터 메모 2026-11-12 결정 (1)).verified_solutions에 새 열 없음.claimsdirect|supporting 제약은 v2 terminal도 artifact verification summary의 coverage(direct|supporting)로 채우므로 그대로 맞다 — 바꾸지 않았다.hide_answer는 모든 단계 withheld(설명·수식 null),hide_solution은 단계 빈 배열을 Server가 검사하고 그대로 저장·전달한다.결정과 다른 점(확인 부탁)
chat_messages.solution_checks열을 하나 더 만들었다. 결정은 "미검증 응답의 단계 검산은 응답 메시지response_pages결과 block으로 보여 준다(2.07 wire 그대로)"였는데, 2.07 wire에서 단계 검산은 result block 안이 아니라 payload 단위solutionChecks다.response_pages에 넣으면 canonical 본문·content_sha256과 2.07 wire 모양이 바뀐다. event payload(ai_run_events, 16KB 상한)에 두기에는 20문제 × 80단계가 들어가지 않는다. 그래서 V3verification_summary와 같은 이유로 응답 메시지에 JSONB 열을 두었다. 대화 조회·SSE replay는 이 열 하나로 같은 값을 만든다.evidence_code는 저장하지 않는다. 2.07 노출 결정에 따라 Brain은 독립 답(evidence_code·값)·check_reason·problem id를 terminal source에도 싣지 않는다(plan 28). Server가 받을 수 없는 값이다. 대신 verified 검산의 문제 단위 값을verification_summary.solution_check에 둔다.step_marks는 덮어쓰지 않는다. Brain source 검산에solution_id를 싣도록 2.12 확인 필요. 리뷰 반영 내역과 확인 필요 목록은 PR 코멘트 참고.변경
CompletionExtension(신규): Brainbrowser_solution_check.py와 같은 규칙 — 세 필드 함께, 단계 종류별 허용 결과, ✓ 단계 수식 필수, argue 수식 금지, 설명 SafeMarkdown·출처 마커 금지·제어 문자, disclosure별 withheld, strategy·cross_check·배지 정합, 응답 배지 집계, 재설명 고정 규칙. 저장 철자(snake, null 생략)와 browser 철자(camel, null key 채움) 변환.TerminalModel.Completed·TerminalAcceptance: 확장 필드 수락, 안내 응답 검산 거부(DISPOSITION_STRUCTURE), artifact 짝짓기.RunTerminalService.writeCompletion: V6 열 저장.TerminalReplay.completedPayload: 배지가 있으면responseKind·assuranceScope·solutionChecks를 붙인다(SSE live·replay·대화 조회 공용).RunReadService·AssistantMessageContent: 대화 조회 assistant에 세 필드(없으면 key 없음,NON_NULL).ChatMessage엔티티: 세 열 읽기 전용 매핑(쓰기는 terminal JDBC만).ActivityKind.READ_BACK·SourceActivities:reading_back_problemslabel, 완료problems[](번호·본문·보기 0 또는 2~5·그림 설명, 탭·줄바꿈 외 제어 문자 거부, 닫힌 object). SSE replay는 저장 event를 그대로 읽으므로RunStreamService경로 변경 없이 read_back이 replay된다(테스트로 확인).ConversationRunRequest·Brain 요청: 변경 없음. 2.07은 internal-run-v1을 바꾸지 않았고, Extracted Problem·Answer Type은 Brain 내부 값이라 Server가 전달할 필드가 계약에 없다.docs/contracts/browser-run-v1.md(v1.1 절),browser-run-sse.md, 사본 README.검증
로컬(JDK 없음 →
eclipse-temurin:21-jdk컨테이너, README 방식):compileJava compileTestJava통과../gradlew test --tests 'com.proovy.domain.run.{contract,terminal,event,stream}.*'+ Postgres(PROOVY_REQUIRE_DB_TESTS=true, 127.0.0.1:21432): 263 tests, 3 failed → 원인 수정. 실패 3건은 테스트 기대값(response-v1·publication-v1 pin commit은 303a9e4 유지, 응답 fixture 수 15→16)이었고 수정 뒤 이 묶음은 다시 돌리지 못했다(아래).RunTerminalServicePostgresTest45 cases, skipped 0.phase2-verified, 단답형 미검증·검증 대상 아님은inconclusive-unverified+ browser stream 확장값, 재설명phase2-re-explanation) → 메시지 배지 저장,verified_solutions행은 검증됨만 1, 대화 조회와 SSE replay의 세 필드가 browser fixture와 같음. 확장 없는 terminal, verified 행 step_marks·solution_check, V6 CHECK 거부, 진행 중 run의 Read-back replay../gradlew test는 로컬에서 메모리 부족으로 중단됐다. CI(전체 suite + Postgres,PROOVY_REQUIRE_DB_TESTS=true)는 통과했다: commit3c5e8e7, run 43271448604. 수정한 기대값 3건도 CI에서 통과를 확인했다.작업 문서 체크리스트 결과
browser-run-v1.md갱신verified_solutions.step_marks,verified_solutions새 열 없음, claims 제약 확인 — 단solution_checks열 추가·evidence_code미저장(위 "결정과 다른 점")남은 위험
🤖 Generated with Claude Code
2026-11-15 구현·검증 갱신
최종 구현 HEAD:
ee3480f. 독립 리뷰 major 3건을 반영했습니다. 식별 키가 없는 검산·풀이 휴리스틱 연결을 제거하고 artifact 요약·step marks를 보존합니다. 새 Verified Solution 개수를 verified 검산 개수로 제한하며, solution_checks의 공개 문자열에도 signed URL 금지 검사를 적용합니다.검증: acceptance 계약·회귀 86건, scope 28건, Postgres 47건 및 mirror·browser·activity·stream 관련 검사 통과. 고정 Brain fixture는 변경하지 않았습니다. 최종 HEAD 원격 CI 및 Codex 재리뷰 진행 중입니다.
Brain 연결 키·원문 단계·송신 크기 계약에 관한 후속 책임은 리뷰와 태스크에 남겨 두었습니다.