fabro/lib/crates/fabro-server/tests/it/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_sessions.rs feat(auth): add unified session API 2026-05-10 14:16:23 -04:00
cli_auth_token.rs refactor(server): gate test app state helpers 2026-05-02 13:02:41 -04:00
docs.rs docs(deployment): split into local vs self-hosted, drop Render/Fly/DO 2026-05-01 09:26:35 -04:00
install.rs refactor(llm): split provider identity from adapters (#280) 2026-05-16 13:13:41 -04:00
install_openai_compatible.rs refactor(llm): split provider identity from adapters (#280) 2026-05-16 13:13:41 -04:00
mod.rs feat(auth): add unified session API 2026-05-10 14:16:23 -04:00
routing.rs feat(server): expose health check at /api/v1/health (#279) 2026-05-16 08:37:00 -04:00
run_files.rs feat(runs): add parent run links (#271) 2026-05-16 13:57:33 -04:00
runs.rs feat(runs): add parent run links (#271) 2026-05-16 13:57:33 -04:00
sandbox_vnc.rs feat(api): unify public run shape 2026-05-10 20:48:55 -04:00
settings.rs refactor(server): gate test app state helpers 2026-05-02 13:02:41 -04:00
system.rs refactor(workflow): remove retro stage (#230) 2026-05-09 10:18:20 -04:00
tcp.rs fix(server): default foreground logs to stdout 2026-05-06 12:41:52 -04:00