chore(docs): add ADR#0035 session store on NATS JetStream - #500
Conversation
yordis
commented
Jul 24, 2026
- The platform Session (ADR#0031) has no persistence design, and ADR#0024 explicitly deferred the session stream topology to a separate decision; this records that decision so session persistence is settled rather than improvised per implementer.
- It builds on the existing decider/JetStream substrate so sessions live on the one event-sourcing pattern the platform already runs, instead of a second bespoke store.
- It commits to an append-only log because rewind, fork, resume, and audit are inherent to agent sessions and should fall out of the model rather than be bolted on.
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
PR SummaryLow Risk Overview The decision commits to append-only mutation (rewind/compaction/cancel are new events at replay), hybrid write preconditions (
Reviewed by Cursor Bugbot for commit ee857b4. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Warning Review limit reached
Next review available in: 34 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughAdds draft ADR 0035 describing a session store as a decider aggregate on NATS JetStream, including stream semantics, concurrency, compaction, forks, cascades, projections, non-goals, consequences, and references. Registers the ADR in the index. ChangesSession Store Architecture Decision
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@docs/adr/0035-session-store-decider-aggregate.md`:
- Around line 20-25: Update the historical-context sentence in ADR#0035 so it
states that the ADR index ran through ADR#0034 before this decision, rather than
asserting that it currently ends at ADR#0034. Preserve the surrounding
references to ADR#0024 and the JetStream topology.
- Around line 76-79: Replace every bare ADR#NNNN occurrence reported in this
document, including the visible references and all additional listed locations,
with relative Markdown links to the corresponding ADR documents. Preserve the
surrounding prose and link each ADR number consistently using the repository’s
existing ADR filename pattern.
- Around line 138-145: The documented Any write path must make idempotency
atomic with append so concurrent deliveries sharing a command key cannot append
duplicate facts. Update the session-store decision flow around the Any-path
events and their idempotency handling to reserve or deduplicate the command
atomically with the append, or route idempotent commands through a guarded write
that replays and returns the existing result on conflict; preserve unguarded Any
behavior only for commands without idempotency requirements.
🪄 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 Plus
Run ID: d8e2b348-d8f7-492a-b6b1-17993882c806
📒 Files selected for processing (2)
docs/adr/0035-session-store-decider-aggregate.mddocs/adr/index.md
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 66c7f9a. Configure here.
…0035 Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
