feat(core): add hosted review foundation#122
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds the initial “hosted review mode” foundation in claurst-core and the Rust CLI, aiming to support multi-tenant hosted review runs by gating which instruction scopes are loaded and by introducing hosted-mode path/metadata primitives for downstream isolation.
Changes:
- Adds hosted review mode configuration and detection (
--hosted-review,COVEN_CODE_HOSTED_REVIEW,config.hostedReview.enabled) plus runtime mode helpers. - Introduces hosted review scope primitives and metadata markers on sessions/transcripts, along with mode-aware transcript/memory path helpers and targeted unit tests.
- Updates context loading to skip user memory in hosted mode by default and to prepend a hosted-mode marker listing loaded AGENTS scopes; documents hosted review behavior.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src-rust/crates/tui/src/app.rs | Minor formatting cleanup in slash command list and nearby whitespace. |
| src-rust/crates/core/src/session_storage.rs | Adds hosted-review transcript marker field and introduces mode/scope-aware transcript path helpers + tests. |
| src-rust/crates/core/src/memdir.rs | Adds mode/scope-aware hosted durable memory path helpers + tests. |
| src-rust/crates/core/src/lib.rs | Wires hosted review config into Config, adds runtime mode helpers, and gates AGENTS loading with hosted marker output. |
| src-rust/crates/core/src/hosted_review.rs | New module defining RuntimeMode, hosted config, scope type, and env parsing. |
| src-rust/crates/core/src/claudemd.rs | Adds MemoryLoadOptions and gates managed/user scope loading for hosted mode + tests. |
| src-rust/crates/core/src/auth_store.rs | Formatting-only adjustment in a test assertion. |
| src-rust/crates/commands/src/stats.rs | Updates transcript test fixtures to include the new hosted-review marker field. |
| src-rust/crates/cli/src/main.rs | Adds --hosted-review flag, threads runtime mode into context building, and marks hosted sessions in metadata. |
| docs/configuration.md | Documents hosted review mode configuration and high-level behavior. |
| docs/advanced.md | Adds an advanced documentation section describing hosted review memory isolation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+250
to
+252
| /// Run with hosted review memory isolation | ||
| #[arg(long = "hosted-review", env = "COVEN_CODE_HOSTED_REVIEW", action = ArgAction::SetTrue)] | ||
| hosted_review: bool, |
Comment on lines
+278
to
+282
| pub fn transcript_path_for_mode( | ||
| project_root: &Path, | ||
| session_id: &str, | ||
| mode: RuntimeMode, | ||
| scope: Option<&HostedReviewScope>, |
Comment on lines
+399
to
+403
| fn hosted_memory_path(scope: &HostedReviewScope) -> PathBuf { | ||
| crate::config::Settings::config_dir() | ||
| .join("hosted-review") | ||
| .join("tenants") | ||
| .join(sanitize_path_component(&scope.tenant_id)) |
Comment on lines
+129
to
+133
| When hosted review mode is active, Coven Code skips user-scope memory | ||
| (`~/.coven-code/AGENTS.md` and `~/.coven-code/CLAUDE.md`) by default, marks | ||
| new session artifacts as hosted review artifacts, and requires a tenant plus | ||
| canonical repository identity before resolving hosted durable memory paths. | ||
| Local-personal mode remains the default and continues to load user memory. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Foundation track for hosted-review mode, related to tracking issue #119 and the hosted review follow-up work called out in #97 and #100.
This PR adds the initial runtime/config foundation only. Follow-up PRs can build on this for the remaining identity, trust, metadata, and hygiene tracks from the hosted-review audit.
Changes
COVEN_CODE_HOSTED_REVIEW/--hosted-review.Verification
cargo fmt --allcargo check --workspacecargo clippy --workspace --all-targets -- -D warningscargo test --workspaceNotes
The branch was rebased onto current
OpenCoven/coven-codemainbefore this PR. A literal rebase ontoKuberwastaken/claurstupstream/mainwould replay the OpenCoven fork history into this PR, so this branch targets the current OpenCoven fork main as requested.