Commit graph

221 commits

Author SHA1 Message Date
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
3879387adc
Reuse store-backed run cleanup in system prune 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
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
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
9826001305
Use store-backed run summaries and attach replay 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
0ac4e2851b
Use store-backed run discovery for asset commands 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
cfdb6248bb
Persist command and diff artifacts in the run store 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
9bf9db6fa0
Require store persistence for pull request records 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
664aa1d6d6
Use store-backed status for attach and run lookup 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
0945b6b9ba
Remove run hydration from production paths 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
da93d9b501
Persist run creation directly into the store 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
7f59d14245
Cut more CLI control-plane reads over to the store 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
f73b28129c
Rehydrate rewound runs before resume 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
9bf4046a6b
Move attach and logs to store-backed event history 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
991c5eb956
Cut PR and diff readers over to the run store 2026-04-01 22:57:27 -07:00
Bryan Helmkamp
d71a5c5d23
Expand store-backed run metadata and detached startup
Add the missing run-store records for node metadata, final patches, and pull
request state, and extend the store snapshots/backends to round-trip them.

Also cut the detached startup path over to explicit run IDs and store-backed
status loading so start and detached execution no longer require run.json for
bootstrap.
2026-04-01 22:57:26 -07:00
Bryan Helmkamp
eb91f2bcab
Cut over Fabro web app to a server-backed SPA
Replace the old React Router SSR setup with a static SPA build served by
fabro-server, move setup and GitHub auth handling into Rust, and update the
default local web URL and stale Arc-era references to match the Fabro name.
2026-04-01 21:36:01 -07:00
Bryan Helmkamp
e849441833
Simplify: fix buggy JSON sorting, deduplicate event filtering, clean up wait loop
- Replace no-op sort_json_value (IndexMap→IndexMap) in create.rs with
  normalize_json_value (IndexMap→BTreeMap→Map) from event.rs, fixing
  RunCreated events having non-deterministic key order
- Add AgentEvent::is_streaming_noise() to centralize the 6-variant
  streaming filter used in api.rs, retro.rs, and subagent.rs
- Extract load_file_status closure and merge Ok(None)|Err(_) arms in
  wait.rs to remove triple-repeated RunStatusRecord::load expression

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 20:13:15 -04:00
Bryan Helmkamp
81fd7aa8e6
Expand workflow event payloads and stabilize CLI logs
Add richer run, stage, prompt, command, retro, and agent session event
metadata so progress output and stored workflow events carry the context
needed by the new plan. Normalize event serialization and update CLI log
handling to prefer progress.jsonl with consistent redaction, and fix the
detached wait/log race covered by the updated integration and snapshot
tests.
2026-04-01 20:13:14 -04:00
Bryan Helmkamp
2178cf16dd
Consolidate unsafe process code into fabro-proc crate
Rename fabro-proctitle to fabro-proc and add safe wrappers for all
process management primitives (signals, pre-exec hooks). This contains
all unsafe proc code behind a safe API so downstream crates no longer
need #[allow(unsafe_code)] or direct libc dependencies.

New modules: signal (process_alive, sigterm, sigkill, sigterm_process_group),
pre_exec (pre_exec_setsid, pre_exec_setpgid, pre_exec_pdeathsig),
title (existing proctitle code). Eliminates three duplicate process_alive
definitions and removes libc as a direct dep of fabro-cli and fabro-sandbox.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 17:49:29 -04:00
Bryan Helmkamp
dbf3f063df
Deny unsafe_code workspace-wide, remove unsafe pointer cast from tests
Promote unsafe_code lint from warn to deny so new unsafe code is a
compile error. Add #![allow(unsafe_code)] to the two sleep_inhibitor
modules that were missing it. Replace the unsafe trait-object pointer
cast in CliMockSandbox tests with a shared Arc<Mutex<Vec<String>>>.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 17:17:59 -04:00
Bryan Helmkamp
e75d8a2fb0
Fix attach hanging on Linux CI when engine exits before attach starts
The attach loop's PID liveness fallback used `last_seq > 0` (store path)
and `!progress_file_is_empty` (file path) to keep the engine "alive" when
no launcher record could be found. These conditions are always true once
events exist, so the loop never exited via the PID path after the launcher
record was cleaned up by start_run or active_launcher_record_for_run.

