feat: persist blocked executor jobs

This commit is contained in:
john
2026-07-24 23:07:46 +08:00
parent d21c4849a9
commit bbb43f97a3
17 changed files with 649 additions and 26 deletions
@@ -102,6 +102,20 @@ not a deployment backend. The compile-time dispatch capability remains false,
so creating a job records `blocked` state without importing an executor SDK,
launching a process, or touching a workspace.
Phase 3.3 persists that state in the Orchestrator-owned PostgreSQL database.
LangGraph checkpoint tables and `executor_jobs` share the isolated
`memind_orchestrator` schema and credentials, but remain behind separate
storage interfaces and readiness probes. This is a deployment simplification,
not a domain ownership leak: neither store can access Memind business tables,
and the Executor Job Store can move to a separate database without changing
the graph or the Memind-facing protocol.
The `build_plan` node creates the deterministic preview job
`<runId>:executor-preview` with idempotency key
`<runId>:build_plan:v1`. The stored result is terminal `blocked` state with
`executor_dispatch_not_implemented`; it is a durable audit and recovery
boundary, not an execution claim.
The implemented internal API is:
```text
@@ -123,8 +137,9 @@ validate_run -> build_plan -> finalize_run
```
It requires `policy.executionMode=observe-only` and
`policy.sideEffectsAllowed=false`. It projects the Native executor boundary but
cannot call Goosed, Aider, OpenHands, Tool Gateway, or the filesystem.
`policy.sideEffectsAllowed=false`. It projects the Native executor boundary and
persists a blocked Executor Job, but cannot dispatch Goosed, Aider, OpenHands,
Tool Gateway, or the filesystem.
## Failure isolation
@@ -139,7 +154,8 @@ failure:
service URL boundary.
Successful observations are projected as `workflow_shadow_completed`; graph
checkpoints stay in the Orchestrator-owned PostgreSQL database.
checkpoints and blocked Executor Jobs stay in the Orchestrator-owned PostgreSQL
database.
Both terminal projection events contain bounded observation latency. The
Memind-owned observability service aggregates those events and may join them to