Skip to content

feat(core): add hosted review foundation#122

Merged
BunsDev merged 1 commit into
mainfrom
cody/hosted-review-foundation
Jun 28, 2026
Merged

feat(core): add hosted review foundation#122
BunsDev merged 1 commit into
mainfrom
cody/hosted-review-foundation

Conversation

@BunsDev

@BunsDev BunsDev commented Jun 28, 2026

Copy link
Copy Markdown
Member

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

  • Adds a hosted-review runtime mode behind config and COVEN_CODE_HOSTED_REVIEW / --hosted-review.
  • Adds hosted-review scope handling for tenant/repo durable namespaces.
  • Keeps project memory available while disabling user memory and managed rules in hosted-review context loading by default.
  • Prepends a Hosted Review Mode marker that records loaded AGENTS scopes.
  • Marks hosted-review session/transcript metadata for downstream handling.
  • Documents hosted-review configuration and runtime behavior.

Verification

  • cargo fmt --all
  • cargo check --workspace
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace

Notes

The branch was rebased onto current OpenCoven/coven-code main before this PR. A literal rebase onto Kuberwastaken/claurst upstream/main would replay the OpenCoven fork history into this PR, so this branch targets the current OpenCoven fork main as requested.

@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Jun 28, 2026 7:27am

@BunsDev BunsDev marked this pull request as ready for review June 28, 2026 08:47
Copilot AI review requested due to automatic review settings June 28, 2026 08:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread docs/configuration.md
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.
@BunsDev BunsDev merged commit 84c761f into main Jun 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants