fix: align reviewer guidance with Bash-enabled scope
This commit is contained in:
@@ -834,7 +834,10 @@ mod tests {
|
||||
assert!(common.contains("target-only movement preserves approval"));
|
||||
assert!(reviewer.contains("complete linked MR/result snapshot"));
|
||||
assert!(reviewer.contains("Submit `ReviewMergeRequest` once"));
|
||||
assert!(reviewer.contains("without modifying implementation files"));
|
||||
assert!(reviewer.contains("Bash"));
|
||||
assert!(reviewer.contains("Git"));
|
||||
assert!(!reviewer.contains("without modifying"));
|
||||
assert!(!reviewer.contains("read-only"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -70,7 +70,8 @@ struct SubWorkerSpawnInput {
|
||||
/// Explicitly grant command execution through the parent-owned Workdir tool broker.
|
||||
#[serde(default)]
|
||||
command: bool,
|
||||
/// Binds an actual read-only builtin Reviewer child to the current Merge Request candidate.
|
||||
/// Binds an actual builtin Reviewer child to the current Merge Request candidate.
|
||||
/// Bash may be enabled for Git and other commands.
|
||||
/// Review capability material is generated by the trusted spawn layer.
|
||||
#[serde(default)]
|
||||
review: Option<ReviewerHandoffInput>,
|
||||
@@ -1174,6 +1175,17 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reviewer_handoff_schema_allows_bash_for_git_commands() {
|
||||
let schema = serde_json::to_value(schemars::schema_for!(SubWorkerSpawnInput)).unwrap();
|
||||
let description = schema["properties"]["review"]["description"]
|
||||
.as_str()
|
||||
.expect("review handoff description");
|
||||
assert!(description.contains("Bash"));
|
||||
assert!(description.contains("Git"));
|
||||
assert!(!description.contains("read-only"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reviewer_handoff_requires_explicit_builtin_profile_and_writable_scope() {
|
||||
let valid: SubWorkerSpawnInput = serde_json::from_value(serde_json::json!({
|
||||
|
||||
Reference in New Issue
Block a user