Files
aios/docs/superpowers/specs/2026-08-18-owner-controlled-execution-rebind.md
T

1.4 KiB

Owner-Controlled Same-Binding Execution Rebind

Purpose

aios_agent_task_execution_rebind.py closes a projection/plan race without replacing the Task, Governed Job, target branch, generation, or idempotency lineage.

The only supported transition is:

official NEEDS_REWORK
→ Task QUEUED with no active lease
→ persisted source_capture envelope
→ canonical Bridge resolves an already-registered deterministic plan
→ CAS-bound metadata.execution + execution_projection replacement
→ audit event
→ normal worker claim

The service rejects arbitrary metadata patches. It derives the new envelope from canonical Bridge /v2/execution-envelope, validates every governed binding coordinate against the persisted envelope, requires source_capture → deterministic, requires exact old/new execution digests supplied by the Owner recovery request, and increments the Task revision under BEGIN IMMEDIATE.

It records TASK_EXECUTION_REBIND_AUTHORIZED and an idempotent task_execution_rebinds receipt. No Task/Job/branch replacement is created and the worker still performs the real claim/heartbeat, WriterLease and governed commit.

The endpoint is loopback-only:

POST /v1/tasks/{task_id}/execution-rebind

and requires the existing Owner control credential plus AIOS_AGENT_TASK_EXECUTION_REBIND_AUTHORIZATION_ID.

Direct/manual Task database edits remain forbidden; the service is the audited mutation boundary.