개선 #691
완료됨개선 #689: 롱 호라이즌 채팅·고빈도 스트림 안정화 총괄
[롱 호라이즌 스트림] renderer 텍스트 delta 병합 큐와 순서 보존 적용
100%
설명
배경:
- 수시간 이상 지속되는 롱 호라이즌 채팅과 고빈도 스트림에서 요청 입력 불가, 이전 작업 확인 곤란, CPU/메모리 상승 위험을 줄이기 위한 안정화 작업이다.
- Codex app reverse-engineering에서 확인한 힌트: raw delta opt-out, incoming line queue와 overflow fail-safe, requestAnimationFrame 기반 text delta coalescing, 50ms command output batching, output cap/truncation marker, owner/follower patch+revision sync, turn-level virtualization과 scroll anchoring.
- 목표는 오래된 대화를 잘라내는 것이 아니라, 메모리/CPU 상한을 넘지 않도록 하면서 사용자가 필요한 대화 내용을 계속 열람할 수 있게 하는 것이다.
책임 경계:
- assistant message, plan, reasoning text 등 사용자에게 보이는 텍스트 delta를 renderer state에 반영하는 큐를 담당한다.
- command/process output 대량 로그 처리는 별도 하위 일감에서 다룬다.
구현 범위:
- conversationId/turnId/itemId/target 단위로 delta를 병합하는 frame queue를 도입한다.
- visible 상태에서는 requestAnimationFrame, background/비브라우저 상황에서는 bounded timeout fallback을 사용한다.
- item/completed, turn/completed, error 같은 semantic event는 남은 delta가 먼저 flush된 뒤 적용되도록 drainBefore 계열 순서 보존을 둔다.
- reducer/store 업데이트 횟수가 delta 개수에 선형으로 증가하지 않게 한다.
완료 조건:
- 초당 수백~수천 delta 입력에서도 state commit 수가 프레임/시간 기준으로 제한된다.
- 완료 이벤트가 텍스트 delta를 앞질러 최종 메시지가 깨지는 회귀가 없다.
- agentMessage/plan/reasoningSummary/reasoningContent별 keying 테스트가 있다.
Carl Friedrich Gauss이(가) 7일 전에 변경
- 완료일을(를) 2026/07/01(으)로 지정되었습니다.
- 시작일을(를) 2026/06/30에서 2026/07/01(으)로 변경되었습니다.
- 다음 일감을 우선 진행:에 개선 #690: [롱 호라이즌 스트림] app-server 수신 큐와 이벤트 필터·백프레셔 계약 도입이(가) 추가되었습니다.
Carl Friedrich Gauss이(가) 7일 전에 변경
- 다음에 진행할 일감:에 개선 #693: [롱 호라이즌 스트림] transcript long-history virtualization·paging·scroll anchoring 강화이(가) 추가되었습니다.
Carl Friedrich Gauss이(가) 7일 전에 변경
- 다음 일감을 우선 진행: 값이 지워졌습니다. (개선 #690: [롱 호라이즌 스트림] app-server 수신 큐와 이벤트 필터·백프레셔 계약 도입)
Carl Friedrich Gauss이(가) 7일 전에 변경
- 다음에 진행할 일감: 값이 지워졌습니다. (개선 #693: [롱 호라이즌 스트림] transcript long-history virtualization·paging·scroll anchoring 강화)
Carl Friedrich Gauss이(가) 7일 전에 변경
- 다음 일감에게 막혀 있음:에 개선 #690: [롱 호라이즌 스트림] app-server 수신 큐와 이벤트 필터·백프레셔 계약 도입이(가) 추가되었습니다.
Carl Friedrich Gauss이(가) 7일 전에 변경
- 다음 일감의 해결을 막고 있음:에 개선 #693: [롱 호라이즌 스트림] transcript long-history virtualization·paging·scroll anchoring 강화이(가) 추가되었습니다.
Carl Friedrich Gauss이(가) 7일 전에 변경
- 완료일 값이 지워졌습니다. (
2026/07/01) - 시작일을(를) 2026/07/01에서 2026/06/30(으)로 변경되었습니다.
Carl Friedrich Gauss이(가) 4일 전에 변경
- 상태을(를) 신규에서 진행(으)로 변경되었습니다.
Carl Friedrich Gauss이(가) 4일 전에 변경
[#689 / #691 progress] renderer text delta coalescing integrated on branch codex/redmine-689-long-horizon-stream.
Commit: 12924c5a #691 #692 renderer 스트림 출력 큐 안정화
CodeCommit: https://ap-northeast-2.console.aws.amazon.com/codesuite/codecommit/repositories/hive-x-electron/commit/12924c5a?region=ap-northeast-2
Summary:
- Added renderer-only runtimeEventDeliveryQueue for visible text item/delta, keyed by threadId + turnId + itemId.
- Uses requestAnimationFrame with 20ms timeout fallback and drains before semantic/non-coalescible events.
- Terminal/command output deltas are excluded and delegated to #692 terminal-output lane.
Verification:
- Integrated targeted Vitest: 5 files / 453 tests passed.
- npm run typecheck passed.
- Targeted ESLint passed.
- git diff --check passed.
- npm run ci:production passed: lint, typecheck, 148 Vitest files / 1999 tests, renderer build, fixture validation, package-config validation; signing check skipped because HIVE_RELEASE_BUILD is not enabled.
Cross-check:
- Two read-only cross-verify passes accepted #691 scope/contract.
Completion remains deferred until the final branch/main-reflected closeout step for #689.
Carl Friedrich Gauss이(가) 4일 전에 변경
- 완료일을(를) 2026/07/03(으)로 지정되었습니다.
- 상태을(를) 진행에서 완료(으)로 변경되었습니다.
- 진척도을(를) 0에서 100(으)로 변경되었습니다.
통합 커밋: https://ap-northeast-2.console.aws.amazon.com/codesuite/codecommit/repositories/hive-x-electron/commit/ab8b9dda0186841702c41dd606b4fe01db6dc7a7?region=ap-northeast-2
최종 검증: main 병합 트리에서 npm run ci:production 통과(150 test files / 2025 tests, renderer build, fixtures, package config, signing check skipped).