The store-based terminal status check (the other exit path) only read from
the SlateDB DbReader, which may not see data still in the WAL or not yet
visible via manifest poll. Adding a disk fallback to read status.json
ensures the check works even when the store reader has a stale view.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 14:32:16 -04:00
Bryan Helmkamp
0337e5ee96
Rename fabro-openai-oauth to fabro-oauth 2026-03-31 13:23:43 -04:00
Bryan Helmkamp
08f340fc8f
Migrate provider_auth test to #[e2e_test] macro
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 09:48:20 -04:00
Bryan Helmkamp
a050269a52
Fix lint and test fallout 2026-03-31 09:47:50 -04:00
Bryan Helmkamp
a6829c57a0
Tighten non-interactive JSON mode 2026-03-31 09:47:50 -04:00
Bryan Helmkamp
7f2d840007
Fix clippy warnings and date-sensitive snapshot tests from --json rollout
Resolve clippy errors (absolute paths in main.rs/preflight.rs, collapsible
if in cli.rs, missing print_stdout allow) and stabilize snapshot tests that
hardcoded a date in dir_name by replacing with a date-prefix filter.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 09:07:06 -04:00
Bryan Helmkamp
3b26601f8e
Add global JSON output mode 2026-03-31 07:51:19 -04:00
Bryan Helmkamp
6a3bafccd0
Split agent processing into thinking and executing 2026-03-30 19:56:38 -04:00
Bryan Helmkamp
3a74c51840
Allow GitHub and Slack base URLs to be overridden via env vars
Adds GITHUB_BASE_URL and SLACK_BASE_URL environment variable support
so integration tests can redirect traffic to fake servers instead of
hitting live third-party services.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 19:08:12 -04:00
Bryan Helmkamp
d064b6c510
Stabilize merged workspace validation 2026-03-30 18:57:06 -04:00
Bryan Helmkamp
0313a1f4ee
Merge remote-tracking branch 'origin/main'
# Conflicts:
#	lib/crates/fabro-cli/tests/it/cmd/attach.rs
#	lib/crates/fabro-cli/tests/it/cmd/create.rs
#	lib/crates/fabro-cli/tests/it/cmd/resume.rs
#	lib/crates/fabro-cli/tests/it/cmd/start.rs
2026-03-30 18:26:57 -04:00
Bryan Helmkamp
c8a398d527
Add CLI integration test coverage 2026-03-30 18:23:24 -04:00
Bryan Helmkamp
1c85dbb367
Fix envelope event verification regressions 2026-03-30 17:38:57 -04:00
Bryan Helmkamp
f43fac10ce
Refactor run event envelopes and subagent linking 2026-03-30 17:09:07 -04:00
Bryan Helmkamp
e9d924fa63
Rename fabro-git-storage to fabro-checkpoint 2026-03-30 16:17:39 -04:00
Bryan Helmkamp
62786ccf4b
Fix run progress replay durations 2026-03-30 16:17:39 -04:00
Bryan Helmkamp
727c8ba1d3
Refactor run progress rendering 2026-03-30 16:17:39 -04:00
Bryan Helmkamp
6046203e42
Remove deprecated fabro init command
Users should use `fabro repo init` instead. The deprecation shim has
been in place long enough; remove it and update all docs references.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 16:17:38 -04:00
Bryan Helmkamp
cee4a07750
Add fabro completion subcommand for shell completions
Uses clap_complete to generate tab-completion scripts for zsh, fish,
elvish, and PowerShell. Bash generation is caught gracefully since
clap_complete panics with #[command(flatten)] subcommands.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 16:17:38 -04:00
Bryan Helmkamp
63176c99fb
Rename fabro serve to fabro server start
Restructure the flat `serve` command into a nested `server start`
subcommand, following the existing namespace pattern (system prune,
repo init, etc.).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 16:17:38 -04:00
Bryan Helmkamp
6757efc7f7
Prefix API routes with /api/v1 2026-03-30 16:17:06 -04:00