diff --git a/checkpoint.json b/checkpoint.json index 11b13d757..67af600c6 100644 --- a/checkpoint.json +++ b/checkpoint.json @@ -1,6 +1,6 @@ { - "timestamp": "2026-03-20T01:11:44.799084Z", - "current_node": "verify", + "timestamp": "2026-03-20T01:14:14.457132Z", + "current_node": "fixup", "completed_nodes": [ "start", "toolchain", @@ -9,9 +9,11 @@ "implement", "simplify_opus", "simplify_gpt", - "verify" + "verify", + "fixup" ], "node_retries": { + "fixup": 1, "implement": 1, "verify": 1, "simplify_gpt": 1, @@ -31,30 +33,33 @@ "internal.retry_count.verify": 1, "graph.model_stylesheet": "\n * { backend: api; model: claude-opus-4-6;}\n ", "internal.node_visit_count": 1, + "internal.retry_count.fixup": 1, "internal.retry_count.start": 1, "internal.retry_count.simplify_gpt": 1, - "failure_class": "canceled", - "outcome": "fail", + "failure_class": "", + "outcome": "success", "internal.retry_count.preflight_lint": 1, + "thread.verify.current_node": "fixup", "graph.goal": "# Plan: Add node-level model validation + missing catalog aliases\n\n## Context\n\nRunning `fabro run` with `model=\"gpt-54\"` on a workflow node fails at runtime with `LLM error: Not found on anthropic: model: gpt-54`. Two issues contribute:\n\n1. `fabro validate` doesn't warn about unknown model names on **nodes** (only validates stylesheet models via `StylesheetModelKnownRule`)\n2. The catalog is missing hyphenated aliases like `gpt-54` for `gpt-5.4` (only has `gpt54`)\n\n## Step 1: Add hyphenated aliases to catalog\n\n**File: `lib/crates/fabro-llm/src/catalog.json`**\n\n| Model ID | Current aliases | Add |\n|---|---|---|\n| `gpt-5.4` (line 161) | `[\"gpt54\"]` | `\"gpt-54\"` |\n| `gpt-5.4-pro` (line 178) | `[\"gpt54-pro\"]` | `\"gpt-54-pro\"` |\n| `gpt-5.4-mini` (line 194) | `[\"gpt54-mini\"]` | `\"gpt-54-mini\"` |\n\n**File: `lib/crates/fabro-llm/src/catalog.rs`** — add alias resolution tests:\n- `gpt_54_hyphenated_alias` → asserts `get_model_info(\"gpt-54\")` resolves to `gpt-5.4`\n- `gpt_54_pro_hyphenated_alias` → same for `gpt-54-pro`\n- `gpt_54_mini_hyphenated_alias` → same for `gpt-54-mini`\n\nUpdate insta snapshots (`cargo insta review`) for `gpt_5_4_in_catalog` and `gpt_5_4_pro_in_catalog`.\n\n## Step 2: Add `NodeModelKnownRule`\n\n**File: `lib/crates/fabro-validate/src/rules.rs`**\n\nAdd `NodeModelKnownRule` right after `StylesheetModelKnownRule` (after line 977). Mirrors the stylesheet rule but iterates nodes:\n\n- Iterate `graph.nodes.values()`\n- If `node.model()` is `Some` and `get_model_info()` returns `None` → emit `Severity::Warning`\n- If `node.provider()` is `Some` and `Provider::from_str()` fails → emit `Severity::Warning`\n- Set `node_id: Some(node.id.clone())` on each diagnostic\n\nRegister `Box::new(NodeModelKnownRule)` in `built_in_rules()` (line 33, after `StylesheetModelKnownRule`).\n\n**Tests** (following existing `stylesheet_model_known_rule_*` pattern):\n- `node_model_known_rule_valid_model` — known model, no warnings\n- `node_model_known_rule_unknown_model` — unknown model, 1 warning with model name and node ID\n- `node_model_known_rule_alias` — alias like `\"opus\"`, no warnings\n- `node_model_known_rule_unknown_provider` — bad provider, 1 warning\n- `node_model_known_rule_no_model_no_provider` — plain node, no warnings\n\n## Step 3: Fix the workflow\n\n**File: `fabro/workflows/implement/workflow.fabro` line 19**\n\nChange `model=\"gpt-54\"` to `model=\"gpt-54\"` (now valid after Step 1 adds the alias). No change needed — it will just work.\n\n## Verification\n\n```bash\ncargo test -p fabro-llm\ncargo insta review # accept updated snapshots\ncargo test -p fabro-validate\ncargo clippy --workspace -- -D warnings\ncargo fmt --check --all\n```\n\nThen run `fabro validate fabro/workflows/implement/workflow.fabro` to confirm no warnings.\n", - "internal.thread_id": "simplify_gpt", + "internal.thread_id": "verify", "internal.run_id": "01KM4C6R7M1XZF086NV6F0S7JS", "thread.implement.current_node": "simplify_opus", - "last_stage": "simplify_opus", - "failure_signature": "verify|canceled|script failed with exit code: ## stdout warning: function `init_repo_with_remote` is never used --> lib/crates/fabro-workflows/src/git.rs:: | | fn init_repo_with_remote(dir: &path) -> (std::path::pathbuf,std::path::pathbuf) { ", + "last_stage": "fixup", + "failure_signature": "", "internal.retry_count.simplify_opus": 1, "internal.fidelity": "compact", "internal.retry_count.implement": 1, - "last_response": "Clean. Here's a summary of what was fixed:\n\n## Summary\n\n**Issue found and fixed: Copy-paste duplication between `StylesheetModelKnownRule` and `NodeModelKnownRule`**\n\nThe new `NodeModelKnownRule` had ", + "last_response": "All checks pass. Here's a summary of the two fixes:\n\n1. **Removed unused `init_repo_with_remote` function** in `lib/crates/fabro-workflows/src/git.rs` (lines 1152-1195) — this was a test helper that", "internal.retry_count.toolchain": 1, "thread.preflight_lint.current_node": "implement", "response.implement": "Everything passes. Let me summarize the changes made:\n\n## Summary\n\n### Step 1: Added hyphenated aliases to catalog\n\n**`lib/crates/fabro-llm/src/catalog.json`** — Added three new aliases:\n- `\"gpt-54\"` for `gpt-5.4` (alongside existing `\"gpt54\"`)\n- `\"gpt-54-pro\"` for `gpt-5.4-pro` (alongside existing `\"gpt54-pro\"`)\n- `\"gpt-54-mini\"` for `gpt-5.4-mini` (alongside existing `\"gpt54-mini\"`)\n\n**`lib/crates/fabro-llm/src/catalog.rs`** — Updated two insta snapshots (`gpt_5_4_in_catalog` and `gpt_5_4_pro_in_catalog`) to include the new aliases, and added three new alias resolution tests:\n- `gpt_54_hyphenated_alias` — asserts `get_model_info(\"gpt-54\")` resolves to `gpt-5.4`\n- `gpt_54_pro_hyphenated_alias` — asserts `get_model_info(\"gpt-54-pro\")` resolves to `gpt-5.4-pro`\n- `gpt_54_mini_hyphenated_alias` — asserts `get_model_info(\"gpt-54-mini\")` resolves to `gpt-5.4-mini`\n\n### Step 2: Added `NodeModelKnownRule`\n\n**`lib/crates/fabro-validate/src/rules.rs`** — Added a new `NodeModelKnownRule` lint rule that:\n- Iterates `graph.nodes.values()` \n- Warns when `node.model()` is `Some` and `get_model_info()` returns `None`\n- Warns when `node.provider()` is `Some` and `Provider::from_str()` fails\n- Sets `node_id: Some(node.id.clone())` on each diagnostic\n\nRegistered `Box::new(NodeModelKnownRule)` in `built_in_rules()` after `StylesheetModelKnownRule`.\n\nAdded five tests following the existing pattern:\n- `node_model_known_rule_valid_model` — known model → no warnings\n- `node_model_known_rule_unknown_model` — unknown model → 1 warning with model name and node ID\n- `node_model_known_rule_alias` — alias `\"opus\"` → no warnings\n- `node_model_known_rule_unknown_provider` — bad provider → 1 warning\n- `node_model_known_rule_no_model_no_provider` — plain node → no warnings\n\n### Step 3: Workflow fix\n\nNo change needed to `fabro/workflows/implement/workflow.fabro` — the `model=\"gpt-54\"` on line 19 is now valid after Step 1 added the alias.\n\n### Verification\n- `cargo test -p fabro-llm` — 41 tests pass ✅\n- `cargo test -p fabro-validate` — 147 tests pass ✅\n- `cargo clippy --workspace -- -D warnings` — clean ✅\n- `cargo fmt --check --all` — clean ✅", "command.stderr": "", + "response.fixup": "All checks pass. Here's a summary of the two fixes:\n\n1. **Removed unused `init_repo_with_remote` function** in `lib/crates/fabro-workflows/src/git.rs` (lines 1152-1195) — this was a test helper that was never called, causing a clippy `-D warnings` failure.\n\n2. **Updated trycmd snapshots** in `lib/crates/fabro-cli/tests/cmd/model/` — the `list.trycmd` and `bare.trycmd` files needed updating because the catalog aliases column now includes the new hyphenated aliases (`gpt-54`, `gpt-54-pro`, `gpt-54-mini`), which changed the column width and content.", "thread.preflight_compile.current_node": "preflight_lint", "graph.rankdir": "LR", "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 42154a41-2072-4ed8-a8a0-1d59f643f781 with nextest profile: default\n Starting 3221 tests across 41 binaries (177 tests skipped)\n FAIL [ 0.019s] ( 463/3221) fabro-cli::trycmd cli_model\n stdout ───\n\n running 1 test\n test cli_model ... FAILED\n\n failures:\n\n failures:\n cli_model\n\n test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 14 filtered out; finished in 0.02s\n\n stderr ───\n Testing tests/cmd/model/help.trycmd:2 ... ok 4ms 279us 413ns\n Testing tests/cmd/model/list-query-aliases.trycmd:2 ... ok 5ms 900us 88ns\n Testing tests/cmd/model/list-query.trycmd:2 ... ok 5ms 924us 215ns\n Testing tests/cmd/model/bare.trycmd:2 ... failed 5ms 913us 38ns\n Exit: success\n\n ---- expected: stdout\n ++++ actual: stdout\n 1 - MODEL PROVIDER ALIASES CONTEXT COST SPEED \n 2 - claude-opus-4-6 anthropic opus, claude-opus 1m $15.0 / $75.0 25 tok/s \n 3 - claude-sonnet-4-5 anthropic 200k $3.0 / $15.0 50 tok/s \n 4 - claude-sonnet-4-6 anthropic sonnet, claude-sonnet 200k $3.0 / $15.0 50 tok/s \n 5 - claude-haiku-4-5 anthropic haiku, claude-haiku 200k $0.8 / $4.0 100 tok/s \n 6 - gpt-5.2 openai gpt5 1m $1.8 / $14.0 65 tok/s \n 7 - gpt-5-mini openai gpt5-mini 1m $0.2 / $2.0 70 tok/s \n 8 - gpt-5.2-codex openai 1m $1.8 / $14.0 100 tok/s \n 9 - gpt-5.3-codex openai codex 1m $1.8 / $14.0 100 tok/s \n 10 - gpt-5.3-codex-spark openai codex-spark 131k - / - 1000 tok/s \n 11 - gpt-5.4 openai gpt54 1m $2.5 / $15.0 70 tok/s \n 12 - gpt-5.4-pro openai gpt54-pro 1m $30.0 / $180.0 20 tok/s \n 13 - gpt-5.4-mini openai gpt54-mini 400k $0.8 / $4.5 140 tok/s \n 14 - gemini-3.1-pro-preview gemini gemini-pro 1m $2.0 / $12.0 85 tok/s \n 15 - gemini-3.1-pro-preview-customtools gemini gemini-customtools 1m $2.0 / $12.0 85 tok/s \n 16 - gemini-3-flash-preview gemini gemini-flash 1m $0.5 / $3.0 150 tok/s \n 17 - gemini-3.1-flash-lite-preview gemini gemini-flash-lite 1m $0.2 / $1.5 200 tok/s \n 18 - kimi-k2.5 kimi kimi 262k $0.6 / $3.0 50 tok/s \n 19 - glm-4.7 zai glm, glm4 203k $0.6 / $2.2 100 tok/s \n 20 - minimax-m2.5 minimax minimax 197k $0.3 / $1.2 45 tok/s \n 21 - mercury-2 inception mercury 131k $0.2 / $0.8 1000 tok/s \n 1 + MODEL PROVIDER ALIASES CONTEXT COST SPEED \n 2 + claude-opus-4-6 anthropic opus, claude-opus 1m $15.0 / $75.0 25 tok/s \n 3 + claude-sonnet-4-5 anthropic 200k $3.0 / $15.0 50 tok/s \n 4 + claude-sonnet-4-6 anthropic sonnet, claude-sonnet 200k $3.0 / $15.0 50 tok/s \n 5 + claude-haiku-4-5 anthropic haiku, claude-haiku 200k $0.8 / $4.0 100 tok/s \n 6 + gpt-5.2 openai gpt5 1m $1.8 / $14.0 65 tok/s \n 7 + gpt-5-mini openai gpt5-mini 1m $0.2 / $2.0 70 tok/s \n 8 + gpt-5.2-codex openai 1m $1.8 / $14.0 100 tok/s \n 9 + gpt-5.3-codex openai codex 1m $1.8 / $14.0 100 tok/s \n 10 + gpt-5.3-codex-spark openai codex-spark 131k - / - 1000 tok/s \n 11 + gpt-5.4 openai gpt54, gpt-54 1m $2.5 / $15.0 70 tok/s \n 12 + gpt-5.4-pro openai gpt54-pro, gpt-54-pro 1m $30.0 / $180.0 20 tok/s \n 13 + gpt-5.4-mini openai gpt54-mini, gpt-54-mini 400k $0.8 / $4.5 140 tok/s \n 14 + gemini-3.1-pro-preview gemini gemini-pro 1m $2.0 / $12.0 85 tok/s \n 15 + gemini-3.1-pro-preview-customtools gemini gemini-customtools 1m $2.0 / $12.0 85 tok/s \n 16 + gemini-3-flash-preview gemini gemini-flash 1m $0.5 / $3.0 150 tok/s \n 17 + gemini-3.1-flash-lite-preview gemini gemini-flash-lite 1m $0.2 / $1.5 200 tok/s \n 18 + kimi-k2.5 kimi kimi 262k $0.6 / $3.0 50 tok/s \n 19 + glm-4.7 zai glm, glm4 203k $0.6 / $2.2 100 tok/s \n 20 + minimax-m2.5 minimax minimax 197k $0.3 / $1.2 45 tok/s \n 21 + mercury-2 inception mercury 131k $0.2 / $0.8 1000 tok/s \n 22 22 | ∅\n stderr:\n\n Testing tests/cmd/model/list-provider.trycmd:2 ... ok 6ms 84us 942ns\n Testing tests/cmd/model/list-query-case-insensitive.trycmd:2 ... ok 5ms 108us 434ns\n Testing tests/cmd/model/list.trycmd:2 ... failed 6ms 153us 147ns\n Exit: success\n\n ---- expected: stdout\n ++++ actual: stdout\n 1 - MODEL PROVIDER ALIASES CONTEXT COST SPEED \n 2 - claude-opus-4-6 anthropic opus, claude-opus 1m $15.0 / $75.0 25 tok/s \n 3 - claude-sonnet-4-5 anthropic 200k $3.0 / $15.0 50 tok/s \n 4 - claude-sonnet-4-6 anthropic sonnet, claude-sonnet 200k $3.0 / $15.0 50 tok/s \n 5 - claude-haiku-4-5 anthropic haiku, claude-haiku 200k $0.8 / $4.0 100 tok/s \n 6 - gpt-5.2 openai gpt5 1m $1.8 / $14.0 65 tok/s \n 7 - gpt-5-mini openai gpt5-mini 1m $0.2 / $2.0 70 tok/s \n 8 - gpt-5.2-codex openai 1m $1.8 / $14.0 100 tok/s \n 9 - gpt-5.3-codex openai codex 1m $1.8 / $14.0 100 tok/s \n 10 - gpt-5.3-codex-spark openai codex-spark 131k - / - 1000 tok/s \n 11 - gpt-5.4 openai gpt54 1m $2.5 / $15.0 70 tok/s \n 12 - gpt-5.4-pro openai gpt54-pro 1m $30.0 / $180.0 20 tok/s \n 13 - gpt-5.4-mini openai gpt54-mini 400k $0.8 / $4.5 140 tok/s \n 14 - gemini-3.1-pro-preview gemini gemini-pro 1m $2.0 / $12.0 85 tok/s \n 15 - gemini-3.1-pro-preview-customtools gemini gemini-customtools 1m $2.0 / $12.0 85 tok/s \n 16 - gemini-3-flash-preview gemini gemini-flash 1m $0.5 / $3.0 150 tok/s \n 17 - gemini-3.1-flash-lite-preview gemini gemini-flash-lite 1m $0.2 / $1.5 200 tok/s \n 18 - kimi-k2.5 kimi kimi 262k $0.6 / $3.0 50 tok/s \n 19 - glm-4.7 zai glm, glm4 203k $0.6 / $2.2 100 tok/s \n 20 - minimax-m2.5 minimax minimax 197k $0.3 / $1.2 45 tok/s \n 21 - mercury-2 inception mercury 131k $0.2 / $0.8 1000 tok/s \n 1 + MODEL PROVIDER ALIASES CONTEXT COST SPEED \n 2 + claude-opus-4-6 anthropic opus, claude-opus 1m $15.0 / $75.0 25 tok/s \n 3 + claude-sonnet-4-5 anthropic 200k $3.0 / $15.0 50 tok/s \n 4 + claude-sonnet-4-6 anthropic sonnet, claude-sonnet 200k $3.0 / $15.0 50 tok/s \n 5 + claude-haiku-4-5 anthropic haiku, claude-haiku 200k $0.8 / $4.0 100 tok/s \n 6 + gpt-5.2 openai gpt5 1m $1.8 / $14.0 65 tok/s \n 7 + gpt-5-mini openai gpt5-mini 1m $0.2 / $2.0 70 tok/s \n 8 + gpt-5.2-codex openai 1m $1.8 / $14.0 100 tok/s \n 9 + gpt-5.3-codex openai codex 1m $1.8 / $14.0 100 tok/s \n 10 + gpt-5.3-codex-spark openai codex-spark 131k - / - 1000 tok/s \n 11 + gpt-5.4 openai gpt54, gpt-54 1m $2.5 / $15.0 70 tok/s \n 12 + gpt-5.4-pro openai gpt54-pro, gpt-54-pro 1m $30.0 / $180.0 20 tok/s \n 13 + gpt-5.4-mini openai gpt54-mini, gpt-54-mini 400k $0.8 / $4.5 140 tok/s \n 14 + gemini-3.1-pro-preview gemini gemini-pro 1m $2.0 / $12.0 85 tok/s \n 15 + gemini-3.1-pro-preview-customtools gemini gemini-customtools 1m $2.0 / $12.0 85 tok/s \n 16 + gemini-3-flash-preview gemini gemini-flash 1m $0.5 / $3.0 150 tok/s \n 17 + gemini-3.1-flash-lite-preview gemini gemini-flash-lite 1m $0.2 / $1.5 200 tok/s \n 18 + kimi-k2.5 kimi kimi 262k $0.6 / $3.0 50 tok/s \n 19 + glm-4.7 zai glm, glm4 203k $0.6 / $2.2 100 tok/s \n 20 + minimax-m2.5 minimax minimax 197k $0.3 / $1.2 45 tok/s \n 21 + mercury-2 inception mercury 131k $0.2 / $0.8 1000 tok/s \n 22 22 | ∅\n stderr:\n\n Update snapshots with `TRYCMD=overwrite`\n Debug output with `TRYCMD=dump`\n\n thread 'cli_model' (24410) panicked at /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/trycmd-0.15.11/src/runner.rs:123:17:\n 2 of 7 tests failed\n note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n\n Cancelling due to test failure: 3 tests still running\n────────────\n Summary [ 3.552s] 466/3221 tests run: 465 passed, 1 failed, 177 skipped\n FAIL [ 0.019s] ( 463/3221) fabro-cli::trycmd cli_model\nwarning: 2755/3221 tests were not run due to test failure (run with --no-fail-fast to run all tests, or run with --max-fail)\nerror: test run failed\n", - "current_node": "verify", - "current.preamble": "Goal: # Plan: Add node-level model validation + missing catalog aliases\n\n## Context\n\nRunning `fabro run` with `model=\"gpt-54\"` on a workflow node fails at runtime with `LLM error: Not found on anthropic: model: gpt-54`. Two issues contribute:\n\n1. `fabro validate` doesn't warn about unknown model names on **nodes** (only validates stylesheet models via `StylesheetModelKnownRule`)\n2. The catalog is missing hyphenated aliases like `gpt-54` for `gpt-5.4` (only has `gpt54`)\n\n## Step 1: Add hyphenated aliases to catalog\n\n**File: `lib/crates/fabro-llm/src/catalog.json`**\n\n| Model ID | Current aliases | Add |\n|---|---|---|\n| `gpt-5.4` (line 161) | `[\"gpt54\"]` | `\"gpt-54\"` |\n| `gpt-5.4-pro` (line 178) | `[\"gpt54-pro\"]` | `\"gpt-54-pro\"` |\n| `gpt-5.4-mini` (line 194) | `[\"gpt54-mini\"]` | `\"gpt-54-mini\"` |\n\n**File: `lib/crates/fabro-llm/src/catalog.rs`** — add alias resolution tests:\n- `gpt_54_hyphenated_alias` → asserts `get_model_info(\"gpt-54\")` resolves to `gpt-5.4`\n- `gpt_54_pro_hyphenated_alias` → same for `gpt-54-pro`\n- `gpt_54_mini_hyphenated_alias` → same for `gpt-54-mini`\n\nUpdate insta snapshots (`cargo insta review`) for `gpt_5_4_in_catalog` and `gpt_5_4_pro_in_catalog`.\n\n## Step 2: Add `NodeModelKnownRule`\n\n**File: `lib/crates/fabro-validate/src/rules.rs`**\n\nAdd `NodeModelKnownRule` right after `StylesheetModelKnownRule` (after line 977). Mirrors the stylesheet rule but iterates nodes:\n\n- Iterate `graph.nodes.values()`\n- If `node.model()` is `Some` and `get_model_info()` returns `None` → emit `Severity::Warning`\n- If `node.provider()` is `Some` and `Provider::from_str()` fails → emit `Severity::Warning`\n- Set `node_id: Some(node.id.clone())` on each diagnostic\n\nRegister `Box::new(NodeModelKnownRule)` in `built_in_rules()` (line 33, after `StylesheetModelKnownRule`).\n\n**Tests** (following existing `stylesheet_model_known_rule_*` pattern):\n- `node_model_known_rule_valid_model` — known model, no warnings\n- `node_model_known_rule_unknown_model` — unknown model, 1 warning with model name and node ID\n- `node_model_known_rule_alias` — alias like `\"opus\"`, no warnings\n- `node_model_known_rule_unknown_provider` — bad provider, 1 warning\n- `node_model_known_rule_no_model_no_provider` — plain node, no warnings\n\n## Step 3: Fix the workflow\n\n**File: `fabro/workflows/implement/workflow.fabro` line 19**\n\nChange `model=\"gpt-54\"` to `model=\"gpt-54\"` (now valid after Step 1 adds the alias). No change needed — it will just work.\n\n## Verification\n\n```bash\ncargo test -p fabro-llm\ncargo insta review # accept updated snapshots\ncargo test -p fabro-validate\ncargo clippy --workspace -- -D warnings\ncargo fmt --check --all\n```\n\nThen run `fabro validate fabro/workflows/implement/workflow.fabro` to confirm no warnings.\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, 40.6k tokens in / 7.0k out\n - Files: /home/daytona/workspace/lib/crates/fabro-llm/src/catalog.json, /home/daytona/workspace/lib/crates/fabro-llm/src/catalog.rs, /home/daytona/workspace/lib/crates/fabro-validate/src/rules.rs\n- **simplify_opus**: success\n - Model: claude-opus-4-6, 24.7k tokens in / 10.1k out\n - Files: /home/daytona/workspace/lib/crates/fabro-validate/src/rules.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_node": "fixup", + "current.preamble": "Goal: # Plan: Add node-level model validation + missing catalog aliases\n\n## Context\n\nRunning `fabro run` with `model=\"gpt-54\"` on a workflow node fails at runtime with `LLM error: Not found on anthropic: model: gpt-54`. Two issues contribute:\n\n1. `fabro validate` doesn't warn about unknown model names on **nodes** (only validates stylesheet models via `StylesheetModelKnownRule`)\n2. The catalog is missing hyphenated aliases like `gpt-54` for `gpt-5.4` (only has `gpt54`)\n\n## Step 1: Add hyphenated aliases to catalog\n\n**File: `lib/crates/fabro-llm/src/catalog.json`**\n\n| Model ID | Current aliases | Add |\n|---|---|---|\n| `gpt-5.4` (line 161) | `[\"gpt54\"]` | `\"gpt-54\"` |\n| `gpt-5.4-pro` (line 178) | `[\"gpt54-pro\"]` | `\"gpt-54-pro\"` |\n| `gpt-5.4-mini` (line 194) | `[\"gpt54-mini\"]` | `\"gpt-54-mini\"` |\n\n**File: `lib/crates/fabro-llm/src/catalog.rs`** — add alias resolution tests:\n- `gpt_54_hyphenated_alias` → asserts `get_model_info(\"gpt-54\")` resolves to `gpt-5.4`\n- `gpt_54_pro_hyphenated_alias` → same for `gpt-54-pro`\n- `gpt_54_mini_hyphenated_alias` → same for `gpt-54-mini`\n\nUpdate insta snapshots (`cargo insta review`) for `gpt_5_4_in_catalog` and `gpt_5_4_pro_in_catalog`.\n\n## Step 2: Add `NodeModelKnownRule`\n\n**File: `lib/crates/fabro-validate/src/rules.rs`**\n\nAdd `NodeModelKnownRule` right after `StylesheetModelKnownRule` (after line 977). Mirrors the stylesheet rule but iterates nodes:\n\n- Iterate `graph.nodes.values()`\n- If `node.model()` is `Some` and `get_model_info()` returns `None` → emit `Severity::Warning`\n- If `node.provider()` is `Some` and `Provider::from_str()` fails → emit `Severity::Warning`\n- Set `node_id: Some(node.id.clone())` on each diagnostic\n\nRegister `Box::new(NodeModelKnownRule)` in `built_in_rules()` (line 33, after `StylesheetModelKnownRule`).\n\n**Tests** (following existing `stylesheet_model_known_rule_*` pattern):\n- `node_model_known_rule_valid_model` — known model, no warnings\n- `node_model_known_rule_unknown_model` — unknown model, 1 warning with model name and node ID\n- `node_model_known_rule_alias` — alias like `\"opus\"`, no warnings\n- `node_model_known_rule_unknown_provider` — bad provider, 1 warning\n- `node_model_known_rule_no_model_no_provider` — plain node, no warnings\n\n## Step 3: Fix the workflow\n\n**File: `fabro/workflows/implement/workflow.fabro` line 19**\n\nChange `model=\"gpt-54\"` to `model=\"gpt-54\"` (now valid after Step 1 adds the alias). No change needed — it will just work.\n\n## Verification\n\n```bash\ncargo test -p fabro-llm\ncargo insta review # accept updated snapshots\ncargo test -p fabro-validate\ncargo clippy --workspace -- -D warnings\ncargo fmt --check --all\n```\n\nThen run `fabro validate fabro/workflows/implement/workflow.fabro` to confirm no warnings.\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, 40.6k tokens in / 7.0k out\n - Files: /home/daytona/workspace/lib/crates/fabro-llm/src/catalog.json, /home/daytona/workspace/lib/crates/fabro-llm/src/catalog.rs, /home/daytona/workspace/lib/crates/fabro-validate/src/rules.rs\n- **simplify_opus**: success\n - Model: claude-opus-4-6, 24.7k tokens in / 10.1k out\n - Files: /home/daytona/workspace/lib/crates/fabro-validate/src/rules.rs\n- **simplify_gpt**: fail\n- **verify**: fail\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 (118 lines omitted)\n 13 + gpt-5.4-mini openai gpt54-mini, gpt-54-mini 400k $0.8 / $4.5 140 tok/s \n 14 + gemini-3.1-pro-preview gemini gemini-pro 1m $2.0 / $12.0 85 tok/s \n 15 + gemini-3.1-pro-preview-customtools gemini gemini-customtools 1m $2.0 / $12.0 85 tok/s \n 16 + gemini-3-flash-preview gemini gemini-flash 1m $0.5 / $3.0 150 tok/s \n 17 + gemini-3.1-flash-lite-preview gemini gemini-flash-lite 1m $0.2 / $1.5 200 tok/s \n 18 + kimi-k2.5 kimi kimi 262k $0.6 / $3.0 50 tok/s \n 19 + glm-4.7 zai glm, glm4 203k $0.6 / $2.2 100 tok/s \n 20 + minimax-m2.5 minimax minimax 197k $0.3 / $1.2 45 tok/s \n 21 + mercury-2 inception mercury 131k $0.2 / $0.8 1000 tok/s \n 22 22 | ∅\n stderr:\n \n Update snapshots with `TRYCMD=overwrite`\n Debug output with `TRYCMD=dump`\n \n thread 'cli_model' (24410) panicked at /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/trycmd-0.15.11/src/runner.rs:123:17:\n 2 of 7 tests failed\n note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n \n Cancelling due to test failure: 3 tests still running\n ────────────\n Summary [ 3.552s] 466/3221 tests run: 465 passed, 1 failed, 177 skipped\n FAIL [ 0.019s] ( 463/3221) fabro-cli::trycmd cli_model\n warning: 2755/3221 tests were not run due to test failure (run with --no-fail-fast to run all tests, or run with --max-fail)\n error: test run failed\n ```\n - Stderr: (empty)\n\n## Context\n- failure_class: canceled\n- failure_signature: verify|canceled|script failed with exit code: ## stdout warning: function `init_repo_with_remote` is never used --> lib/crates/fabro-workflows/src/git.rs:: | | fn init_repo_with_remote(dir: &path) -> (std::path::pathbuf,std::path::pathbuf) { \n" }, "logs": [], "node_outcomes": { @@ -147,6 +152,28 @@ "notes": "Script completed: cargo clippy -q --workspace -- -D warnings 2>&1", "duration_ms": 10405 }, + "fixup": { + "status": "success", + "context_updates": { + "last_stage": "fixup", + "response.fixup": "All checks pass. Here's a summary of the two fixes:\n\n1. **Removed unused `init_repo_with_remote` function** in `lib/crates/fabro-workflows/src/git.rs` (lines 1152-1195) — this was a test helper that was never called, causing a clippy `-D warnings` failure.\n\n2. **Updated trycmd snapshots** in `lib/crates/fabro-cli/tests/cmd/model/` — the `list.trycmd` and `bare.trycmd` files needed updating because the catalog aliases column now includes the new hyphenated aliases (`gpt-54`, `gpt-54-pro`, `gpt-54-mini`), which changed the column width and content.", + "last_response": "All checks pass. Here's a summary of the two fixes:\n\n1. **Removed unused `init_repo_with_remote` function** in `lib/crates/fabro-workflows/src/git.rs` (lines 1152-1195) — this was a test helper that" + }, + "notes": "Stage completed: fixup", + "usage": { + "model": "claude-opus-4-6", + "input_tokens": 22779, + "output_tokens": 3287, + "cache_read_tokens": 241516, + "cache_write_tokens": 27907, + "reasoning_tokens": 273, + "cost": 0.58821 + }, + "files_touched": [ + "/home/daytona/workspace/lib/crates/fabro-workflows/src/git.rs" + ], + "duration_ms": 147243 + }, "toolchain": { "status": "success", "context_updates": { @@ -157,7 +184,7 @@ "duration_ms": 39 } }, - "next_node_id": "fixup", + "next_node_id": "verify", "loop_failure_signatures": { "simplify_gpt|deterministic|api_deterministic|anthropic|not_found": 1 }, @@ -167,6 +194,7 @@ "verify": 1, "preflight_lint": 1, "start": 1, + "fixup": 1, "preflight_compile": 1, "simplify_opus": 1, "implement": 1 diff --git a/nodes/fixup/prompt.md b/nodes/fixup/prompt.md new file mode 100644 index 000000000..9cbe94db1 --- /dev/null +++ b/nodes/fixup/prompt.md @@ -0,0 +1,127 @@ +Goal: # Plan: Add node-level model validation + missing catalog aliases + +## Context + +Running `fabro run` with `model="gpt-54"` on a workflow node fails at runtime with `LLM error: Not found on anthropic: model: gpt-54`. Two issues contribute: + +1. `fabro validate` doesn't warn about unknown model names on **nodes** (only validates stylesheet models via `StylesheetModelKnownRule`) +2. The catalog is missing hyphenated aliases like `gpt-54` for `gpt-5.4` (only has `gpt54`) + +## Step 1: Add hyphenated aliases to catalog + +**File: `lib/crates/fabro-llm/src/catalog.json`** + +| Model ID | Current aliases | Add | +|---|---|---| +| `gpt-5.4` (line 161) | `["gpt54"]` | `"gpt-54"` | +| `gpt-5.4-pro` (line 178) | `["gpt54-pro"]` | `"gpt-54-pro"` | +| `gpt-5.4-mini` (line 194) | `["gpt54-mini"]` | `"gpt-54-mini"` | + +**File: `lib/crates/fabro-llm/src/catalog.rs`** — add alias resolution tests: +- `gpt_54_hyphenated_alias` → asserts `get_model_info("gpt-54")` resolves to `gpt-5.4` +- `gpt_54_pro_hyphenated_alias` → same for `gpt-54-pro` +- `gpt_54_mini_hyphenated_alias` → same for `gpt-54-mini` + +Update insta snapshots (`cargo insta review`) for `gpt_5_4_in_catalog` and `gpt_5_4_pro_in_catalog`. + +## Step 2: Add `NodeModelKnownRule` + +**File: `lib/crates/fabro-validate/src/rules.rs`** + +Add `NodeModelKnownRule` right after `StylesheetModelKnownRule` (after line 977). Mirrors the stylesheet rule but iterates nodes: + +- Iterate `graph.nodes.values()` +- If `node.model()` is `Some` and `get_model_info()` returns `None` → emit `Severity::Warning` +- If `node.provider()` is `Some` and `Provider::from_str()` fails → emit `Severity::Warning` +- Set `node_id: Some(node.id.clone())` on each diagnostic + +Register `Box::new(NodeModelKnownRule)` in `built_in_rules()` (line 33, after `StylesheetModelKnownRule`). + +**Tests** (following existing `stylesheet_model_known_rule_*` pattern): +- `node_model_known_rule_valid_model` — known model, no warnings +- `node_model_known_rule_unknown_model` — unknown model, 1 warning with model name and node ID +- `node_model_known_rule_alias` — alias like `"opus"`, no warnings +- `node_model_known_rule_unknown_provider` — bad provider, 1 warning +- `node_model_known_rule_no_model_no_provider` — plain node, no warnings + +## Step 3: Fix the workflow + +**File: `fabro/workflows/implement/workflow.fabro` line 19** + +Change `model="gpt-54"` to `model="gpt-54"` (now valid after Step 1 adds the alias). No change needed — it will just work. + +## Verification + +```bash +cargo test -p fabro-llm +cargo insta review # accept updated snapshots +cargo test -p fabro-validate +cargo clippy --workspace -- -D warnings +cargo fmt --check --all +``` + +Then run `fabro validate fabro/workflows/implement/workflow.fabro` to confirm no warnings. + + +## 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) +- **implement**: success + - Model: claude-opus-4-6, 40.6k tokens in / 7.0k out + - Files: /home/daytona/workspace/lib/crates/fabro-llm/src/catalog.json, /home/daytona/workspace/lib/crates/fabro-llm/src/catalog.rs, /home/daytona/workspace/lib/crates/fabro-validate/src/rules.rs +- **simplify_opus**: success + - Model: claude-opus-4-6, 24.7k tokens in / 10.1k out + - Files: /home/daytona/workspace/lib/crates/fabro-validate/src/rules.rs +- **simplify_gpt**: fail +- **verify**: fail + - Script: `cargo clippy -q --workspace -- -D warnings 2>&1 && cargo nextest run --cargo-quiet --workspace --status-level fail 2>&1` + - Stdout: + ``` + (118 lines omitted) + 13 + gpt-5.4-mini openai gpt54-mini, gpt-54-mini 400k $0.8 / $4.5 140 tok/s + 14 + gemini-3.1-pro-preview gemini gemini-pro 1m $2.0 / $12.0 85 tok/s + 15 + gemini-3.1-pro-preview-customtools gemini gemini-customtools 1m $2.0 / $12.0 85 tok/s + 16 + gemini-3-flash-preview gemini gemini-flash 1m $0.5 / $3.0 150 tok/s + 17 + gemini-3.1-flash-lite-preview gemini gemini-flash-lite 1m $0.2 / $1.5 200 tok/s + 18 + kimi-k2.5 kimi kimi 262k $0.6 / $3.0 50 tok/s + 19 + glm-4.7 zai glm, glm4 203k $0.6 / $2.2 100 tok/s + 20 + minimax-m2.5 minimax minimax 197k $0.3 / $1.2 45 tok/s + 21 + mercury-2 inception mercury 131k $0.2 / $0.8 1000 tok/s + 22 22 | ∅ + stderr: + + Update snapshots with `TRYCMD=overwrite` + Debug output with `TRYCMD=dump` + + thread 'cli_model' (24410) panicked at /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/trycmd-0.15.11/src/runner.rs:123:17: + 2 of 7 tests failed + note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace + + Cancelling due to test failure: 3 tests still running + ──────────── + Summary [ 3.552s] 466/3221 tests run: 465 passed, 1 failed, 177 skipped + FAIL [ 0.019s] ( 463/3221) fabro-cli::trycmd cli_model + warning: 2755/3221 tests were not run due to test failure (run with --no-fail-fast to run all tests, or run with --max-fail) + error: test run failed + ``` + - Stderr: (empty) + +## Context +- failure_class: canceled +- failure_signature: verify|canceled|script failed with exit code: ## stdout warning: function `init_repo_with_remote` is never used --> lib/crates/fabro-workflows/src/git.rs:: | | fn init_repo_with_remote(dir: &path) -> (std::path::pathbuf,std::path::pathbuf) { + + +The verify step failed. Read the build output from context and fix all clippy lint warnings and test failures. \ No newline at end of file diff --git a/nodes/fixup/provider_used.json b/nodes/fixup/provider_used.json new file mode 100644 index 000000000..c1905ff10 --- /dev/null +++ b/nodes/fixup/provider_used.json @@ -0,0 +1,5 @@ +{ + "mode": "agent", + "provider": "anthropic", + "model": "claude-opus-4-6" +} \ No newline at end of file diff --git a/nodes/fixup/response.md b/nodes/fixup/response.md new file mode 100644 index 000000000..ab44f4b24 --- /dev/null +++ b/nodes/fixup/response.md @@ -0,0 +1,5 @@ +All checks pass. Here's a summary of the two fixes: + +1. **Removed unused `init_repo_with_remote` function** in `lib/crates/fabro-workflows/src/git.rs` (lines 1152-1195) — this was a test helper that was never called, causing a clippy `-D warnings` failure. + +2. **Updated trycmd snapshots** in `lib/crates/fabro-cli/tests/cmd/model/` — the `list.trycmd` and `bare.trycmd` files needed updating because the catalog aliases column now includes the new hyphenated aliases (`gpt-54`, `gpt-54-pro`, `gpt-54-mini`), which changed the column width and content. \ No newline at end of file diff --git a/nodes/fixup/status.json b/nodes/fixup/status.json new file mode 100644 index 000000000..f9416c285 --- /dev/null +++ b/nodes/fixup/status.json @@ -0,0 +1,6 @@ +{ + "status": "success", + "notes": "Stage completed: fixup", + "failure_reason": null, + "timestamp": "2026-03-20T01:14:14.456923+00:00" +} \ No newline at end of file