Commit graph

1834 commits

Author SHA1 Message Date
Bryan Helmkamp
b63c4e664d
test(twin-github): reuse checked-in RSA public key 2026-04-05 12:18:39 -04:00
Bryan Helmkamp
e282143b19
test: tidy remaining test harness edits 2026-04-05 12:17:35 -04:00
Bryan Helmkamp
d644ca1e95
test: standardize no-proxy localhost HTTP clients 2026-04-05 12:17:29 -04:00
Bryan Helmkamp
e8ab762984
test(cli): normalize json run snapshot llm defaults 2026-04-05 11:06:13 -04:00
Bryan Helmkamp
d07850cb7f
plan 2026-04-05 11:03:02 -04:00
Bryan Helmkamp
1b49558f49
test(twin-github): stop generating rsa keys during tests 2026-04-05 11:02:54 -04:00
Bryan Helmkamp
1d7ef425ab
test(cli): reduce logs snapshot surface area
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.
2026-04-05 10:47:41 -04:00
Bryan Helmkamp
0a9e583ce5
fix(server): persist cancelled terminal state and align status tests
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.
2026-04-05 10:42:22 -04:00
Bryan Helmkamp
21671ffa0a
test(cli): stabilize ps JSON global flag assertion
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.
2026-04-05 10:34:32 -04:00
Bryan Helmkamp
0787b4fac8
fix(server): persist cancelled run status in store
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.
2026-04-05 10:30:17 -04:00
Bryan Helmkamp
e9751b881c
js 2026-04-05 10:19:51 -04:00
Bryan Helmkamp
1c199fbc06
test(cli): remove flaky workflow-name start assertion 2026-04-05 10:15:10 -04:00
Bryan Helmkamp
fa7de26188
fix(cli): restore green server-backed test checkpoint 2026-04-05 03:41:10 -04:00
Bryan Helmkamp
2f45976e39
fix(cli): remove remaining local test store access 2026-04-05 03:34:26 -04:00
Bryan Helmkamp
234b1e69e9
fix(store): keep shared slatedb open across run handles
After the single-DB refactor, closing one SlateRunStore could close the
shared SlateDB for every run in the process. Under shared-daemon test
load that surfaced as 500 responses with \"db is closed\" on later state,
event, and delete requests.

Make run-handle close a no-op so the shared DB lifetime stays owned by
the store/process rather than individual run handles.
2026-04-05 03:22:41 -04:00
Bryan Helmkamp
76b5517bc9
fix(tests): isolate shared-daemon scenario helpers 2026-04-05 03:18:46 -04:00
Bryan Helmkamp
4423e65e4a
fix(cli): route shared-test run lookup through server 2026-04-05 03:02:16 -04:00
Bryan Helmkamp
50aff2787b
refactor(store): route test helpers through server-owned runs 2026-04-05 02:53:17 -04:00
Bryan Helmkamp
9597a115b7
fix(test): reduce shared-daemon cli overhead 2026-04-05 00:56:08 -04:00
Bryan Helmkamp
41f0f367b3
Merge remote-tracking branch 'origin/main' 2026-04-05 00:20:53 -04:00
Bryan Helmkamp
2af2ff0068
refactor(cli): route run state through the shared server daemon
Move durable run access and execution control onto the server-backed client,
canonicalize run APIs under /api/v1/runs, and switch CLI integration tests
to a shared test daemon/storage model with shared-state-safe assertions.
2026-04-05 00:15:33 -04:00
Bryan Helmkamp
b4665579ce
test(workflow): fix watchdog event assertion
The test captures Debug output from RunEvent, which renders the event body variant name rather than the canonical envelope string. Assert on StallWatchdogTimeout so the check matches the collected output.
2026-04-04 21:42:12 -04:00
Bryan Helmkamp
b8bd859125
fix(test): remove hidden HTTP client startup overhead
Disable proxy discovery for the hot test HTTP clients so nextest no longer
pays macOS system proxy lookup on repeated reqwest client creation.

