Commit graph

635 commits

Author SHA1 Message Date
Bryan Helmkamp
a02148aacd
Rename fabro-api-types to fabro-api with progenitor client generation
Replace typify-only type generation with progenitor, which generates both
Rust types (in a `types` module) and a reqwest-based HTTP client from the
OpenAPI spec. Also upgrades reqwest 0.12→0.13 and rmcp 0.15→1.3 to align
dependency versions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 11:17:27 -07:00
Bryan Helmkamp
7ba75e4743
Merge remote-tracking branch 'origin/main' 2026-04-03 10:34:48 -07:00
Bryan Helmkamp
2c27582b9c
Remove non-event put_*/get_* methods from SlateRunStore and fix tests
Follow-up to the prior commit that removed production callers. This commit:
- Removes InMemoryRunStore methods and dead key functions
- Rewrites store/workflow tests to use append_event + state() instead of removed methods
- Updates CLI snapshot tests for new event-projected output

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 10:11:30 -07:00
Bryan Helmkamp
9bfd7f5593
Remove server feature flag from fabro-cli, always compile server in
The server subcommand and related code were gated behind
cfg(feature = "server"). This removes the feature flag entirely,
making fabro-server a required dependency so the server command
is always available.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 10:09:56 -07:00
Bryan Helmkamp
5737fcff66
Fix clippy warnings: remove useless .into(), unnecessary async, large futures, and style lints
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 08:47:16 -07:00
Bryan Helmkamp
9c4923f338
Update attach snapshot: run.running now emitted before sandbox.initialized
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 07:59:33 -07:00
Bryan Helmkamp
23b59a2f01
Gate server test imports behind cfg(feature = "server")
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 07:57:32 -07:00
Bryan Helmkamp
946009dbef
Merge remote-tracking branch 'origin/main' into feat/event-sourced-run-state 2026-04-03 06:44:58 -07:00
Bryan Helmkamp
491f326c12
Collapse store handles onto Slate 2026-04-02 23:16:05 -07:00
Bryan Helmkamp
79cad86ed4
Require a durable run store throughout execution
Make run lookup fail with RunNotFound instead of returning Option, thread a required RunStore through workflow and retro paths, and update CLI, server, and test callers to match. Also treat null optional event properties as absent during store-backed replay so event-sourced state stays robust.
2026-04-02 15:08:21 -07:00
Bryan Helmkamp
9d3a8243c3
Merge remote-tracking branch 'origin/main' 2026-04-02 14:29:31 -07:00
Bryan Helmkamp
9c42d375b2
Clean up server integration tests
Remove empty server.rs, redundant comments, redundant server.json
existence check (already covered by status check), unnecessary
String allocation, and unnecessary final filters.clone().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 14:25:06 -07:00
Bryan Helmkamp
1847357d44
Add integration tests for server daemon management
- cmd/server_start: help snapshot, start-already-running error
- cmd/server_stop: help snapshot, stop-when-not-running error
- cmd/server_status: help snapshot, status-when-not-running error
- scenario/server_lifecycle: full start → status → status --json → stop cycle
- Remove stale server.rs help test (replaced by per-command files)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 14:18:05 -07:00
Bryan Helmkamp
57108f7d3c
Remove unnecessary comments, use bail! consistently in server start
- Delete WHAT comments that restate the code
- Replace eprintln! + process::exit(1) with bail! in daemon "already running" path for consistency with foreground mode

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 10:45:37 -07:00
Bryan Helmkamp
4afe95c575
Add server daemon management with Unix socket support
Transform `fabro server` from foreground-only TCP into a proper daemon:
- `server start` launches background daemon with flock-based locking
- `server start --foreground` retains current blocking behavior
- `server stop` sends SIGTERM, waits, escalates to SIGKILL
- `server status` reports running/stopped with PID, bind, uptime (--json)
- `--bind` replaces `--host`/`--port`, supporting Unix sockets and TCP
- Default bind is `{storage_dir}/fabro.sock` (Unix socket)
- Hidden `__serve` subcommand for daemon child process lifecycle
- Graceful shutdown via SIGTERM/SIGINT signal handlers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 10:40:19 -07:00
Bryan Helmkamp
c245c4194d
Make provider metadata event-derived and rewind append-only 2026-04-02 10:26:12 -07:00
Bryan Helmkamp
631d9a96e1
Finish events-as-source-of-truth follow-ups 2026-04-02 10:02:31 -07:00
Bryan Helmkamp
936ebfade1
Align event tests and snapshots with stage responses
Update CLI progress test fixtures and log snapshots for the new
stage.completed response field, and add a narrow clippy allow/type alias
cleanup needed to keep the workspace warning-free.
2026-04-02 09:02:06 -07:00
Bryan Helmkamp
e79f337077
Make workflow state fully derivable from events
Complete the remaining event coverage from the events-as-source-of-truth plan.
Add response and failure-signature snapshots to stage.completed,
enrich retro.started and retro.completed with prompt/response data,
and remove the stale script field from stage.started.

