Host: workspaces (always) and encrypted folder sync (AppConfig::with_sync) commands; SiteHooks::backup_sections and backup_section_names say what a backup and sync carry; commands::WORKSPACES, commands::SYNC, testkit::assert_sync_guards

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
CRTkafa 2026-10-01 04:26:03 +07:00
parent 385ca189da
commit 48ff509b15
5 changed files with 435 additions and 5 deletions

View file

@ -243,6 +243,14 @@ pub fn assert_update_guards() {
}
}
/// The workspaces and sync commands' wrappers check their caller first. Runs against the host's source.
pub fn assert_sync_guards() {
let source = include_str!("sync_commands.rs");
for command in commands::WORKSPACES.iter().chain(commands::SYNC) {
assert_guarded(source, command, "shell_only(&webview)?");
}
}
#[cfg(test)]
mod tests {
use super::*;
@ -253,6 +261,7 @@ mod tests {
assert_media_guards();
assert_fonts_guards();
assert_update_guards();
assert_sync_guards();
}
fn caps_with(shell_extra: &str, tab_extra: &str, site_extra: &str) -> Capabilities {