I4000 — A repeated executions.start with the same key answers one execution
Give executions.start an optional idempotency key; ExecutionStore::create returns the existing execution id for a key it has already seen instead of creating a second execution (Mission Control B1).
PŘIPRAVENO vlna 0 · p1 · profil implementation · bezpečné paralelně
Připraveno. Všechny závislosti jsou hotové, takže majordomus plan start I4000 bude přijato.
Cíl
Give executions.start an optional idempotency key; ExecutionStore::create returns the existing execution id for a key it has already seen instead of creating a second execution (Mission Control B1).
Proč
A double click or a retried client starts two executions of the same capability today; nothing in ExecutionStore::create recognises a repeat.
Aktuální stav
Not built: this issue is planned by the milestone a-session-proceeds-through-the-mesh and nothing of it exists.
Cílový stav
The acceptance criteria below hold and case 4000 proves them.
Rozsah
- apps/majordomus-cli/src/execution/store.rs
- apps/majordomus-cli/src/capability/builtin/executions.rs
- docs/EXECUTIONS.md
- test/cases/4000_executions_start_takes_an_idempotency_key.sh
- .ai/repo/project/issues/I4000.yaml
Závislosti
Žádné. Tento úkol je kořenem grafu.
Co na tom čeká
- I4001BLOCKED The execution state machine has Authorizing, Claimed, Verifying, Refused and UnknownOutcome
- I4003BLOCKED Devtask.implement runs readiness, preflight, claim, worktree and one execution
- I4004BLOCKED The executor takes the issue's mesh claim in the handler and releases it when the run ends
Kritéria přijetí
- A repeated executions.start with the same key answers the same execution id and starts no second execution
- A different key, or no key, behaves as before
- The key lives in the execution's own record: no new store
Validace
- env -u MAJORDOMUS_SHARE -u MAJORDOMUS_HTTP_HOST -u MJ_ROOT bash test/run.sh 4000_executions_start_takes_an_idempotency_key
Požadované důkazy
- case_4000_executions_start_takes_an_idempotency_key
Důkazy
Nic nezaznamenáno. Za každým tokenem výše musí stát příkaz nebo artefakt, než lze tento úkol dokončit; vyprávění se odmítá.
Časová osa
- zahájeno
- —
- ověřeno
- —
- dokončeno
- —
Tato tři pole, důkazy výše a stav závislostí jsou vše, z čeho se stav skládá. Neexistuje žádné pole stavu, které by s nimi mohlo být v rozporu.
Canonical record: .ai/repo/project/issues/I4000.yaml. Read it back with majordomus plan show I4000.