Commit graph

685 commits

Author SHA1 Message Date
Bryan Helmkamp
e10bd2f771
chore: fix warnings and test stability 2026-04-04 13:31:04 -04:00
Bryan Helmkamp
76e1da8b35
refactor: remove remaining event json indirection 2026-04-04 13:24:19 -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
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
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
Bryan Helmkamp
7efb66cd3e
refactor: introduce StageId 2026-04-03 18:00:29 -07:00
Bryan Helmkamp
35620f08e6
Narrow fabro-cli helper visibility 2026-04-03 17:47:51 -07:00
Bryan Helmkamp
0b7e284924
Derive run metadata from RunId 2026-04-03 17:46:44 -07:00
Bryan Helmkamp
a56a990ed4
fix: resolve fabro-workflow nextest timeouts and regressions 2026-04-03 17:45:47 -07:00
Bryan Helmkamp
1ed3861e70
refactor: simplify run storage and retire sqlite metadata 2026-04-03 17:24:51 -07:00
Bryan Helmkamp
4a7faee035
Use # as SlateDB key separator instead of /
File paths in node asset keys contain / (e.g. src/main.rs), which
conflicted with the / segment separator. Using # eliminates the
ambiguity — the filename is always the trailing segment after the
last #, so embedded slashes parse correctly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:39:24 -07:00
Bryan Helmkamp
103d1bf511
Rename fabro_store::RunState to RunProjection
Clarifies that this type is an event-sourced projection of run history,
distinct from fabro_core::ExecutionState which tracks live execution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:37:19 -07:00
Bryan Helmkamp
a667fb7472
Rename fabro_core::RunState to ExecutionState
Resolves the name collision with fabro_store::RunState. The core type
represents live in-memory execution state (current node, visits, context),
while the store type is an event-sourced projection of a full run record.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:34:24 -07:00
Bryan Helmkamp
22115a180b
Remove NodeOutcomeRecord alias; embed CatalogRecord in RunSummary
NodeOutcomeRecord was a duplicate alias for Outcome<Option<StageUsage>>
which fabro-workflow already calls Outcome. Inline the type instead.

RunSummary duplicated CatalogRecord's four fields. Use #[serde(flatten)]
to embed CatalogRecord directly, eliminating the duplication.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:31:44 -07:00
Bryan Helmkamp
7bc0b5db3a
Merge remote-tracking branch 'origin/main' 2026-04-03 16:25:17 -07:00
Bryan Helmkamp
0844294440
Remove dead code, double-Arc, and back-compat shims
- Remove RunStoreHandle type alias (double-Arc); use SlateRunStore directly
- Remove RunState::list_node_ids (test-only, inline in tests)
- Remove SlateRunStore::list_assets and scan_prefix (test-only)
- Remove RuntimeState::ensure_runtime_dir/ensure_artifact_values_dir (test-only)
- Remove read_dot_source and its 4 tests (reads files no longer written)
- Remove back-compat modules transform/vars/stylesheet; update integration test
- Remove unused InvalidTransition/ParseRunStatusError re-exports
- Fix crate::vars import to crate::transforms::variable_expansion

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:24:44 -07:00
Bryan Helmkamp
0577de38f9
refactor(run): remove vestigial run dir params 2026-04-03 16:16:53 -07:00
Bryan Helmkamp
27f59d3f6c
Fix clippy warnings in fabro-workflow
- run_dump: take &Path instead of PathBuf by value in path helpers
- test_support: remove empty no-op persist_run_artifacts_for_tests
- agent.rs: use u32::try_from instead of as u32 cast
- retro.rs: remove unnecessary let binding
- pull_request.rs: use NodeState::default() instead of Default::default()
- execute/tests.rs: replace bool::then in filter_map with filter+map

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 15:52:49 -07:00
Bryan Helmkamp
5d62a8ba15
lint 2026-04-03 15:41:46 -07:00
Bryan Helmkamp
374b224ac4
refactor(run): remove dead legacy cleanup paths 2026-04-03 15:40:16 -07:00
Bryan Helmkamp
6c2c4ce657
test(run): remove unused temp dirs 2026-04-03 15:25:12 -07:00
Bryan Helmkamp
4d7c9c55a7
refactor(run): remove legacy checkpoint and stage dir I/O 2026-04-03 15:23:45 -07:00
Bryan Helmkamp
336a0eece6
Remove InMemoryStore, RunSnapshot, and NodeSnapshot; use RunState directly
InMemoryStore duplicated SlateStore's interface and was unused in
production. RunSnapshot/NodeSnapshot were intermediate projections that
tests consumed — replaced with RunState to eliminate the indirection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 14:59:24 -07:00
Bryan Helmkamp
a19878e590
Remove SandboxRecordExt trait (save/load were unused in production)
The trait just wrapped serde_json + std::fs. Tests using it were testing
serialization, not sandbox behavior — deleted those and simplified the
daytona cp test to pass the record directly to reconnect.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 14:58:18 -07:00
Bryan Helmkamp
01b1ce45e0
refactor(run): unify legacy dump projections 2026-04-03 14:50:12 -07:00
Bryan Helmkamp
ef1e831a0e
Restore test-used save/load methods; remove file_name(), write_run_status, Conclusion::load, save_json
The prior commit over-removed methods still needed by tests. This restores
save/load/from_context on CheckpointExt, ConclusionExt, RunRecordExt, and
RunStatusRecordExt with inlined serialization (no longer using save_json).

