fabro/lib/packages/fabro-api-client/src/api
Bryan Helmkamp 2296ba6ea8
feat(runs): add parent run links (#271)
## Summary

Adds orchestration-only parent links between runs without merging them
into fork or rewind lineage. Runs can now be created under a parent,
linked to a different parent, or unlinked through event-sourced
mutations that rebuild summaries and projections from the run event
stream.

## Changes

- Adds optional `parent_id` to run manifests, public run summaries, run
projections, `run.created`, OpenAPI, and the generated TypeScript API
client.
- Adds `PUT /api/v1/runs/{id}/parent` and `DELETE
/api/v1/runs/{id}/parent` for mutable parent links across any run state,
including terminal or archived runs.
- Records `run.parent.linked` and `run.parent.unlinked` events with
actor metadata and previous/current parent IDs.
- Validates parent changes in the API path: parent must exist for new
links, self-parenting is rejected, cycles are rejected, and same-parent
or already-root operations are idempotent no-ops.
- Adds `parent_id` filtering to run listing while preserving dangling
historical parent references after parent deletion.

## Validation

- `cargo +nightly-2026-04-14 fmt --check --all`
- `cargo build -p fabro-api`
- `cargo check -p fabro-workflow -p fabro-store -p fabro-server`
- `cargo nextest run -p fabro-types -p fabro-store`
- `cargo nextest run -p fabro-server --features test-support
create_run_can_set_parent_and_list_children
link_relink_and_unlink_parent_are_idempotent
parent_link_validation_rejects_missing_self_and_cycles
deleting_parent_leaves_child_parent_id_as_historical_reference`
- `cargo nextest run -p fabro-api
run_summary_json_matches_openapi_shape`
- `cd lib/packages/fabro-api-client && bun run typecheck`

Known unrelated broad-suite blocker: `cargo nextest run -p fabro-server
--features test-support get_graph_returns_svg` currently returns 500
because the render subprocess emits test-harness output instead of SVG.

---

[![Compound
Engineering](https://img.shields.io/badge/Compound_Engineering-6366f1)](https://github.com/EveryInc/compound-engineering-plugin)
🤖 Generated with GPT-5 (unknown context, medium reasoning) via
[Codex](https://openai.com/codex)
2026-05-16 13:57:33 -04:00
..
auth-api.ts feat(server): expose health check at /api/v1/health (#279) 2026-05-16 08:37:00 -04:00
billing-api.ts refactor: wire vendored Graphviz into fabro-graphviz, remove dot dependency 2026-04-13 22:46:29 -04:00
completions-api.ts refactor: wire vendored Graphviz into fabro-graphviz, remove dot dependency 2026-04-13 22:46:29 -04:00
discovery-api.ts feat(server): expose health check at /api/v1/health (#279) 2026-05-16 08:37:00 -04:00
human-in-the-loop-api.ts feat(server): expose health check at /api/v1/health (#279) 2026-05-16 08:37:00 -04:00
insights-api.ts refactor: wire vendored Graphviz into fabro-graphviz, remove dot dependency 2026-04-13 22:46:29 -04:00
install-api.ts feat(install): make LLM setup optional in web installer and CLI (#265) 2026-05-14 22:34:39 -04:00
integrations-api.ts fix(api): correct GitHub webhook OpenAPI contract 2026-04-20 07:13:49 -04:00
models-api.ts feat(server): expose health check at /api/v1/health (#279) 2026-05-16 08:37:00 -04:00
repos-api.ts refactor: wire vendored Graphviz into fabro-graphviz, remove dot dependency 2026-04-13 22:46:29 -04:00
run-internals-api.ts feat(runs): merge command output streams 2026-05-07 22:07:13 -07:00
run-outputs-api.ts feat(server): expose health check at /api/v1/health (#279) 2026-05-16 08:37:00 -04:00
runs-api.ts feat(runs): add parent run links (#271) 2026-05-16 13:57:33 -04:00
secrets-api.ts refactor: wire vendored Graphviz into fabro-graphviz, remove dot dependency 2026-04-13 22:46:29 -04:00
settings-api.ts refactor settings API entrypoints 2026-04-22 18:58:47 -04:00
system-api.ts fix(system): expose unreadable run repair flow 2026-05-06 07:15:18 -04:00
workflows-api.ts feat(web): migrate to generated API client 2026-05-08 07:44:33 -07:00