Commit graph

811 commits

Author SHA1 Message Date
Bryan Helmkamp
90b373c366
fix(test): eliminate recovery, cancel, and label flakes
Stabilize the recovery scenario around rebuilt metadata timing and node
ordinals, make in-process run cancellation converge on a cancelled
reason, and keep the label assertion unit test out of the shared
TestContext session lifecycle.
2026-04-08 10:13:17 -04:00
Bryan Helmkamp
e37d20bd6f
test fix 2026-04-08 07:55:32 -04:00
Bryan Helmkamp
6a5f6024a2
Merge remote-tracking branch 'origin/main'
# Conflicts:
#	lib/crates/fabro-cli/src/server_client.rs
2026-04-08 03:53:54 -04:00
Bryan Helmkamp
57ec693a90
test(cli): replace slow active-run coverage
Replace the slow CLI integration tests that waited on worker shutdown
grace periods with focused coverage that still checks the important
behavior. The attach JSON test now finishes the gated run cleanly,
the rm force test uses a mocked server contract, and the Ctrl-C cancel
path is covered at the attach layer instead of through a full live run.

Add a cooperative subprocess cancel control message so cancel and delete
can abort pending interviews without relying only on the 5 second hard
kill fallback.
2026-04-08 03:47:35 -04:00
Bryan Helmkamp
057575baa2
test(cli): move timeout-prone run coverage into ITs
Replace bin-scoped localhost HTTP tests with command-facing integration
coverage so they run under the intended IT timeout budget without
changing nextest overrides.
2026-04-08 03:40:48 -04:00
Bryan Helmkamp
c2e5d465e1
Merge remote-tracking branch 'origin/main' 2026-04-07 23:44:15 -04:00
Bryan Helmkamp
5cc4c92c63
fix(cli): follow paginated run events 2026-04-07 23:43:25 -04:00
Bryan Helmkamp
57cc38894b
fix(server): skip delete grace for terminal runs
Completed runs can briefly retain a stale worker PID after their terminal
state is visible. Using the full 5s worker cancellation grace in that window
made rm and prune pay an avoidable delay.

Keep the existing grace for active runs, but use a short delete grace for
already-terminal runs so completed-run cleanup stays fast.
2026-04-07 23:43:06 -04:00
Bryan Helmkamp
1b9de04b33
test(cli): narrow system prune coverage for speed 2026-04-07 23:42:15 -04:00
Bryan Helmkamp
a308ada2db
test(checkpoint): restore RunRecord helper fields 2026-04-07 23:24:36 -04:00
Bryan Helmkamp
3c801f1665
Merge remote-tracking branch 'origin/main' 2026-04-07 23:16:15 -04:00
Bryan Helmkamp
d634f77951
Merge remote-tracking branch 'origin/main'
# Conflicts:
#	lib/crates/fabro-types/src/run_event/run.rs
2026-04-07 23:15:06 -04:00
Bryan Helmkamp
8bf619a095
Merge remote-tracking branch 'origin/main' 2026-04-07 23:13:56 -04:00
Bryan Helmkamp
3c9c8cabf0
refactor(artifacts): clean up stale artifact wording
Remove leftover object-backed terminology from the worker uploader,
rename the remaining scratch-fallback test to match current behavior,
and update the old artifact upload plan to reflect the current
no-fallback model.
2026-04-07 23:13:22 -04:00
Bryan Helmkamp
cde5aaed34
test(cli): make server_start cleanup non-graceful 2026-04-07 23:13:11 -04:00
Bryan Helmkamp
4a417b6013
refactor(run): simplify CAS-backed run definitions
Drop compatibility versioning from run-definition blobs, remove the
read-after-write polling added around CAS access, and tighten tests to
assert workflow_bundle.json is never written.
2026-04-07 23:10:00 -04:00
Bryan Helmkamp
46232503dc
fix(api): resolve build spec path at runtime 2026-04-07 23:05:07 -04:00
Bryan Helmkamp
82b07bc254
refactor(artifacts): remove obsolete artifact storage flag
Drop the dead artifact storage capability split from run records,
run.created events, and workflow/server create paths. Worker artifact
upload is now unconditional, and tests/snapshots no longer encode a
legacy object-backed distinction.
2026-04-07 23:01:33 -04:00
Bryan Helmkamp
6e3cd5fc12
refactor(run): store manifests and definitions in global CAS
Persist submitted run manifests and accepted run definitions as SHA256
blob refs on run events, remove workflow_bundle.json from the runtime
path, and stop deleting shared CAS blobs when removing runs.
2026-04-07 22:57:48 -04:00
Bryan Helmkamp
87b5144c49
perf(cli): reduce slow integration test overhead
Collapse expensive CLI smoke coverage into scenario tests, replace the
slow doctor no-color integration check with a unit-level render test,
and remove duplicate attach coverage. Also fix local Unix-socket
autostart so missing daemons don't spend the full 5s readiness wait
before startup.

