feat(trogon-decider-runtime): make snapshot decisions command-aware#179
Conversation
yordis
commented
May 25, 2026
- Snapshot policies need access to command intent when the durable result alone cannot express checkpoint intent.
- Loaded snapshot context needs to preserve first-run versus resumed execution without treating stream positions as event counts.
PR SummaryMedium Risk Overview
Tests cover command-driven snapshotting, Reviewed by Cursor Bugbot for commit 9f09066. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughSnapshot policy APIs were refactored to be decider-aware: ChangesSnapshot Policy Decider Awareness
Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly Related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 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 |
Code Coverage SummaryDetailsDiff against mainResults for commit: 9f09066 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@rsworkspace/crates/trogon-decider-runtime/src/execution.rs`:
- Around line 113-119: The accessor for the event-count is currently
crate-private and takes ownership (pub(crate) fn
events_since_last_snapshot(self) -> u64), preventing public SnapshotPolicy
implementers from reading it; change the method on DecideSnapshot to a public
non-consuming accessor (pub fn events_since_last_snapshot(&self) -> u64) that
returns the events_since_last_snapshot field so downstream crates can access the
counter when implementing SnapshotPolicy.
🪄 Autofix (Beta)
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: CHILL
Plan: Pro
Run ID: a07bc262-0aec-4c64-a98d-bc53750ad20c
📒 Files selected for processing (1)
rsworkspace/crates/trogon-decider-runtime/src/execution.rs
6bb656f to
9c737a6
Compare
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
9c737a6 to
9f09066
Compare