Enforce bounded operation guardrails
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a028de-e2c8-7732-8521-46a7fc5db82f
This commit is contained in:
parent
c384f60530
commit
26934e25b9
51 changed files with 1843 additions and 472 deletions
|
|
@ -59,23 +59,10 @@ stable ID must be assigned one by the ingress boundary before entering the syste
|
|||
|
||||
---
|
||||
|
||||
## Task instance idempotency
|
||||
|
||||
Each `TaskInstance` spawned by `RunActivityWorkflow` gets its own unique workflow ID:
|
||||
|
||||
```
|
||||
task-{run_id}:{task_type}:{index}
|
||||
```
|
||||
|
||||
This ensures that if `RunActivityWorkflow` is replayed by Temporal (e.g. after a worker
|
||||
restart), it does not re-spawn task instances that were already started.
|
||||
|
||||
---
|
||||
|
||||
## Database idempotency
|
||||
|
||||
`activity_runs` uses `run_id` as the primary key (UUID). The `log_run` activity
|
||||
uses an upsert (`INSERT ... ON CONFLICT DO NOTHING`) so that Temporal activity retries
|
||||
do not produce duplicate run records.
|
||||
|
||||
`task_instances` similarly uses an upsert on `id`.
|
||||
do not produce duplicate run records. Task emission idempotency uses the
|
||||
consumer reference recorded in `task_spawn_log`; runtime delivery uses the
|
||||
unique `ops_runs.idempotency_key`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue