Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a35db4e
feat(storage): implement multi-write v2 metadata partitioning
baojun-zhang Oct 8, 2026
fd4b694
feat(storage): multiwrite meta data file should follow backend encryp…
baojun-zhang Oct 8, 2026
cd8a7f9
feat(storage): remove redundant Redis implementation. adjust segment …
baojun-zhang Oct 9, 2026
bf2c195
feat(storage): remove unused code
baojun-zhang Oct 9, 2026
a9ffe51
feat(storage): uniform const manager && using stream read/write for c…
baojun-zhang Oct 9, 2026
3384f2e
feat(storage): uniform const manager && using stream read/write for c…
baojun-zhang Oct 9, 2026
28393b3
feat(storage): remove meaningless const
baojun-zhang Oct 9, 2026
1943587
feat(storage): remove meaningless const
baojun-zhang Oct 9, 2026
75438df
feat(storage): remove dead code
baojun-zhang Oct 9, 2026
05dc38f
fix(storage): fix checkpoint empty directory issue
baojun-zhang Oct 9, 2026
bf43254
fix(storage): fix checkpoint remain unused directory issue
baojun-zhang Oct 9, 2026
41bbd84
feat(storage): remove unused const
baojun-zhang Oct 9, 2026
578d937
feat(storage): route V1 cleanup through wrapped filesystem
baojun-zhang Oct 9, 2026
d6808e3
feat(storage): refine multiwrite redis key
baojun-zhang Oct 10, 2026
37704b7
feat(plugins): bump memory plugin versions
baojun-zhang Oct 10, 2026
04a9f47
chore: merge main into multiwrite-v2
baojun-zhang Oct 10, 2026
08b9dc2
chore: merge main into multiwrite-v2
baojun-zhang Oct 12, 2026
6197c8f
fix(plugins): 普通文件`rename(a.md -> b.md)` 不再生成`MoveTree`
baojun-zhang Oct 12, 2026
246e93b
fix(plugins): 将根`/_system` 建成一个显式 system account/scope, 避免定时全量复制成本
baojun-zhang Oct 12, 2026
f74f07e
fix(storage): preserve recreated account writes after delete
baojun-zhang Oct 13, 2026
7022f83
chore: merge upstream main into multiwrite-v2
baojun-zhang Oct 13, 2026
a10b2c7
chore(plugins): bump memory plugin versions
baojun-zhang Oct 13, 2026
d4122b6
fix(storage): remove stray multibackend test brace
baojun-zhang Oct 13, 2026
a20757a
fix(storage): make _system dir also execute checkpoint worker
baojun-zhang Oct 13, 2026
f967a69
fix(storage): replay recreated account data after scope delete
baojun-zhang Oct 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions crates/ov_cli/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,20 +510,6 @@ impl HttpClient {
self.post("/api/v1/system/consistency", &body).await
}

pub async fn backend_sync_status(&self, uri: &str) -> Result<serde_json::Value> {
let body = serde_json::json!({
"uri": uri,
});
self.post("/api/v1/system/backend/sync-status", &body).await
}

pub async fn backend_sync_retry(&self, uri: &str) -> Result<serde_json::Value> {
let body = serde_json::json!({
"uri": uri,
});
self.post("/api/v1/system/backend/sync-retry", &body).await
}

