Backfill legacy delegation working directories

f33fbf6c98ff · AtlantisPleb · · parent f291cf64f6cf

Backfill legacy delegation working directories

Deploy story

What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.

Not deployed through the forge lane

No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.

Changed files

  • modified priv/repo/migrations/20260820085203_harden_async_runtime_boundaries.exs

Diff

1 file changed, +8 -2

priv/repo/migrations/20260820085203_harden_async_runtime_boundaries.exs modified +8 -2

@@ -36,11 +36,17 @@ defmodule OpenAgents.Repo.Migrations.HardenAsyncRuntimeBoundaries do

36 36
37 37
    execute("""
38 38
    UPDATE work_jobs AS job
39
    SET machine_id = machine.id,
39
    SET delegation = jsonb_set(
40
          job.delegation,
41
          '{cwd}',
42
          to_jsonb(COALESCE(NULLIF(job.delegation->>'cwd', ''), machine.roots[1])),
43
          true
44
        ),
45
        machine_id = machine.id,
40 46
        authority_snapshot = jsonb_build_object(
41 47
          'machine_tier', machine.tier,
42 48
          'roots', machine.roots,
43
          'cwd', COALESCE(job.delegation->>'cwd', ''),
49
          'cwd', COALESCE(NULLIF(job.delegation->>'cwd', ''), machine.roots[1]),
44 50
          'agent_id', COALESCE(job.delegation->>'agent_id', ''),
45 51
          'machine_name', COALESCE(job.delegation->>'machine_name', machine.name)
46 52
        ),

This page updates live while a promote is in flight · changelog