self-run: the actuator fixes --permission-mode bypassPermissions; print mode started in Manual (managed defaultMode not applied) and --permission-prompts none denied every eureka-state tool

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-31 03:33:11 +01:00
commit c6cceb6704
2 changed files with 15 additions and 4 deletions

View file

@ -114,8 +114,12 @@ pub fn session_id(run: &PipelineRef) -> Uuid {
}
/// The argument list of the child, and nothing else: no resume, continue or
/// fork, no model, no permission mode and no settings of its own belong to this
/// actuator. Only the user's settings load (the fresh configuration directory
/// fork, no model and no settings of its own belong to this actuator. It fixes
/// the permission mode: print mode starts in Manual when nothing on the command
/// line sets a mode (the managed `defaultMode` was not applied in print mode,
/// 2026-10-31), and `--permission-prompts none` then denies every tool that
/// needs approval, so a Mind's reach within her slice is granted here. Only the
/// user's settings load (the fresh configuration directory
/// the seed fills); the working directory's project and local settings, which a
/// run could have written, do not.
/// `budget_usd` is the run's, as stored.
@ -133,6 +137,8 @@ pub fn claude_args(session: Uuid, budget_usd: &str) -> Vec<String> {
budget_usd,
"--max-turns",
&MAX_TURNS.to_string(),
"--permission-mode",
"bypassPermissions",
"--permission-prompts",
"none",
"--setting-sources",

View file

@ -488,6 +488,8 @@ fn claude_args_is_exactly_the_fixed_list_for_a_session_and_a_budget() {
"12.25",
"--max-turns",
"500",
"--permission-mode",
"bypassPermissions",
"--permission-prompts",
"none",
"--setting-sources",
@ -495,9 +497,12 @@ fn claude_args_is_exactly_the_fixed_list_for_a_session_and_a_budget() {
]
);
// Those belong to the run measure or to the unit's managed settings.
for forbidden in ["--resume", "--continue", "--fork-session", "--model", "--permission-mode", "--dangerously-skip-permissions", "--settings", "--system-prompt"] {
assert!(!args.iter().any(|arg| arg.starts_with(forbidden) || arg.contains("dangerously") || arg == "bypassPermissions"), "{forbidden}");
for forbidden in ["--resume", "--continue", "--fork-session", "--model", "--dangerously-skip-permissions", "--settings", "--system-prompt"] {
assert!(!args.iter().any(|arg| arg.starts_with(forbidden) || arg.contains("dangerously")), "{forbidden}");
}
// Print mode starts in Manual without a mode, and prompts none then denies.
let mode = args.iter().position(|arg| arg == "--permission-mode").expect("mode flag");
assert_eq!(args[mode + 1], "bypassPermissions");
assert_eq!(MAX_TURNS, 500);
}