Also update the internal event and run-directory docs so they match
current event payloads and derivation rules.
2026-04-02 08:33:42 -07:00
Bryan Helmkamp
28a1fc72f4
Rename FabroSettings to Settings, eliminate FabroSettingsExt
Move storage_dir() from FabroSettingsExt trait in fabro-config into an
inherent method on Settings in fabro-types. Remove the re-export from
fabro-config so callers import directly from fabro_types. Drop the
redundant Fabro prefix since the type already lives in the fabro_types
crate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 07:36:44 -07:00
Bryan Helmkamp
5f1f47a966
Increase polling budgets for server tests that fail under concurrent load
Unit tests used 100×10ms=1s polling, insufficient when 82 tests run
concurrently. Integration tests already used 500×10ms=5s. SSE test
frame timeout was 500ms, too short for stage events to arrive under
CPU contention.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 07:13:51 -07:00
Bryan Helmkamp
3f1c71b541
Merge remote-tracking branch 'origin/main'
# Conflicts:
#	lib/crates/fabro-server/src/server.rs
#	lib/crates/fabro-server/src/web_auth.rs
2026-04-02 06:48:22 -07:00
Bryan Helmkamp
b5f5162c3a
Rename SessionConfig to SessionOptions and McpServerConfig to McpServerSettings
Aligns naming with the convention that "Config" is for file-level configuration
while "Options" and "Settings" describe runtime parameters. Also applies
rustfmt formatting fixes in web_auth.rs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 06:47:42 -07:00
Bryan Helmkamp
f2910c557e
Reduce slatedb timers 2026-04-02 06:43:58 -07:00
Bryan Helmkamp
75b0e0879a
Stabilize workspace tests and clean warnings
Make the full workspace nextest run reliable after the run-store migration,
restore legacy test-harness projections needed by workflow integration tests,
and clear the remaining fmt/clippy issues in the touched paths.
2026-04-02 06:33:22 -07:00
Bryan Helmkamp
93eab71892
Remove legacy run file projection layer 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
ebe7db8e62
Load pull request diffs from the run store 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
81d838f600
Use store-only metadata for PR body generation 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
426eee85ed
Require store-backed state for run diffs 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
8c23e93a2a
Restore rewound run metadata from the store 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
a831f3675b
Infer attach store context without run records 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
7906ecad15
Recover launcher state without run records 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
083c3c5e89
Stop reloading run ids after detached execution 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
3879387adc
Reuse store-backed run cleanup in system prune 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
82a243b0cd
Stop reloading run ids during detached failures 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
f39255594c
Pass run IDs directly into detached start services 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
92dc29a897
Load sandbox cleanup metadata from the run store 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
1b7da29c6b
Stop requiring progress files for attach fallback 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
dff33d4f17
Project run creation events through the store 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
0cb5495ce9
Require store-backed metadata branch bootstrap 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
a169ba068d
Require store-backed conclusion data for PR bodies 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
601676b737
Stop writing rewind status files 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
0399d1daf8
Restore start metadata when rehydrating rewound runs 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
c41594d3a1
Stop writing legacy run status and conclusion files 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
15389780f3
Stop writing legacy pull request files 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
c681e65fdb
Cut operational run readers over to store-only state 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
fc5b910691
Normalize attach JSON snapshot ordering 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
9826001305
Use store-backed run summaries and attach replay 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
abffd09f41
Rebuild metadata branches from store-backed node state 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
eb1933954a
Export checkpoint metadata from the run store 2026-04-01 22:57:27 -07:00