mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-08 22:21:45 +00:00
parent
cbfafbdcc6
commit
c8af9ff4b1
5 changed files with 180 additions and 8 deletions
|
|
@ -1,40 +1,47 @@
|
|||
{
|
||||
"timestamp": "2026-03-20T01:04:38.422501Z",
|
||||
"current_node": "preflight_lint",
|
||||
"timestamp": "2026-03-20T01:09:06.457574Z",
|
||||
"current_node": "implement",
|
||||
"completed_nodes": [
|
||||
"start",
|
||||
"toolchain",
|
||||
"preflight_compile",
|
||||
"preflight_lint"
|
||||
"preflight_lint",
|
||||
"implement"
|
||||
],
|
||||
"node_retries": {
|
||||
"implement": 1,
|
||||
"preflight_compile": 1,
|
||||
"start": 1,
|
||||
"toolchain": 1,
|
||||
"preflight_lint": 1
|
||||
},
|
||||
"context_values": {
|
||||
"internal.retry_count.implement": 1,
|
||||
"failure_class": "",
|
||||
"internal.node_visit_count": 1,
|
||||
"failure_signature": "",
|
||||
"thread.start.current_node": "toolchain",
|
||||
"command.output": "",
|
||||
"thread.preflight_lint.current_node": "implement",
|
||||
"internal.retry_count.toolchain": 1,
|
||||
"last_response": "Here's a summary of all changes made:\n\n### Files changed\n\n1. **`lib/crates/fabro-cli/src/commands/wait.rs`** (new file) — The `fabro wait` command implementation:\n - `WaitArgs` struct with `run`, ",
|
||||
"outcome": "success",
|
||||
"command.stderr": "",
|
||||
"internal.thread_id": "preflight_compile",
|
||||
"internal.thread_id": "preflight_lint",
|
||||
"internal.fidelity": "compact",
|
||||
"current.preamble": "Goal: # Plan: `fabro wait` subcommand\n\n## Context\n\n`fabro run` launches workflows but there's no way to block until a run completes and get its exit code — analogous to `docker wait`. This is useful for scripting (e.g., `fabro run smoke && echo \"passed\"`). The closest existing command is `fabro logs --follow`, which streams events and exits when `conclusion.json` appears.\n\n## Implementation\n\n### 1. Create `lib/crates/fabro-cli/src/commands/wait.rs`\n\n**Args struct:**\n```rust\n#[derive(Args)]\npub struct WaitArgs {\n /// Run ID prefix or workflow name (most recent run)\n pub run: String,\n\n /// Maximum time to wait in seconds\n #[arg(long, value_name = \"SECONDS\")]\n pub timeout: Option<u64>,\n\n /// Poll interval in milliseconds\n #[arg(long, value_name = \"MS\", default_value = \"1000\")]\n pub interval: u64,\n\n /// Output conclusion as JSON\n #[arg(long)]\n pub json: bool,\n}\n```\n\n**`run()` function logic:**\n1. Resolve run via `fabro_workflows::run_lookup::resolve_run()` (same as `logs.rs:30`)\n2. Poll `status.json` via `RunStatusRecord::load()` every `--interval` ms\n3. When `status.is_terminal()`, read `conclusion.json` for summary data\n4. Print human-readable status line to stderr (or `--json` to stdout)\n5. Exit 0 for `Succeeded`, exit 1 for `Failed`/`Dead` (use `std::process::exit(1)` to avoid printing an error prefix, matching the pattern in `run.rs`)\n\n**Completion detection:** Poll `status.json` (not `conclusion.json` existence) since `RunStatusRecord::load()` gives the exact status. Fall back to `Dead` if the file is missing (orphaned run).\n\n**Timeout:** Check deadline after each sleep iteration; `bail!()` with a message if exceeded.\n\n### 2. Register in `lib/crates/fabro-cli/src/commands/mod.rs`\n\nAdd `pub mod wait;` between `validate` and `workflow` (line 19).\n\n### 3. Register in `lib/crates/fabro-cli/src/main.rs`\n\nThree insertions:\n\n**(a)** Command enum variant (after `Rewind` at ~line 149):\n```rust\n/// Block until a workflow run completes\nWait(commands::wait::WaitArgs),\n```\n\n**(b)** Command name mapping (~line 497):\n```rust\nCommand::Wait(_) => \"wait\",\n```\n\n**(c)** Execution dispatch (~line 884, after `Rewind`):\n```rust\nCommand::Wait(args) => {\n let styles = fabro_util::terminal::Styles::detect_stderr();\n commands::wait::run(args, &styles)?;\n}\n```\n\n### Reused utilities\n\n| Utility | Location |\n|---|---|\n| `resolve_run()` | `fabro_workflows::run_lookup` (run ID/name resolution) |\n| `RunStatusRecord::load()` | `fabro_workflows::run_status` (poll status.json) |\n| `RunStatus::is_terminal()` | `fabro_workflows::run_status` (check completion) |\n| `Conclusion::load()` | `fabro_workflows::conclusion` (read duration/cost) |\n| `format_duration_ms()` | `commands::shared` (human-readable duration) |\n| `Styles` | `fabro_util::terminal` (colored output) |\n\nNo new dependencies needed — all are already in `fabro-cli/Cargo.toml`.\n\n## Verification\n\n1. `cargo build -p fabro-cli` — compiles\n2. `cargo test -p fabro-cli` — existing tests pass\n3. `fabro wait --help` — shows usage\n4. `fabro wait <completed-run-id>` — prints status immediately, exits 0 or 1\n5. Launch a run, then `fabro wait <run-id>` — blocks until completion\n6. `fabro wait --timeout 1 <active-run>` — times out with error\n7. `fabro wait --json <run-id>` — prints JSON to stdout\n\n\n## Completed stages\n- **toolchain**: success\n - Script: `command -v cargo >/dev/null || { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && sudo ln -sf $HOME/.cargo/bin/* /usr/local/bin/; }; cargo --version 2>&1`\n - Stdout:\n ```\n cargo 1.94.0 (85eff7c80 2026-01-15)\n ```\n - Stderr: (empty)\n- **preflight_compile**: success\n - Script: `cargo check -q --workspace 2>&1`\n - Stdout: (empty)\n - Stderr: (empty)\n",
|
||||
"current.preamble": "Goal: # Plan: `fabro wait` subcommand\n\n## Context\n\n`fabro run` launches workflows but there's no way to block until a run completes and get its exit code — analogous to `docker wait`. This is useful for scripting (e.g., `fabro run smoke && echo \"passed\"`). The closest existing command is `fabro logs --follow`, which streams events and exits when `conclusion.json` appears.\n\n## Implementation\n\n### 1. Create `lib/crates/fabro-cli/src/commands/wait.rs`\n\n**Args struct:**\n```rust\n#[derive(Args)]\npub struct WaitArgs {\n /// Run ID prefix or workflow name (most recent run)\n pub run: String,\n\n /// Maximum time to wait in seconds\n #[arg(long, value_name = \"SECONDS\")]\n pub timeout: Option<u64>,\n\n /// Poll interval in milliseconds\n #[arg(long, value_name = \"MS\", default_value = \"1000\")]\n pub interval: u64,\n\n /// Output conclusion as JSON\n #[arg(long)]\n pub json: bool,\n}\n```\n\n**`run()` function logic:**\n1. Resolve run via `fabro_workflows::run_lookup::resolve_run()` (same as `logs.rs:30`)\n2. Poll `status.json` via `RunStatusRecord::load()` every `--interval` ms\n3. When `status.is_terminal()`, read `conclusion.json` for summary data\n4. Print human-readable status line to stderr (or `--json` to stdout)\n5. Exit 0 for `Succeeded`, exit 1 for `Failed`/`Dead` (use `std::process::exit(1)` to avoid printing an error prefix, matching the pattern in `run.rs`)\n\n**Completion detection:** Poll `status.json` (not `conclusion.json` existence) since `RunStatusRecord::load()` gives the exact status. Fall back to `Dead` if the file is missing (orphaned run).\n\n**Timeout:** Check deadline after each sleep iteration; `bail!()` with a message if exceeded.\n\n### 2. Register in `lib/crates/fabro-cli/src/commands/mod.rs`\n\nAdd `pub mod wait;` between `validate` and `workflow` (line 19).\n\n### 3. Register in `lib/crates/fabro-cli/src/main.rs`\n\nThree insertions:\n\n**(a)** Command enum variant (after `Rewind` at ~line 149):\n```rust\n/// Block until a workflow run completes\nWait(commands::wait::WaitArgs),\n```\n\n**(b)** Command name mapping (~line 497):\n```rust\nCommand::Wait(_) => \"wait\",\n```\n\n**(c)** Execution dispatch (~line 884, after `Rewind`):\n```rust\nCommand::Wait(args) => {\n let styles = fabro_util::terminal::Styles::detect_stderr();\n commands::wait::run(args, &styles)?;\n}\n```\n\n### Reused utilities\n\n| Utility | Location |\n|---|---|\n| `resolve_run()` | `fabro_workflows::run_lookup` (run ID/name resolution) |\n| `RunStatusRecord::load()` | `fabro_workflows::run_status` (poll status.json) |\n| `RunStatus::is_terminal()` | `fabro_workflows::run_status` (check completion) |\n| `Conclusion::load()` | `fabro_workflows::conclusion` (read duration/cost) |\n| `format_duration_ms()` | `commands::shared` (human-readable duration) |\n| `Styles` | `fabro_util::terminal` (colored output) |\n\nNo new dependencies needed — all are already in `fabro-cli/Cargo.toml`.\n\n## Verification\n\n1. `cargo build -p fabro-cli` — compiles\n2. `cargo test -p fabro-cli` — existing tests pass\n3. `fabro wait --help` — shows usage\n4. `fabro wait <completed-run-id>` — prints status immediately, exits 0 or 1\n5. Launch a run, then `fabro wait <run-id>` — blocks until completion\n6. `fabro wait --timeout 1 <active-run>` — times out with error\n7. `fabro wait --json <run-id>` — prints JSON to stdout\n\n\n## Completed stages\n- **toolchain**: success\n - Script: `command -v cargo >/dev/null || { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && sudo ln -sf $HOME/.cargo/bin/* /usr/local/bin/; }; cargo --version 2>&1`\n - Stdout:\n ```\n cargo 1.94.0 (85eff7c80 2026-01-15)\n ```\n - Stderr: (empty)\n- **preflight_compile**: success\n - Script: `cargo check -q --workspace 2>&1`\n - Stdout: (empty)\n - Stderr: (empty)\n- **preflight_lint**: success\n - Script: `cargo clippy -q --workspace -- -D warnings 2>&1`\n - Stdout: (empty)\n - Stderr: (empty)\n",
|
||||
"last_stage": "implement",
|
||||
"thread.preflight_compile.current_node": "preflight_lint",
|
||||
"graph.rankdir": "LR",
|
||||
"thread.toolchain.current_node": "preflight_compile",
|
||||
"graph.goal": "# Plan: `fabro wait` subcommand\n\n## Context\n\n`fabro run` launches workflows but there's no way to block until a run completes and get its exit code — analogous to `docker wait`. This is useful for scripting (e.g., `fabro run smoke && echo \"passed\"`). The closest existing command is `fabro logs --follow`, which streams events and exits when `conclusion.json` appears.\n\n## Implementation\n\n### 1. Create `lib/crates/fabro-cli/src/commands/wait.rs`\n\n**Args struct:**\n```rust\n#[derive(Args)]\npub struct WaitArgs {\n /// Run ID prefix or workflow name (most recent run)\n pub run: String,\n\n /// Maximum time to wait in seconds\n #[arg(long, value_name = \"SECONDS\")]\n pub timeout: Option<u64>,\n\n /// Poll interval in milliseconds\n #[arg(long, value_name = \"MS\", default_value = \"1000\")]\n pub interval: u64,\n\n /// Output conclusion as JSON\n #[arg(long)]\n pub json: bool,\n}\n```\n\n**`run()` function logic:**\n1. Resolve run via `fabro_workflows::run_lookup::resolve_run()` (same as `logs.rs:30`)\n2. Poll `status.json` via `RunStatusRecord::load()` every `--interval` ms\n3. When `status.is_terminal()`, read `conclusion.json` for summary data\n4. Print human-readable status line to stderr (or `--json` to stdout)\n5. Exit 0 for `Succeeded`, exit 1 for `Failed`/`Dead` (use `std::process::exit(1)` to avoid printing an error prefix, matching the pattern in `run.rs`)\n\n**Completion detection:** Poll `status.json` (not `conclusion.json` existence) since `RunStatusRecord::load()` gives the exact status. Fall back to `Dead` if the file is missing (orphaned run).\n\n**Timeout:** Check deadline after each sleep iteration; `bail!()` with a message if exceeded.\n\n### 2. Register in `lib/crates/fabro-cli/src/commands/mod.rs`\n\nAdd `pub mod wait;` between `validate` and `workflow` (line 19).\n\n### 3. Register in `lib/crates/fabro-cli/src/main.rs`\n\nThree insertions:\n\n**(a)** Command enum variant (after `Rewind` at ~line 149):\n```rust\n/// Block until a workflow run completes\nWait(commands::wait::WaitArgs),\n```\n\n**(b)** Command name mapping (~line 497):\n```rust\nCommand::Wait(_) => \"wait\",\n```\n\n**(c)** Execution dispatch (~line 884, after `Rewind`):\n```rust\nCommand::Wait(args) => {\n let styles = fabro_util::terminal::Styles::detect_stderr();\n commands::wait::run(args, &styles)?;\n}\n```\n\n### Reused utilities\n\n| Utility | Location |\n|---|---|\n| `resolve_run()` | `fabro_workflows::run_lookup` (run ID/name resolution) |\n| `RunStatusRecord::load()` | `fabro_workflows::run_status` (poll status.json) |\n| `RunStatus::is_terminal()` | `fabro_workflows::run_status` (check completion) |\n| `Conclusion::load()` | `fabro_workflows::conclusion` (read duration/cost) |\n| `format_duration_ms()` | `commands::shared` (human-readable duration) |\n| `Styles` | `fabro_util::terminal` (colored output) |\n\nNo new dependencies needed — all are already in `fabro-cli/Cargo.toml`.\n\n## Verification\n\n1. `cargo build -p fabro-cli` — compiles\n2. `cargo test -p fabro-cli` — existing tests pass\n3. `fabro wait --help` — shows usage\n4. `fabro wait <completed-run-id>` — prints status immediately, exits 0 or 1\n5. Launch a run, then `fabro wait <run-id>` — blocks until completion\n6. `fabro wait --timeout 1 <active-run>` — times out with error\n7. `fabro wait --json <run-id>` — prints JSON to stdout\n",
|
||||
"internal.run_id": "01KM4C8NP9T0GX1XX23NCZ8HVQ",
|
||||
"current_node": "preflight_lint",
|
||||
"current_node": "implement",
|
||||
"internal.retry_count.start": 1,
|
||||
"internal.retry_count.preflight_compile": 1,
|
||||
"graph.model_stylesheet": "\n * { backend: api; model: claude-opus-4-6;}\n ",
|
||||
"internal.retry_count.preflight_lint": 1
|
||||
"internal.retry_count.preflight_lint": 1,
|
||||
"response.implement": "Here's a summary of all changes made:\n\n### Files changed\n\n1. **`lib/crates/fabro-cli/src/commands/wait.rs`** (new file) — The `fabro wait` command implementation:\n - `WaitArgs` struct with `run`, `--timeout`, `--interval` (default 1000ms), and `--json` flags\n - `run()` function that resolves the run via `resolve_run()`, polls `status.json` via `RunStatusRecord::load()` every `--interval` ms, detects terminal status, reads `conclusion.json` for summary data, prints human-readable output to stderr (or JSON to stdout with `--json`), exits 0 for `Succeeded` and exits 1 for `Failed`/`Dead`\n - `build_json_output()` — builds JSON with run_id, status, duration_ms, and total_cost\n - `print_human_output()` — colored status line with duration and cost\n - 7 unit tests covering JSON output (with/without conclusion, various statuses), human output, poll behavior, and missing status fallback to Dead\n\n2. **`lib/crates/fabro-cli/src/commands/mod.rs`** — Added `pub mod wait;`\n\n3. **`lib/crates/fabro-cli/src/main.rs`** — Three insertions:\n - `Wait(commands::wait::WaitArgs)` variant in the `Command` enum\n - `Command::Wait(_) => \"wait\"` in the command name mapping\n - `Command::Wait(args) => { ... }` dispatch in the execution block"
|
||||
},
|
||||
"logs": [],
|
||||
"node_outcomes": {
|
||||
|
|
@ -56,6 +63,30 @@
|
|||
"notes": "Script completed: command -v cargo >/dev/null || { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && sudo ln -sf $HOME/.cargo/bin/* /usr/local/bin/; }; cargo --version 2>&1",
|
||||
"duration_ms": 237
|
||||
},
|
||||
"implement": {
|
||||
"status": "success",
|
||||
"context_updates": {
|
||||
"response.implement": "Here's a summary of all changes made:\n\n### Files changed\n\n1. **`lib/crates/fabro-cli/src/commands/wait.rs`** (new file) — The `fabro wait` command implementation:\n - `WaitArgs` struct with `run`, `--timeout`, `--interval` (default 1000ms), and `--json` flags\n - `run()` function that resolves the run via `resolve_run()`, polls `status.json` via `RunStatusRecord::load()` every `--interval` ms, detects terminal status, reads `conclusion.json` for summary data, prints human-readable output to stderr (or JSON to stdout with `--json`), exits 0 for `Succeeded` and exits 1 for `Failed`/`Dead`\n - `build_json_output()` — builds JSON with run_id, status, duration_ms, and total_cost\n - `print_human_output()` — colored status line with duration and cost\n - 7 unit tests covering JSON output (with/without conclusion, various statuses), human output, poll behavior, and missing status fallback to Dead\n\n2. **`lib/crates/fabro-cli/src/commands/mod.rs`** — Added `pub mod wait;`\n\n3. **`lib/crates/fabro-cli/src/main.rs`** — Three insertions:\n - `Wait(commands::wait::WaitArgs)` variant in the `Command` enum\n - `Command::Wait(_) => \"wait\"` in the command name mapping\n - `Command::Wait(args) => { ... }` dispatch in the execution block",
|
||||
"last_response": "Here's a summary of all changes made:\n\n### Files changed\n\n1. **`lib/crates/fabro-cli/src/commands/wait.rs`** (new file) — The `fabro wait` command implementation:\n - `WaitArgs` struct with `run`, ",
|
||||
"last_stage": "implement"
|
||||
},
|
||||
"notes": "Stage completed: implement",
|
||||
"usage": {
|
||||
"model": "claude-opus-4-6",
|
||||
"input_tokens": 64077,
|
||||
"output_tokens": 6728,
|
||||
"cache_read_tokens": 1034913,
|
||||
"cache_write_tokens": 70022,
|
||||
"reasoning_tokens": 41,
|
||||
"cost": 1.4657550000000001
|
||||
},
|
||||
"files_touched": [
|
||||
"/home/daytona/workspace/lib/crates/fabro-cli/src/commands/mod.rs",
|
||||
"/home/daytona/workspace/lib/crates/fabro-cli/src/commands/wait.rs",
|
||||
"/home/daytona/workspace/lib/crates/fabro-cli/src/main.rs"
|
||||
],
|
||||
"duration_ms": 263759
|
||||
},
|
||||
"preflight_compile": {
|
||||
"status": "success",
|
||||
"context_updates": {
|
||||
|
|
@ -70,8 +101,9 @@
|
|||
"duration_ms": 0
|
||||
}
|
||||
},
|
||||
"next_node_id": "implement",
|
||||
"next_node_id": "simplify_opus",
|
||||
"node_visits": {
|
||||
"implement": 1,
|
||||
"start": 1,
|
||||
"toolchain": 1,
|
||||
"preflight_compile": 1,
|
||||
|
|
|
|||
112
nodes/implement/prompt.md
Normal file
112
nodes/implement/prompt.md
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
Goal: # Plan: `fabro wait` subcommand
|
||||
|
||||
## Context
|
||||
|
||||
`fabro run` launches workflows but there's no way to block until a run completes and get its exit code — analogous to `docker wait`. This is useful for scripting (e.g., `fabro run smoke && echo "passed"`). The closest existing command is `fabro logs --follow`, which streams events and exits when `conclusion.json` appears.
|
||||
|
||||
## Implementation
|
||||
|
||||
### 1. Create `lib/crates/fabro-cli/src/commands/wait.rs`
|
||||
|
||||
**Args struct:**
|
||||
```rust
|
||||
#[derive(Args)]
|
||||
pub struct WaitArgs {
|
||||
/// Run ID prefix or workflow name (most recent run)
|
||||
pub run: String,
|
||||
|
||||
/// Maximum time to wait in seconds
|
||||
#[arg(long, value_name = "SECONDS")]
|
||||
pub timeout: Option<u64>,
|
||||
|
||||
/// Poll interval in milliseconds
|
||||
#[arg(long, value_name = "MS", default_value = "1000")]
|
||||
pub interval: u64,
|
||||
|
||||
/// Output conclusion as JSON
|
||||
#[arg(long)]
|
||||
pub json: bool,
|
||||
}
|
||||
```
|
||||
|
||||
**`run()` function logic:**
|
||||
1. Resolve run via `fabro_workflows::run_lookup::resolve_run()` (same as `logs.rs:30`)
|
||||
2. Poll `status.json` via `RunStatusRecord::load()` every `--interval` ms
|
||||
3. When `status.is_terminal()`, read `conclusion.json` for summary data
|
||||
4. Print human-readable status line to stderr (or `--json` to stdout)
|
||||
5. Exit 0 for `Succeeded`, exit 1 for `Failed`/`Dead` (use `std::process::exit(1)` to avoid printing an error prefix, matching the pattern in `run.rs`)
|
||||
|
||||
**Completion detection:** Poll `status.json` (not `conclusion.json` existence) since `RunStatusRecord::load()` gives the exact status. Fall back to `Dead` if the file is missing (orphaned run).
|
||||
|
||||
**Timeout:** Check deadline after each sleep iteration; `bail!()` with a message if exceeded.
|
||||
|
||||
### 2. Register in `lib/crates/fabro-cli/src/commands/mod.rs`
|
||||
|
||||
Add `pub mod wait;` between `validate` and `workflow` (line 19).
|
||||
|
||||
### 3. Register in `lib/crates/fabro-cli/src/main.rs`
|
||||
|
||||
Three insertions:
|
||||
|
||||
**(a)** Command enum variant (after `Rewind` at ~line 149):
|
||||
```rust
|
||||
/// Block until a workflow run completes
|
||||
Wait(commands::wait::WaitArgs),
|
||||
```
|
||||
|
||||
**(b)** Command name mapping (~line 497):
|
||||
```rust
|
||||
Command::Wait(_) => "wait",
|
||||
```
|
||||
|
||||
**(c)** Execution dispatch (~line 884, after `Rewind`):
|
||||
```rust
|
||||
Command::Wait(args) => {
|
||||
let styles = fabro_util::terminal::Styles::detect_stderr();
|
||||
commands::wait::run(args, &styles)?;
|
||||
}
|
||||
```
|
||||
|
||||
### Reused utilities
|
||||
|
||||
| Utility | Location |
|
||||
|---|---|
|
||||
| `resolve_run()` | `fabro_workflows::run_lookup` (run ID/name resolution) |
|
||||
| `RunStatusRecord::load()` | `fabro_workflows::run_status` (poll status.json) |
|
||||
| `RunStatus::is_terminal()` | `fabro_workflows::run_status` (check completion) |
|
||||
| `Conclusion::load()` | `fabro_workflows::conclusion` (read duration/cost) |
|
||||
| `format_duration_ms()` | `commands::shared` (human-readable duration) |
|
||||
| `Styles` | `fabro_util::terminal` (colored output) |
|
||||
|
||||
No new dependencies needed — all are already in `fabro-cli/Cargo.toml`.
|
||||
|
||||
## Verification
|
||||
|
||||
1. `cargo build -p fabro-cli` — compiles
|
||||
2. `cargo test -p fabro-cli` — existing tests pass
|
||||
3. `fabro wait --help` — shows usage
|
||||
4. `fabro wait <completed-run-id>` — prints status immediately, exits 0 or 1
|
||||
5. Launch a run, then `fabro wait <run-id>` — blocks until completion
|
||||
6. `fabro wait --timeout 1 <active-run>` — times out with error
|
||||
7. `fabro wait --json <run-id>` — prints JSON to stdout
|
||||
|
||||
|
||||
## Completed stages
|
||||
- **toolchain**: success
|
||||
- Script: `command -v cargo >/dev/null || { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && sudo ln -sf $HOME/.cargo/bin/* /usr/local/bin/; }; cargo --version 2>&1`
|
||||
- Stdout:
|
||||
```
|
||||
cargo 1.94.0 (85eff7c80 2026-01-15)
|
||||
```
|
||||
- Stderr: (empty)
|
||||
- **preflight_compile**: success
|
||||
- Script: `cargo check -q --workspace 2>&1`
|
||||
- Stdout: (empty)
|
||||
- Stderr: (empty)
|
||||
- **preflight_lint**: success
|
||||
- Script: `cargo clippy -q --workspace -- -D warnings 2>&1`
|
||||
- Stdout: (empty)
|
||||
- Stderr: (empty)
|
||||
|
||||
|
||||
Read the plan file referenced in the goal and implement every step. Make all the code changes described in the plan. Use red/green TDD.
|
||||
5
nodes/implement/provider_used.json
Normal file
5
nodes/implement/provider_used.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"mode": "agent",
|
||||
"provider": "anthropic",
|
||||
"model": "claude-opus-4-6"
|
||||
}
|
||||
17
nodes/implement/response.md
Normal file
17
nodes/implement/response.md
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
Here's a summary of all changes made:
|
||||
|
||||
### Files changed
|
||||
|
||||
1. **`lib/crates/fabro-cli/src/commands/wait.rs`** (new file) — The `fabro wait` command implementation:
|
||||
- `WaitArgs` struct with `run`, `--timeout`, `--interval` (default 1000ms), and `--json` flags
|
||||
- `run()` function that resolves the run via `resolve_run()`, polls `status.json` via `RunStatusRecord::load()` every `--interval` ms, detects terminal status, reads `conclusion.json` for summary data, prints human-readable output to stderr (or JSON to stdout with `--json`), exits 0 for `Succeeded` and exits 1 for `Failed`/`Dead`
|
||||
- `build_json_output()` — builds JSON with run_id, status, duration_ms, and total_cost
|
||||
- `print_human_output()` — colored status line with duration and cost
|
||||
- 7 unit tests covering JSON output (with/without conclusion, various statuses), human output, poll behavior, and missing status fallback to Dead
|
||||
|
||||
2. **`lib/crates/fabro-cli/src/commands/mod.rs`** — Added `pub mod wait;`
|
||||
|
||||
3. **`lib/crates/fabro-cli/src/main.rs`** — Three insertions:
|
||||
- `Wait(commands::wait::WaitArgs)` variant in the `Command` enum
|
||||
- `Command::Wait(_) => "wait"` in the command name mapping
|
||||
- `Command::Wait(args) => { ... }` dispatch in the execution block
|
||||
6
nodes/implement/status.json
Normal file
6
nodes/implement/status.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"status": "success",
|
||||
"notes": "Stage completed: implement",
|
||||
"failure_reason": null,
|
||||
"timestamp": "2026-03-20T01:09:06.457180+00:00"
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue