mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-10 22:43:37 +00:00
parent
e6b73594a2
commit
749b950a7a
4 changed files with 38 additions and 8 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"timestamp": "2026-03-20T01:14:41.236836Z",
|
||||
"current_node": "verify",
|
||||
"timestamp": "2026-03-20T01:14:44.498707Z",
|
||||
"current_node": "fmt",
|
||||
"completed_nodes": [
|
||||
"start",
|
||||
"toolchain",
|
||||
|
|
@ -9,13 +9,15 @@
|
|||
"implement",
|
||||
"simplify_opus",
|
||||
"simplify_gpt",
|
||||
"verify"
|
||||
"verify",
|
||||
"fmt"
|
||||
],
|
||||
"node_retries": {
|
||||
"verify": 1,
|
||||
"toolchain": 1,
|
||||
"start": 1,
|
||||
"preflight_lint": 1,
|
||||
"fmt": 1,
|
||||
"preflight_compile": 1,
|
||||
"implement": 1,
|
||||
"simplify_opus": 1,
|
||||
|
|
@ -23,7 +25,7 @@
|
|||
},
|
||||
"context_values": {
|
||||
"internal.run_id": "01KM4CDSHYC8PQ5NNEHKPJD4V0",
|
||||
"current_node": "verify",
|
||||
"current_node": "fmt",
|
||||
"last_stage": "simplify_opus",
|
||||
"graph.rankdir": "LR",
|
||||
"thread.preflight_compile.current_node": "preflight_lint",
|
||||
|
|
@ -33,7 +35,7 @@
|
|||
"failure_class": "",
|
||||
"internal.retry_count.preflight_lint": 1,
|
||||
"outcome": "success",
|
||||
"current.preamble": "Goal: # Strip markdown headings and \"Plan:\" prefix from GOAL column in `fabro ps`\n\n## Context\nThe `GOAL` column in `fabro ps` output sometimes shows raw markdown heading markers (`#`, `##`, etc.) and a `Plan:` prefix, which is noisy. We want to strip these for cleaner output.\n\n## Change\n**File:** `lib/crates/fabro-cli/src/commands/runs.rs` — `truncate_goal` function (line 229)\n\nBefore truncating, add two stripping steps:\n1. Strip leading `#` characters and any whitespace after them (e.g. `## Fix bug` → `Fix bug`)\n2. Strip a leading `Plan:` prefix (case-sensitive)\n3. Trim whitespace after both strips\n\nCurrent code:\n```rust\nfn truncate_goal(goal: &str, max_len: usize) -> String {\n let line = goal.lines().next().unwrap_or(\"\");\n // ... truncation logic\n}\n```\n\nUpdated logic (inserted after extracting `line`, before truncation):\n```rust\nlet line = line.trim_start_matches('#').trim();\nlet line = line.strip_prefix(\"Plan:\").map(|s| s.trim()).unwrap_or(line);\n```\n\n## Verification\n- `cargo test -p fabro-cli` — run existing tests\n- `cargo clippy --workspace -- -D warnings` — lint check\n- Manual: `fabro ps -a` to confirm goals render without `#` or `Plan:` prefixes\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- **implement**: success\n - Model: claude-opus-4-6, 15.2k tokens in / 2.5k out\n - Files: /home/daytona/workspace/lib/crates/fabro-cli/src/commands/runs.rs\n- **simplify_opus**: success\n - Model: claude-opus-4-6, 18.2k tokens in / 6.4k out\n - Files: /home/daytona/workspace/lib/crates/fabro-cli/src/commands/runs.rs\n- **simplify_gpt**: fail\n\n## Context\n- failure_class: deterministic\n- failure_signature: simplify_gpt|deterministic|api_deterministic|anthropic|not_found\n",
|
||||
"current.preamble": "Goal: # Strip markdown headings and \"Plan:\" prefix from GOAL column in `fabro ps`\n\n## Context\nThe `GOAL` column in `fabro ps` output sometimes shows raw markdown heading markers (`#`, `##`, etc.) and a `Plan:` prefix, which is noisy. We want to strip these for cleaner output.\n\n## Change\n**File:** `lib/crates/fabro-cli/src/commands/runs.rs` — `truncate_goal` function (line 229)\n\nBefore truncating, add two stripping steps:\n1. Strip leading `#` characters and any whitespace after them (e.g. `## Fix bug` → `Fix bug`)\n2. Strip a leading `Plan:` prefix (case-sensitive)\n3. Trim whitespace after both strips\n\nCurrent code:\n```rust\nfn truncate_goal(goal: &str, max_len: usize) -> String {\n let line = goal.lines().next().unwrap_or(\"\");\n // ... truncation logic\n}\n```\n\nUpdated logic (inserted after extracting `line`, before truncation):\n```rust\nlet line = line.trim_start_matches('#').trim();\nlet line = line.strip_prefix(\"Plan:\").map(|s| s.trim()).unwrap_or(line);\n```\n\n## Verification\n- `cargo test -p fabro-cli` — run existing tests\n- `cargo clippy --workspace -- -D warnings` — lint check\n- Manual: `fabro ps -a` to confirm goals render without `#` or `Plan:` prefixes\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- **implement**: success\n - Model: claude-opus-4-6, 15.2k tokens in / 2.5k out\n - Files: /home/daytona/workspace/lib/crates/fabro-cli/src/commands/runs.rs\n- **simplify_opus**: success\n - Model: claude-opus-4-6, 18.2k tokens in / 6.4k out\n - Files: /home/daytona/workspace/lib/crates/fabro-cli/src/commands/runs.rs\n- **simplify_gpt**: fail\n- **verify**: success\n - Script: `cargo clippy -q --workspace -- -D warnings 2>&1 && cargo nextest run --cargo-quiet --workspace --status-level fail 2>&1`\n - Stdout:\n ```\n warning: function `init_repo_with_remote` is never used\n --> lib/crates/fabro-workflows/src/git.rs:1153:8\n |\n 1153 | fn init_repo_with_remote(dir: &Path) -> (std::path::PathBuf, std::path::PathBuf) {\n | ^^^^^^^^^^^^^^^^^^^^^\n |\n = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default\n \n ────────────\n Nextest run ID ab4298cc-e711-466d-ac56-c30ebf0fd5bc with nextest profile: default\n Starting 3218 tests across 41 binaries (177 tests skipped)\n ────────────\n Summary [ 13.985s] 3218 tests run: 3218 passed, 177 skipped\n ```\n - Stderr: (empty)\n",
|
||||
"thread.preflight_lint.current_node": "implement",
|
||||
"response.simplify_opus": "## Summary\n\n**Fixed 1 issue:**\n\n- **Leaky abstraction** (line 409): `truncate_goal` was being called on `workflow_name`, which would incorrectly strip `#` characters and `Plan:` prefix from workflow names. Extracted a generic `truncate_str` helper for plain truncation and changed the `workflow_name` call site to use it. `truncate_goal` now delegates to `truncate_str` after doing its goal-specific cleanup.\n\n**Noted but skipped (out of scope / false positive):**\n\n- **Near-duplicate with `pr_title_from_goal`**: Valid finding — both functions do similar goal cleaning. However, they live in different crates (`fabro-cli` vs `fabro-workflows`) and extracting a shared utility into `fabro-util` is a larger refactor beyond the scope of this change.\n- **Greedy `trim_start_matches('#')`**: Agent 2 noted this could strip `#` from non-heading contexts like `#channel-name`. In practice, goals in this system are user-provided task descriptions, not Slack references, and the existing test suite validates the expected behavior. The greedy approach is intentionally simpler and handles `###`+ headings that the `pr_title_from_goal` version misses. Not worth changing.\n- **`\"Plan:\"` as a shared constant**: Only two uses across separate crates — not worth the abstraction overhead.",
|
||||
"internal.node_visit_count": 1,
|
||||
|
|
@ -45,14 +47,16 @@
|
|||
"graph.goal": "# Strip markdown headings and \"Plan:\" prefix from GOAL column in `fabro ps`\n\n## Context\nThe `GOAL` column in `fabro ps` output sometimes shows raw markdown heading markers (`#`, `##`, etc.) and a `Plan:` prefix, which is noisy. We want to strip these for cleaner output.\n\n## Change\n**File:** `lib/crates/fabro-cli/src/commands/runs.rs` — `truncate_goal` function (line 229)\n\nBefore truncating, add two stripping steps:\n1. Strip leading `#` characters and any whitespace after them (e.g. `## Fix bug` → `Fix bug`)\n2. Strip a leading `Plan:` prefix (case-sensitive)\n3. Trim whitespace after both strips\n\nCurrent code:\n```rust\nfn truncate_goal(goal: &str, max_len: usize) -> String {\n let line = goal.lines().next().unwrap_or(\"\");\n // ... truncation logic\n}\n```\n\nUpdated logic (inserted after extracting `line`, before truncation):\n```rust\nlet line = line.trim_start_matches('#').trim();\nlet line = line.strip_prefix(\"Plan:\").map(|s| s.trim()).unwrap_or(line);\n```\n\n## Verification\n- `cargo test -p fabro-cli` — run existing tests\n- `cargo clippy --workspace -- -D warnings` — lint check\n- Manual: `fabro ps -a` to confirm goals render without `#` or `Plan:` prefixes\n",
|
||||
"response.implement": "The implementation is complete. Here's a summary of the changes:\n\n**`lib/crates/fabro-cli/src/commands/runs.rs`:**\n\n1. **`truncate_goal` function** (line 231-232): Added two stripping steps after extracting the first line:\n - `line.trim_start_matches('#').trim()` — strips leading `#` characters and surrounding whitespace\n - `line.strip_prefix(\"Plan:\").map(|s| s.trim()).unwrap_or(line)` — strips a leading `Plan:` prefix if present\n\n2. **Tests** (5 new tests added):\n - `truncate_goal_strips_markdown_headings` — verifies `#`, `##`, `###` are stripped\n - `truncate_goal_strips_plan_prefix` — verifies `Plan:` prefix is stripped\n - `truncate_goal_strips_heading_and_plan_prefix` — verifies both combined (`## Plan: migrate DB` → `migrate DB`)\n - `truncate_goal_plain_text_unchanged` — verifies plain text passes through unchanged\n - `truncate_goal_still_truncates_after_stripping` — verifies truncation still works after stripping",
|
||||
"graph.model_stylesheet": "\n * { backend: api; model: claude-opus-4-6;}\n ",
|
||||
"internal.thread_id": "simplify_gpt",
|
||||
"command.output": "warning: function `init_repo_with_remote` is never used\n --> lib/crates/fabro-workflows/src/git.rs:1153:8\n |\n1153 | fn init_repo_with_remote(dir: &Path) -> (std::path::PathBuf, std::path::PathBuf) {\n | ^^^^^^^^^^^^^^^^^^^^^\n |\n = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default\n\n────────────\n Nextest run ID ab4298cc-e711-466d-ac56-c30ebf0fd5bc with nextest profile: default\n Starting 3218 tests across 41 binaries (177 tests skipped)\n────────────\n Summary [ 13.985s] 3218 tests run: 3218 passed, 177 skipped\n",
|
||||
"internal.thread_id": "verify",
|
||||
"command.output": "",
|
||||
"command.stderr": "",
|
||||
"thread.verify.current_node": "fmt",
|
||||
"internal.retry_count.toolchain": 1,
|
||||
"internal.retry_count.preflight_compile": 1,
|
||||
"internal.retry_count.start": 1,
|
||||
"thread.toolchain.current_node": "preflight_compile",
|
||||
"thread.implement.current_node": "simplify_opus",
|
||||
"internal.retry_count.fmt": 1,
|
||||
"last_response": "## Summary\n\n**Fixed 1 issue:**\n\n- **Leaky abstraction** (line 409): `truncate_goal` was being called on `workflow_name`, which would incorrectly strip `#` characters and `Plan:` prefix from workflow n",
|
||||
"internal.fidelity": "compact"
|
||||
},
|
||||
|
|
@ -129,6 +133,15 @@
|
|||
"notes": "Script completed: cargo clippy -q --workspace -- -D warnings 2>&1 && cargo nextest run --cargo-quiet --workspace --status-level fail 2>&1",
|
||||
"duration_ms": 80620
|
||||
},
|
||||
"fmt": {
|
||||
"status": "success",
|
||||
"context_updates": {
|
||||
"command.output": "",
|
||||
"command.stderr": ""
|
||||
},
|
||||
"notes": "Script completed: cargo fmt --all 2>&1",
|
||||
"duration_ms": 1062
|
||||
},
|
||||
"implement": {
|
||||
"status": "success",
|
||||
"context_updates": {
|
||||
|
|
@ -152,7 +165,7 @@
|
|||
"duration_ms": 148532
|
||||
}
|
||||
},
|
||||
"next_node_id": "fmt",
|
||||
"next_node_id": "exit",
|
||||
"loop_failure_signatures": {
|
||||
"simplify_gpt|deterministic|api_deterministic|anthropic|not_found": 1
|
||||
},
|
||||
|
|
@ -164,6 +177,7 @@
|
|||
"preflight_lint": 1,
|
||||
"start": 1,
|
||||
"verify": 1,
|
||||
"fmt": 1,
|
||||
"simplify_opus": 1
|
||||
}
|
||||
}
|
||||
5
nodes/fmt/script_invocation.json
Normal file
5
nodes/fmt/script_invocation.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"command": "cargo fmt --all 2>&1",
|
||||
"language": "shell",
|
||||
"timeout_ms": null
|
||||
}
|
||||
5
nodes/fmt/script_timing.json
Normal file
5
nodes/fmt/script_timing.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"duration_ms": 1061,
|
||||
"exit_code": 0,
|
||||
"timed_out": false
|
||||
}
|
||||
6
nodes/fmt/status.json
Normal file
6
nodes/fmt/status.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"status": "success",
|
||||
"notes": "Script completed: cargo fmt --all 2>&1",
|
||||
"failure_reason": null,
|
||||
"timestamp": "2026-03-20T01:14:44.498259+00:00"
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue