mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-05 08:10:39 +00:00
parent
e98edbc263
commit
089657b043
4 changed files with 56 additions and 27 deletions
|
|
@ -1,34 +1,46 @@
|
|||
{
|
||||
"timestamp": "2026-04-01T15:44:36.022813Z",
|
||||
"current_node": "preflight_compile",
|
||||
"timestamp": "2026-04-01T15:44:54.667830Z",
|
||||
"current_node": "preflight_lint",
|
||||
"completed_nodes": [
|
||||
"start",
|
||||
"toolchain",
|
||||
"preflight_compile"
|
||||
"preflight_compile",
|
||||
"preflight_lint"
|
||||
],
|
||||
"node_retries": {},
|
||||
"context_values": {
|
||||
"failure_class": "",
|
||||
"thread.toolchain.current_node": "preflight_compile",
|
||||
"internal.retry_count.toolchain": 0,
|
||||
"internal.retry_count.preflight_compile": 0,
|
||||
"internal.fidelity": "compact",
|
||||
"internal.node_visit_count": 1,
|
||||
"internal.run_id": "01KN4VB09T999RE1V2DD8Z3YC3",
|
||||
"command.output": "",
|
||||
"graph.goal": "# Add `--force` flag to `fabro pr create`\n\n## Context\n`fabro pr create` rejects runs with non-success status. Users sometimes want to create PRs for failed runs (e.g. partial work worth reviewing). A `--force` flag bypasses the status check.\n\n## Changes\n\n### 1. Add `--force` flag to `PrCreateArgs` (`lib/crates/fabro-cli/src/args.rs:582-588`)\nAdd `#[arg(short, long)] pub(crate) force: bool` to `PrCreateArgs`.\n\n### 2. Pass `force` through and skip status check (`lib/crates/fabro-cli/src/commands/pr/create.rs:76-79`)\nReplace the hard bail with a warning when `--force` is set:\n```rust\nmatch conclusion.status {\n StageStatus::Success | StageStatus::PartialSuccess => {}\n status if args.force => {\n tracing::warn!(\"Run status is '{status}', proceeding because --force was specified\");\n }\n status => bail!(\"Run status is '{status}', expected success or partial_success\"),\n}\n```\n\n### 3. Add `setup_failed_run` helper (`lib/crates/fabro-cli/tests/it/cmd/support.rs`)\nNew helper that runs a real (non-dry-run) workflow with a `shape=parallelogram, script=\"exit 1\"` node. This produces a genuine `conclusion.json` with `status: \"fail\"`. Pattern follows `run_local_workflow` — uses `--sandbox local --provider openai` with `OPENAI_API_KEY=test`. The helper won't assert CLI exit success since the workflow fails; instead it finds the run dir via `only_run`.\n\n### 4. Add integration tests (`lib/crates/fabro-cli/tests/it/cmd/pr_create.rs`)\n\n**a) `pr_create_failed_run_rejects_without_force`** — `setup_failed_run`, run `pr create <run_id>`, assert error \"Run status is 'fail', expected success or partial_success\"\n\n**b) `pr_create_failed_run_proceeds_with_force`** — `setup_failed_run`, run `pr create --force <run_id>`, assert it passes status check and hits next validation error (\"Run has no run_branch\"). Proves `--force` bypassed the status gate.\n\n## Verification\n- `cargo clippy -p fabro-cli -- -D warnings`\n- `cargo nextest run -p fabro-cli`\n- `./target/debug/fabro pr create --help` — confirm `-f`/`--force` appears\n",
|
||||
"failure_signature": "",
|
||||
"current.preamble": "Goal: # Add `--force` flag to `fabro pr create`\n\n## Context\n`fabro pr create` rejects runs with non-success status. Users sometimes want to create PRs for failed runs (e.g. partial work worth reviewing). A `--force` flag bypasses the status check.\n\n## Changes\n\n### 1. Add `--force` flag to `PrCreateArgs` (`lib/crates/fabro-cli/src/args.rs:582-588`)\nAdd `#[arg(short, long)] pub(crate) force: bool` to `PrCreateArgs`.\n\n### 2. Pass `force` through and skip status check (`lib/crates/fabro-cli/src/commands/pr/create.rs:76-79`)\nReplace the hard bail with a warning when `--force` is set:\n```rust\nmatch conclusion.status {\n StageStatus::Success | StageStatus::PartialSuccess => {}\n status if args.force => {\n tracing::warn!(\"Run status is '{status}', proceeding because --force was specified\");\n }\n status => bail!(\"Run status is '{status}', expected success or partial_success\"),\n}\n```\n\n### 3. Add `setup_failed_run` helper (`lib/crates/fabro-cli/tests/it/cmd/support.rs`)\nNew helper that runs a real (non-dry-run) workflow with a `shape=parallelogram, script=\"exit 1\"` node. This produces a genuine `conclusion.json` with `status: \"fail\"`. Pattern follows `run_local_workflow` — uses `--sandbox local --provider openai` with `OPENAI_API_KEY=test`. The helper won't assert CLI exit success since the workflow fails; instead it finds the run dir via `only_run`.\n\n### 4. Add integration tests (`lib/crates/fabro-cli/tests/it/cmd/pr_create.rs`)\n\n**a) `pr_create_failed_run_rejects_without_force`** — `setup_failed_run`, run `pr create <run_id>`, assert error \"Run status is 'fail', expected success or partial_success\"\n\n**b) `pr_create_failed_run_proceeds_with_force`** — `setup_failed_run`, run `pr create --force <run_id>`, assert it passes status check and hits next validation error (\"Run has no run_branch\"). Proves `--force` bypassed the status gate.\n\n## Verification\n- `cargo clippy -p fabro-cli -- -D warnings`\n- `cargo nextest run -p fabro-cli`\n- `./target/debug/fabro pr create --help` — confirm `-f`/`--force` appears\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",
|
||||
"graph.model_stylesheet": "\n * { model: claude-opus-4-6; }\n ",
|
||||
"graph.rankdir": "LR",
|
||||
"thread.start.current_node": "toolchain",
|
||||
"command.stderr": "",
|
||||
"outcome": "success",
|
||||
"current_node": "preflight_compile",
|
||||
"command.output": "",
|
||||
"internal.retry_count.start": 0,
|
||||
"internal.thread_id": "toolchain"
|
||||
"command.stderr": "",
|
||||
"thread.start.current_node": "toolchain",
|
||||
"current_node": "preflight_lint",
|
||||
"failure_signature": "",
|
||||
"graph.goal": "# Add `--force` flag to `fabro pr create`\n\n## Context\n`fabro pr create` rejects runs with non-success status. Users sometimes want to create PRs for failed runs (e.g. partial work worth reviewing). A `--force` flag bypasses the status check.\n\n## Changes\n\n### 1. Add `--force` flag to `PrCreateArgs` (`lib/crates/fabro-cli/src/args.rs:582-588`)\nAdd `#[arg(short, long)] pub(crate) force: bool` to `PrCreateArgs`.\n\n### 2. Pass `force` through and skip status check (`lib/crates/fabro-cli/src/commands/pr/create.rs:76-79`)\nReplace the hard bail with a warning when `--force` is set:\n```rust\nmatch conclusion.status {\n StageStatus::Success | StageStatus::PartialSuccess => {}\n status if args.force => {\n tracing::warn!(\"Run status is '{status}', proceeding because --force was specified\");\n }\n status => bail!(\"Run status is '{status}', expected success or partial_success\"),\n}\n```\n\n### 3. Add `setup_failed_run` helper (`lib/crates/fabro-cli/tests/it/cmd/support.rs`)\nNew helper that runs a real (non-dry-run) workflow with a `shape=parallelogram, script=\"exit 1\"` node. This produces a genuine `conclusion.json` with `status: \"fail\"`. Pattern follows `run_local_workflow` — uses `--sandbox local --provider openai` with `OPENAI_API_KEY=test`. The helper won't assert CLI exit success since the workflow fails; instead it finds the run dir via `only_run`.\n\n### 4. Add integration tests (`lib/crates/fabro-cli/tests/it/cmd/pr_create.rs`)\n\n**a) `pr_create_failed_run_rejects_without_force`** — `setup_failed_run`, run `pr create <run_id>`, assert error \"Run status is 'fail', expected success or partial_success\"\n\n**b) `pr_create_failed_run_proceeds_with_force`** — `setup_failed_run`, run `pr create --force <run_id>`, assert it passes status check and hits next validation error (\"Run has no run_branch\"). Proves `--force` bypassed the status gate.\n\n## Verification\n- `cargo clippy -p fabro-cli -- -D warnings`\n- `cargo nextest run -p fabro-cli`\n- `./target/debug/fabro pr create --help` — confirm `-f`/`--force` appears\n",
|
||||
"outcome": "success",
|
||||
"thread.toolchain.current_node": "preflight_compile",
|
||||
"graph.rankdir": "LR",
|
||||
"failure_class": "",
|
||||
"internal.fidelity": "compact",
|
||||
"internal.thread_id": "preflight_compile",
|
||||
"thread.preflight_compile.current_node": "preflight_lint",
|
||||
"internal.run_id": "01KN4VB09T999RE1V2DD8Z3YC3",
|
||||
"current.preamble": "Goal: # Add `--force` flag to `fabro pr create`\n\n## Context\n`fabro pr create` rejects runs with non-success status. Users sometimes want to create PRs for failed runs (e.g. partial work worth reviewing). A `--force` flag bypasses the status check.\n\n## Changes\n\n### 1. Add `--force` flag to `PrCreateArgs` (`lib/crates/fabro-cli/src/args.rs:582-588`)\nAdd `#[arg(short, long)] pub(crate) force: bool` to `PrCreateArgs`.\n\n### 2. Pass `force` through and skip status check (`lib/crates/fabro-cli/src/commands/pr/create.rs:76-79`)\nReplace the hard bail with a warning when `--force` is set:\n```rust\nmatch conclusion.status {\n StageStatus::Success | StageStatus::PartialSuccess => {}\n status if args.force => {\n tracing::warn!(\"Run status is '{status}', proceeding because --force was specified\");\n }\n status => bail!(\"Run status is '{status}', expected success or partial_success\"),\n}\n```\n\n### 3. Add `setup_failed_run` helper (`lib/crates/fabro-cli/tests/it/cmd/support.rs`)\nNew helper that runs a real (non-dry-run) workflow with a `shape=parallelogram, script=\"exit 1\"` node. This produces a genuine `conclusion.json` with `status: \"fail\"`. Pattern follows `run_local_workflow` — uses `--sandbox local --provider openai` with `OPENAI_API_KEY=test`. The helper won't assert CLI exit success since the workflow fails; instead it finds the run dir via `only_run`.\n\n### 4. Add integration tests (`lib/crates/fabro-cli/tests/it/cmd/pr_create.rs`)\n\n**a) `pr_create_failed_run_rejects_without_force`** — `setup_failed_run`, run `pr create <run_id>`, assert error \"Run status is 'fail', expected success or partial_success\"\n\n**b) `pr_create_failed_run_proceeds_with_force`** — `setup_failed_run`, run `pr create --force <run_id>`, assert it passes status check and hits next validation error (\"Run has no run_branch\"). Proves `--force` bypassed the status gate.\n\n## Verification\n- `cargo clippy -p fabro-cli -- -D warnings`\n- `cargo nextest run -p fabro-cli`\n- `./target/debug/fabro pr create --help` — confirm `-f`/`--force` appears\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",
|
||||
"internal.retry_count.preflight_lint": 0,
|
||||
"internal.retry_count.preflight_compile": 0,
|
||||
"internal.node_visit_count": 1,
|
||||
"internal.retry_count.toolchain": 0
|
||||
},
|
||||
"node_outcomes": {
|
||||
"preflight_compile": {
|
||||
"status": "success",
|
||||
"context_updates": {
|
||||
"command.output": "",
|
||||
"command.stderr": ""
|
||||
},
|
||||
"notes": "Script completed: cargo check -q --workspace 2>&1",
|
||||
"usage": null
|
||||
},
|
||||
"start": {
|
||||
"status": "success",
|
||||
"usage": null
|
||||
|
|
@ -42,20 +54,21 @@
|
|||
"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",
|
||||
"usage": null
|
||||
},
|
||||
"preflight_compile": {
|
||||
"preflight_lint": {
|
||||
"status": "success",
|
||||
"context_updates": {
|
||||
"command.output": "",
|
||||
"command.stderr": ""
|
||||
"command.stderr": "",
|
||||
"command.output": ""
|
||||
},
|
||||
"notes": "Script completed: cargo check -q --workspace 2>&1",
|
||||
"notes": "Script completed: cargo clippy -q --workspace -- -D warnings 2>&1",
|
||||
"usage": null
|
||||
}
|
||||
},
|
||||
"next_node_id": "preflight_lint",
|
||||
"next_node_id": "implement",
|
||||
"node_visits": {
|
||||
"toolchain": 1,
|
||||
"preflight_lint": 1,
|
||||
"start": 1,
|
||||
"preflight_compile": 1,
|
||||
"start": 1
|
||||
"toolchain": 1
|
||||
}
|
||||
}
|
||||
5
nodes/preflight_lint/script_invocation.json
Normal file
5
nodes/preflight_lint/script_invocation.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"command": "cargo clippy -q --workspace -- -D warnings 2>&1",
|
||||
"language": "shell",
|
||||
"timeout_ms": null
|
||||
}
|
||||
5
nodes/preflight_lint/script_timing.json
Normal file
5
nodes/preflight_lint/script_timing.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"duration_ms": 15598,
|
||||
"exit_code": 0,
|
||||
"timed_out": false
|
||||
}
|
||||
6
nodes/preflight_lint/status.json
Normal file
6
nodes/preflight_lint/status.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"status": "success",
|
||||
"notes": "Script completed: cargo clippy -q --workspace -- -D warnings 2>&1",
|
||||
"failure_reason": null,
|
||||
"timestamp": "2026-04-01T15:44:54.662072Z"
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue