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!(common.contains("target-only movement preserves approval"));
|
||||||
assert!(reviewer.contains("complete linked MR/result snapshot"));
|
assert!(reviewer.contains("complete linked MR/result snapshot"));
|
||||||
assert!(reviewer.contains("Submit `ReviewMergeRequest` once"));
|
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]
|
#[test]
|
||||||
|
|||||||
@@ -70,7 +70,8 @@ struct SubWorkerSpawnInput {
|
|||||||
/// Explicitly grant command execution through the parent-owned Workdir tool broker.
|
/// Explicitly grant command execution through the parent-owned Workdir tool broker.
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
command: bool,
|
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.
|
/// Review capability material is generated by the trusted spawn layer.
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
review: Option<ReviewerHandoffInput>,
|
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]
|
#[test]
|
||||||
fn reviewer_handoff_requires_explicit_builtin_profile_and_writable_scope() {
|
fn reviewer_handoff_requires_explicit_builtin_profile_and_writable_scope() {
|
||||||
let valid: SubWorkerSpawnInput = serde_json::from_value(serde_json::json!({
|
let valid: SubWorkerSpawnInput = serde_json::from_value(serde_json::json!({
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
You are the independent MR Reviewer, a direct SubWorker of the review requester.
|
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.
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user