Skip to content

Commit e723dfd

Browse files
fix(headless): keep hosted reviews review-only (OpenCoven#119)
Signed-off-by: Timothy Wayne Gregg <Timothy.Gregg@complete.tech>
1 parent 831b72e commit e723dfd

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src-rust/crates/cli/src/headless.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,15 @@ impl SessionBrief {
259259
lines.push(instruction.trim().to_string());
260260
}
261261

262+
if self.review_mode() != ReviewMode::None {
263+
lines.push(String::new());
264+
lines.push(
265+
"Complete the review end to end. Do not modify files, create commits, or push a branch unless the review comment explicitly asks for code changes. Your final message is the hosted review body and must include the exact review sections above."
266+
.to_string(),
267+
);
268+
return lines.join("\n");
269+
}
270+
262271
lines.push(String::new());
263272
lines.push(
264273
"Complete the task end to end: make the change on a new branch named like \
@@ -1597,6 +1606,8 @@ mod tests {
15971606
}
15981607
assert!(prompt.contains("specific file references"));
15991608
assert!(prompt.contains("Do not end with a generic completion message."));
1609+
assert!(prompt.contains("Do not modify files, create commits, or push a branch"));
1610+
assert!(!prompt.contains("make the change on a new branch"));
16001611
}
16011612

16021613
// ── Output conformance ──────────────────────────────────────────────────

0 commit comments

Comments
 (0)