The commit includes the measured slow-test report updates for the work
landed here.
2026-04-07 22:57:45 -04:00
Bryan Helmkamp
60b469e7a8
refactor(artifacts): remove scratch manifest fallback
Make ArtifactStore the only artifact read path, stop writing
manifest.json into run scratch, and update the CLI summary to
resolve artifact paths from the durable server API.
2026-04-07 22:46:44 -04:00
Bryan Helmkamp
c1507b57a3
refactor(scratch): remove store-backed diff and blob cache writes
Stop writing scratch final.patch files now that diffs are projected from
run state, and remove the unused cache/artifacts/values plumbing while
keeping runtime/blobs materialization intact.

Update tests and run-directory docs to match the current scratch contract.
2026-04-07 22:31:59 -04:00
Bryan Helmkamp
45f8d94df6
refactor(server): stop writing worker stderr scratch logs
Route subprocess worker stderr directly into server tracing and remove
the scratch-file sink. Update the run-directory docs to reflect that
runtime now only documents blob materialization here.
2026-04-07 20:57:52 -04:00
Bryan Helmkamp
e120d4f0d7
Merge remote-tracking branch 'origin/main' 2026-04-07 20:57:06 -04:00
Bryan Helmkamp
3b9f9ad4ed
Merge remote-tracking branch 'origin/main'
# Conflicts:
#	lib/crates/fabro-cli/src/commands/run/runner.rs
#	lib/crates/fabro-server/src/server.rs
2026-04-07 20:56:00 -04:00
Bryan Helmkamp
00d2a1e5b2
Merge remote-tracking branch 'origin/main' 2026-04-07 20:45:12 -04:00
Bryan Helmkamp
4bcd8f7647
refactor(scratch): remove stale scratch file refs
Drop scratch-only compatibility paths and legacy test scaffolding now that
SlateDB-backed state is authoritative. This removes scratch file fallbacks,
updates docs and UI labels, and moves tests onto durable store-backed helpers.
2026-04-07 20:40:06 -04:00
Bryan Helmkamp
b5ee35937b
fix(clippy): restore workspace lint cleanups 2026-04-07 20:40:02 -04:00
Bryan Helmkamp
c5f68d4eda
fix(server): skip stale worker cleanup after resume
Guard server worker cleanup against superseded subprocesses so rewind and
resume flows do not append a synthetic failure from an older worker. Update
CLI snapshots for the current interview events and give the shared test
session lock more time to cover daemon startup and shutdown.
2026-04-07 20:11:17 -04:00
Bryan Helmkamp
2dd58237b4
refactor(interview): simplify pending question handling
Collapse the live answer rendezvous into ControlInterviewer, move pending
question storage onto a shared typed record, and route HTTP and Slack answer
submission through one server-side flow.
2026-04-07 19:44:32 -04:00
Bryan Helmkamp
326e0c27fa
refactor(interview): move run answers onto control channels
Some checks are pending
Rust / Format (push) Waiting to run
Rust / Clippy (push) Waiting to run
Rust / Test (Linux) (push) Waiting to run
Rust / Test (macOS) (push) Waiting to run
TypeScript / Typecheck (push) Waiting to run
TypeScript / Test (push) Waiting to run
TypeScript / Build (push) Waiting to run
Persist pending interviews in run state, deliver accepted answers to workers
through the server-owned control path, and remove the old scratch-file and
WebInterviewer transports.

This also moves Slack onto the canonical server answer flow, adds richer
question metadata to the API and run events, and covers the subprocess
question lifecycle with end-to-end tests.
2026-04-07 19:23:36 -04:00
Bryan Helmkamp
bc3f91fb38
refactor(store): unify run dump export sources
Share one store-dump export pipeline across the server-backed CLI path
and the local test helper, and add mixed blob-ref plus artifact coverage
for the exported output.
2026-04-07 18:28:28 -04:00
Bryan Helmkamp
54dbb28289
fix(store): make run export use server-backed blob reads
Route `fabro store dump` through the server client for run state, events,
blob hydration, and artifact downloads instead of reopening storage directly
from the CLI process. This fixes blob-backed checkpoint exports and restores
store-dump coverage under the in-memory test server.
2026-04-07 18:16:29 -04:00
Bryan Helmkamp
668d7857e6
fix(clippy): restore workspace lint cleanups after main merge
Reapply the lint-safe changes that were partially displaced while merging
origin/main, including the billing serialization assertion and the attach
replay/server annotation cleanups. This keeps the merged main branch back to a
clean full-workspace clippy pass before the store-dump debugging continues.
2026-04-07 18:01:53 -04:00
Bryan Helmkamp
ffe3854c8f
Merge remote-tracking branch 'origin/main'
Resolve the artifact lifecycle merge by keeping object-backed upload and sandbox sync behavior alongside durable blob-ref normalization.
2026-04-07 17:52:07 -04:00
Bryan Helmkamp
0d48f2c255
fix(artifacts): harden object-backed upload rollout
Tighten the worker upload path so object-backed runs only fail when an
artifact upload is actually attempted without a token, and update CLI
snapshots for the new artifact storage metadata.