Also keep the approved OAuth loopback cleanup and replace GitHub test key
generation with a checked-in PEM fixture.
2026-04-04 21:25:51 -04:00
Bryan Helmkamp
39980b5404
refactor: add run store HTTP endpoints
Define the new run-store contract in the OpenAPI spec, regenerate the
Rust and TypeScript clients, and implement the matching store and
server support for run state, event access, blobs, and stage artifacts.
2026-04-04 15:37:43 -04:00
Bryan Helmkamp
ddebb888b6
Merge remote-tracking branch 'origin/main' 2026-04-04 13:33:32 -04:00
Bryan Helmkamp
e10bd2f771
chore: fix warnings and test stability 2026-04-04 13:31:04 -04:00
Bryan Helmkamp
c32705f12f
docs: align events strategy with RunEvent simplification
Update terminology (RunEventEnvelope → RunEvent), consumer guidance
(match on body instead of .event/.properties), and "Adding A New Event"
steps to reflect the direct Event → EventBody construction.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 13:26:08 -04:00
Bryan Helmkamp
76e1da8b35
refactor: remove remaining event json indirection 2026-04-04 13:24:19 -04:00
Bryan Helmkamp
ce087e840e
refactor: split POST /runs into create + start, remove context endpoint
Align the HTTP API with the CLI's existing `fabro create` / `fabro start`
separation. POST /api/v1/runs now creates a run in `submitted` status
without queuing it. A new POST /api/v1/runs/{id}/start transitions to
`queued` and notifies the scheduler. Also removes the unused
/api/v1/runs/{id}/context endpoint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 13:02:08 -04:00
Bryan Helmkamp
6c9877cc73
refactor: simplify run event representation 2026-04-04 12:59:42 -04:00
Bryan Helmkamp
f6c5823bc5
Merge remote-tracking branch 'origin/main' 2026-04-04 12:25:28 -04:00
Bryan Helmkamp
0be6b81160
refactor: rename EventEmitter to Emitter
The Event prefix is redundant since the type lives in event.rs modules.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 12:24:42 -04:00
Bryan Helmkamp
efe7ad2785
Merge remote-tracking branch 'origin/main' 2026-04-04 12:14:23 -04:00
Bryan Helmkamp
5d2635ae0e
Resolve main merge conflicts 2026-04-04 12:14:05 -04:00
Bryan Helmkamp
5fe852e5eb
cleanup 2026-04-04 12:08:57 -04:00
Bryan Helmkamp
264576ea85
refactor: remove dead code and unnecessary clones in run event types
Remove unused RunEventHeader and AssistantUsageProps structs, simplify
identity RunNoticeLevel conversion, and return references from
event_name()/properties() instead of cloning.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 12:08:38 -04:00
Bryan Helmkamp
4d448feee0
Refactor assets into blob-backed artifacts 2026-04-04 12:08:15 -04:00
Bryan Helmkamp
1ce4a4ca4d
Merge branch 'event-run-event-rename' 2026-04-04 11:15:39 -04:00
Bryan Helmkamp
3c447011bb
refactor: rename workflow run events 2026-04-04 11:15:32 -04:00
Bryan Helmkamp
93a7f19383
refactor: remove legacy stored event compatibility 2026-04-04 10:51:15 -04:00
Bryan Helmkamp
89a55b37e3
refactor: unify workflow stored event model
Add a shared StoredEvent schema in fabro-types and switch workflow,
store, CLI, and server event handling to use it directly.

This removes the writer/reader mismatch around flattened failure data,
updates affected projections and progress rendering, and refreshes the
fixture/snapshot coverage around the canonical event shape.
2026-04-04 10:38:44 -04:00
Bryan Helmkamp
c7787e3d31
docs: clarify file-backed artifact docs
Update the run directory, context, and output docs to describe
large offloaded values as file-backed artifacts while preserving the
existing cache path examples.
2026-04-04 00:00:25 -07:00
Bryan Helmkamp
2842870737
refactor: replace artifact values with run blobs
Rename durable artifact values to raw byte blobs keyed by RunBlobId,
add the blob type in fabro-types, switch SlateRunStore to write/read/list
blob APIs, and export blobs from store dumps by UUID.
2026-04-03 23:59:27 -07:00
Bryan Helmkamp
f82c5fc911
refactor: remove workflow lifecycle disk checkpoints 2026-04-03 23:49:57 -07:00
Bryan Helmkamp
8250909282
refactor: remove legacy node file writes from workflow handlers 2026-04-03 23:12:40 -07:00
Bryan Helmkamp
47ce67d147
refactor: remove NodeVisitRef in favor of StageId
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 21:07:51 -07:00
Bryan Helmkamp
2943508dd1
merge: resolve conflicts from origin/main
Merged origin/main incorporating:
- db_prefix threading in SlateRunStore for run isolation
- matches_run validation in active run cache
- NodeVisitRef type in fabro-store types
- ListRunsQuery parameter for list_runs API
- HashSet dedup in catalog listing
- Updated snapshot tests for new run directory format

Preserved from feature branch:
- NodeAsset struct and exports
- StageId-based node references in run state
- make_run_dir as pub for cross-crate access
- Thread-spawn approach in handler test_default for tokio safety
- parse_run_id handles YYYYMMDD-ULID directory format

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 20:46:09 -07:00
Bryan Helmkamp
24d04fddd9
fix: serialize run.running with workflow lifecycle events
Move run.running emission onto the event emitter path so it cannot race
past sandbox.initialized or run.started via a direct store append. This
keeps event ordering deterministic for CLI consumers and snapshot tests.
2026-04-03 19:35:51 -07:00
Bryan Helmkamp
ebf5a0621d
refactor: derive durable run paths from run IDs
Move durable run metadata and path derivation onto RunId, simplify the
Slate catalog/index format, and carry the storage-specific run directory
through workflow creation so detached and lookup flows stay aligned.

Also update affected CLI snapshots and test helpers to match the new
run discovery behavior.
2026-04-03 19:15:39 -07:00
Bryan Helmkamp
f922a483c6
chore: fix cli lint and snapshot drift 2026-04-03 18:11:33 -07:00