Enforce bounded operation guardrails
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Build and Publish Container Image / build-and-push (push) Successful in 21s

Assistant: codex
Assistant-Model: gpt-5.6-sol
Assistant-Session: 01a028de-e2c8-7732-8521-46a7fc5db82f
This commit is contained in:
tegwick 2026-08-23 12:31:13 +02:00
parent c384f60530
commit 26934e25b9
51 changed files with 1843 additions and 472 deletions

View file

@ -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`.