fabro/lib/crates/fabro-cli/tests/it/cmd
Bryan Helmkamp ea84d9bc72
refactor(store): flatten EventEnvelope wire shape via serde
Replace the hand-written to_wire_value / from_wire_value helpers
and the wire_event_envelope_from_generated bridge with
#[serde(flatten)] on EventEnvelope.payload. Derived serde now
produces and accepts the wire shape natively:

  { "seq": 42, "id": "...", "event": "...", ... }

instead of the nested { "seq": 42, "payload": { ... } } the
derive would otherwise emit. #[serde(flatten)] composes fine with
the #[serde(transparent)] EventPayload(Value) wrapper, so the
inner payload object is merged into the outer map on both sides.

- fabro-store/src/types.rs: add #[serde(flatten)]; delete the two
  wire helpers (33 lines of Value-map poking); update the
  round-trip test to assert the shape is actually flat.
- fabro-server/src/server.rs: sse_event_from_store serializes
  the envelope directly; api_event_envelope_from_store pipelines
  to_value into from_value.
- fabro-cli/src/server_client.rs: buffer_sse_events parses
  straight into EventEnvelope via serde_json::from_str;
  list_run_events uses the existing convert_type helper in place
  of the deleted wire_event_envelope_from_generated bridge.
- fabro-cli tests: helpers that called from_wire_value now call
  serde_json::from_value.

Drops the shape check that from_wire_value used to perform on
parse (id/ts/run_id/event must exist as strings): that check
extracted run_id from the payload and then validated it against
itself, so it only guaranteed presence, not correctness.
EventPayload::new(value, expected_run_id) still runs the same
check where a caller has a real external run_id to cross-match.

Generated code and the OpenAPI allOf(seq, RunEvent) schema are
untouched; the wire JSON is byte-identical before and after.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 12:09:00 -04:00
..
artifact_cp.rs perf(cli): reduce slow integration test overhead 2026-04-07 22:57:45 -04:00
artifact_list.rs perf(cli): reduce slow integration test overhead 2026-04-07 22:57:45 -04:00
attach.rs feat(api): flatten EventEnvelope wire JSON (schema v2) 2026-04-09 10:40:21 -04:00
config.rs perf(cli): reduce slow integration test overhead 2026-04-07 22:57:45 -04:00
create.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
diff.rs refactor(scratch): remove store-backed diff and blob cache writes 2026-04-07 22:31:59 -04:00
discord.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
docs.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
doctor.rs perf(cli): reduce slow integration test overhead 2026-04-07 22:57:45 -04:00
exec.rs perf(cli): reduce slow integration test overhead 2026-04-07 22:57:45 -04:00
fabro.rs fix(cli): restore fabro-cli verification after merge 2026-04-08 16:41:13 -04:00
fork.rs refactor(cli): make run-adjacent commands server-only 2026-04-06 06:12:16 -04:00
graph.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
inspect.rs refactor(scratch): remove stale scratch file refs 2026-04-07 20:40:06 -04:00
install.rs test(nextest): share one session server by default 2026-04-07 09:44:34 -04:00
json_global.rs test(cli): stabilize ps JSON global flag assertion 2026-04-05 10:34:32 -04:00
logs.rs refactor(scratch): remove stale scratch file refs 2026-04-07 20:40:06 -04:00
mod.rs test(cli): add integration tests for fabro uninstall 2026-04-08 16:47:48 -04:00
model.rs refactor(billing): unify the LLM billing domain 2026-04-07 14:33:35 -04:00
model_list.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
model_test.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
parse.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
pr.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
pr_close.rs refactor(cli): make run-adjacent commands server-only 2026-04-06 06:12:16 -04:00
pr_create.rs refactor(scratch): remove stale scratch file refs 2026-04-07 20:40:06 -04:00
pr_list.rs refactor(cli): make run-adjacent commands server-only 2026-04-06 06:12:16 -04:00
pr_merge.rs refactor(cli): make run-adjacent commands server-only 2026-04-06 06:12:16 -04:00
pr_view.rs feat(types): add RunEvent envelope fields + ActorRef (schema v2) 2026-04-09 10:03:01 -04:00
preflight.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
provider.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
provider_login.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
ps.rs refactor(scratch): remove stale scratch file refs 2026-04-07 20:40:06 -04:00
repo.rs chore: remove skill install command and GET /runs/{id}/verification endpoint 2026-04-06 16:38:03 -04:00
repo_deinit.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
repo_init.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
resume.rs refactor(scratch): remove stale scratch file refs 2026-04-07 20:40:06 -04:00
rewind.rs refactor(run): store manifests and definitions in global CAS 2026-04-07 22:57:48 -04:00
rm.rs test(cli): replace slow active-run coverage 2026-04-08 03:47:35 -04:00
run.rs feat(api): flatten EventEnvelope wire JSON (schema v2) 2026-04-09 10:40:21 -04:00
runner.rs test(cli): move timeout-prone run coverage into ITs 2026-04-08 03:40:48 -04:00
sandbox_cp.rs refactor(scratch): remove stale scratch file refs 2026-04-07 20:40:06 -04:00
sandbox_preview.rs refactor(cli): make run-adjacent commands server-only 2026-04-06 06:12:16 -04:00
sandbox_ssh.rs refactor(cli): make run-adjacent commands server-only 2026-04-06 06:12:16 -04:00
secret.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
secret_list.rs refactor(server): make secrets and operational checks server-canonical 2026-04-05 17:34:01 -04:00
secret_rm.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
secret_set.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
send_analytics.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
send_panic.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
server_start.rs feat(server): make web ui optional 2026-04-08 16:22:41 -04:00
server_status.rs test(nextest): share one session server by default 2026-04-07 09:44:34 -04:00
server_stop.rs test(nextest): share one session server by default 2026-04-07 09:44:34 -04:00
start.rs refactor(scratch): remove stale scratch file refs 2026-04-07 20:40:06 -04:00
store.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
store_dump.rs refactor(store): unify run dump export sources 2026-04-07 18:28:28 -04:00
support.rs refactor(store): flatten EventEnvelope wire shape via serde 2026-04-09 12:09:00 -04:00
system.rs feat(system): add server-backed system commands 2026-04-06 16:10:06 -04:00
system_df.rs test(nextest): share one session server by default 2026-04-07 09:44:34 -04:00
system_events.rs test(nextest): share one session server by default 2026-04-07 09:44:34 -04:00
system_info.rs test(nextest): share one session server by default 2026-04-07 09:44:34 -04:00
system_prune.rs test(cli): narrow system prune coverage for speed 2026-04-07 23:42:15 -04:00
test_panic.rs test: speed up slow default-profile tests and tighten nextest thresholds 2026-04-05 13:15:59 -04:00
top_level.rs Move cli.rs and scenario.rs tests into per-subcommand cmd/ files 2026-03-30 11:37:24 -04:00
uninstall.rs test(cli): add integration tests for fabro uninstall 2026-04-08 16:47:48 -04:00
upgrade.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
validate.rs refactor(cli): separate local socket and storage defaults 2026-04-06 11:57:14 -04:00
wait.rs refactor(scratch): remove stale scratch file refs 2026-04-07 20:40:06 -04:00
workflow.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
workflow_create.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00
workflow_list.rs refactor(cli): deglobalize server and storage target flags 2026-04-05 16:06:42 -04:00