From 08d6bd2ef35985c777f71b60951f11c9901bbebf Mon Sep 17 00:00:00 2001 From: J Date: Thu, 9 Jul 2026 18:42:09 +0800 Subject: [PATCH] =?UTF-8?q?chore(attribution):=20renumber=20migrations=201?= =?UTF-8?q?50/151=20=E2=86=92=20157/158=20after=20merging=20main=20(MUL-43?= =?UTF-8?q?02)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit main's #5162 ("unblock release migrations") renumbered the chat migrations and took 150 (agent_task_coalesced_comments) and 151 (chat_read_cursor), colliding with this branch's attribution migrations. Renumber them above main's new highest (156) so TestMigrationNumericPrefixesStayUniqueAfterLegacySet passes: - 150_agent_task_attribution → 157_agent_task_attribution - 151_agent_task_accountable_user → 158_agent_task_accountable_user Fixed the internal "migration 150" references in 158's header to 157. Migrations apply cleanly through 158 on a fresh DB; migration lint green. Co-authored-by: multica-agent --- ...tribution.down.sql => 157_agent_task_attribution.down.sql} | 0 ...k_attribution.up.sql => 157_agent_task_attribution.up.sql} | 0 ...user.down.sql => 158_agent_task_accountable_user.down.sql} | 0 ...ble_user.up.sql => 158_agent_task_accountable_user.up.sql} | 4 ++-- 4 files changed, 2 insertions(+), 2 deletions(-) rename server/migrations/{150_agent_task_attribution.down.sql => 157_agent_task_attribution.down.sql} (100%) rename server/migrations/{150_agent_task_attribution.up.sql => 157_agent_task_attribution.up.sql} (100%) rename server/migrations/{151_agent_task_accountable_user.down.sql => 158_agent_task_accountable_user.down.sql} (100%) rename server/migrations/{151_agent_task_accountable_user.up.sql => 158_agent_task_accountable_user.up.sql} (96%) diff --git a/server/migrations/150_agent_task_attribution.down.sql b/server/migrations/157_agent_task_attribution.down.sql similarity index 100% rename from server/migrations/150_agent_task_attribution.down.sql rename to server/migrations/157_agent_task_attribution.down.sql diff --git a/server/migrations/150_agent_task_attribution.up.sql b/server/migrations/157_agent_task_attribution.up.sql similarity index 100% rename from server/migrations/150_agent_task_attribution.up.sql rename to server/migrations/157_agent_task_attribution.up.sql diff --git a/server/migrations/151_agent_task_accountable_user.down.sql b/server/migrations/158_agent_task_accountable_user.down.sql similarity index 100% rename from server/migrations/151_agent_task_accountable_user.down.sql rename to server/migrations/158_agent_task_accountable_user.down.sql diff --git a/server/migrations/151_agent_task_accountable_user.up.sql b/server/migrations/158_agent_task_accountable_user.up.sql similarity index 96% rename from server/migrations/151_agent_task_accountable_user.up.sql rename to server/migrations/158_agent_task_accountable_user.up.sql index adef3ea4d6..4cdeae80b5 100644 --- a/server/migrations/151_agent_task_accountable_user.up.sql +++ b/server/migrations/158_agent_task_accountable_user.up.sql @@ -1,7 +1,7 @@ -- Human Attribution, Phase 1 — split the accountable human off originator_user_id -- (MUL-4302, decided by Bohan on the MUL-4302 thread). -- --- Migration 150 stamped provenance (originator_source, evidence, lineage) ONTO +-- Migration 157 stamped provenance (originator_source, evidence, lineage) ONTO -- originator_user_id, treating that one column as both "who authorized this run" -- and "who is accountable for it". Those are two different questions with two -- different lifetimes, and collapsing them onto one column is a latent hazard: @@ -39,7 +39,7 @@ -- lock). -- -- NULL does NOT mean "pre-migration row" here. Unlike originator_source (which --- every new enqueue path now stamps non-NULL, migration 150), accountable_user_id +-- every new enqueue path now stamps non-NULL, migration 157), accountable_user_id -- is legitimately NULL on NEW rows too, whenever the row's audit source resolved -- no human yet: run_only autopilot writes originator_source='unattributed' with a -- NULL accountable until rule_owner lands, and any classified-unattributed path is