mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-07 08:27:12 +00:00
parent
3f695c5b79
commit
493663589a
6 changed files with 198 additions and 51 deletions
215
run.json
215
run.json
|
|
@ -505,7 +505,7 @@
|
|||
"kind": "running"
|
||||
},
|
||||
"status_updated_at": "2026-05-27T16:04:24.169500Z",
|
||||
"last_event_at": "2026-05-27T16:04:32.483677Z",
|
||||
"last_event_at": "2026-05-27T16:05:25.056695Z",
|
||||
"pending_control": null,
|
||||
"checkpoints": [
|
||||
{
|
||||
|
|
@ -609,9 +609,9 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"seq": 0,
|
||||
"seq": 39,
|
||||
"checkpoint": {
|
||||
"timestamp": "2026-05-27T16:05:20.058088Z",
|
||||
"timestamp": "2026-05-27T16:05:25.056591Z",
|
||||
"current_node": "preflight_compile",
|
||||
"completed_nodes": [
|
||||
"start",
|
||||
|
|
@ -621,25 +621,29 @@
|
|||
"node_retries": {},
|
||||
"context_values": {
|
||||
"command.output": "blob://sha256/3e73c3817f9634a464d5dade1eb4defe3b21ad047b62622960871a37f4e5d2dc",
|
||||
"internal.retry_count.toolchain": 0,
|
||||
"thread.toolchain.current_node": "preflight_compile",
|
||||
"failure_signature": "preflight_compile|deterministic|script failed with exit code: <n> ## output error[e0609]: no field `reference` on type `environmentimagesettings` --> lib/crates/fabro-types/src/settings/run.rs:<n>:<n> | <n> | substitute_option_string(&mut environment.image.reference,looku",
|
||||
"current_node": "preflight_compile",
|
||||
"internal.work_dir": "/home/daytona/workspace/fabro",
|
||||
"graph.model_stylesheet": "\n * { model: claude-opus-4-7; }\n ",
|
||||
"internal.retry_count.start": 0,
|
||||
"failure_class": "deterministic",
|
||||
"internal.fidelity": "compact",
|
||||
"internal.thread_id": "toolchain",
|
||||
"internal.node_visit_count": 1,
|
||||
"outcome": "failed",
|
||||
"internal.retry_count.preflight_compile": 0,
|
||||
"thread.toolchain.current_node": "preflight_compile",
|
||||
"internal.thread_id": "toolchain",
|
||||
"graph.goal": "# Define automation API contract and clients\n\n- Number: #396\n- State: OPEN\n- Author: brynary (Bryan Helmkamp)\n- Created: 2026-05-25T15:06:24Z\n- Updated: 2026-05-25T15:06:24Z\n- URL: https://github.com/fabro-sh/fabro/issues/396\n\n## Body\n\n## Goal\n\nDefine the public Automations API contract, reuse compatible Rust domain types, and regenerate generated API clients.\n\n## Scope\n\nUpdate the OpenAPI spec under `/api/v1` with these paths:\n\n```http\nGET /automations\nPOST /automations\nGET /automations/{id}\nPUT /automations/{id}\nDELETE /automations/{id}\nGET /automations/{id}/runs\nPOST /automations/{id}/runs\n```\n\nAdd schemas for:\n\n- `Automation`\n- `AutomationTarget`\n- `AutomationTrigger`\n- `AutomationApiTrigger`\n- `AutomationScheduleTrigger`\n- `CreateAutomationRequest`\n- `ReplaceAutomationRequest`\n- `AutomationListResponse`\n\nUse this response shape for automations:\n\n```ts\ntype Automation = {\n id: string;\n revision: string;\n name: string;\n description: string | null;\n enabled: boolean;\n target: AutomationTarget;\n triggers: AutomationTrigger[];\n};\n\ntype AutomationTarget = {\n repository: string;\n ref: string;\n workflow: string;\n};\n\ntype AutomationTrigger =\n | { id: string; type: \"api\"; enabled: boolean }\n | { id: string; type: \"schedule\"; enabled: boolean; expression: string };\n```\n\nRequest shapes:\n\n```ts\ntype CreateAutomationRequest = {\n id: string;\n name: string;\n description?: string | null;\n enabled?: boolean;\n target: AutomationTarget;\n triggers: AutomationTrigger[];\n};\n\ntype ReplaceAutomationRequest = {\n name: string;\n description?: string | null;\n enabled: boolean;\n target: AutomationTarget;\n triggers: AutomationTrigger[];\n};\n```\n\nContract details:\n\n- Use an OpenAPI discriminator with `propertyName: type` for trigger variants.\n- Unknown trigger discriminator values should be reported by handlers as domain validation errors with HTTP 422, not malformed JSON errors with HTTP 400.\n- Reuse existing `Run` and paginated run-list envelope schemas for automation run endpoints.\n- Add `If-Match` header parameters for replace and delete operations.\n- Add `ETag` response headers on automation read and replace responses.\n- Response codes should cover 200, 201, 204, 400, 404, 409, 422, and 428 where applicable.\n- Before generating duplicate Rust types, search for matching `fabro-automation` domain types and add `with_replacement(...)` mappings where the serde wire shape is identical.\n- Add JSON parity tests for every reused automation type.\n\n## Files\n\nModify:\n\n- `docs/public/api-reference/fabro-api.yaml`\n- `lib/crates/fabro-api/Cargo.toml`\n- `lib/crates/fabro-api/build.rs`\n- Generated Rust API files under `lib/crates/fabro-api/src`, as produced by build/codegen\n- Generated TypeScript client files under `lib/packages/fabro-api-client`\n\nCreate:\n\n- `lib/crates/fabro-api/tests/automation_round_trip.rs`\n\n## Acceptance Criteria\n\n- The OpenAPI document exposes the full backend Automations API contract.\n- Rust generated API types compile.\n- Compatible automation domain types are reused instead of duplicated.\n- Reused type JSON parity is covered by tests.\n- The TypeScript API client contains generated automation operations and types.\n- No web UI consumer imports are added.\n\n## Verification\n\nRun:\n\n```bash\ncargo build -p fabro-api\ncargo nextest run -p fabro-api\ncd lib/packages/fabro-api-client && bun run generate\ngit diff -- apps/fabro-web lib/crates/fabro-cli\n```\n\nExpected: generated API files may change; application UI and CLI command modules should not change.\n\n\n## Comments\n\nNo comments.\n",
|
||||
"graph.rankdir": "LR",
|
||||
"internal.fidelity": "compact",
|
||||
"internal.run_id": "01KSN2VNQ496GSM5N0RSZFDNHN",
|
||||
"thread.start.current_node": "toolchain",
|
||||
"internal.node_visit_count": 1,
|
||||
"graph.goal": "# Define automation API contract and clients\n\n- Number: #396\n- State: OPEN\n- Author: brynary (Bryan Helmkamp)\n- Created: 2026-05-25T15:06:24Z\n- Updated: 2026-05-25T15:06:24Z\n- URL: https://github.com/fabro-sh/fabro/issues/396\n\n## Body\n\n## Goal\n\nDefine the public Automations API contract, reuse compatible Rust domain types, and regenerate generated API clients.\n\n## Scope\n\nUpdate the OpenAPI spec under `/api/v1` with these paths:\n\n```http\nGET /automations\nPOST /automations\nGET /automations/{id}\nPUT /automations/{id}\nDELETE /automations/{id}\nGET /automations/{id}/runs\nPOST /automations/{id}/runs\n```\n\nAdd schemas for:\n\n- `Automation`\n- `AutomationTarget`\n- `AutomationTrigger`\n- `AutomationApiTrigger`\n- `AutomationScheduleTrigger`\n- `CreateAutomationRequest`\n- `ReplaceAutomationRequest`\n- `AutomationListResponse`\n\nUse this response shape for automations:\n\n```ts\ntype Automation = {\n id: string;\n revision: string;\n name: string;\n description: string | null;\n enabled: boolean;\n target: AutomationTarget;\n triggers: AutomationTrigger[];\n};\n\ntype AutomationTarget = {\n repository: string;\n ref: string;\n workflow: string;\n};\n\ntype AutomationTrigger =\n | { id: string; type: \"api\"; enabled: boolean }\n | { id: string; type: \"schedule\"; enabled: boolean; expression: string };\n```\n\nRequest shapes:\n\n```ts\ntype CreateAutomationRequest = {\n id: string;\n name: string;\n description?: string | null;\n enabled?: boolean;\n target: AutomationTarget;\n triggers: AutomationTrigger[];\n};\n\ntype ReplaceAutomationRequest = {\n name: string;\n description?: string | null;\n enabled: boolean;\n target: AutomationTarget;\n triggers: AutomationTrigger[];\n};\n```\n\nContract details:\n\n- Use an OpenAPI discriminator with `propertyName: type` for trigger variants.\n- Unknown trigger discriminator values should be reported by handlers as domain validation errors with HTTP 422, not malformed JSON errors with HTTP 400.\n- Reuse existing `Run` and paginated run-list envelope schemas for automation run endpoints.\n- Add `If-Match` header parameters for replace and delete operations.\n- Add `ETag` response headers on automation read and replace responses.\n- Response codes should cover 200, 201, 204, 400, 404, 409, 422, and 428 where applicable.\n- Before generating duplicate Rust types, search for matching `fabro-automation` domain types and add `with_replacement(...)` mappings where the serde wire shape is identical.\n- Add JSON parity tests for every reused automation type.\n\n## Files\n\nModify:\n\n- `docs/public/api-reference/fabro-api.yaml`\n- `lib/crates/fabro-api/Cargo.toml`\n- `lib/crates/fabro-api/build.rs`\n- Generated Rust API files under `lib/crates/fabro-api/src`, as produced by build/codegen\n- Generated TypeScript client files under `lib/packages/fabro-api-client`\n\nCreate:\n\n- `lib/crates/fabro-api/tests/automation_round_trip.rs`\n\n## Acceptance Criteria\n\n- The OpenAPI document exposes the full backend Automations API contract.\n- Rust generated API types compile.\n- Compatible automation domain types are reused instead of duplicated.\n- Reused type JSON parity is covered by tests.\n- The TypeScript API client contains generated automation operations and types.\n- No web UI consumer imports are added.\n\n## Verification\n\nRun:\n\n```bash\ncargo build -p fabro-api\ncargo nextest run -p fabro-api\ncd lib/packages/fabro-api-client && bun run generate\ngit diff -- apps/fabro-web lib/crates/fabro-cli\n```\n\nExpected: generated API files may change; application UI and CLI command modules should not change.\n\n\n## Comments\n\nNo comments.\n"
|
||||
"internal.retry_count.preflight_compile": 0,
|
||||
"current_node": "preflight_compile",
|
||||
"failure_class": "deterministic",
|
||||
"internal.retry_count.toolchain": 0,
|
||||
"internal.retry_count.start": 0,
|
||||
"graph.model_stylesheet": "\n * { model: claude-opus-4-7; }\n ",
|
||||
"internal.work_dir": "/home/daytona/workspace/fabro",
|
||||
"failure_signature": "preflight_compile|deterministic|script failed with exit code: <n> ## output error[e0609]: no field `reference` on type `environmentimagesettings` --> lib/crates/fabro-types/src/settings/run.rs:<n>:<n> | <n> | substitute_option_string(&mut environment.image.reference,looku"
|
||||
},
|
||||
"node_outcomes": {
|
||||
"start": {
|
||||
"status": "succeeded",
|
||||
"usage": null
|
||||
},
|
||||
"toolchain": {
|
||||
"status": "succeeded",
|
||||
"context_updates": {
|
||||
|
|
@ -654,10 +658,6 @@
|
|||
"active_time_ms": 1389
|
||||
}
|
||||
},
|
||||
"start": {
|
||||
"status": "succeeded",
|
||||
"usage": null
|
||||
},
|
||||
"preflight_compile": {
|
||||
"status": "failed",
|
||||
"context_updates": {
|
||||
|
|
@ -677,16 +677,74 @@
|
|||
}
|
||||
},
|
||||
"next_node_id": "exit",
|
||||
"git_commit_sha": "3950d2fbe5d2f3aca337206c172890b021264486",
|
||||
"loop_failure_signatures": {
|
||||
"preflight_compile|deterministic|script failed with exit code: <n> ## output error[e0609]: no field `reference` on type `environmentimagesettings` --> lib/crates/fabro-types/src/settings/run.rs:<n>:<n> | <n> | substitute_option_string(&mut environment.image.reference,looku": 1
|
||||
},
|
||||
"node_visits": {
|
||||
"preflight_compile": 1,
|
||||
"toolchain": 1,
|
||||
"start": 1
|
||||
"start": 1,
|
||||
"preflight_compile": 1
|
||||
}
|
||||
},
|
||||
"diff": {}
|
||||
"diff": {
|
||||
"patch": "diff --git a/Cargo.lock b/Cargo.lock\nindex fe93492ce..ebd8e2593 100644\n--- a/Cargo.lock\n+++ b/Cargo.lock\n@@ -2652,7 +2652,7 @@ dependencies = [\n \n [[package]]\n name = \"fabro-variable\"\n-version = \"0.245.0-nightly.1\"\n+version = \"0.246.0-nightly.0\"\n dependencies = [\n \"chrono\",\n \"fabro-types\",\n",
|
||||
"summary": {
|
||||
"files_changed": 1,
|
||||
"additions": 1,
|
||||
"deletions": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"conclusion": null,
|
||||
"conclusion": {
|
||||
"timestamp": "2026-05-27T16:05:25.079355Z",
|
||||
"status": "succeeded",
|
||||
"timing": {
|
||||
"wall_time_ms": 60893,
|
||||
"inference_time_ms": 0,
|
||||
"tool_time_ms": 48956,
|
||||
"active_time_ms": 48956
|
||||
},
|
||||
"final_git_commit_sha": "3950d2fbe5d2f3aca337206c172890b021264486",
|
||||
"stages": [
|
||||
{
|
||||
"stage_id": "start",
|
||||
"stage_label": "start",
|
||||
"timing": {
|
||||
"wall_time_ms": 0,
|
||||
"inference_time_ms": 0,
|
||||
"tool_time_ms": 0,
|
||||
"active_time_ms": 0
|
||||
},
|
||||
"retries": 0
|
||||
},
|
||||
{
|
||||
"stage_id": "toolchain",
|
||||
"stage_label": "toolchain",
|
||||
"timing": {
|
||||
"wall_time_ms": 1397,
|
||||
"inference_time_ms": 0,
|
||||
"tool_time_ms": 1389,
|
||||
"active_time_ms": 1389
|
||||
},
|
||||
"retries": 0
|
||||
},
|
||||
{
|
||||
"stage_id": "preflight_compile",
|
||||
"stage_label": "preflight_compile",
|
||||
"timing": {
|
||||
"wall_time_ms": 47573,
|
||||
"inference_time_ms": 0,
|
||||
"tool_time_ms": 47567,
|
||||
"active_time_ms": 47567
|
||||
},
|
||||
"retries": 0
|
||||
}
|
||||
],
|
||||
"total_retries": 0,
|
||||
"diff": {}
|
||||
},
|
||||
"sandbox": {
|
||||
"provider": "daytona",
|
||||
"snapshot": "fabro-v12",
|
||||
|
|
@ -706,6 +764,88 @@
|
|||
"superseded_by": null,
|
||||
"pending_interviews": {},
|
||||
"stages": {
|
||||
"preflight_compile@1": {
|
||||
"first_event_seq": 32,
|
||||
"prompt": null,
|
||||
"response": null,
|
||||
"completion": {
|
||||
"outcome": "failed",
|
||||
"notes": null,
|
||||
"failure_reason": "Script failed with exit code: 101\n\n## output\nerror[E0609]: no field `reference` on type `EnvironmentImageSettings`\n --> lib/crates/fabro-types/src/settings/run.rs:259:53\n |\n259 | substitute_option_string(&mut environment.image.reference, lookup)?;\n | ^^^^^^^^^ unknown field\n |\n = note: available fields are: `docker`, `dockerfile`\n\nFor more information about this error, try `rustc --explain E0609`.\nerror: could not compile `fabro-types` (lib) due to 1 previous error\n",
|
||||
"timestamp": "2026-05-27T16:05:20.057576Z"
|
||||
},
|
||||
"provider_used": null,
|
||||
"diff": null,
|
||||
"script_invocation": {
|
||||
"script": "cargo check -q --workspace 2>&1",
|
||||
"command": "exec 2>&1\ncargo check -q --workspace 2>&1",
|
||||
"language": "shell"
|
||||
},
|
||||
"script_timing": {
|
||||
"output": "blob://sha256/3e73c3817f9634a464d5dade1eb4defe3b21ad047b62622960871a37f4e5d2dc",
|
||||
"exit_code": 101,
|
||||
"duration_ms": 47567,
|
||||
"termination": "exited",
|
||||
"output_bytes": 495,
|
||||
"live_streaming": true
|
||||
},
|
||||
"parallel_results": null,
|
||||
"output": null,
|
||||
"output_bytes": 495,
|
||||
"live_streaming": true,
|
||||
"termination": "exited",
|
||||
"started_at": "2026-05-27T16:04:32.483253Z",
|
||||
"handler": "command",
|
||||
"timing": {
|
||||
"wall_time_ms": 47573,
|
||||
"inference_time_ms": 0,
|
||||
"tool_time_ms": 47567,
|
||||
"active_time_ms": 47567
|
||||
},
|
||||
"usage": {
|
||||
"input_tokens": 0,
|
||||
"output_tokens": 0,
|
||||
"total_tokens": 0,
|
||||
"reasoning_tokens": 0,
|
||||
"cache_read_tokens": 0,
|
||||
"cache_write_tokens": 0
|
||||
},
|
||||
"state": "failed"
|
||||
},
|
||||
"exit@1": {
|
||||
"first_event_seq": 42,
|
||||
"prompt": null,
|
||||
"response": null,
|
||||
"completion": {
|
||||
"outcome": "succeeded",
|
||||
"notes": null,
|
||||
"failure_reason": null,
|
||||
"timestamp": "2026-05-27T16:05:25.056695Z"
|
||||
},
|
||||
"provider_used": null,
|
||||
"diff": null,
|
||||
"script_invocation": null,
|
||||
"script_timing": null,
|
||||
"parallel_results": null,
|
||||
"output": null,
|
||||
"started_at": "2026-05-27T16:05:25.056677Z",
|
||||
"handler": "exit",
|
||||
"timing": {
|
||||
"wall_time_ms": 0,
|
||||
"inference_time_ms": 0,
|
||||
"tool_time_ms": 0,
|
||||
"active_time_ms": 0
|
||||
},
|
||||
"usage": {
|
||||
"input_tokens": 0,
|
||||
"output_tokens": 0,
|
||||
"total_tokens": 0,
|
||||
"reasoning_tokens": 0,
|
||||
"cache_read_tokens": 0,
|
||||
"cache_write_tokens": 0
|
||||
},
|
||||
"state": "succeeded"
|
||||
},
|
||||
"start@1": {
|
||||
"first_event_seq": 18,
|
||||
"prompt": null,
|
||||
|
|
@ -740,33 +880,6 @@
|
|||
},
|
||||
"state": "succeeded"
|
||||
},
|
||||
"preflight_compile@1": {
|
||||
"first_event_seq": 32,
|
||||
"prompt": null,
|
||||
"response": null,
|
||||
"completion": null,
|
||||
"provider_used": null,
|
||||
"diff": null,
|
||||
"script_invocation": {
|
||||
"script": "cargo check -q --workspace 2>&1",
|
||||
"command": "exec 2>&1\ncargo check -q --workspace 2>&1",
|
||||
"language": "shell"
|
||||
},
|
||||
"script_timing": null,
|
||||
"parallel_results": null,
|
||||
"output": null,
|
||||
"started_at": "2026-05-27T16:04:32.483253Z",
|
||||
"handler": "command",
|
||||
"usage": {
|
||||
"input_tokens": 0,
|
||||
"output_tokens": 0,
|
||||
"total_tokens": 0,
|
||||
"reasoning_tokens": 0,
|
||||
"cache_read_tokens": 0,
|
||||
"cache_write_tokens": 0
|
||||
},
|
||||
"state": "running"
|
||||
},
|
||||
"toolchain@1": {
|
||||
"first_event_seq": 22,
|
||||
"prompt": null,
|
||||
|
|
|
|||
13
stages/003-preflight_compile@1/diff.patch
Normal file
13
stages/003-preflight_compile@1/diff.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index fe93492ce..ebd8e2593 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -2652,7 +2652,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "fabro-variable"
|
||||
-version = "0.245.0-nightly.1"
|
||||
+version = "0.246.0-nightly.0"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"fabro-types",
|
||||
1
stages/003-preflight_compile@1/output.log
Normal file
1
stages/003-preflight_compile@1/output.log
Normal file
|
|
@ -0,0 +1 @@
|
|||
blob://sha256/3e73c3817f9634a464d5dade1eb4defe3b21ad047b62622960871a37f4e5d2dc
|
||||
8
stages/003-preflight_compile@1/script_timing.json
Normal file
8
stages/003-preflight_compile@1/script_timing.json
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"output": "blob://sha256/3e73c3817f9634a464d5dade1eb4defe3b21ad047b62622960871a37f4e5d2dc",
|
||||
"exit_code": 101,
|
||||
"duration_ms": 47567,
|
||||
"termination": "exited",
|
||||
"output_bytes": 495,
|
||||
"live_streaming": true
|
||||
}
|
||||
6
stages/003-preflight_compile@1/status.json
Normal file
6
stages/003-preflight_compile@1/status.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"outcome": "failed",
|
||||
"notes": null,
|
||||
"failure_reason": "Script failed with exit code: 101\n\n## output\nerror[E0609]: no field `reference` on type `EnvironmentImageSettings`\n --> lib/crates/fabro-types/src/settings/run.rs:259:53\n |\n259 | substitute_option_string(&mut environment.image.reference, lookup)?;\n | ^^^^^^^^^ unknown field\n |\n = note: available fields are: `docker`, `dockerfile`\n\nFor more information about this error, try `rustc --explain E0609`.\nerror: could not compile `fabro-types` (lib) due to 1 previous error\n",
|
||||
"timestamp": "2026-05-27T16:05:20.057576Z"
|
||||
}
|
||||
6
stages/004-exit@1/status.json
Normal file
6
stages/004-exit@1/status.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"outcome": "succeeded",
|
||||
"notes": null,
|
||||
"failure_reason": null,
|
||||
"timestamp": "2026-05-27T16:05:25.056695Z"
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue