fabro/lib/crates
Bryan Helmkamp 6297b200f7
refactor(run): add rich failure contract (#256)
## Summary

Terminal run failures now use a first-class `RunFailure` contract so
downstream consumers receive structured diagnostics instead of flat
`error` / `causes` / `reason` fields. The wire shape keeps concise
public messages, source-chain causes, classification, optional
actor/signature data, and redacted exec output tail in one nested value.

Refs fabro-sh/fabro#198

## What Changed

- Added `fabro_types::RunFailure` and changed `run.failed` to emit
`properties.failure` with `final_git_commit_sha` for failed-run commit
state.
- Replaced `Conclusion.failure_reason` with `Conclusion.failure` while
leaving stage-level `StageCompletion.failure_reason` untouched.
- Updated workflow internals to preserve owned error source chains until
terminal event projection, then convert them into `RunFailure.causes`.
- Updated store, server, CLI, OpenAPI, and generated TypeScript client
consumers to use the nested failure object.
- Added serialization, OpenAPI replacement, projection, and lifecycle
coverage for the new contract.

## Validation

- `cargo nextest run -p fabro-api -p fabro-types -p fabro-workflow -p
fabro-store -p fabro-server -p fabro-cli`
- `cargo +nightly-2026-04-14 clippy --workspace --all-targets -- -D
warnings`
- `cargo +nightly-2026-04-14 fmt --check --all`
- `cd apps/fabro-web && bun run typecheck`
- `cd apps/fabro-web && bun test`
- `git diff --check`

---

[![Compound
Engineering](https://img.shields.io/badge/Compound_Engineering-6366f1)](https://github.com/EveryInc/compound-engineering-plugin)
🤖 Generated with GPT-5 via [Codex](https://openai.com/codex)
2026-05-13 12:32:28 -04:00
..
build-support fix(build): refresh embedded git sha on branch commits 2026-05-09 14:10:04 -04:00
fabro-acp fix(acp): tolerate clean stdio exit after final response 2026-05-12 09:03:53 -04:00
fabro-agent feat(model): support open provider catalog data (#245) 2026-05-12 15:42:49 -04:00
fabro-api refactor(run): add rich failure contract (#256) 2026-05-13 12:32:28 -04:00
fabro-auth feat(model): support open provider catalog data (#245) 2026-05-12 15:42:49 -04:00
fabro-checkpoint Make git metadata sandbox-native 2026-04-27 21:43:15 -07:00
fabro-cli refactor(run): add rich failure contract (#256) 2026-05-13 12:32:28 -04:00
fabro-client feat(cli): add Fabro MCP server (#236) 2026-05-11 18:20:50 -04:00
fabro-config feat(manifest): support path-based Daytona Dockerfiles (#258) 2026-05-13 12:32:15 -04:00
fabro-core Cancel in-flight agent stages with CancellationToken (#211) 2026-05-05 09:54:22 -04:00
fabro-dev feat(model): support open provider catalog data (#245) 2026-05-12 15:42:49 -04:00
fabro-devcontainer refactor(static): centralize env var names 2026-04-24 12:29:51 -04:00
fabro-dump refactor(run): add rich failure contract (#256) 2026-05-13 12:32:28 -04:00
fabro-github fix(github): refresh installation tokens during workflows 2026-05-06 07:15:18 -04:00
fabro-graphviz fix(graphviz): accept multi-line DOT attribute blocks without commas (#255) 2026-05-13 08:29:09 -04:00
fabro-hooks fix(github): refresh installation tokens during workflows 2026-05-06 07:15:18 -04:00
fabro-http refactor(static): centralize env var names 2026-04-24 12:29:51 -04:00
fabro-install fix(server): default foreground logs to stdout 2026-05-06 12:41:52 -04:00
fabro-interview Wire end-to-end steering for running agents (#209) 2026-05-05 15:34:16 -04:00
fabro-llm feat(model): support open provider catalog data (#245) 2026-05-12 15:42:49 -04:00
fabro-macros refactor(dev): simplify generated docs tooling 2026-04-24 18:41:00 -04:00
fabro-manifest feat(manifest): support path-based Daytona Dockerfiles (#258) 2026-05-13 12:32:15 -04:00
fabro-mcp feat(cli): add Fabro MCP server (#236) 2026-05-11 18:20:50 -04:00
fabro-mcp-server fix(validate): pick up sibling workflow.toml inputs for bare .fabro path (#242) 2026-05-12 12:05:21 -04:00
fabro-model feat(server): inject settings-backed model catalog (#247) 2026-05-12 17:55:28 -04:00
fabro-oauth fix(error): preserve remaining error context 2026-05-02 10:51:15 -04:00
fabro-options-metadata refactor(dev): simplify generated docs tooling 2026-04-24 18:41:00 -04:00
fabro-proc refactor(static): centralize env var names 2026-04-24 12:29:51 -04:00
fabro-redact refactor(integrations): make chat integrations Slack-only 2026-05-09 11:43:16 -04:00
fabro-sandbox fix(sandbox): resolve bash via PATH instead of /bin/bash (#241) 2026-05-12 10:31:12 -04:00
fabro-server refactor(run): add rich failure contract (#256) 2026-05-13 12:32:28 -04:00
fabro-slack feat(slack): render plan summary + run link in interview messages (re #253, stacked on #252) (#254) 2026-05-13 07:41:54 -04:00
fabro-spa feat(dev): gitignore embedded spa assets 2026-04-26 21:31:11 -04:00
fabro-static fix(server): preserve worker terminal color env 2026-05-06 15:54:00 -04:00
fabro-store refactor(run): add rich failure contract (#256) 2026-05-13 12:32:28 -04:00
fabro-telemetry refactor(workflow): remove retro stage (#230) 2026-05-09 10:18:20 -04:00
fabro-template fix(validate): pick up sibling workflow.toml inputs for bare .fabro path (#242) 2026-05-12 12:05:21 -04:00
fabro-test feat(cli): add Fabro MCP server (#236) 2026-05-11 18:20:50 -04:00
fabro-tracker fix(github): refresh installation tokens during workflows 2026-05-06 07:15:18 -04:00
fabro-types refactor(run): add rich failure contract (#256) 2026-05-13 12:32:28 -04:00
fabro-util refactor(error): drop String error shims and DisplayContains test traits 2026-05-01 19:35:22 -04:00
fabro-validate Add ACP backend support (#237) 2026-05-11 23:39:43 -04:00
fabro-vault refactor(api): unify secret metadata types 2026-04-29 20:26:13 -04:00
fabro-workflow refactor(run): add rich failure contract (#256) 2026-05-13 12:32:28 -04:00