mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-09 03:20:56 +00:00
parent
094f434ea5
commit
c09334d6da
5 changed files with 177 additions and 8 deletions
|
|
@ -1,37 +1,44 @@
|
|||
{
|
||||
"timestamp": "2026-03-20T01:03:14.135683Z",
|
||||
"current_node": "preflight_lint",
|
||||
"timestamp": "2026-03-20T01:06:12.946111Z",
|
||||
"current_node": "implement",
|
||||
"completed_nodes": [
|
||||
"start",
|
||||
"toolchain",
|
||||
"preflight_compile",
|
||||
"preflight_lint"
|
||||
"preflight_lint",
|
||||
"implement"
|
||||
],
|
||||
"node_retries": {
|
||||
"preflight_lint": 1,
|
||||
"implement": 1,
|
||||
"preflight_compile": 1,
|
||||
"start": 1,
|
||||
"toolchain": 1
|
||||
},
|
||||
"context_values": {
|
||||
"internal.thread_id": "preflight_compile",
|
||||
"internal.thread_id": "preflight_lint",
|
||||
"graph.rankdir": "LR",
|
||||
"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",
|
||||
"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",
|
||||
"failure_signature": "",
|
||||
"thread.toolchain.current_node": "preflight_compile",
|
||||
"internal.retry_count.preflight_compile": 1,
|
||||
"thread.preflight_compile.current_node": "preflight_lint",
|
||||
"internal.fidelity": "compact",
|
||||
"internal.retry_count.implement": 1,
|
||||
"graph.model_stylesheet": "\n * { backend: api; model: claude-opus-4-6;}\n ",
|
||||
"last_stage": "implement",
|
||||
"last_response": "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\"",
|
||||
"internal.node_visit_count": 1,
|
||||
"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 ✅",
|
||||
"internal.retry_count.start": 1,
|
||||
"command.stderr": "",
|
||||
"failure_class": "",
|
||||
"outcome": "success",
|
||||
"internal.retry_count.preflight_lint": 1,
|
||||
"command.output": "",
|
||||
"current_node": "preflight_lint",
|
||||
"current_node": "implement",
|
||||
"internal.run_id": "01KM4C6R7M1XZF086NV6F0S7JS",
|
||||
"thread.start.current_node": "toolchain",
|
||||
"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"
|
||||
|
|
@ -56,6 +63,30 @@
|
|||
"notes": "Script completed: cargo clippy -q --workspace -- -D warnings 2>&1",
|
||||
"duration_ms": 10405
|
||||
},
|
||||
"implement": {
|
||||
"status": "success",
|
||||
"context_updates": {
|
||||
"last_stage": "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 ✅",
|
||||
"last_response": "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\""
|
||||
},
|
||||
"notes": "Stage completed: implement",
|
||||
"usage": {
|
||||
"model": "claude-opus-4-6",
|
||||
"input_tokens": 40563,
|
||||
"output_tokens": 6968,
|
||||
"cache_read_tokens": 698910,
|
||||
"cache_write_tokens": 45227,
|
||||
"reasoning_tokens": 67,
|
||||
"cost": 1.1310449999999999
|
||||
},
|
||||
"files_touched": [
|
||||
"/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"
|
||||
],
|
||||
"duration_ms": 176731
|
||||
},
|
||||
"start": {
|
||||
"status": "success",
|
||||
"duration_ms": 0
|
||||
|
|
@ -70,11 +101,12 @@
|
|||
"duration_ms": 39
|
||||
}
|
||||
},
|
||||
"next_node_id": "implement",
|
||||
"next_node_id": "simplify_opus",
|
||||
"node_visits": {
|
||||
"preflight_compile": 1,
|
||||
"toolchain": 1,
|
||||
"preflight_lint": 1,
|
||||
"start": 1
|
||||
"start": 1,
|
||||
"implement": 1
|
||||
}
|
||||
}
|
||||
84
nodes/implement/prompt.md
Normal file
84
nodes/implement/prompt.md
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
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)
|
||||
|
||||
|
||||
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"
|
||||
}
|
||||
42
nodes/implement/response.md
Normal file
42
nodes/implement/response.md
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
Everything passes. Let me summarize the changes made:
|
||||
|
||||
## Summary
|
||||
|
||||
### Step 1: Added hyphenated aliases to catalog
|
||||
|
||||
**`lib/crates/fabro-llm/src/catalog.json`** — Added three new aliases:
|
||||
- `"gpt-54"` for `gpt-5.4` (alongside existing `"gpt54"`)
|
||||
- `"gpt-54-pro"` for `gpt-5.4-pro` (alongside existing `"gpt54-pro"`)
|
||||
- `"gpt-54-mini"` for `gpt-5.4-mini` (alongside existing `"gpt54-mini"`)
|
||||
|
||||
**`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:
|
||||
- `gpt_54_hyphenated_alias` — asserts `get_model_info("gpt-54")` resolves to `gpt-5.4`
|
||||
- `gpt_54_pro_hyphenated_alias` — asserts `get_model_info("gpt-54-pro")` resolves to `gpt-5.4-pro`
|
||||
- `gpt_54_mini_hyphenated_alias` — asserts `get_model_info("gpt-54-mini")` resolves to `gpt-5.4-mini`
|
||||
|
||||
### Step 2: Added `NodeModelKnownRule`
|
||||
|
||||
**`lib/crates/fabro-validate/src/rules.rs`** — Added a new `NodeModelKnownRule` lint rule that:
|
||||
- Iterates `graph.nodes.values()`
|
||||
- Warns when `node.model()` is `Some` and `get_model_info()` returns `None`
|
||||
- Warns when `node.provider()` is `Some` and `Provider::from_str()` fails
|
||||
- Sets `node_id: Some(node.id.clone())` on each diagnostic
|
||||
|
||||
Registered `Box::new(NodeModelKnownRule)` in `built_in_rules()` after `StylesheetModelKnownRule`.
|
||||
|
||||
Added five tests following the existing 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 `"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: Workflow fix
|
||||
|
||||
No change needed to `fabro/workflows/implement/workflow.fabro` — the `model="gpt-54"` on line 19 is now valid after Step 1 added the alias.
|
||||
|
||||
### Verification
|
||||
- `cargo test -p fabro-llm` — 41 tests pass ✅
|
||||
- `cargo test -p fabro-validate` — 147 tests pass ✅
|
||||
- `cargo clippy --workspace -- -D warnings` — clean ✅
|
||||
- `cargo fmt --check --all` — clean ✅
|
||||
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:06:12.945599+00:00"
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue