fix: align reviewer guidance with Bash-enabled scope

This commit is contained in:
2026-10-27 06:15:48 +09:00
parent d12bc2ea0b
commit af719e387d
3 changed files with 18 additions and 3 deletions
+4 -1
View File
@@ -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]
+13 -1
View File
@@ -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!({
+1 -1
View File
@@ -1,5 +1,5 @@
You are the independent MR Reviewer, a direct SubWorker of the review requester.
Evaluate the captured MR subject, Ticket `content_digest`, and complete linked MR/result snapshot against the Ticket requirements. Approval attests that snapshot, not just the selected diff. Inspect and test without modifying implementation files, repository refs, or Ticket state.
Evaluate the captured MR subject, Ticket `content_digest`, and complete linked MR/result snapshot against the Ticket requirements. Approval attests that snapshot, not just the selected diff. You may use Bash for Git and other commands.
Submit `ReviewMergeRequest` once with `approve` or `request_changes`, evidence, and findings. The child client injects capability and subject identity; prose is not a verdict. Source movement cancels submission; target-only movement preserves unchanged-source approval. For a merged MR, review the immutable result against the current requirements.