Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

refactor(approvals): move approval handlers to config module (#2286)

Maximilian Roos80a4b0ba86f3
diff --git a/src/commands/config/approvals.rs b/src/commands/config/approvals.rs
new file mode 100644
index 000000000..20d8aea1d
--- /dev/null
+++ b/src/commands/config/approvals.rs
@@ -0,0 +1,133 @@
+//! Approvals commands for `wt config approvals` subcommand.
+//!
+//! - `add_approvals` - Approve all project commands (hooks and aliases)
+//! - `clear_approvals` - Clear approved commands
+
+use anyhow::Context;
+use strum::IntoEnumIterator;
+use worktrunk::HookType;
+use worktrunk::config::Approvals;
+use worktrunk::git::{GitError, Repository};
+use worktrunk::styling::{eprintln, info_message, success_message};
+
+use crate::commands::command_approval::approve_command_batch;
+use crate::commands::project_config::{collect_commands_for_aliases, collect_commands_for_hooks};
+
+/// Handle `wt config approvals add` command - approve all hook and alias commands in the project
+pub fn add_approvals(show_all: bool) -> anyhow::Result<()> {
+ let repo = Repository::current()?;
+ let project_id = repo.project_identifier()?;
+ let approvals = Approvals::load().context("Failed to load approvals")?;
+
+ // Load project config (error if missing - this command requires it)
+ let config_path = repo
+ .project_config_path()?
+ .context("Cannot determine project config location — no worktree found")?;
+ let project_config = repo
+ .load_project_config()?
+ .ok_or(GitError::ProjectConfigNotFound { config_path })?;
+
+ // Collect all commands from the project config: hooks first (lifecycle order),
+ // then aliases (alphabetical via BTreeMap).
+ let all_hooks: Vec<_> = HookType::iter().collect();
+ let mut commands = collect_commands_for_hooks(&project_config, &all_hooks);
+ commands.extend(collect_commands_for_aliases(&project_config));
+
+ if commands.is_empty() {
+ eprintln!("{}", info_message("No commands configured in project"));
+ return Ok(());
+ }
+
+ // Filter to only unapproved commands (unless --all is specified)
+ let commands_to_approve = if !show_all {
+ let unapproved: Vec<_> = commands
+ .into_iter()
+ .filter(|cmd| !approvals.is_command_approved(&project_id, &cmd.command.template))
+ .collect();
+
+ if unapproved.is_empty() {
+ eprintln!("{}", info_message("All commands already approved"));
+ return Ok(());
+ }
+
+ unapproved
+ } else {
+ commands
+ };
+
+ // Call the approval prompt (yes=false to require interactive approval and save)
+ // When show_all=true, we've already included all commands in commands_to_approve
+ // When show_all=false, we've already filtered to unapproved commands
+ // So we pass skip_approval_filter=true to prevent double-filtering
+ let approved =
+ approve_command_batch(&commands_to_approve, &project_id, &approvals, false, true)?;
+
+ // Show result
+ if approved {
+ eprintln!("{}", success_message("Commands approved & saved to config"));
+ } else {
+ eprintln!("{}", info_message("Commands declined"));
+ }
+
+ Ok(())
+}
+
+/// Handle `wt config approvals clear` command - clear approved commands
+pub fn clear_approvals(global: bool) -> anyhow::Result<()> {
+ let mut approvals = Approvals::load().context("Failed to load approvals")?;
+
+ if global {
+ // Count projects with approvals before clearing
+ let project_count = approvals
+ .projects()
+ .filter(|(_, cmds)| !cmds.is_empty())
+ .count();
+
+ if project_count == 0 {
+ eprintln!("{}", info_message("No approvals to clear"));
+ return Ok(());
+ }
+
+ approvals
+ .clear_all(None)
+ .context("Failed to clear approvals")?;
+
+ eprintln!(
+ "{}",
+ success_message(format!(
+ "Cleared approvals for {project_count} project{}",
+ if project_count == 1 { "" } else { "s" }
+ ))
+ );
+ } else {
+ // Clear approvals for current project (default)
+ let repo = Repository::current()?;
+ let project_id = repo.project_identifier()?;
+
+ // Count approvals before clearing
+ let approval_count = approvals
+ .projects()
+ .find(|(id, _)| *id == project_id)
+ .map(|(_, cmds)| cmds.len())
+ .unwrap_or(0);
+
+ if approval_count == 0 {
+ eprintln!("{}", info_message("No approvals to clear for this project"));
+ return Ok(());
+ }
+
+ approvals
+ .revoke_project(&project_id, None)
+ .context("Failed to clear project approvals")?;
+
+ eprintln!(
+ "{}",
+ success_message(format!(
+ "Cleared {approval_count} approval{} for this project",
+ if approval_count == 1 { "" } else { "s" }
+ ))
+ );
+ }
+
+ Ok(())
+}
diff --git a/src/commands/config/mod.rs b/src/commands/config/mod.rs
index 0294943ca..dd5c79413 100644
--- a/src/commands/config/mod.rs
+++ b/src/commands/config/mod.rs
@@ -2,6 +2,7 @@
//!
//! Commands for managing user config, project config, state, and hints.
+mod approvals;
mod create;
mod hints;
pub mod opencode;
@@ -11,6 +12,7 @@ mod state;
mod update;
// Re-export public functions
+pub use approvals::{add_approvals, clear_approvals};
pub use create::handle_config_create;
pub use hints::{handle_hints_clear, handle_hints_get};
pub use opencode::{handle_opencode_install, handle_opencode_uninstall};
diff --git a/src/commands/hook_commands.rs b/src/commands/hook_commands.rs
index cf47aba64..943ac36c0 100644
--- a/src/commands/hook_commands.rs
+++ b/src/commands/hook_commands.rs
@@ -2,8 +2,6 @@
//!
//! This module contains:
//! - `run_hook` - Execute a specific hook type
-//! - `add_approvals` - Approve all project commands
-//! - `clear_approvals` - Clear approved commands
//! - `handle_hook_show` - Display configured hooks
use std::collections::HashMap;
@@ -14,11 +12,11 @@ use color_print::cformat;
use strum::IntoEnumIterator;
use worktrunk::HookType;
use worktrunk::config::{Approvals, CommandConfig, ProjectConfig, UserConfig};
-use worktrunk::git::{GitError, Repository};
+use worktrunk::git::Repository;
use worktrunk::path::format_path_for_display;
use worktrunk::styling::{
INFO_SYMBOL, PROMPT_SYMBOL, eprintln, format_bash_with_gutter, format_heading, hint_message,
- info_message, success_message, warning_message,
+ info_message, warning_message,
};
use super::command_approval::approve_hooks_filtered;
@@ -32,7 +30,6 @@ use super::hooks::{
HookCommandSpec, check_name_filter_matched, count_sourced_commands, prepare_background_hooks,
prepare_sourced_steps, run_hook_with_filter, spawn_hook_pipeline,
};
-use super::project_config::{collect_commands_for_aliases, collect_commands_for_hooks};
fn run_filtered_hook(
ctx: &CommandContext,
@@ -388,127 +385,6 @@ pub fn run_hook(
}
}
-/// Handle `wt config approvals add` command - approve all hook and alias commands in the project
-pub fn add_approvals(show_all: bool) -> anyhow::Result<()> {
- use super::command_approval::approve_command_batch;
-
- let repo = Repository::current()?;
- let project_id = repo.project_identifier()?;
- let approvals = Approvals::load().context("Failed to load approvals")?;
-
- // Load project config (error if missing - this command requires it)
- let config_path = repo
- .project_config_path()?
- .context("Cannot determine project config location — no worktree found")?;
- let project_config = repo
- .load_project_config()?
- .ok_or(GitError::ProjectConfigNotFound { config_path })?;
-
- // Collect all commands from the project config: hooks first (lifecycle order),
- // then aliases (alphabetical via BTreeMap).
- let all_hooks: Vec<_> = HookType::iter().collect();
- let mut commands = collect_commands_for_hooks(&project_config, &all_hooks);
- commands.extend(collect_commands_for_aliases(&project_config));
-
- if commands.is_empty() {
- eprintln!("{}", info_message("No commands configured in project"));
- return Ok(());
- }
-
- // Filter to only unapproved commands (unless --all is specified)
- let commands_to_approve = if !show_all {
- let unapproved: Vec<_> = commands
- .into_iter()
- .filter(|cmd| !approvals.is_command_approved(&project_id, &cmd.command.template))
- .collect();
-
- if unapproved.is_empty() {
- eprintln!("{}", info_message("All commands already approved"));
- return Ok(());
- }
-
- unapproved
- } else {
- commands
- };
-
- // Call the approval prompt (yes=false to require interactive approval and save)
- // When show_all=true, we've already included all commands in commands_to_approve
- // When show_all=false, we've already filtered to unapproved commands
- // So we pass skip_approval_filter=true to prevent double-filtering
- let approved =
- approve_command_batch(&commands_to_approve, &project_id, &approvals, false, true)?;
-
- // Show result
- if approved {
- eprintln!("{}", success_message("Commands approved & saved to config"));
- } else {
- eprintln!("{}", info_message("Commands declined"));
- }
-
- Ok(())
-}
-
-/// Handle `wt config approvals clear` command - clear approved commands
-pub fn clear_approvals(global: bool) -> anyhow::Result<()> {
- let mut approvals = Approvals::load().context("Failed to load approvals")?;
-
- if global {
- // Count projects with approvals before clearing
- let project_count = approvals
- .projects()
- .filter(|(_, cmds)| !cmds.is_empty())
- .count();
-
- if project_count == 0 {
- eprintln!("{}", info_message("No approvals to clear"));
- return Ok(());
- }
-
- approvals
- .clear_all(None)
- .context("Failed to clear approvals")?;
-
- eprintln!(
- "{}",
- success_message(format!(
- "Cleared approvals for {project_count} project{}",
- if project_count == 1 { "" } else { "s" }
- ))
- );
- } else {
- // Clear approvals for current project (default)
- let repo = Repository::current()?;
- let project_id = repo.project_identifier()?;
-
- // Count approvals before clearing
- let approval_count = approvals
- .projects()
- .find(|(id, _)| *id == project_id)
- .map(|(_, cmds)| cmds.len())
- .unwrap_or(0);
-
- if approval_count == 0 {
- eprintln!("{}", info_message("No approvals to clear for this project"));
- return Ok(());
- }
-
- approvals
- .revoke_project(&project_id, None)
- .context("Failed to clear project approvals")?;
-
- eprintln!(
- "{}",
- success_message(format!(
- "Cleared {approval_count} approval{} for this project",
- if approval_count == 1 { "" } else { "s" }
- ))
- );
- }
-
- Ok(())
-}
-
/// Handle `wt hook show` command - display configured hooks
pub fn handle_hook_show(hook_type_filter: Option<&str>, expanded: bool) -> anyhow::Result<()> {
use crate::help_pager::show_help_in_pager;
diff --git a/src/commands/mod.rs b/src/commands/mod.rs
index 1364aec60..b540db973 100644
--- a/src/commands/mod.rs
+++ b/src/commands/mod.rs
@@ -31,11 +31,12 @@ pub(crate) use alias::{
AliasOptions, HelpContext, alias_names_for_suggestions, augment_help, step_alias, try_alias,
};
pub(crate) use config::{
- handle_claude_install, handle_claude_install_statusline, handle_claude_uninstall,
- handle_config_create, handle_config_show, handle_config_update, handle_hints_clear,
- handle_hints_get, handle_logs_list, handle_opencode_install, handle_opencode_uninstall,
- handle_state_clear, handle_state_clear_all, handle_state_get, handle_state_set,
- handle_state_show, handle_vars_clear, handle_vars_get, handle_vars_list, handle_vars_set,
+ add_approvals, clear_approvals, handle_claude_install, handle_claude_install_statusline,
+ handle_claude_uninstall, handle_config_create, handle_config_show, handle_config_update,
+ handle_hints_clear, handle_hints_get, handle_logs_list, handle_opencode_install,
+ handle_opencode_uninstall, handle_state_clear, handle_state_clear_all, handle_state_get,
+ handle_state_set, handle_state_show, handle_vars_clear, handle_vars_get, handle_vars_list,
+ handle_vars_set,
};
pub(crate) use configure_shell::{
handle_configure_shell, handle_show_theme, handle_unconfigure_shell,
@@ -44,7 +45,7 @@ pub(crate) use custom::handle_custom_command;
pub(crate) use eval::step_eval;
pub(crate) use for_each::step_for_each;
pub(crate) use handle_switch::{SwitchOptions, handle_switch};
-pub(crate) use hook_commands::{add_approvals, clear_approvals, handle_hook_show, run_hook};
+pub(crate) use hook_commands::{handle_hook_show, run_hook};
pub(crate) use init::{handle_completions, handle_init};
pub(crate) use list::handle_list;
pub(crate) use merge::{MergeOptions, handle_merge};
diff --git a/tests/integration_tests/approval_pty.rs b/tests/integration_tests/approval_pty.rs
index 469ecc025..375ca0dca 100644
--- a/tests/integration_tests/approval_pty.rs
+++ b/tests/integration_tests/approval_pty.rs
@@ -502,3 +502,44 @@ command = "cat >/dev/null && echo 'feat: squashed commit message'"
"Should indicate squash proceeds without hooks. Output:\n{output}"
);
}
+
+/// `wt config approvals add` accepts the prompt — covers the success branch of
+/// `add_approvals` after `approve_command_batch` returns Ok(true).
+#[rstest]
+fn test_config_approvals_add_accept(repo: TestRepo) {
+ repo.run_git(&["remote", "remove", "origin"]);
+ repo.write_project_config(r#"pre-start = "echo 'test command'""#);
+ repo.commit("Add config");
+
+ let env_vars = repo.test_env_vars();
+ let (output, exit_code) =
+ exec_wt_in_pty(&repo, &["config", "approvals", "add"], &env_vars, "y\n");
+
+ assert_eq!(exit_code, 0, "add should exit cleanly. Output:\n{output}");
+ assert!(
+ output.contains("Commands approved"),
+ "Should show approval success. Output:\n{output}"
+ );
+}
+
+/// `wt config approvals add` declines the prompt — covers the declined branch
+/// of `add_approvals` after `approve_command_batch` returns Ok(false).
+#[rstest]
+fn test_config_approvals_add_decline(repo: TestRepo) {
+ repo.run_git(&["remote", "remove", "origin"]);
+ repo.write_project_config(r#"pre-start = "echo 'test command'""#);
+ repo.commit("Add config");
+
+ let env_vars = repo.test_env_vars();
+ let (output, exit_code) =
+ exec_wt_in_pty(&repo, &["config", "approvals", "add"], &env_vars, "n\n");
+
+ assert_eq!(
+ exit_code, 0,
+ "decline should exit cleanly. Output:\n{output}"
+ );
+ assert!(
+ output.contains("Commands declined"),
+ "Should show decline message. Output:\n{output}"
+ );
+}
diff --git a/tests/integration_tests/approvals.rs b/tests/integration_tests/approvals.rs
index 932d50f38..97ec016c1 100644
--- a/tests/integration_tests/approvals.rs
+++ b/tests/integration_tests/approvals.rs
@@ -1,11 +1,14 @@
//! Integration tests for add-approvals and clear-approvals commands
use crate::common::{
- BareRepoTest, TestRepo, TestRepoBase, make_snapshot_cmd, repo, setup_snapshot_settings,
- setup_temp_snapshot_settings, wt_command,
+ BareRepoTest, TestRepo, TestRepoBase, make_snapshot_cmd, repo, set_temp_home_env,
+ setup_snapshot_settings, setup_snapshot_settings_with_home, setup_temp_snapshot_settings,
+ temp_home, wt_command,
};
use insta_cmd::assert_cmd_snapshot;
use rstest::rstest;
+use std::fs;
+use tempfile::TempDir;
use worktrunk::config::Approvals;
/// Helper to snapshot add-approvals command
@@ -179,6 +182,45 @@ fn test_clear_approvals_after_clear(repo: TestRepo) {
snapshot_clear_approvals("clear_approvals_after_clear", &repo, &[]);
}
+/// `clear` reads approvals from the legacy `[projects.X]` section in `config.toml`
+/// when `approvals.toml` is absent, and clears them. Exercises the
+/// `Approvals::load` fallback path documented in `src/config/approvals.rs`.
+#[rstest]
+fn test_clear_approvals_legacy_config_storage(repo: TestRepo, temp_home: TempDir) {
+ // Remove origin so project_identifier uses full canonical path
+ repo.run_git(&["remote", "remove", "origin"]);
+
+ // Get the canonical path for the project identifier (escaped for TOML)
+ let project_id_str = repo.project_id();
+
+ // Write approved commands as a sibling config.toml of the test approvals path.
+ // The fallback reads config.toml from the same directory as approvals.toml.
+ let config_path = repo.test_approvals_path().with_file_name("config.toml");
+ fs::write(
+ &config_path,
+ format!(
+ r#"worktree-path = "../{{{{ repo }}}}.{{{{ branch }}}}"
+
+[projects.'{project_id_str}']
+approved-commands = ["cargo build", "cargo test", "npm install"]
+"#
+ ),
+ )
+ .unwrap();
+
+ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ repo.configure_wt_cmd(&mut cmd);
+ cmd.env("WORKTRUNK_CONFIG_PATH", &config_path);
+ cmd.args(["config", "approvals", "clear"])
+ .current_dir(repo.root_path());
+ set_temp_home_env(&mut cmd, temp_home.path());
+
+ assert_cmd_snapshot!("clear_approvals_legacy_config_storage", cmd);
+ });
+}
+
#[rstest]
fn test_clear_approvals_multiple_approvals(repo: TestRepo) {
// Remove origin so project_id uses directory name (matches test expectation)
@@ -228,16 +270,18 @@ lint = "echo 'third'"
#[rstest]
fn test_add_approvals_all_already_approved(repo: TestRepo) {
- let project_id = format!("{}/origin", repo.root_path().display());
+ // Remove origin so project_identifier uses the canonical worktree path —
+ // matches what `Repository::project_identifier` computes at runtime.
+ repo.run_git(&["remote", "remove", "origin"]);
repo.commit("Initial commit");
repo.write_project_config(r#"post-create = "echo 'test'""#);
repo.commit("Add config");
- // Manually approve the command
+ // Manually approve the command using the same project id wt will compute.
let mut approvals = Approvals::default();
approvals
.approve_command(
- project_id,
+ repo.project_id(),
"echo 'test'".to_string(),
Some(repo.test_approvals_path()),
)
diff --git a/tests/integration_tests/hook_show.rs b/tests/integration_tests/hook_show.rs
index dd58f79b7..ef110d258 100644
--- a/tests/integration_tests/hook_show.rs
+++ b/tests/integration_tests/hook_show.rs
@@ -313,73 +313,6 @@ lint = "pre-commit run"
});
}
-/// Test `wt config approvals clear` when no approvals exist for the project.
-#[rstest]
-fn test_hook_clear_no_approvals(repo: TestRepo, temp_home: TempDir) {
- // Remove origin so project_identifier uses full canonical path
- repo.run_git(&["remote", "remove", "origin"]);
-
- // Create user config without any project approvals
- let global_config_dir = temp_home.path().join(".config").join("worktrunk");
- fs::create_dir_all(&global_config_dir).unwrap();
- let config_path = global_config_dir.join("config.toml");
- fs::write(
- &config_path,
- r#"worktree-path = "../{{ repo }}.{{ branch }}"
-"#,
- )
- .unwrap();
-
- let settings = setup_snapshot_settings_with_home(&repo, &temp_home);
- settings.bind(|| {
- let mut cmd = wt_command();
- repo.configure_wt_cmd(&mut cmd);
- cmd.env("WORKTRUNK_CONFIG_PATH", &config_path);
- cmd.args(["config", "approvals", "clear"])
- .current_dir(repo.root_path());
- set_temp_home_env(&mut cmd, temp_home.path());
-
- assert_cmd_snapshot!(cmd);
- });
-}
-
-/// Test `wt config approvals clear` when project has approvals to clear.
-#[rstest]
-fn test_hook_clear_with_approvals(repo: TestRepo, temp_home: TempDir) {
- // Remove origin so project_identifier uses full canonical path
- repo.run_git(&["remote", "remove", "origin"]);
-
- // Get the canonical path for the project identifier (escaped for TOML)
- let project_id_str = repo.project_id();
-
- // Write approved commands as a sibling config.toml of the test approvals path.
- // The fallback reads config.toml from the same directory as approvals.toml.
- let config_path = repo.test_approvals_path().with_file_name("config.toml");
- fs::write(
- &config_path,
- format!(
- r#"worktree-path = "../{{{{ repo }}}}.{{{{ branch }}}}"
-
-[projects.'{project_id_str}']
-approved-commands = ["cargo build", "cargo test", "npm install"]
-"#
- ),
- )
- .unwrap();
-
- let settings = setup_snapshot_settings_with_home(&repo, &temp_home);
- settings.bind(|| {
- let mut cmd = wt_command();
- repo.configure_wt_cmd(&mut cmd);
- cmd.env("WORKTRUNK_CONFIG_PATH", &config_path);
- cmd.args(["config", "approvals", "clear"])
- .current_dir(repo.root_path());
- set_temp_home_env(&mut cmd, temp_home.path());
-
- assert_cmd_snapshot!(cmd);
- });
-}
-
/// Test that syntax errors in templates are shown (not swallowed) with --expanded.
#[rstest]
fn test_hook_show_expanded_syntax_error(repo: TestRepo, temp_home: TempDir) {
diff --git a/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_already_approved.snap b/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_already_approved.snap
index 342158499..2bee2d915 100644
--- a/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_already_approved.snap
+++ b/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_already_approved.snap
@@ -40,15 +40,11 @@ info:
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
---
-success: false
-exit_code: 1
+success: true
+exit_code: 0
----- stdout -----
----- stderr -----
▲ Project config: post-create hook is deprecated in favor of pre-start
↳ To see details, run wt config show; to apply updates, run wt config update
-▲ origin needs approval to execute 1 command:
-○ pre-start:
-  echo 'test'
-✗ Cannot prompt for approval in non-interactive environment
-↳ To skip prompts in CI/CD, add --yes; to pre-approve commands, run wt config approvals add
+○ All commands already approved
diff --git a/tests/snapshots/integration__integration_tests__hook_show__hook_clear_with_approvals.snap b/tests/snapshots/integration__integration_tests__approvals__clear_approvals_legacy_config_storage.snap
similarity index 96%
rename from tests/snapshots/integration__integration_tests__hook_show__hook_clear_with_approvals.snap
rename to tests/snapshots/integration__integration_tests__approvals__clear_approvals_legacy_config_storage.snap
index 6549c2ec5..eccf55fac 100644
--- a/tests/snapshots/integration__integration_tests__hook_show__hook_clear_with_approvals.snap
+++ b/tests/snapshots/integration__integration_tests__approvals__clear_approvals_legacy_config_storage.snap
@@ -1,5 +1,5 @@
---
-source: tests/integration_tests/hook_show.rs
+source: tests/integration_tests/approvals.rs
info:
program: wt
args:
diff --git a/tests/snapshots/integration__integration_tests__hook_show__hook_clear_no_approvals.snap b/tests/snapshots/integration__integration_tests__hook_show__hook_clear_no_approvals.snap
deleted file mode 100644
index cf0cce326..000000000
--- a/tests/snapshots/integration__integration_tests__hook_show__hook_clear_no_approvals.snap
+++ /dev/null
@@ -1,48 +0,0 @@
----
-source: tests/integration_tests/hook_show.rs
-info:
- program: wt
- args:
- - config
- - approvals
- - clear
- env:
- APPDATA: "[TEST_CONFIG_HOME]"
- CLICOLOR_FORCE: "1"
- COLUMNS: "500"
- GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
- GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
- GIT_CONFIG_SYSTEM: /dev/null
- GIT_EDITOR: ""
- GIT_TERMINAL_PROMPT: "0"
- HOME: "[TEST_HOME]"
- LANG: C
- LC_ALL: C
- MOCK_CONFIG_DIR: "[MOCK_CONFIG_DIR]"
- NO_COLOR: ""
- OPENCODE_CONFIG_DIR: "[TEST_OPENCODE_CONFIG]"
- PATH: "[PATH]"
- PSModulePath: ""
- RUST_LOG: warn
- SHELL: ""
- TERM: alacritty
- USERPROFILE: "[TEST_HOME]"
- WORKTRUNK_APPROVALS_PATH: "[TEST_APPROVALS]"
- WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
- WORKTRUNK_SYSTEM_CONFIG_PATH: "[TEST_SYSTEM_CONFIG]"
- WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
- WORKTRUNK_TEST_DELAYED_STREAM_MS: "-1"
- WORKTRUNK_TEST_EPOCH: "1735776000"
- WORKTRUNK_TEST_NUSHELL_ENV: "0"
- WORKTRUNK_TEST_OPENCODE_INSTALLED: "0"
- WORKTRUNK_TEST_POWERSHELL_ENV: "0"
- WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
- XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
----
-success: true
-exit_code: 0
------ stdout -----
-
------ stderr -----
-○ No approvals to clear for this project