Fold in the workspace test and clippy fixes needed to verify the final
artifact upload implementation cleanly across Rust and web targets.
2026-04-07 17:45:49 -04:00
Bryan Helmkamp
73e9509aa8
feat(workflow): persist offloaded context as global blob refs
Store large context payloads in the global CAS and keep durable
checkpoint state as blob://sha256 refs instead of execution-local file
paths. Resolve and materialize blob refs at execution, output, and export
time so resumed and remote runs can read legacy and new artifacts
consistently.
2026-04-07 17:18:28 -04:00
Bryan Helmkamp
5ced931d1a
feat(artifacts): finish object-backed artifact uploads
Add scoped worker upload tokens and HTTP artifact upload clients.

Support manifest-first multipart stage artifact uploads with validation and checksums.

Gate artifact reads by run capability while preserving legacy scratch fallback.
2026-04-07 16:56:37 -04:00
Bryan Helmkamp
5899850541
fix(run): terminate active workers on force removal
Active runs deleted through rm --force were removed from server state
without signalling the worker process, which could leave detached
workers orphaned after test cleanup. Terminate the tracked worker
process group before deleting run state and cover it with an
integration regression.
2026-04-07 16:04:26 -04:00
Bryan Helmkamp
6f5da61497
fix(server): update aggregate billing test 2026-04-07 15:35:29 -04:00
Bryan Helmkamp
9ca0113f66
Merge remote-tracking branch 'origin/main'
# Conflicts:
#	apps/fabro-web/app/routes/run-overview.tsx
#	apps/fabro-web/app/routes/workflow-detail.tsx
#	apps/fabro-web/app/routes/workflows.tsx
#	lib/crates/fabro-workflow/src/lifecycle/artifact.rs
#	lib/crates/fabro-workflow/src/pipeline/finalize.rs
2026-04-07 15:24:07 -04:00
Bryan Helmkamp
df67cfaa36
Merge remote-tracking branch 'origin/main' into codex/fix-attach-terminal-authoritative-stream
# Conflicts:
#	lib/crates/fabro-cli/src/server_client.rs
2026-04-07 15:04:32 -04:00
Bryan Helmkamp
ba7dc77be0
refactor(billing): unify the LLM billing domain
Replace the overlapping usage and cost model with canonical billing
primitives centered on ModelRef, ModelHandle, TokenCounts, and
BilledModelUsage. This also renames the public API and web surface from
usage to billing, removes compatibility aliases, and normalizes provider
usage adapters onto the shared billing vocabulary.
2026-04-07 14:33:35 -04:00
Bryan Helmkamp
1953ed1a69
refactor(run): remove worker-side SlateDB access
Move detached workers onto an HTTP-backed runtime store so the server
remains the only SlateDB owner. This replaces the worker's seeded local
RunDatabase with a canonical server-backed handle for state, events, and
blobs, and updates workflow runtime plumbing to use that abstraction.
2026-04-07 14:33:33 -04:00
Bryan Helmkamp
3dcf2ad04b
fix(run): make attach stream terminal-authoritative
Replay persisted run events for attach requests, keep the SSE stream live
only while the run is active, and close on terminal run events instead of
returning 410 for completed runs.

The CLI now treats premature attach EOF as an error, and the affected
integration tests were stabilized around store-backed event ordering and
recovered rewind timelines.
2026-04-07 14:32:23 -04:00
Bryan Helmkamp
6c5ea35fd1
Merge remote-tracking branch 'origin/main' 2026-04-07 13:00:13 -04:00
Bryan Helmkamp
f4488c4d35
feat(run): record run creation provenance
Persist server, client, and subject provenance on run creation so
run state and inspect output can show which Fabro version created a
run, which first-party client submitted it, and how the request was
authenticated.
2026-04-07 12:59:25 -04:00
Bryan Helmkamp
26e21f0a13
fmt 2026-04-07 12:59:16 -04:00
Bryan Helmkamp
6a804e9808
refactor(cli): stream run attach over SSE
Replace the attach polling loop with the existing run attach SSE endpoint.
Seed from stored history once, fetch interview questions only when needed,
and keep completed-run replay behavior intact.
2026-04-07 12:58:37 -04:00
Bryan Helmkamp
80dfbd5309
Merge remote-tracking branch 'origin/main'
# Conflicts:
#	lib/crates/fabro-cli/tests/it/cmd/support.rs
2026-04-07 11:44:13 -04:00