⚒️ Generated with [Fabro](https://fabro.sh)
This commit is contained in:
Fabro 2026-03-19 21:02:00 -04:00
parent db96f490a6
commit b32655918c
3 changed files with 55 additions and 0 deletions

37
graph.fabro Normal file
View file

@ -0,0 +1,37 @@
digraph ImplementAndSimplify {
graph [
goal="Implement and simplify",
model_stylesheet="
* { backend: api; model: claude-opus-4-6;}
"
]
rankdir=LR
start [shape=Mdiamond, label="Start"]
exit [shape=Msquare, label="Exit"]
toolchain [label="Toolchain", shape=parallelogram, 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", max_retries=0]
preflight_compile [label="Preflight Compile", shape=parallelogram, script="cargo check -q --workspace 2>&1", max_retries=0]
preflight_lint [label="Preflight Lint", shape=parallelogram, script="cargo clippy -q --workspace -- -D warnings 2>&1", max_retries=0]
fix_lints [label="Fix Lints", prompt="The preflight lint step failed. Read the build output from context and fix all clippy lint warnings.", max_visits=3]
implement [label="Implement", prompt="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."]
simplify_opus [label="Simplify (Opus)", prompt="@prompts/simplify.md"]
simplify_gpt [label="Simplify (GPT-54)", prompt="@prompts/simplify.md", model="gpt-54"]
verify [label="Verify", shape=parallelogram, script="cargo clippy -q --workspace -- -D warnings 2>&1 && cargo nextest run --cargo-quiet --workspace --status-level fail 2>&1", goal_gate=true, retry_target="fixup"]
fixup [label="Fixup", prompt="The verify step failed. Read the build output from context and fix all clippy lint warnings and test failures.", max_visits=3]
fmt [label="Format", shape=parallelogram, script="cargo fmt --all 2>&1", max_retries=0]
start -> toolchain
toolchain -> preflight_compile [condition="outcome=success"]
toolchain -> exit
preflight_compile -> preflight_lint [condition="outcome=success"]
preflight_compile -> exit
preflight_lint -> implement [condition="outcome=success"]
preflight_lint -> fix_lints
fix_lints -> preflight_lint
implement -> simplify_opus -> simplify_gpt -> verify
verify -> fmt [condition="outcome=success"]
verify -> fixup
fixup -> verify
fmt -> exit
}

13
manifest.json Normal file
View file

@ -0,0 +1,13 @@
{
"run_id": "01KM4C6R7M1XZF086NV6F0S7JS",
"workflow_name": "ImplementAndSimplify",
"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",
"start_time": "2026-03-20T01:02:00.241750Z",
"node_count": 12,
"edge_count": 15,
"run_branch": "fabro/run/01KM4C6R7M1XZF086NV6F0S7JS",
"base_sha": "1fc3495ba93e711faaa7ea4db9819d1f61d03b78",
"base_branch": "main",
"workflow_slug": "implement",
"host_repo_path": "/Users/bhelmkamp/p/fabro-sh/fabro"
}

5
sandbox.json Normal file
View file

@ -0,0 +1,5 @@
{
"provider": "daytona",
"working_directory": "/home/daytona/workspace",
"identifier": "fabro-01KM4C6R7M1XZF086NV6F0S7JS"
}