diff --git a/src-tauri/src/config/model.rs b/src-tauri/src/config/model.rs index ab9057d..15be9b6 100644 --- a/src-tauri/src/config/model.rs +++ b/src-tauri/src/config/model.rs @@ -78,7 +78,10 @@ impl Default for AppConfig { pr_cooldown_seconds: 1800, source_kind: SourceKind::default(), engine_kind: EngineKind::default(), - auto_review: true, + // Boot defaults to manual review: scheduler polls/emits but does NOT + // auto-dispatch codex at startup (avoids clashing with other review + // processes). Flip-back guarded by `default_auto_review_is_off`. + auto_review: false, webhook_enabled: false, webhook_port: 8787, webhook_secret: String::new(), @@ -245,7 +248,7 @@ mod tests { pr_cooldown_seconds: 1800, source_kind: SourceKind::default(), engine_kind: EngineKind::default(), - auto_review: true, + auto_review: false, webhook_enabled: false, webhook_port: 8787, webhook_secret: "shh".to_string(), @@ -310,6 +313,17 @@ mod tests { assert_eq!(AppConfig::default().repo_root, ""); } + /// Default-manual-review lock (Medium). A fresh/reset config must NOT + /// auto-dispatch codex review at boot: `auto_review` defaults off, so the + /// scheduler only polls/emits PRs and codex is left to the explicit triggers + /// (`start_review` / `start_codex`). Locking the default here makes that intent + /// machine-checked — a silent flip back to `true` would reintroduce the + /// boot-time review-process clash this guards against, and fails CI first. + #[test] + fn default_auto_review_is_off() { + assert!(!AppConfig::default().auto_review); + } + #[test] fn validate_accepts_existing_repo_root_and_skill() { let config = AppConfig { diff --git a/src/config/OnboardingWizard.vue b/src/config/OnboardingWizard.vue index 06647c7..2f2586c 100644 --- a/src/config/OnboardingWizard.vue +++ b/src/config/OnboardingWizard.vue @@ -34,7 +34,7 @@ const draft = reactive({ prCooldownSeconds: 0, sourceKind: "github", engineKind: "codex", - autoReview: true, + autoReview: false, webhookEnabled: false, webhookPort: 8787, webhookSecret: "", diff --git a/src/config/SettingsView.vue b/src/config/SettingsView.vue index f8ae0a4..1a1ea66 100644 --- a/src/config/SettingsView.vue +++ b/src/config/SettingsView.vue @@ -33,7 +33,7 @@ const draft = reactive({ prCooldownSeconds: 0, sourceKind: "github", engineKind: "codex", - autoReview: true, + autoReview: false, webhookEnabled: false, webhookPort: 8787, webhookSecret: "", diff --git a/src/config/fields.test.ts b/src/config/fields.test.ts index 8e6a95e..a4e8b01 100644 --- a/src/config/fields.test.ts +++ b/src/config/fields.test.ts @@ -25,7 +25,7 @@ function validDraft(): AppConfig { prCooldownSeconds: 1800, sourceKind: "github", engineKind: "codex", - autoReview: true, + autoReview: false, webhookEnabled: false, webhookPort: 8787, webhookSecret: "", diff --git a/src/config/useConfigStore.test.ts b/src/config/useConfigStore.test.ts index f3f1301..dc70ade 100644 --- a/src/config/useConfigStore.test.ts +++ b/src/config/useConfigStore.test.ts @@ -25,7 +25,7 @@ const cfg = (over: Partial = {}): AppConfig => ({ prCooldownSeconds: 1800, sourceKind: "github", engineKind: "codex", - autoReview: true, + autoReview: false, webhookEnabled: false, webhookPort: 8787, webhookSecret: "",