Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/command_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -888,8 +888,8 @@ fn parse_invite_token(raw: &str) -> Option<InviteContext> {
pub(crate) fn normalize_agent_selector(raw: &str) -> String {
let lowered = raw.trim().to_ascii_lowercase();
match lowered.as_str() {
"implementer" => "implementer".to_string(),
"reviewer" | "reviewer1" | "reviewer-1" => "reviewer-1".to_string(),
"implement" | "implementer" => "implementer".to_string(),
"review" | "reviewer" | "reviewer1" | "reviewer-1" => "reviewer-1".to_string(),
_ => raw.trim().to_string(),
}
}
Expand Down Expand Up @@ -1489,7 +1489,7 @@ mod tests {
#[test]
fn run_resolution_prompts_interactively_when_unresolved() -> Result<()> {
let args = run_args();
let mut prompter = StaticPrompter::new(&["prompt-session", "reviewer"]);
let mut prompter = StaticPrompter::new(&["prompt-session", "review"]);
let resolved = resolve_run_context(&args, None, None, None, None, &mut prompter)?;
assert_eq!(resolved.session, "prompt-session");
assert_eq!(resolved.agent, "reviewer-1");
Expand Down
14 changes: 7 additions & 7 deletions src/workflow/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl RunCommand for ImplementRunCommand {
fn resolve(&self, args: &[String], workspace: &Path) -> Result<RunCommandResolution> {
if args.len() < 2 {
bail!(
"usage: /rally {}\n\nExample: /rally implement todos/create-todo.md implementer",
"usage: /rally {}\n\nExample: /rally implement todos/create-todo.md implement",
self.usage()
);
}
Expand Down Expand Up @@ -577,7 +577,7 @@ mod tests {
let cmd = ImplementRunCommand;
let args = vec![
"create-todo.md".to_string(),
"implementer".to_string(),
"implement".to_string(),
];
let (session_name, agent_name, create_args) =
unwrap_session(cmd.resolve(&args, &workspace).expect("resolve"));
Expand All @@ -597,7 +597,7 @@ mod tests {
write_todo(&workspace, "my-task.md");

let cmd = ImplementRunCommand;
let args = vec!["my-task.md".to_string(), "reviewer".to_string()];
let args = vec!["my-task.md".to_string(), "review".to_string()];
let (session_name, agent_name, _) =
unwrap_session(cmd.resolve(&args, &workspace).expect("resolve"));
assert_eq!(agent_name, "reviewer-1");
Expand All @@ -612,7 +612,7 @@ mod tests {
let cmd = ImplementRunCommand;
let args = vec![
"task.md".to_string(),
"implementer".to_string(),
"implement".to_string(),
"--reviewers".to_string(),
"3".to_string(),
];
Expand Down Expand Up @@ -641,7 +641,7 @@ mod tests {
fn implement_run_command_resolve_bad_todo_path() {
let workspace = temp_workspace("rally-impl-cmd-bad-todo");
let cmd = ImplementRunCommand;
let args = vec!["nonexistent.md".to_string(), "implementer".to_string()];
let args = vec!["nonexistent.md".to_string(), "implement".to_string()];
let err = cmd
.resolve(&args, &workspace)
.expect_err("should fail for missing todo");
Expand All @@ -656,7 +656,7 @@ mod tests {
let cmd = ImplementRunCommand;
let args = vec![
"task.md".to_string(),
"implementer".to_string(),
"implement".to_string(),
"--reviewers".to_string(),
"abc".to_string(),
];
Expand All @@ -673,7 +673,7 @@ mod tests {
let abs_path = todo.to_str().expect("utf8 path").to_string();

let cmd = ImplementRunCommand;
let args = vec![abs_path, "implementer".to_string()];
let args = vec![abs_path, "implement".to_string()];
let (session_name, agent_name, create_args) =
unwrap_session(cmd.resolve(&args, &workspace).expect("resolve with absolute path"));
assert_eq!(session_name, "implement-abs-task");
Expand Down
6 changes: 3 additions & 3 deletions tests/command_install_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ fn command_install_run_entrypoint_integration() -> Result<()> {
{
let stdin = child.stdin.as_mut().expect("stdin");
writeln!(stdin, "{session_two}")?;
writeln!(stdin, "implementer")?;
writeln!(stdin, "implement")?;
}
let output = child.wait_with_output()?;
assert!(
Expand Down Expand Up @@ -414,7 +414,7 @@ fn command_install_run_entrypoint_integration() -> Result<()> {
"run",
"implement",
&run_cmd_todo_rel,
"implementer",
"implement",
"--reviewers",
"0",
"--non-interactive",
Expand Down Expand Up @@ -454,7 +454,7 @@ fn command_install_run_entrypoint_integration() -> Result<()> {
"run",
"implement",
&run_cmd_todo_rel,
"reviewer",
"review",
"--reviewers",
"0",
"--non-interactive",
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e-implement.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ launch() {
echo ""
echo "Launching implementer ($IMPL_AGENT)..."
IMPL_PID=$(launch "$IMPL_AGENT" \
"/rally implement ${TODO_NAME}.md implementer" \
"/rally implement ${TODO_NAME}.md implement" \
"$LOGDIR/impl.log")

sleep 5

echo "Launching reviewer ($REVW_AGENT)..."
REVW_PID=$(launch "$REVW_AGENT" \
"/rally implement ${TODO_NAME}.md reviewer" \
"/rally implement ${TODO_NAME}.md review" \
"$LOGDIR/revw.log")

# ── poll for completion ──────────────────────────────────────────────
Expand Down