feat(tasks): track authenticated native progress until final reply
Renew broker idle waits only for encrypted current-task progress, keep an absolute deadline and binding/session/worker fences, and retain original-message reply deduplication. Add guarded prepare-update staging that reuses the active broker key material and application configuration. Validation: 216 passed, 2 skipped; guarded update and long-task routing covered with synthetic Docker configuration and loopback WebSocket tests. Real ECS build and acceptance remain pending.
This commit is contained in:
@@ -161,6 +161,14 @@ class BindingState:
|
||||
WHERE turn_id=? AND environment=? AND app_id=? AND status=?""",
|
||||
(status,time.time(),turn,self.environment,self.app_id,previous)).rowcount == 1
|
||||
|
||||
def progress(self, turn, host, session, worker):
|
||||
# A progress packet may keep transport waiting, never change task outcome
|
||||
# or extend the absolute lifetime. Unbound/stale sessions fail closed.
|
||||
task = self.task(turn)
|
||||
return bool(self.task_current(task) and
|
||||
(task['host_id'],task['session_id'],task['worker_id'],task['status']) ==
|
||||
(host,session,worker,'inflight'))
|
||||
|
||||
def complete(self, turn, host, session, worker):
|
||||
with self.db:
|
||||
task = self.task(turn)
|
||||
|
||||
Reference in New Issue
Block a user