docs: add session domain model diagram - #262
Conversation
|
Warning Review limit reached
More reviews will be available in 13 minutes and 26 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds ChangesSession Domain Model Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docs/session-domain-diag.md (1)
138-138: ⚡ Quick winClarify the stale socket detection mechanism.
Line 138 presents two alternatives ("Connect-and-prune or liveness-check") without specifying which approach is actually used. This ambiguity may confuse readers trying to understand the exact behavior. Consider specifying the implemented mechanism or documenting when each approach applies.
🤖 Prompt for 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. In `@docs/session-domain-diag.md` at line 138, Clarify which stale-socket detection strategy `Minimal` uses and how it works: explicitly state whether `Minimal` performs a connect-and-prune on discovered `<pid>.sock` files (attempts a socket connect and removes the file if the connect/handshake fails or times out) or relies on a periodic liveness-check/heartbeat, and include the timeout/retry behavior and when pruning occurs (on discovery vs background sweep) so readers know the exact implemented mechanism and any fallback behavior.
🤖 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/session-domain-diag.md`:
- Around line 162-174: The glossary table is broken by the blockquote note so
the final row "| Minimal | Client process; ..." is not included in the table;
move the entire "Minimal" table row so it appears immediately before the
blockquote (i.e., make the table contiguous by placing the "| Minimal | Client
process; discovers providers..." row above the "> Note:" line) so the Markdown
table renders correctly; ensure the pipe/column formatting matches the other
rows.
---
Nitpick comments:
In `@docs/session-domain-diag.md`:
- Line 138: Clarify which stale-socket detection strategy `Minimal` uses and how
it works: explicitly state whether `Minimal` performs a connect-and-prune on
discovered `<pid>.sock` files (attempts a socket connect and removes the file if
the connect/handshake fails or times out) or relies on a periodic
liveness-check/heartbeat, and include the timeout/retry behavior and when
pruning occurs (on discovery vs background sweep) so readers know the exact
implemented mechanism and any fallback behavior.
🪄 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: d33975cb-02aa-436e-8ae6-83a738fcd496
📒 Files selected for processing (1)
docs/session-domain-diag.md
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5613e95 to
08d072c
Compare
Move the Minimal row above the blockquote so the table renders. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
||
| class Socket { | ||
| <<connection>> | ||
| +path: $HOME/.minimal/local/[pid].sock |
There was a problem hiding this comment.
On linux at least, might be worth considering putting this in XDG_RUNTIME_DIR to be XDG compliant, see https://wiki.archlinux.org/title/XDG_Base_Directory
since that dir is created with strict perms and is usually on tmpfs, runtime sockets won't risk polluting the filesystem or leaking to other users, will get cleaned up if the user's session dies. Also more predictable, in ~/.minimal someone may delete it thinking it's a stray config file.
There was a problem hiding this comment.
Good call. XDG_RUNTIME_DIR is the place for this on linux. On macOS it is less clear.
For now, I am going to remove references to definitive socket paths in this PR. It is an implementation detail and specifying it is not my goal right now
There was a problem hiding this comment.
In the current code the socket lives with the provider config at $XDG_STATE_DIR/minimal/providers/<name>/ssh.sock Now would be the best time to change it!
minimal/crates/minimald/src/main.rs
Lines 27 to 64 in 3d4ce47
05c018a to
3d5b3f1
Compare
Definitive socket paths and stale-socket detection are implementation details, outside the scope of the domain model diagram. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3d5b3f1 to
ad5849e
Compare
Adds
docs/session-domain-diag.md: domain model for the session architecture.Covers:
Minimalclient →Socketdiscovery →Providerimplementations (minimald,minvmd, hosted, cloud)minimald; sessions reached via VM-hostedminimaldproxied to host)🤖 Generated with Claude Code
Summary by CodeRabbit