checkpoint

⚒️ Generated with [Fabro](https://fabro.sh)
This commit is contained in:
Fabro 2026-05-27 16:27:32 -04:00
parent a94fa144ce
commit 3425ccbeb7
5 changed files with 220 additions and 55 deletions

255
run.json
View file

@ -505,7 +505,7 @@
"kind": "running"
},
"status_updated_at": "2026-05-27T20:21:07.705651Z",
"last_event_at": "2026-05-27T20:21:25.357192Z",
"last_event_at": "2026-05-27T20:23:49.892180Z",
"pending_control": null,
"checkpoints": [
{
@ -609,9 +609,9 @@
}
},
{
"seq": 0,
"seq": 38,
"checkpoint": {
"timestamp": "2026-05-27T20:23:45.032583Z",
"timestamp": "2026-05-27T20:23:49.890628Z",
"current_node": "preflight_compile",
"completed_nodes": [
"start",
@ -620,24 +620,24 @@
],
"node_retries": {},
"context_values": {
"thread.start.current_node": "toolchain",
"current_node": "preflight_compile",
"internal.node_visit_count": 1,
"internal.thread_id": "toolchain",
"internal.retry_count.preflight_compile": 0,
"internal.run_id": "01KSNHHJ558NP7RY00VDW5WSAV",
"internal.work_dir": "/home/daytona/workspace/fabro",
"internal.fidelity": "compact",
"internal.retry_count.start": 0,
"internal.retry_count.toolchain": 0,
"thread.toolchain.current_node": "preflight_compile",
"graph.model_stylesheet": "\n * { model: claude-opus-4-7; }\n ",
"failure_signature": "",
"failure_class": "",
"command.output": "blob://sha256/12ae32cb1ec02d01eda3581b127c1fee3b0dc53572ed6baf239721a03d82e126",
"outcome": "succeeded",
"graph.rankdir": "LR",
"internal.work_dir": "/home/daytona/workspace/fabro",
"graph.goal": "# Issue #397: Wire automation store and CRUD API\n\nSource: https://github.com/fabro-sh/fabro/issues/397\nState: OPEN\nAuthor: brynary\nCreated: 2026-05-25T15:06:25Z\nUpdated: 2026-05-25T15:06:25Z\nLabels: none\nAssignees: none\nComments: none\n\n## Body\n\n## Goal\n\nLoad the automation store into server state and expose authenticated REST endpoints for managing automation definitions.\n\n## Scope\n\nServer state:\n\n- Add `fabro-automation = { path = \"../fabro-automation\" }` to `fabro-server`.\n- Add `automation_store: Arc<AutomationStore>` to `AppState`.\n- In `build_app_state`, compute the automation directory as:\n\n```rust\nlet automation_dir = active_config_path\n .parent()\n .unwrap_or_else(|| std::path::Path::new(\".\"))\n .join(\"automations\");\n```\n\n- Load `AutomationStore::load(automation_dir)` before constructing `AppState`.\n- Fail server startup if an existing automation file is malformed.\n- Add a crate-private `automation_store()` accessor.\n- Keep test support isolated so each test using a temp active config path gets its own sibling `automations` directory.\n\nCRUD API:\n\n- Create `lib/crates/fabro-server/src/server/handler/automations.rs`.\n- Wire automation routes into real server routes.\n- Use `RequiredUser` for CRUD routes.\n- Implement shared request helpers for path ID parsing, quoted/unquoted `If-Match` parsing, ETag formatting, and `AutomationStoreError` to API error mapping.\n- Missing `If-Match` on replace/delete should return HTTP 428.\n- Stale revisions should return HTTP 409.\n- Domain validation failures should return HTTP 422.\n\nImplement these endpoints:\n\n```http\nGET /automations\nPOST /automations\nGET /automations/{id}\nPUT /automations/{id}\nDELETE /automations/{id}\n```\n\nEndpoint behavior:\n\n- `GET /automations` returns `{ data, meta: { total } }`, sorted by automation ID ascending.\n- `POST /automations` creates a new automation and returns 201; duplicate IDs return 409.\n- `GET /automations/{id}` returns 200 with `ETag: \"<revision>\"`; missing automation returns 404.\n- `PUT /automations/{id}` requires `If-Match`, fully replaces the automation, and returns 200 with a new ETag.\n- `DELETE /automations/{id}` requires `If-Match` and returns 204 on success.\n\n## Files\n\nModify:\n\n- `lib/crates/fabro-server/Cargo.toml`\n- `lib/crates/fabro-server/src/server.rs`\n- `lib/crates/fabro-server/src/server/handler/mod.rs`\n- `lib/crates/fabro-server/src/test_support.rs`\n- `lib/crates/fabro-server/tests/it/api/mod.rs`\n\nCreate:\n\n- `lib/crates/fabro-server/src/server/handler/automations.rs`\n- `lib/crates/fabro-server/tests/it/api/automations.rs`\n\nRead before implementation:\n\n- `docs/internal/logging-strategy.md`\n- `docs/internal/error-handling-strategy.md`\n- `docs/internal/testing-strategy.md`\n\n## Acceptance Criteria\n\n- A server with no `automations/` directory starts and returns an empty automation list.\n- Malformed persisted automation TOML fails server startup.\n- Creating an automation writes `dirname(active_config_path)/automations/<id>.toml`.\n- Reading an automation returns the current ETag revision.\n- Replacing or deleting an automation requires `If-Match`.\n- Stale revisions are rejected.\n- Invalid automation and trigger shapes are rejected with 422.\n- CRUD routes require the existing authenticated user behavior used by real API routes.\n\n## Verification\n\nAdd integration tests for:\n\n- Empty list.\n- Create automation.\n- Duplicate create.\n- Get automation with ETag.\n- Replace automation.\n- Stale replace.\n- Missing `If-Match`.\n- Delete automation.\n- Invalid trigger IDs.\n- Duplicate trigger IDs.\n- Second trigger with `type = \"api\"`.\n- Invalid schedule expression.\n\nRun:\n\n```bash\ncargo nextest run -p fabro-server automations\ncargo nextest run -p fabro-server automation_store\n```\n",
"internal.fidelity": "compact"
"thread.toolchain.current_node": "preflight_compile",
"internal.retry_count.preflight_compile": 0,
"failure_class": "",
"internal.retry_count.toolchain": 0,
"graph.model_stylesheet": "\n * { model: claude-opus-4-7; }\n ",
"internal.node_visit_count": 1,
"command.output": "blob://sha256/12ae32cb1ec02d01eda3581b127c1fee3b0dc53572ed6baf239721a03d82e126",
"internal.run_id": "01KSNHHJ558NP7RY00VDW5WSAV",
"internal.thread_id": "toolchain",
"thread.start.current_node": "toolchain",
"failure_signature": ""
},
"node_outcomes": {
"start": {
@ -674,9 +674,106 @@
}
},
"next_node_id": "preflight_lint",
"git_commit_sha": "522f6bcf8f1b829c67bc19ec69864dbd89afb751",
"node_visits": {
"preflight_compile": 1,
"start": 1,
"toolchain": 1
}
},
"diff": {
"summary": {
"files_changed": 0,
"additions": 0,
"deletions": 0
}
}
},
{
"seq": 0,
"checkpoint": {
"timestamp": "2026-05-27T20:27:31.907364Z",
"current_node": "preflight_lint",
"completed_nodes": [
"start",
"toolchain",
"preflight_compile",
"preflight_lint"
],
"node_retries": {},
"context_values": {
"thread.start.current_node": "toolchain",
"current_node": "preflight_lint",
"internal.node_visit_count": 1,
"internal.thread_id": "preflight_compile",
"internal.retry_count.preflight_compile": 0,
"internal.run_id": "01KSNHHJ558NP7RY00VDW5WSAV",
"internal.work_dir": "/home/daytona/workspace/fabro",
"internal.retry_count.start": 0,
"internal.retry_count.toolchain": 0,
"thread.toolchain.current_node": "preflight_compile",
"graph.model_stylesheet": "\n * { model: claude-opus-4-7; }\n ",
"thread.preflight_compile.current_node": "preflight_lint",
"failure_signature": "preflight_lint|deterministic|failed to spawn script",
"failure_class": "deterministic",
"command.output": "blob://sha256/12ae32cb1ec02d01eda3581b127c1fee3b0dc53572ed6baf239721a03d82e126",
"outcome": "failed",
"graph.rankdir": "LR",
"internal.retry_count.preflight_lint": 0,
"graph.goal": "# Issue #397: Wire automation store and CRUD API\n\nSource: https://github.com/fabro-sh/fabro/issues/397\nState: OPEN\nAuthor: brynary\nCreated: 2026-05-25T15:06:25Z\nUpdated: 2026-05-25T15:06:25Z\nLabels: none\nAssignees: none\nComments: none\n\n## Body\n\n## Goal\n\nLoad the automation store into server state and expose authenticated REST endpoints for managing automation definitions.\n\n## Scope\n\nServer state:\n\n- Add `fabro-automation = { path = \"../fabro-automation\" }` to `fabro-server`.\n- Add `automation_store: Arc<AutomationStore>` to `AppState`.\n- In `build_app_state`, compute the automation directory as:\n\n```rust\nlet automation_dir = active_config_path\n .parent()\n .unwrap_or_else(|| std::path::Path::new(\".\"))\n .join(\"automations\");\n```\n\n- Load `AutomationStore::load(automation_dir)` before constructing `AppState`.\n- Fail server startup if an existing automation file is malformed.\n- Add a crate-private `automation_store()` accessor.\n- Keep test support isolated so each test using a temp active config path gets its own sibling `automations` directory.\n\nCRUD API:\n\n- Create `lib/crates/fabro-server/src/server/handler/automations.rs`.\n- Wire automation routes into real server routes.\n- Use `RequiredUser` for CRUD routes.\n- Implement shared request helpers for path ID parsing, quoted/unquoted `If-Match` parsing, ETag formatting, and `AutomationStoreError` to API error mapping.\n- Missing `If-Match` on replace/delete should return HTTP 428.\n- Stale revisions should return HTTP 409.\n- Domain validation failures should return HTTP 422.\n\nImplement these endpoints:\n\n```http\nGET /automations\nPOST /automations\nGET /automations/{id}\nPUT /automations/{id}\nDELETE /automations/{id}\n```\n\nEndpoint behavior:\n\n- `GET /automations` returns `{ data, meta: { total } }`, sorted by automation ID ascending.\n- `POST /automations` creates a new automation and returns 201; duplicate IDs return 409.\n- `GET /automations/{id}` returns 200 with `ETag: \"<revision>\"`; missing automation returns 404.\n- `PUT /automations/{id}` requires `If-Match`, fully replaces the automation, and returns 200 with a new ETag.\n- `DELETE /automations/{id}` requires `If-Match` and returns 204 on success.\n\n## Files\n\nModify:\n\n- `lib/crates/fabro-server/Cargo.toml`\n- `lib/crates/fabro-server/src/server.rs`\n- `lib/crates/fabro-server/src/server/handler/mod.rs`\n- `lib/crates/fabro-server/src/test_support.rs`\n- `lib/crates/fabro-server/tests/it/api/mod.rs`\n\nCreate:\n\n- `lib/crates/fabro-server/src/server/handler/automations.rs`\n- `lib/crates/fabro-server/tests/it/api/automations.rs`\n\nRead before implementation:\n\n- `docs/internal/logging-strategy.md`\n- `docs/internal/error-handling-strategy.md`\n- `docs/internal/testing-strategy.md`\n\n## Acceptance Criteria\n\n- A server with no `automations/` directory starts and returns an empty automation list.\n- Malformed persisted automation TOML fails server startup.\n- Creating an automation writes `dirname(active_config_path)/automations/<id>.toml`.\n- Reading an automation returns the current ETag revision.\n- Replacing or deleting an automation requires `If-Match`.\n- Stale revisions are rejected.\n- Invalid automation and trigger shapes are rejected with 422.\n- CRUD routes require the existing authenticated user behavior used by real API routes.\n\n## Verification\n\nAdd integration tests for:\n\n- Empty list.\n- Create automation.\n- Duplicate create.\n- Get automation with ETag.\n- Replace automation.\n- Stale replace.\n- Missing `If-Match`.\n- Delete automation.\n- Invalid trigger IDs.\n- Duplicate trigger IDs.\n- Second trigger with `type = \"api\"`.\n- Invalid schedule expression.\n\nRun:\n\n```bash\ncargo nextest run -p fabro-server automations\ncargo nextest run -p fabro-server automation_store\n```\n",
"internal.fidelity": "compact"
},
"node_outcomes": {
"start": {
"status": "succeeded",
"usage": null
},
"preflight_lint": {
"status": "failed",
"failure": {
"message": "Failed to spawn script",
"causes": [
"Failed to get Daytona session command status",
"error in reqwest-middleware: error sending request for url (https://proxy.app.daytona.io/toolbox/0e1ee2b5-41db-4297-bdcd-2d411bfa8eaa/process/session/fabro-21598ea96552ac80/command/e19744a7-aa92-43ac-8b3b-45a2232c3619): error sending request for url (https://proxy.app.daytona.io/toolbox/0e1ee2b5-41db-4297-bdcd-2d411bfa8eaa/process/session/fabro-21598ea96552ac80/command/e19744a7-aa92-43ac-8b3b-45a2232c3619): client error (SendRequest): connection error: address not available"
],
"category": "deterministic"
},
"usage": null
},
"toolchain": {
"status": "succeeded",
"context_updates": {
"command.output": "blob://sha256/fc14b2ba2d770e5cd3169df7a29525c962adfc4cfa3097b9098c63ebd61a748c"
},
"notes": "Script completed: command -v cargo >/dev/null || { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && sudo ln -sf $HOME/.cargo/bin/* /usr/local/bin/; }; cargo --version 2>&1",
"usage": null,
"timing": {
"wall_time_ms": 0,
"inference_time_ms": 0,
"tool_time_ms": 1835,
"active_time_ms": 1835
}
},
"preflight_compile": {
"status": "succeeded",
"context_updates": {
"command.output": "blob://sha256/12ae32cb1ec02d01eda3581b127c1fee3b0dc53572ed6baf239721a03d82e126"
},
"notes": "Script completed: cargo check -q --workspace 2>&1",
"usage": null,
"timing": {
"wall_time_ms": 0,
"inference_time_ms": 0,
"tool_time_ms": 139661,
"active_time_ms": 139661
}
}
},
"next_node_id": "fix_lints",
"node_visits": {
"toolchain": 1,
"start": 1,
"preflight_lint": 1,
"preflight_compile": 1
}
},
@ -709,6 +806,88 @@
"superseded_by": null,
"pending_interviews": {},
"stages": {
"start@1": {
"first_event_seq": 17,
"prompt": null,
"response": null,
"completion": {
"outcome": "succeeded",
"notes": null,
"failure_reason": null,
"timestamp": "2026-05-27T20:21:11.106611Z"
},
"provider_used": null,
"diff": null,
"script_invocation": null,
"script_timing": null,
"parallel_results": null,
"output": null,
"started_at": "2026-05-27T20:21:11.106359Z",
"handler": "start",
"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"
},
"preflight_compile@1": {
"first_event_seq": 31,
"prompt": null,
"response": null,
"completion": {
"outcome": "succeeded",
"notes": "Script completed: cargo check -q --workspace 2>&1",
"failure_reason": null,
"timestamp": "2026-05-27T20:23:45.032078Z"
},
"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/12ae32cb1ec02d01eda3581b127c1fee3b0dc53572ed6baf239721a03d82e126",
"exit_code": 0,
"duration_ms": 139661,
"termination": "exited",
"output_bytes": 0,
"live_streaming": false
},
"parallel_results": null,
"output": null,
"output_bytes": 0,
"live_streaming": false,
"termination": "exited",
"started_at": "2026-05-27T20:21:25.356963Z",
"handler": "command",
"timing": {
"wall_time_ms": 139674,
"inference_time_ms": 0,
"tool_time_ms": 139661,
"active_time_ms": 139661
},
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0,
"reasoning_tokens": 0,
"cache_read_tokens": 0,
"cache_write_tokens": 0
},
"state": "succeeded"
},
"toolchain@1": {
"first_event_seq": 21,
"prompt": null,
@ -757,56 +936,22 @@
},
"state": "succeeded"
},
"start@1": {
"first_event_seq": 17,
"prompt": null,
"response": null,
"completion": {
"outcome": "succeeded",
"notes": null,
"failure_reason": null,
"timestamp": "2026-05-27T20:21:11.106611Z"
},
"provider_used": null,
"diff": null,
"script_invocation": null,
"script_timing": null,
"parallel_results": null,
"output": null,
"started_at": "2026-05-27T20:21:11.106359Z",
"handler": "start",
"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"
},
"preflight_compile@1": {
"first_event_seq": 31,
"preflight_lint@1": {
"first_event_seq": 41,
"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",
"script": "cargo +nightly-2026-04-14 clippy -q --workspace --all-targets -- -D warnings 2>&1",
"command": "exec 2>&1\ncargo +nightly-2026-04-14 clippy -q --workspace --all-targets -- -D warnings 2>&1",
"language": "shell"
},
"script_timing": null,
"parallel_results": null,
"output": null,
"started_at": "2026-05-27T20:21:25.356963Z",
"started_at": "2026-05-27T20:23:49.891876Z",
"handler": "command",
"usage": {
"input_tokens": 0,

View file

@ -0,0 +1 @@
blob://sha256/12ae32cb1ec02d01eda3581b127c1fee3b0dc53572ed6baf239721a03d82e126

View file

@ -0,0 +1,8 @@
{
"output": "blob://sha256/12ae32cb1ec02d01eda3581b127c1fee3b0dc53572ed6baf239721a03d82e126",
"exit_code": 0,
"duration_ms": 139661,
"termination": "exited",
"output_bytes": 0,
"live_streaming": false
}

View file

@ -0,0 +1,6 @@
{
"outcome": "succeeded",
"notes": "Script completed: cargo check -q --workspace 2>&1",
"failure_reason": null,
"timestamp": "2026-05-27T20:23:45.032078Z"
}

View file

@ -0,0 +1,5 @@
{
"script": "cargo +nightly-2026-04-14 clippy -q --workspace --all-targets -- -D warnings 2>&1",
"command": "exec 2>&1\ncargo +nightly-2026-04-14 clippy -q --workspace --all-targets -- -D warnings 2>&1",
"language": "shell"
}