Increase the artifact scenario timeout so the retry fixture still forces one timeout without spuriously creating a third retry under full-workspace nextest load. Also import the generated ServerSettings type directly so workspace clippy stays clean.
default_settings_path() and active_settings_path() always return a
value (Home::from_env() never fails), so unwrap_or_else fallbacks to
".fabro/settings.toml" were dead code. Change both functions to return
PathBuf instead of Option<PathBuf> and remove the unreachable branches
in server_client, serve, and user config.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Default `fabro settings` now resolves effective runtime settings against the
selected server, while `--local` preserves local-only inspection. This also
extracts shared settings resolution logic so CLI output, manifest preparation,
and the `/api/v1/settings` contract stay aligned.
Home lived in fabro-config, which meant fabro-types (a dependency of
fabro-config) could not use it — forcing Settings::storage_dir() to
duplicate the FABRO_HOME / dirs::home_dir() fallback logic. Moving Home
to the leaf crate fabro-util breaks this layering constraint and lets
Settings::storage_dir() delegate to Home::from_env().storage_dir().
Also adds stable accessors: storage_dir, socket_path, workflows_dir,
logs_dir, tmp_dir. fabro-config re-exports Home for API compatibility.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Full workspace verification exposed one real mismatch after the socket and
storage split: workflow default scratch lookup still derived from ~/.fabro
instead of the new storage root. Keep the helper aligned with Settings defaults
and fold in the small clippy-driven cleanups in the related server path code.
Keep local server targeting based on explicit server targets instead of
implicitly deriving a socket from storage_dir. This makes ~/.fabro/fabro.sock
the default local socket again, keeps storage under ~/.fabro/storage, threads
FABRO_CONFIG through server autostart paths, and updates the CLI test harness
for the new split.
- centralize FABRO_HOME and storage path resolution in fabro-config
- rename store types, extract ArtifactStore, and simplify run key layout
- switch run scratch to scratch/, remove RuntimeState, and refresh docs/clients
Consolidate CLI and server machine defaults under settings.toml,
including loader renames, writer preservation fixes, same-machine
manifest handling, and docs/test updates for the new config model.
The file interviewer tests were assuming a transient claim file would be
observed within a 2ms window, which flaked under full-workspace load.
Make the observation wait explicit so nextest remains reliable.
Allow run and create to resolve the same explicit or configured server
connection model used by preflight, validate, and graph. This removes the
last local-only submission assumption from the CLI surface while keeping
local storage-backed behavior intact when no remote target is selected.
Resolve the fabro-server merge conflicts by keeping the settings-aware test
app-state helper from origin/main while preserving the secret-store-aware
AppState construction added locally.
Tighten pre-manifest cleanup by removing the old dotenv helper, reducing
legacy .env handling to warning-only path detection, and renaming internal
remote target fields from base_url to api_url.
This also updates install/server docs and CLI terminology so the codebase
reflects the current direct-run vs server-interface model more accurately.
Move secret storage, diagnostics, and repo/provider validation behind the
server API so credentials live under the server storage dir and take effect
immediately without process env mutation.
This also removes the old .env runtime path, rewires doctor/install/secret/
provider login/repo init around the server contract, and regenerates the
TypeScript client for the new endpoints.
Move --storage-dir and --server-url off GlobalArgs and onto the
leaf commands that actually honor them.
This aligns help, parser behavior, and env-var wiring with the
current command architecture while preserving the intended model
and exec targeting semantics.
Server scenario tests were inheriting the default local sandbox
worktree mode, which meant they created git worktrees and branches
before stage execution. Under suite load that setup intermittently
stalled the run long enough for the scenario polling windows to fail.
Disable worktrees in the shared server test settings and let lifecycle
scenarios use the same test-only settings through a settings-aware
registry factory helper.
Move integration tests from monolithic api.rs into api/ (single-endpoint
contract tests) and scenario/ (multi-API-step flows), mirroring the CLI's
cmd/ vs scenario/ pattern. Move 3 scheduler-dependent unit tests from
server.rs into it/scenario/ where they get the correct nextest timeout
(kind=test override). Deduplicate shared helpers into helpers.rs.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move the model command surface into fabro-cli and delete the dead
fabro-llm CLI module now that prompt/chat/model CLI entrypoints are gone.
This also removes the now-unused fabro-llm CLI-only dependencies.
Replace subprocess-based server stop (fabro server stop) with direct
SIGTERM/SIGKILL via fabro_proc, eliminating silent failures under
nextest parallelism that left orphaned daemon processes. Use test
function name as temp dir prefix (.ft-<name>-) so leaked processes
are identifiable by test, truncated to 16 chars for Unix socket
path limits.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove redundant config_change_after_submission test (1.67s avg) from
fabro-server — already covered by start_run_persists_full_settings_snapshot
and architectural guarantees. Defer reqwest::Client init past validation
in web_search tool so missing-key/missing-query tests skip macOS proxy
discovery (1.56s → 9ms). Move telemetry panic event tests to a CLI IT
via a new cfg(debug_assertions) __test_panic subcommand. Lower default
nextest SLOW threshold from 3s to 1.5s with 2x headroom over the new
worst-case (0.84s).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rename the hidden detached worker command to __runner, remove launcher
bookkeeping, and resolve runs through a shared server-backed lookup.
This leaves attach, resume, logs, and related commands using the server
as the source of truth and updates the integration coverage around the
new lifecycle.
Replace the brittle raw NDJSON snapshots in logs tests with direct
assertions on the stable contract: the command succeeds, all events belong
to the requested run, and the expected lifecycle events appear in order.
This keeps coverage on logs behavior while avoiding churn from unrelated
run.created payload details like default model configuration.
Persist a cancelled terminal record when a live run is interrupted by the
server-side cancel signal, and abort pending web interview questions so
human-gated runs can unwind instead of hanging in a non-terminal durable
state.
Also align server tests with the current succeeded status contract and poll
aggregate usage until the in-memory accumulator converges with the store-
backed run status.
Scope the ps listing to the current test case and compare a normalized
projection instead of exact live run payload equality. This avoids flakes
from parallel tests and in-flight status transitions while preserving the
CLI contract under test.
Keep durable run summaries aligned with in-memory cancellation state,
including runs cancelled before startup completes, and update server
coverage to assert the durable cancelled reason.