forked from molecule-ai/molecule-core
Adds the final step (3/3) of the durable Temporal resume path: Platform (Go): - `Latest` handler: GET /workspaces/:id/checkpoints/latest returns the most recently completed step across all workflows for the workspace, ordered by completed_at DESC. Returns 404 when no checkpoints exist. - Router: registers the new route BEFORE the wildcard :wfid route to avoid shadowing; callerMismatch guard enforces workspace isolation. - 4 new unit tests: 200, 500, 404 (ErrNoRows), and 403 (caller mismatch). Workspace runtime (Python): - `_fetch_latest_checkpoint()`: non-fatal async helper that GETs the new endpoint and returns the parsed dict, or None on 404 / any error. - `TemporalWorkflowWrapper.run()`: on startup, fetches the latest checkpoint and prepends a synthetic [system, ...] entry to the serialised AgentTaskInput.history so the agent is aware of its prior crash state before receiving the current task. - 4 new pytest tests: 404→None, 200→dict, exception→None (non-fatal contract), and end-to-end injection into AgentTaskInput.history. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| cmd/server | ||
| docs/adr | ||
| internal | ||
| migrations | ||
| pkg/provisionhook | ||
| Dockerfile | ||
| Dockerfile.tenant | ||
| entrypoint-tenant.sh | ||
| go.mod | ||
| go.sum | ||