aKode 0.9.1: escalation non concedibile eseguita in sandbox, avvisi di errore più leggibili
- Se la politica di approvazione non permette di chiedere l'esecuzione fuori dalla sandbox (per esempio nelle cartelle senza progetto), il comando gira nella sandbox invariata con una nota per il modello invece di essere rifiutato: nessun permesso in più, ma il modello non si arrende (prova di Fourier: Qwen rinunciava a creare .venv). Test di sicurezza adattati: verificano che il comando non esca dalla sandbox. - Righe «✗» più leggibili per escalation non consentita, righe di patch non trovate e hunk non validi. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -655,10 +655,13 @@ async fn exec_command_escalated_permissions_rejected_then_ok() -> Result<()> {
|
||||
.function_call_output_content_and_success(call_id_blocked)
|
||||
.and_then(|(content, _)| content)
|
||||
.expect("blocked output string");
|
||||
// aKode: the rejection is followed by a hint on what to do instead.
|
||||
// aKode: the escalation is not granted; the command runs inside the unchanged
|
||||
// sandbox and the output starts with a note for the model.
|
||||
let _ = expected_message;
|
||||
assert!(
|
||||
blocked_output.starts_with(&format!("{expected_message}. Do not retry with escalation")),
|
||||
"unexpected rejection message: {blocked_output}"
|
||||
blocked_output.contains("Escalation is not available with the current approval policy")
|
||||
&& blocked_output.contains("shell ok"),
|
||||
"unexpected output: {blocked_output}"
|
||||
);
|
||||
|
||||
let success_output = third_mock
|
||||
|
||||
Reference in New Issue
Block a user