Removed: file_name() from RunRecordExt and StartRecordExt (zero callers),
Conclusion::load (zero callers), write_run_status (zero callers),
save_json helper (replaced by inline serialization).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 11:51:28 -07:00
Bryan Helmkamp
3e9a118420
Remove dead .save() methods, write_run_status, save_json, and ConclusionExt
These disk-write methods had no production callers — all data is now
persisted via events in SlateDB. Removes save_json helper, .save() from
RunRecord/StartRecord/Checkpoint traits, the entire ConclusionExt trait,
and the write_run_status function.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 11:38:27 -07:00
Bryan Helmkamp
3270136281
refactor(run): drop workflow.toml run-dir fallback
Remove the run_dir workflow.toml snapshot and the path resolver fallback
that treated a missing workflow.toml as a sibling workflow.fabro. SlateDB
and explicit workflow inputs are now the only supported sources.
2026-04-03 11:27:32 -07:00
Bryan Helmkamp
8d2a3220f7
Simplify: rename internal AggregateUsageTotals to UsageAccumulator, add TODO
Eliminates confusing alias (`ApiAggregateUsageTotals`) by giving the
internal accumulator struct a distinct name. Adds a TODO for removing
the OAS 3.1→3.0 patch when progenitor gains 3.1 support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 11:24:36 -07:00
Bryan Helmkamp
0e1730a6a3
test(run): remove legacy file absence assertions
Keep the coverage focused on current store-backed behavior instead of
asserting that old run_dir debug files are missing.
2026-04-03 11:24:30 -07:00
Bryan Helmkamp
58a1380865
refactor(run): drop debug-only node artifact files
Remove API/CLI request and log artifact writes plus panic.txt now that
run state and events are store-backed. Update the direct tests to assert
returned behavior instead of on-disk debug files.
2026-04-03 11:23:14 -07:00
Bryan Helmkamp
679728a1a8
refactor(run): remove file-backed attach fallback
Require attach to use SlateDB-backed run state and events instead of
falling back to progress.jsonl, status.json, and conclusion.json.
Also remove the unused disk progress logger and keep PR body plan text
store-backed so the remaining run_dir file writes can continue shrinking.
2026-04-03 11:19:23 -07:00
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
19543e6558
fix(pull-request): read plan text from run state
Stop PR body generation from depending on run_dir response.md files by
loading plan node responses from RunState instead. This keeps PR body
assembly working after removing stage response file writes and adds a
regression test covering the store-only path.
2026-04-03 11:13:40 -07:00