fix(responses): expose continuation spill write health - #3525
Conversation
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughResponse spill writes now track classified health state, failure streaks, and event timestamps. The authenticated memory endpoint exposes these fields without raw errors or paths. Tests and documentation cover failure, recovery, privacy, CLI snapshots, and dashboard behavior. ChangesResponse spill-write health
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change adds privacy-safe spill-write health diagnostics to the authenticated memory interface while keeping liveness behavior unchanged. The documented status, counters, error classes, timestamps, and recovery behavior are covered with no remaining merge-blocking risk. Sequence Diagram(s)sequenceDiagram
participant SpillPublication
participant ResponseState
participant ManagementMemoryAPI
participant MemoryDashboard
SpillPublication->>ResponseState: record classified write success or failure
ManagementMemoryAPI->>ResponseState: read responseState metrics
ResponseState-->>ManagementMemoryAPI: return status, streak, code, and timestamps
MemoryDashboard->>ManagementMemoryAPI: request authenticated memory snapshot
ManagementMemoryAPI-->>MemoryDashboard: render privacy-safe spill-write health
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 15 functions across 5 files. (3 skipped: 3 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
리뷰 · 우선순위 70 / 80설명 이 PR은 #3522에서 잡힌 “프로세스는 살아 있는데 continuation spill 쓰기는 계속 실패하는” 상태를, 운영자가 숫자만으로 구분할 수 있게 만드는 관측성 패치입니다. 지금 브랜치는 노출면은 기존 인증 경로만 씁니다. 점수를 70으로 둔 이유는 #3522가 실제 Windows 운영 사고이고, 이 PR이 그 사고의 최소 관측 계약을 정확히 메우기 때문입니다. 루트 원인 재현·자동 재시작·ACL 완화는 의도적으로 범위 밖이고, 이슈를 닫지 말라는 PR 본문 판단도 맞습니다. 대시보드 Memory 카드( 라인 - src/responses/state.ts noteSpillWriteSuccess - 성공은 누적 writes와 streak 리셋·lastSuccessAt만 갱신하고 lastFailureCode/At은 지우지 않습니다. 테스트가 의도적으로 고정한 포렌식 설계입니다. 다만 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
|
CI triage update for head The only completed failure is not in this PR's runtime or focused tests. Linux
#3526 deletes only the byte-equivalent routing duplicate while retaining all six cases under |
58760d5 to
288506d
Compare
|
Rebased onto the current Post-rebase local verification used isolated runtime homes:
The protected local runtime configuration files were unchanged across validation. This remains unmerged pending exact-head CI and independent maintainer review; #3522 also remains open because these diagnostics do not yet prove the reporter’s underlying stall cause. |
… (#3542) * fix(responses): expose continuation spill write health * chore: carry #3525 onto current dev Co-authored-by: Ingwannu <186453546+Ingwannu@users.noreply.github.com> --------- Co-authored-by: Ingwannu <ingwannu@users.noreply.github.com> Co-authored-by: jun <jun@lidge.dev> Co-authored-by: Ingwannu <186453546+Ingwannu@users.noreply.github.com>
Summary
responseStateMetrics()and the existing authenticatedGET /api/system/memory/ocx observe memory --jsonsurface.initial/healthy/degradedstatus, a consecutive-failure streak, last failure/success timestamps, and a closed error-code union. Raw messages, paths, response ids, payloads, and causes never enter the response.EACLRETRYEXHAUSTEDwithout weakening ACL hardening, changing readiness, or adding restart behavior./healthz.This fixes the current observability gap identified in #3522. It does not claim that the original 2.39.0 incident root cause has been reproduced on the current release, so the issue should remain open for an exercised 2.42/2.43+ snapshot after this instrumentation lands.
Refs #3522
Verification
devb20af6668:bun test tests/responses/responses-state.test.ts tests/responses/continuation-dedup.test.ts tests/memory-watchdog.test.ts— 172 pass, 0 fail.bun run typecheck— pass.bun run privacy:scan— pass.docs-sitebuild — 425 pages built successfully.HOME,OPENCODEX_HOME, andCODEX_HOME; inherited data/admin auth tokens were cleared only inside the test processes.git diff --check— pass.Checklist
Summary by CodeRabbit
New Features
ocx observe memory --jsoncommand for viewing memory and spill-write health details.Bug Fixes
Documentation