/// Download file as raw bytes
pub async fn get_bytes(&self, uri: &str) -> Result<Vec<u8>> {
let url = format!("{}/api/v1/content/download", self.base.base_url);
Expand Down
22 changes: 0 additions & 22 deletions crates/ov_cli/src/commands/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,28 +81,6 @@ pub async fn consistency(
Ok(())
}

pub async fn backend_sync_status(
client: &HttpClient,
uri: &str,
output_format: OutputFormat,
compact: bool,
) -> Result<()> {
let response: serde_json::Value = client.backend_sync_status(uri).await?;
output_success(&response, output_format, compact);
Ok(())
}

pub async fn backend_sync_retry(
client: &HttpClient,
uri: &str,
output_format: OutputFormat,
compact: bool,
) -> Result<()> {
let response: serde_json::Value = client.backend_sync_retry(uri).await?;
output_success(&response, output_format, compact);
Ok(())
}

fn output_consistency_table(response: &serde_json::Value, compact: bool) {
let summary = json!({
"ok": response.get("ok").and_then(|v| v.as_bool()).unwrap_or(false),
Expand Down
6 changes: 0 additions & 6 deletions crates/ov_cli/src/error_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,12 +529,6 @@ fn system_help_command(program: &str, tokens: &[&str]) -> String {
Some("init-key") => format!("{program} system crypto init-key --help"),
_ => format!("{program} system crypto --help"),
},
Some("backend") => match tokens.get(3).copied() {
Some("sync-status" | "sync-retry") => {
format!("{program} system backend {} --help", tokens[3])
}
_ => format!("{program} system backend --help"),
},
Some("wait" | "status" | "health" | "consistency") => {
format!("{program} system {} --help", tokens[2])
}
Expand Down
12 changes: 1 addition & 11 deletions crates/ov_cli/src/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ pub async fn handle_restore(
.await
}

use crate::{SystemBackendCommands, SystemCommands};
use crate::SystemCommands;

pub async fn handle_system(cmd: SystemCommands, ctx: CliContext) -> Result<()> {
let client = ctx.get_client();
Expand All @@ -440,16 +440,6 @@ pub async fn handle_system(cmd: SystemCommands, ctx: CliContext) -> Result<()> {
commands::system::consistency(&client, &uri, ctx.output_format, ctx.compact).await
}
SystemCommands::Crypto { action } => commands::crypto::handle_crypto(action).await,
SystemCommands::Backend { action } => match action {
SystemBackendCommands::SyncStatus { uri } => {
commands::system::backend_sync_status(&client, &uri, ctx.output_format, ctx.compact)
.await
}
SystemBackendCommands::SyncRetry { uri } => {
commands::system::backend_sync_retry(&client, &uri, ctx.output_format, ctx.compact)
.await
}
},
}
}

Expand Down
41 changes: 2 additions & 39 deletions crates/ov_cli/src/help_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ const COMMAND_HELP_SPECS: &[CommandHelpSpec] = &[
},
CommandHelpSpec {
path: &["system"],
purpose: "Run server utility, health, consistency, backend sync, and crypto commands.",
purpose: "Run server utility, health, consistency, and crypto commands.",
examples: &[
HelpItem {
label: "ov system health",
Expand All @@ -1350,34 +1350,12 @@ const COMMAND_HELP_SPECS: &[CommandHelpSpec] = &[
label: "ov system consistency viking://projects/acme",
description: "Check filesystem/vector consistency.",
},
HelpItem {
label: "ov system backend sync-status viking://projects/acme",
description: "Inspect multi-write backend sync lag.",
},
],
next_steps: &[HelpItem {
label: "ov status",
description: "Use the standard status view.",
}],
},
CommandHelpSpec {
path: &["system", "backend"],
purpose: "Inspect and repair multi-write backend sync state.",
examples: &[
HelpItem {
label: "ov system backend sync-status viking://resources",
description: "Show pending and acknowledged backend sync state.",
},
HelpItem {
label: "ov system backend sync-retry viking://resources",
description: "Retry lagging backend sync targets.",
},
],
next_steps: &[HelpItem {
label: "ov system backend sync-status <uri>",
description: "Inspect the subtree again after retry.",
}],
},
CommandHelpSpec {
path: &["reindex"],
purpose: "Reindex semantic/vector artifacts for a URI.",
Expand Down Expand Up @@ -2992,7 +2970,6 @@ mod tests {
fn curated_help_lists_timeout_for_waiting_commands() {
for args in [
["ov", "add-resource", "--help"],
["ov", "add-skill", "--help"],
["ov", "rm", "--help"],
["ov", "write", "--help"],
] {
Expand Down Expand Up @@ -3214,7 +3191,7 @@ mod tests {
("admin", "Manage accounts, users, roles, and API keys."),
(
"system",
"Run server utility, health, consistency, backend sync, and crypto commands.",
"Run server utility, health, consistency, and crypto commands.",
),
("observer", "Inspect specific OpenViking server subsystems."),
] {
Expand Down Expand Up @@ -3281,20 +3258,6 @@ mod tests {
);
}

#[test]
fn supported_nested_curated_help_still_renders() {
let rendered = strip_ansi(
&render_command_help_request(&os_args(&["ov", "system", "backend", "--help"]))
.expect("system backend help should render curated nested help"),
);

assert!(rendered.contains("ov system backend"));
assert!(rendered.contains("sync-status"));
assert!(rendered.contains("sync-retry"));
assert!(!rendered.contains("help Print this message"));
assert!(rendered.contains("--sudo"));
}

#[test]
fn prefixed_help_with_positional_value_renders_curated_command_help() {
let rendered = strip_ansi(
Expand Down
61 changes: 1 addition & 60 deletions crates/ov_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1589,29 +1589,6 @@ enum SystemCommands {
#[command(subcommand)]
action: commands::crypto::CryptoCommands,
},
/// Backend sync inspection and repair commands
Backend {
#[command(subcommand)]
action: SystemBackendCommands,
},
}

#[derive(Subcommand)]
enum SystemBackendCommands {
/// Show multi-write backend sync status for a URI subtree
#[command(name = "sync-status")]
SyncStatus {
/// Viking URI to inspect
#[arg(value_name = "uri")]
uri: String,
},
/// Retry pending multi-write backend sync work for a URI subtree
#[command(name = "sync-retry")]
SyncRetry {
/// Viking URI to repair
#[arg(value_name = "uri")]
uri: String,
},
}

#[derive(Subcommand)]
Expand Down Expand Up @@ -2544,14 +2521,6 @@ fn plain_help_misuse(args: &[OsString]) -> Option<PlainHelpMisuse> {
{
path.push(watch_subcommand.to_string());
}
if command == "system"
&& path.get(1).is_some_and(|token| token == "backend")
&& let Some(backend_subcommand) =
tokens.get(2).map(|token| canonical_plain_help_token(token))
&& backend_subcommand != "help"
{
path.push(backend_subcommand.to_string());
}
return Some(PlainHelpMisuse {
help_command: prefixed_help_command(&path),
});
Expand Down Expand Up @@ -2763,10 +2732,6 @@ fn known_task_command_requires_config(tokens: &[String]) -> bool {
fn known_system_command_requires_config(tokens: &[String]) -> bool {
match tokens.get(1).map(String::as_str) {
Some("wait" | "status" | "health" | "consistency") => true,
Some("backend") => matches!(
tokens.get(2).map(String::as_str),
None | Some("sync-status" | "sync-retry")
),
Some("crypto") => matches!(tokens.get(2).map(String::as_str), None | Some("init-key")),
_ => false,
}
Expand Down Expand Up @@ -4032,7 +3997,7 @@ mod tests {
};
use crate::config::{Config, DEFAULT_CUSTOM_URL};
use crate::output::OutputFormat;
use crate::{AdminCommands, SystemBackendCommands, SystemCommands, handlers};
use crate::{AdminCommands, handlers};
use clap::{CommandFactory, Parser};
use std::ffi::OsString;

Expand Down Expand Up @@ -4382,22 +4347,6 @@ mod tests {
}
}

#[test]
fn cli_parses_system_backend_sync_status() {
let cli = Cli::try_parse_from(["ov", "system", "backend", "sync-status", "viking://a"])
.expect("system backend sync-status should parse");

match cli.command {
Commands::System { action } => match action {
SystemCommands::Backend { action } => match action {
SystemBackendCommands::SyncStatus { uri } => assert_eq!(uri, "viking://a"),
_ => panic!("expected backend sync-status command"),
},
_ => panic!("expected system backend command"),
},
_ => panic!("expected system command"),
}
}

#[test]
fn server_commands_require_existing_cli_config() {
Expand Down Expand Up @@ -4623,7 +4572,6 @@ mod tests {
&["ov", "config", "validate"],
&["ov", "config", "show"],
&["ov", "system", "consistency"],
&["ov", "system", "backend", "sync-status"],
&["ov", "admin", "list-accounts"],
] {
assert!(
Expand Down Expand Up @@ -4708,9 +4656,6 @@ mod tests {
&["ov", "system", "status"],
&["ov", "system", "health"],
&["ov", "system", "consistency"],
&["ov", "system", "backend"],
&["ov", "system", "backend", "sync-status"],
&["ov", "system", "backend", "sync-retry"],
&["ov", "system", "crypto"],
&["ov", "system", "crypto", "init-key"],
&["ov", "session", "new"],
Expand Down Expand Up @@ -5628,10 +5573,6 @@ mod tests {
vec!["ov", "system", "consistency", "help"],
"ov system consistency --help",
),
(
vec!["ov", "system", "backend", "sync-status", "help"],
"ov system backend sync-status --help",
),
] {
let misuse = plain_help_misuse(&os_args(&args))
.unwrap_or_else(|| panic!("{args:?} should be plain-help misuse"));
Expand Down
Loading
Loading