docs: update ClaudeJob lifecycle with plan_snapshot
Document state machine snapshot capture/reset, plan_snapshot field rationale, and drift-detection baseline semantics. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a3af2dda63
commit
075af9d619
1 changed files with 7 additions and 3 deletions
|
|
@ -1120,12 +1120,15 @@ Developers kunnen vanuit de Task Detail Dialog een lokale Claude Code-sessie ins
|
|||
### State machine
|
||||
|
||||
```
|
||||
QUEUED → CLAIMED → RUNNING → DONE
|
||||
→ FAILED
|
||||
QUEUED → CLAIMED (snapshot capture) → RUNNING → DONE
|
||||
→ FAILED
|
||||
→ CANCELLED (door user)
|
||||
CLAIMED → QUEUED (stale claim cleanup, >30min)
|
||||
CLAIMED → QUEUED (stale claim cleanup, >30min; snapshot gewist)
|
||||
QUEUED → CLAIMED (re-claim na stale reset; snapshot refreshed)
|
||||
```
|
||||
|
||||
**Snapshot-rationale:** bij atomic claim schrijft `wait_for_job` de dan-actuele `task.implementation_plan` naar `claude_jobs.plan_snapshot`. Dit veld blijft bevroren terwijl de job loopt — ook als een gebruiker `update_task_plan` aanroept. Zo kan een toekomstige verify-tool drift detecteren tussen de baseline (snapshot) en de actuele plan. Jobs zonder snapshot (NULL) zijn aangemaakt vóór deze feature en worden als "no baseline" gemarkeerd.
|
||||
|
||||
### ClaudeJob model
|
||||
|
||||
```
|
||||
|
|
@ -1134,6 +1137,7 @@ claude_jobs
|
|||
status: ClaudeJobStatus (QUEUED|CLAIMED|RUNNING|DONE|FAILED|CANCELLED)
|
||||
claimed_by_token_id (FK → api_tokens, nullable)
|
||||
claimed_at, started_at, finished_at
|
||||
plan_snapshot: String? — bevroren snapshot van task.implementation_plan bij claim
|
||||
branch, summary, error
|
||||
@@index([user_id, status])
|
||||
@@index([task_id, status])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue