Skip to content

feat: persist Dream session recovery events - #111

Merged
divo12 merged 6 commits into
mainfrom
feat/session-recovery-events
Aug 16, 2026
Merged

divo12 merged 6 commits into
mainfrom
feat/session-recovery-events

Conversation

@divo12

@divo12 divo12 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • decode Dream's typed role.session.recovered envelope into a frozen Chorus recovery notice and closed event kind
  • retain recovery across transient retries and raised retry failures, even when no Chorus observer is installed
  • persist the recovery reason on the exact authoritative AgentSession, including cancellation without cost or lifecycle mutation
  • clear the prior recovery reason only after a later clean beat on the same open handle

Stack

Tests

  • pytest -q tests/adapters/test_dream_beat.py tests/adapters/test_observer.py tests/heartbeat/test_transient_retry.py tests/ledger/test_agent_session_beat.py --basetemp=/tmp/ch-rec-final (80 passed)
  • targeted Ruff (passed)
  • strict mypy on all changed source files (passed)
  • independent review completed after fixes for retry, exception, and cancellation loss paths; no actionable findings
  • full-project strict mypy retains four pre-existing Dream API signature mismatches in src/chorus_harness/_factory.py

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

divo12 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

Base automatically changed from feat/authoritative-session-handle to main August 16, 2026 16:32
divo12 and others added 4 commits August 16, 2026 23:28
Decode Dream #107's typed RoleSessionRecovered onto the authoritative
AgentSession so recovery notices survive retries and cancel without
mutating cost or lifecycle.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the reviewed current-main implementation while joining the original PR branch without rewriting remote history.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

divo12 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@divo12
divo12 merged commit 260e43f into main Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant