Repository navigation
[1.90] v1 run reducer — seq·ID 중복 제거와 terminal 불변 - #308
Merged
Merged
Conversation
This was referenced Oct 19, 2026
… 불변) - frame과 대화 조회 초기화를 같은 순수 reducer로 처리한다(React·네트워크 독립) - seq > lastSeq만 반영, 마지막 처리 frame id를 재접속 cursor로 노출, heartbeat는 no-op - Activity는 처음 등장 순서·ID당 하나, terminal outcome 불변, terminal 시점 열린 Activity는 selector에서 run 결과로 투영 - canonical 응답은 run.completed(또는 대화 조회 COMPLETED message)에서만 만들고 page는 경계·순서만 둔다 - fixture 10개 시나리오: 처음부터·중간 cursor·중복 주입·대화 조회 초기화, replay/live 비교 Closes #300 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 대화 조회 conversation 액션: 이미 cursor가 있으면 lastSeq·cursor를 바꾸지 않고 status는 PENDING→RUNNING→CANCELING으로만 옮긴다 - resume 옵션 추가(기본 replay: cursor 없이 seq 1부터 받아 Activity 복원, cursor: activeRun.lastSeq 사용) - 대상 run을 runId → 추적 중 run → activeRun 순서로 정해 run 종료 뒤 refetch가 terminal message를 반영한다 - 내용을 무시한 frame도 lastSeq·cursor는 올린다(마지막으로 받은 frame id) - activity terminal에서 progressStatus를 지우고 message를 terminal payload 값으로 바꾼다 - selectActivities를 state·Activity 단위로 memo하고, selectIsActive가 ACTIVE_RUN_STATUSES를 쓴다 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chowon442
force-pushed
the
worktree-task-1.90
branch
from
October 20, 2026 01:26
97368d1 to
ace98b2
Compare
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.
📌 관련 이슈
🏷️ PR 타입
📝 작업 내용
src/features/run/model/에 browser-run-v1 v1-only 순수 reducer·selector 추가 (React·네트워크 의존 없음, 1.88 공용 타입만 사용·변경 없음)runReducer로 처리: streamframe, 대화 조회conversation(ConversationPage 초기화),heartbeat(no-op)seq > lastSeq일 때만 반영 → 같은 event id 재전달·겹친 replay 무시. 마지막으로 받은 frame id를cursor로 노출(내용을 무시한 frame도 cursor는 올림, heartbeat는 cursor 아님)conversation)는 cursor를 당기지 않고(이미 cursor가 있으면 유지) status를 PENDING→RUNNING→CANCELING으로만 옮긴다.resume: "replay"(기본)는 cursor 없이 seq 1부터 받아 Activity까지 복원,"cursor"는activeRun.lastSeq를 cursor로 둔다run.created(PENDING) → activity/page frame(RUNNING) →run.canceling(CANCELING, 되돌리지 않음) → terminal. terminal 뒤 모든 입력은 같은 state 참조를 돌려준다selectActivities가 run 결과로 닫아closedByRun: true로 투영(1.80 메모)run.completedpayload(또는 대화 조회 COMPLETED message)에서만.response.page.*는 id·pageIndex·presentation·completed만 저장(제목·본문 없음). verification 진행은stepProgress {checked,total}만code·reason·message·recoverable)·취소(cause·message) 노출state 인터페이스 (
run_state.ts)reducer·selector (
run_reducer.ts,run_selectors.ts, barrel@/features/run/model)검증
pnpm test -- src/features/run/model: 147 passed (리뷰 반영 후) — fixture 10개 각각 처음부터 재생, 모든 중간 cursor 재개(겹침 포함), 중복 주입, 진행 중 재전달 시 같은 참조, terminal 뒤 불변, activeRun.lastSeq 초기화 후 이어 받기 / replay-source-unavailable의 replay·live는available외 동일 / 대화 조회 fixture 3개(active-run cursor = cursor 판정표 active lastDurableSeq 4, terminal message 결과 = 같은 run stream 결과) / 합성 frame으로 같은 ID 갱신·새 ID 누적·outcome 불변·열린 Activity 투영 3종 / run.completed 전 state에 본문·제목·plainText 없음, 퍼센트·delta·candidate·token 키 없음eslint src/features/run,tsc -p tsconfig.test.json --noEmit,pnpm run build통과✅ 체크리스트
공통
pnpm tsc --noEmit타입 체크를 통과했습니다type/이슈번호-작업명) — 오케스트레이션 지정 브랜치worktree-task-1.90사용📎 기타 참고사항
resume: "replay"로 대화 조회를 넣으면 cursor가 null이고, cursor 없이GET /events를 열어 seq 1부터 받으면 Activity·page까지 처음부터 받은 결과와 같습니다(spec 08:18, 테스트).resume: "cursor"는activeRun.lastSeq부터 받으므로 그 앞에서 시작한 Activity는 복원되지 않습니다(대화 조회에 Activity 없음).lastSeq·cursor는 기존 값을 유지합니다(빈 state면 0·null). terminal이라 재접속하지 않습니다.🤖 Generated with Claude Code