Conversation
🦋 Changeset detectedLatest commit: be73216 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Thank you for following the naming conventions! 🙏 |
📝 WalkthroughWalkthroughEve now tracks open turns per session. Cancelled turns finish with status ChangesEve turn lifecycle
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant EveEvents as Eve event handlers
participant EveState as Eve session state
participant TurnLogger as turn logger
EveEvents->>EveState: register open turn
EveEvents->>TurnLogger: handle turn.cancelled
TurnLogger->>EveState: finish turn with status 499
EveEvents->>TurnLogger: handle session.completed or session.failed
TurnLogger->>EveState: finish remaining open turns
EveState->>EveState: clear session context
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 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 |
commit: |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/evlog/src/eve/index.ts`:
- Around line 872-900: Update the 'session.completed' and 'session.failed'
handlers to guarantee clearSessionState(ctx.session.id) runs even when turn
cleanup rejects. Handle each open turn’s finish operation independently so one
rejection does not prevent remaining turns from being processed, and move
session cleanup into a finally block while preserving the existing error
logging.
In `@packages/evlog/test/eve.test.ts`:
- Around line 361-390: Update the test named “drops session context once the
session completes” to leave the initial turn open by removing its turn.completed
event, then emit session.completed and assert that finishOpenTurns drains a
status-200 event and useLogger(toolContext()) fails. Preserve the subsequent
new-turn assertion to verify session context is not retained, and ensure the
added behavior has explicit test coverage.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 2f889b32-c57e-4e1c-b167-1ae8e669a221
📒 Files selected for processing (3)
.changeset/eve-terminate-cancelled-turns.mdpackages/evlog/src/eve/index.tspackages/evlog/test/eve.test.ts
🔗 Linked issue
📚 Description
📝 Checklist
Summary by CodeRabbit
New Features
499.Documentation