:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
perf(personhog): switch identity queries to mark_active predicate (#100628)
Nick Beste499d743d3f1
diff --git a/rust/personhog-identity/.sqlx/query-09621f1029ea0f60c14857875c91489b0befe416607cc1160db1ecab7cb77a7e.json b/rust/personhog-identity/.sqlx/query-09621f1029ea0f60c14857875c91489b0befe416607cc1160db1ecab7cb77a7e.jsonnew file mode 100644index 000000000000..585187b0f839--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-09621f1029ea0f60c14857875c91489b0befe416607cc1160db1ecab7cb77a7e.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "UPDATE lifecycle_op_person_tmp SET status = $2, mark_active = false WHERE op_id = $1 AND status = $3",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Text",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "09621f1029ea0f60c14857875c91489b0befe416607cc1160db1ecab7cb77a7e"+}diff --git a/rust/personhog-identity/.sqlx/query-dfb4201590984a3d47ecb011e5c80e4971b0137d3792d2027975fe7a4812069e.json b/rust/personhog-identity/.sqlx/query-0f56b36fb53017960bb82b2554a95a1ea67d2cb6ffa7bb12c5ac07018fb151b6.jsonsimilarity index 59%rename from rust/personhog-identity/.sqlx/query-dfb4201590984a3d47ecb011e5c80e4971b0137d3792d2027975fe7a4812069e.jsonrename to rust/personhog-identity/.sqlx/query-0f56b36fb53017960bb82b2554a95a1ea67d2cb6ffa7bb12c5ac07018fb151b6.jsonindex 1263cd85eebf..bdaace7e1aa1 100644--- a/rust/personhog-identity/.sqlx/query-dfb4201590984a3d47ecb011e5c80e4971b0137d3792d2027975fe7a4812069e.json+++ b/rust/personhog-identity/.sqlx/query-0f56b36fb53017960bb82b2554a95a1ea67d2cb6ffa7bb12c5ac07018fb151b6.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person SET status = $2\n WHERE op_id = $1 AND role = $3 AND status = $4\n ",+ "query": "\n UPDATE lifecycle_op_person SET status = $2, mark_active = false\n WHERE op_id = $1 AND role = $3 AND status = $4\n ","describe": {"columns": [],"parameters": {@@ -13,5 +13,5 @@},"nullable": []},- "hash": "dfb4201590984a3d47ecb011e5c80e4971b0137d3792d2027975fe7a4812069e"+ "hash": "0f56b36fb53017960bb82b2554a95a1ea67d2cb6ffa7bb12c5ac07018fb151b6"}diff --git a/rust/personhog-identity/.sqlx/query-ea96e264833f90d30dfcdb26f5fb4e57f6977ea28b18c9a9e892a29358b5a430.json b/rust/personhog-identity/.sqlx/query-1198230cecbe993cd59b40e8c20af56ae488f5075ece4e96fbc5b988df6afe75.jsonsimilarity index 57%rename from rust/personhog-identity/.sqlx/query-ea96e264833f90d30dfcdb26f5fb4e57f6977ea28b18c9a9e892a29358b5a430.jsonrename to rust/personhog-identity/.sqlx/query-1198230cecbe993cd59b40e8c20af56ae488f5075ece4e96fbc5b988df6afe75.jsonindex 896db32a05b5..6047eb863aec 100644--- a/rust/personhog-identity/.sqlx/query-ea96e264833f90d30dfcdb26f5fb4e57f6977ea28b18c9a9e892a29358b5a430.json+++ b/rust/personhog-identity/.sqlx/query-1198230cecbe993cd59b40e8c20af56ae488f5075ece4e96fbc5b988df6afe75.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n DELETE FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND person_id = ANY($2) AND status IN ('marked', 'sealed')\n ",+ "query": "\n DELETE FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND person_id = ANY($2) AND mark_active\n ","describe": {"columns": [],"parameters": {@@ -11,5 +11,5 @@},"nullable": []},- "hash": "ea96e264833f90d30dfcdb26f5fb4e57f6977ea28b18c9a9e892a29358b5a430"+ "hash": "1198230cecbe993cd59b40e8c20af56ae488f5075ece4e96fbc5b988df6afe75"}diff --git a/rust/personhog-identity/.sqlx/query-14c5a2212339d66a09b60ed2dd254c3cfe723715cb6f248f4d478ab2faac3349.json b/rust/personhog-identity/.sqlx/query-13abc8ab80be969ca87a77f927f275db61c32be1bba5dcf8bca1c84bc61d5b7e.jsonsimilarity index 65%rename from rust/personhog-identity/.sqlx/query-14c5a2212339d66a09b60ed2dd254c3cfe723715cb6f248f4d478ab2faac3349.jsonrename to rust/personhog-identity/.sqlx/query-13abc8ab80be969ca87a77f927f275db61c32be1bba5dcf8bca1c84bc61d5b7e.jsonindex b1b802bc4ce5..6971ee1a73fd 100644--- a/rust/personhog-identity/.sqlx/query-14c5a2212339d66a09b60ed2dd254c3cfe723715cb6f248f4d478ab2faac3349.json+++ b/rust/personhog-identity/.sqlx/query-13abc8ab80be969ca87a77f927f275db61c32be1bba5dcf8bca1c84bc61d5b7e.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT person_id FROM lifecycle_op_person\n WHERE op_id = $1 AND status IN ('marked', 'sealed')\n ORDER BY person_id\n ",+ "query": "\n SELECT person_id FROM lifecycle_op_person\n WHERE op_id = $1 AND mark_active\n ORDER BY person_id\n ","describe": {"columns": [{@@ -18,5 +18,5 @@false]},- "hash": "14c5a2212339d66a09b60ed2dd254c3cfe723715cb6f248f4d478ab2faac3349"+ "hash": "13abc8ab80be969ca87a77f927f275db61c32be1bba5dcf8bca1c84bc61d5b7e"}diff --git a/rust/personhog-identity/.sqlx/query-99eac54ad5e1c689f1782d8b1e7e828a0d58fdb026e2c85b2d8c201e566c8f21.json b/rust/personhog-identity/.sqlx/query-1d27524127cd4d136b9051c5e26192171cc017d9a0d0681bed5900b62c8e721a.jsonsimilarity index 77%rename from rust/personhog-identity/.sqlx/query-99eac54ad5e1c689f1782d8b1e7e828a0d58fdb026e2c85b2d8c201e566c8f21.jsonrename to rust/personhog-identity/.sqlx/query-1d27524127cd4d136b9051c5e26192171cc017d9a0d0681bed5900b62c8e721a.jsonindex 063551976c38..98ea1a0b422b 100644--- a/rust/personhog-identity/.sqlx/query-99eac54ad5e1c689f1782d8b1e7e828a0d58fdb026e2c85b2d8c201e566c8f21.json+++ b/rust/personhog-identity/.sqlx/query-1d27524127cd4d136b9051c5e26192171cc017d9a0d0681bed5900b62c8e721a.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person lop\n SET status = $4, sealed = u.sealed\n FROM unnest($2::bigint[], $3::jsonb[]) AS u(person_id, sealed)\n WHERE lop.op_id = $1 AND lop.person_id = u.person_id\n AND lop.status IN ('marked', 'sealed')\n ",+ "query": "\n UPDATE lifecycle_op_person lop\n SET status = $4, sealed = u.sealed\n FROM unnest($2::bigint[], $3::jsonb[]) AS u(person_id, sealed)\n WHERE lop.op_id = $1 AND lop.person_id = u.person_id\n AND lop.mark_active\n ","describe": {"columns": [],"parameters": {@@ -13,5 +13,5 @@},"nullable": []},- "hash": "99eac54ad5e1c689f1782d8b1e7e828a0d58fdb026e2c85b2d8c201e566c8f21"+ "hash": "1d27524127cd4d136b9051c5e26192171cc017d9a0d0681bed5900b62c8e721a"}diff --git a/rust/personhog-identity/.sqlx/query-1d7171ba1445785d92ca6f82bcd00020fc8855c706f0d730164bb6938169d189.json b/rust/personhog-identity/.sqlx/query-1d7171ba1445785d92ca6f82bcd00020fc8855c706f0d730164bb6938169d189.jsonnew file mode 100644index 000000000000..16b4142327ed--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-1d7171ba1445785d92ca6f82bcd00020fc8855c706f0d730164bb6938169d189.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "UPDATE lifecycle_op_person_tmp SET status = $2, mark_active = false WHERE op_id = $1 AND role = $3",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Text",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "1d7171ba1445785d92ca6f82bcd00020fc8855c706f0d730164bb6938169d189"+}diff --git a/rust/personhog-identity/.sqlx/query-248952755ca64b45cc34eeb3c6eeb91e74ca63d95671a166799448e967ad087c.json b/rust/personhog-identity/.sqlx/query-248952755ca64b45cc34eeb3c6eeb91e74ca63d95671a166799448e967ad087c.jsondeleted file mode 100644index b1fb5dbc36cc..000000000000--- a/rust/personhog-identity/.sqlx/query-248952755ca64b45cc34eeb3c6eeb91e74ca63d95671a166799448e967ad087c.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op_person_tmp SET status = $2 WHERE op_id = $1 AND status = $3",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Text",- "Text"- ]- },- "nullable": []- },- "hash": "248952755ca64b45cc34eeb3c6eeb91e74ca63d95671a166799448e967ad087c"-}diff --git a/rust/personhog-identity/.sqlx/query-3c797d3d827dcfc7a3ccf3fc6f33478c88f6b1fb3daa938d8888590c9e31dd3c.json b/rust/personhog-identity/.sqlx/query-2e3d6691f8df92d92119ec2b9971134aec4df67f5ee6cce83b6001aeabeabb99.jsonsimilarity index 57%rename from rust/personhog-identity/.sqlx/query-3c797d3d827dcfc7a3ccf3fc6f33478c88f6b1fb3daa938d8888590c9e31dd3c.jsonrename to rust/personhog-identity/.sqlx/query-2e3d6691f8df92d92119ec2b9971134aec4df67f5ee6cce83b6001aeabeabb99.jsonindex a50a7d6736b1..621b12ae080b 100644--- a/rust/personhog-identity/.sqlx/query-3c797d3d827dcfc7a3ccf3fc6f33478c88f6b1fb3daa938d8888590c9e31dd3c.json+++ b/rust/personhog-identity/.sqlx/query-2e3d6691f8df92d92119ec2b9971134aec4df67f5ee6cce83b6001aeabeabb99.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n DELETE FROM lifecycle_op_person\n WHERE op_id = $1 AND person_id = ANY($2) AND status IN ('marked', 'sealed')\n ",+ "query": "\n DELETE FROM lifecycle_op_person\n WHERE op_id = $1 AND person_id = ANY($2) AND mark_active\n ","describe": {"columns": [],"parameters": {@@ -11,5 +11,5 @@},"nullable": []},- "hash": "3c797d3d827dcfc7a3ccf3fc6f33478c88f6b1fb3daa938d8888590c9e31dd3c"+ "hash": "2e3d6691f8df92d92119ec2b9971134aec4df67f5ee6cce83b6001aeabeabb99"}diff --git a/rust/personhog-identity/.sqlx/query-2f8a0f781254ae29766530ce387bd4aef256d4a4c8a4ed74b0a0e75b104a41be.json b/rust/personhog-identity/.sqlx/query-2f8a0f781254ae29766530ce387bd4aef256d4a4c8a4ed74b0a0e75b104a41be.jsondeleted file mode 100644index 4de6c6b16ee1..000000000000--- a/rust/personhog-identity/.sqlx/query-2f8a0f781254ae29766530ce387bd4aef256d4a4c8a4ed74b0a0e75b104a41be.json+++ /dev/null@@ -1,15 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op_person SET status = $2 WHERE op_id = $1 AND status = 'sealed'",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Text"- ]- },- "nullable": []- },- "hash": "2f8a0f781254ae29766530ce387bd4aef256d4a4c8a4ed74b0a0e75b104a41be"-}diff --git a/rust/personhog-identity/.sqlx/query-f847b2269365b72844a7e25b9201cb3dda0c7623d728b0f855f2b0797e6f3ecb.json b/rust/personhog-identity/.sqlx/query-3305b73a22a319b0f2ea02441e4778683d8cea5a8aa15142ff6329cb3a848a6d.jsonsimilarity index 80%rename from rust/personhog-identity/.sqlx/query-f847b2269365b72844a7e25b9201cb3dda0c7623d728b0f855f2b0797e6f3ecb.jsonrename to rust/personhog-identity/.sqlx/query-3305b73a22a319b0f2ea02441e4778683d8cea5a8aa15142ff6329cb3a848a6d.jsonindex 56d0d782ee4f..f81504ccecaa 100644--- a/rust/personhog-identity/.sqlx/query-f847b2269365b72844a7e25b9201cb3dda0c7623d728b0f855f2b0797e6f3ecb.json+++ b/rust/personhog-identity/.sqlx/query-3305b73a22a319b0f2ea02441e4778683d8cea5a8aa15142ff6329cb3a848a6d.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person lop\n SET status = $2, sealed = jsonb_build_object('version', u.version, 'created_at', u.created_at)\n FROM unnest($3::bigint[], $4::bigint[], $5::bigint[]) AS u(person_id, version, created_at)\n WHERE lop.op_id = $1 AND lop.person_id = u.person_id\n AND lop.status IN ('marked', 'sealed')\n ",+ "query": "\n UPDATE lifecycle_op_person lop\n SET status = $2, sealed = jsonb_build_object('version', u.version, 'created_at', u.created_at)\n FROM unnest($3::bigint[], $4::bigint[], $5::bigint[]) AS u(person_id, version, created_at)\n WHERE lop.op_id = $1 AND lop.person_id = u.person_id\n AND lop.mark_active\n ","describe": {"columns": [],"parameters": {@@ -14,5 +14,5 @@},"nullable": []},- "hash": "f847b2269365b72844a7e25b9201cb3dda0c7623d728b0f855f2b0797e6f3ecb"+ "hash": "3305b73a22a319b0f2ea02441e4778683d8cea5a8aa15142ff6329cb3a848a6d"}diff --git a/rust/personhog-identity/.sqlx/query-38561c01028859a64ff36b334b57f7b7dbf0724e2d31805cd63d067ae81f50e8.json b/rust/personhog-identity/.sqlx/query-38561c01028859a64ff36b334b57f7b7dbf0724e2d31805cd63d067ae81f50e8.jsonnew file mode 100644index 000000000000..c991ab6e170b--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-38561c01028859a64ff36b334b57f7b7dbf0724e2d31805cd63d067ae81f50e8.json@@ -0,0 +1,15 @@+{+ "db_name": "PostgreSQL",+ "query": "UPDATE lifecycle_op_person_tmp SET status = $2, mark_active = false WHERE op_id = $1 AND status = 'sealed'",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "38561c01028859a64ff36b334b57f7b7dbf0724e2d31805cd63d067ae81f50e8"+}diff --git a/rust/personhog-identity/.sqlx/query-4fd9637eab32f77471edb60dd6084278cf6edfdc7b3b232e9a51ef4660b43408.json b/rust/personhog-identity/.sqlx/query-4fd9637eab32f77471edb60dd6084278cf6edfdc7b3b232e9a51ef4660b43408.jsondeleted file mode 100644index 8bc140c3708c..000000000000--- a/rust/personhog-identity/.sqlx/query-4fd9637eab32f77471edb60dd6084278cf6edfdc7b3b232e9a51ef4660b43408.json+++ /dev/null@@ -1,15 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op_person_tmp SET status = $2 WHERE op_id = $1 AND status = 'sealed'",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Text"- ]- },- "nullable": []- },- "hash": "4fd9637eab32f77471edb60dd6084278cf6edfdc7b3b232e9a51ef4660b43408"-}diff --git a/rust/personhog-identity/.sqlx/query-4bd0abc45641ff6319d2a8535718edee8d1c745de144922fcf71ee56202078c5.json b/rust/personhog-identity/.sqlx/query-6a9186ef8fa50c5169882a2030235bde29c74654892cca574f3983de10b7401f.jsonsimilarity index 76%rename from rust/personhog-identity/.sqlx/query-4bd0abc45641ff6319d2a8535718edee8d1c745de144922fcf71ee56202078c5.jsonrename to rust/personhog-identity/.sqlx/query-6a9186ef8fa50c5169882a2030235bde29c74654892cca574f3983de10b7401f.jsonindex b70cfaa5d3c9..64cb1a84f7d1 100644--- a/rust/personhog-identity/.sqlx/query-4bd0abc45641ff6319d2a8535718edee8d1c745de144922fcf71ee56202078c5.json+++ b/rust/personhog-identity/.sqlx/query-6a9186ef8fa50c5169882a2030235bde29c74654892cca574f3983de10b7401f.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person_tmp lop\n SET status = $4, sealed = u.sealed\n FROM unnest($2::bigint[], $3::jsonb[]) AS u(person_id, sealed)\n WHERE lop.op_id = $1 AND lop.person_id = u.person_id\n AND lop.status IN ('marked', 'sealed')\n ",+ "query": "\n UPDATE lifecycle_op_person_tmp lop\n SET status = $4, sealed = u.sealed\n FROM unnest($2::bigint[], $3::jsonb[]) AS u(person_id, sealed)\n WHERE lop.op_id = $1 AND lop.person_id = u.person_id\n AND lop.mark_active\n ","describe": {"columns": [],"parameters": {@@ -13,5 +13,5 @@},"nullable": []},- "hash": "4bd0abc45641ff6319d2a8535718edee8d1c745de144922fcf71ee56202078c5"+ "hash": "6a9186ef8fa50c5169882a2030235bde29c74654892cca574f3983de10b7401f"}diff --git a/rust/personhog-identity/.sqlx/query-674cce2c61ac403d706c4dede5bbdaf230c06a3e749eeb07a871b128d214b865.json b/rust/personhog-identity/.sqlx/query-6d22ddca76775b9c8f906b4460f880b79adfeffa05e706c2f715f813fe6e73c3.jsonsimilarity index 72%rename from rust/personhog-identity/.sqlx/query-674cce2c61ac403d706c4dede5bbdaf230c06a3e749eeb07a871b128d214b865.jsonrename to rust/personhog-identity/.sqlx/query-6d22ddca76775b9c8f906b4460f880b79adfeffa05e706c2f715f813fe6e73c3.jsonindex 3e6c5395d778..19026810a1c4 100644--- a/rust/personhog-identity/.sqlx/query-674cce2c61ac403d706c4dede5bbdaf230c06a3e749eeb07a871b128d214b865.json+++ b/rust/personhog-identity/.sqlx/query-6d22ddca76775b9c8f906b4460f880b79adfeffa05e706c2f715f813fe6e73c3.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT person_id, person_uuid FROM lifecycle_op_person\n WHERE op_id = $1 AND role = $2 AND status IN ('marked', 'sealed')\n ",+ "query": "\n SELECT person_id, person_uuid FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND role = $2 AND mark_active\n ","describe": {"columns": [{@@ -25,5 +25,5 @@false]},- "hash": "674cce2c61ac403d706c4dede5bbdaf230c06a3e749eeb07a871b128d214b865"+ "hash": "6d22ddca76775b9c8f906b4460f880b79adfeffa05e706c2f715f813fe6e73c3"}diff --git a/rust/personhog-identity/.sqlx/query-92c1ca048420781fbdbce0e666a2c86a297b3e6659619c5e050d31de036f4b68.json b/rust/personhog-identity/.sqlx/query-6ff46c9c3d1a688fc569cee674ded4a39aee6b9423579d498bd8e1dfe3f6f8d9.jsonsimilarity index 50%rename from rust/personhog-identity/.sqlx/query-92c1ca048420781fbdbce0e666a2c86a297b3e6659619c5e050d31de036f4b68.jsonrename to rust/personhog-identity/.sqlx/query-6ff46c9c3d1a688fc569cee674ded4a39aee6b9423579d498bd8e1dfe3f6f8d9.jsonindex 592557efb7c8..957c8aacae2e 100644--- a/rust/personhog-identity/.sqlx/query-92c1ca048420781fbdbce0e666a2c86a297b3e6659619c5e050d31de036f4b68.json+++ b/rust/personhog-identity/.sqlx/query-6ff46c9c3d1a688fc569cee674ded4a39aee6b9423579d498bd8e1dfe3f6f8d9.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op_person SET status = $2 WHERE op_id = $1 AND role = $3",+ "query": "UPDATE lifecycle_op_person SET status = $2, mark_active = false WHERE op_id = $1 AND status = $3","describe": {"columns": [],"parameters": {@@ -12,5 +12,5 @@},"nullable": []},- "hash": "92c1ca048420781fbdbce0e666a2c86a297b3e6659619c5e050d31de036f4b68"+ "hash": "6ff46c9c3d1a688fc569cee674ded4a39aee6b9423579d498bd8e1dfe3f6f8d9"}diff --git a/rust/personhog-identity/.sqlx/query-91ab82990658e82d4daaf03fe215e2a9558f83aeffe1ea18a0d82a16bd37e816.json b/rust/personhog-identity/.sqlx/query-762804628e7f33f4c8acdc8008cef41ff53c5e8851aa30feceef385c7d47a6bf.jsonsimilarity index 67%rename from rust/personhog-identity/.sqlx/query-91ab82990658e82d4daaf03fe215e2a9558f83aeffe1ea18a0d82a16bd37e816.jsonrename to rust/personhog-identity/.sqlx/query-762804628e7f33f4c8acdc8008cef41ff53c5e8851aa30feceef385c7d47a6bf.jsonindex 166f0e8b84b6..285de1302519 100644--- a/rust/personhog-identity/.sqlx/query-91ab82990658e82d4daaf03fe215e2a9558f83aeffe1ea18a0d82a16bd37e816.json+++ b/rust/personhog-identity/.sqlx/query-762804628e7f33f4c8acdc8008cef41ff53c5e8851aa30feceef385c7d47a6bf.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT count(*) as \"count!\" FROM lifecycle_op_person\n WHERE op_id = $1 AND status IN ('marked', 'sealed')\n ",+ "query": "\n SELECT count(*) as \"count!\" FROM lifecycle_op_person\n WHERE op_id = $1 AND mark_active\n ","describe": {"columns": [{@@ -18,5 +18,5 @@null]},- "hash": "91ab82990658e82d4daaf03fe215e2a9558f83aeffe1ea18a0d82a16bd37e816"+ "hash": "762804628e7f33f4c8acdc8008cef41ff53c5e8851aa30feceef385c7d47a6bf"}diff --git a/rust/personhog-identity/.sqlx/query-322ca9ef09b4f6396595c9195b18fbd5a3e99a4dc544c8f37bdb59f92c4fcaee.json b/rust/personhog-identity/.sqlx/query-78a7520c3265e0eac1b0991d49e4ad2db7074c6b441d1d36e553cc1f88eed859.jsonsimilarity index 57%rename from rust/personhog-identity/.sqlx/query-322ca9ef09b4f6396595c9195b18fbd5a3e99a4dc544c8f37bdb59f92c4fcaee.jsonrename to rust/personhog-identity/.sqlx/query-78a7520c3265e0eac1b0991d49e4ad2db7074c6b441d1d36e553cc1f88eed859.jsonindex 2cc25c3427a1..43508c358c14 100644--- a/rust/personhog-identity/.sqlx/query-322ca9ef09b4f6396595c9195b18fbd5a3e99a4dc544c8f37bdb59f92c4fcaee.json+++ b/rust/personhog-identity/.sqlx/query-78a7520c3265e0eac1b0991d49e4ad2db7074c6b441d1d36e553cc1f88eed859.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person SET status = $2\n WHERE op_id = $1 AND person_id = ANY($3) AND status = $4\n ",+ "query": "\n UPDATE lifecycle_op_person SET status = $2, mark_active = false\n WHERE op_id = $1 AND person_id = ANY($3) AND status = $4\n ","describe": {"columns": [],"parameters": {@@ -13,5 +13,5 @@},"nullable": []},- "hash": "322ca9ef09b4f6396595c9195b18fbd5a3e99a4dc544c8f37bdb59f92c4fcaee"+ "hash": "78a7520c3265e0eac1b0991d49e4ad2db7074c6b441d1d36e553cc1f88eed859"}diff --git a/rust/personhog-identity/.sqlx/query-5d8d6706287fed19f5774a13d9ebaeeb0c55c5cebe5a92678b699ec2bf18a563.json b/rust/personhog-identity/.sqlx/query-7acca91633e6b80f627f0515d923a6f34af922a2f72045836d63dd0b13309927.jsonsimilarity index 57%rename from rust/personhog-identity/.sqlx/query-5d8d6706287fed19f5774a13d9ebaeeb0c55c5cebe5a92678b699ec2bf18a563.jsonrename to rust/personhog-identity/.sqlx/query-7acca91633e6b80f627f0515d923a6f34af922a2f72045836d63dd0b13309927.jsonindex 0691c1cac5ea..9ed4757b0e42 100644--- a/rust/personhog-identity/.sqlx/query-5d8d6706287fed19f5774a13d9ebaeeb0c55c5cebe5a92678b699ec2bf18a563.json+++ b/rust/personhog-identity/.sqlx/query-7acca91633e6b80f627f0515d923a6f34af922a2f72045836d63dd0b13309927.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person_tmp SET status = $2\n WHERE op_id = $1 AND person_id = ANY($3) AND status = $4\n ",+ "query": "\n UPDATE lifecycle_op_person_tmp SET status = $2, mark_active = false\n WHERE op_id = $1 AND person_id = ANY($3) AND status = $4\n ","describe": {"columns": [],"parameters": {@@ -13,5 +13,5 @@},"nullable": []},- "hash": "5d8d6706287fed19f5774a13d9ebaeeb0c55c5cebe5a92678b699ec2bf18a563"+ "hash": "7acca91633e6b80f627f0515d923a6f34af922a2f72045836d63dd0b13309927"}diff --git a/rust/personhog-identity/.sqlx/query-d4f56152cd8a92017072440e819579ce8100e1cd7bbb3c2eac05ecf201ded18d.json b/rust/personhog-identity/.sqlx/query-827046e2e02493238bf397aafd920b907c505c1e67185621f3df42b6971988f1.jsonsimilarity index 60%rename from rust/personhog-identity/.sqlx/query-d4f56152cd8a92017072440e819579ce8100e1cd7bbb3c2eac05ecf201ded18d.jsonrename to rust/personhog-identity/.sqlx/query-827046e2e02493238bf397aafd920b907c505c1e67185621f3df42b6971988f1.jsonindex f6be54b6766b..e0353e15d4f9 100644--- a/rust/personhog-identity/.sqlx/query-d4f56152cd8a92017072440e819579ce8100e1cd7bbb3c2eac05ecf201ded18d.json+++ b/rust/personhog-identity/.sqlx/query-827046e2e02493238bf397aafd920b907c505c1e67185621f3df42b6971988f1.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person SET status = $2\n WHERE op_id = $1 AND role = $3 AND status IN ('marked', 'sealed')\n ",+ "query": "\n UPDATE lifecycle_op_person SET status = $2, mark_active = false\n WHERE op_id = $1 AND role = $3 AND mark_active\n ","describe": {"columns": [],"parameters": {@@ -12,5 +12,5 @@},"nullable": []},- "hash": "d4f56152cd8a92017072440e819579ce8100e1cd7bbb3c2eac05ecf201ded18d"+ "hash": "827046e2e02493238bf397aafd920b907c505c1e67185621f3df42b6971988f1"}diff --git a/rust/personhog-identity/.sqlx/query-4247abdc4f01e72f3ec9132bab49846c093b821e072065225a500b277a22e34a.json b/rust/personhog-identity/.sqlx/query-8ca7c456a258145c2f769e1c65fb4c56d7f9e6612e035cfe63d997680e2f9c5c.jsonsimilarity index 59%rename from rust/personhog-identity/.sqlx/query-4247abdc4f01e72f3ec9132bab49846c093b821e072065225a500b277a22e34a.jsonrename to rust/personhog-identity/.sqlx/query-8ca7c456a258145c2f769e1c65fb4c56d7f9e6612e035cfe63d997680e2f9c5c.jsonindex c8c58adb8bf0..91e91111367a 100644--- a/rust/personhog-identity/.sqlx/query-4247abdc4f01e72f3ec9132bab49846c093b821e072065225a500b277a22e34a.json+++ b/rust/personhog-identity/.sqlx/query-8ca7c456a258145c2f769e1c65fb4c56d7f9e6612e035cfe63d997680e2f9c5c.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person_tmp SET status = $2\n WHERE op_id = $1 AND role = $3 AND status IN ('marked', 'sealed')\n ",+ "query": "\n UPDATE lifecycle_op_person_tmp SET status = $2, mark_active = false\n WHERE op_id = $1 AND role = $3 AND mark_active\n ","describe": {"columns": [],"parameters": {@@ -12,5 +12,5 @@},"nullable": []},- "hash": "4247abdc4f01e72f3ec9132bab49846c093b821e072065225a500b277a22e34a"+ "hash": "8ca7c456a258145c2f769e1c65fb4c56d7f9e6612e035cfe63d997680e2f9c5c"}diff --git a/rust/personhog-identity/.sqlx/query-b4b6b473788270dd01cfc772b2885faeae60b225c63cb6329b2a17e8349275ca.json b/rust/personhog-identity/.sqlx/query-903990c5873d1c4c7bafd62a0fedfd0f1b6260b05323a6567d98e86e76781efb.jsonsimilarity index 51%rename from rust/personhog-identity/.sqlx/query-b4b6b473788270dd01cfc772b2885faeae60b225c63cb6329b2a17e8349275ca.jsonrename to rust/personhog-identity/.sqlx/query-903990c5873d1c4c7bafd62a0fedfd0f1b6260b05323a6567d98e86e76781efb.jsonindex d5f62af68118..30bd68e793a1 100644--- a/rust/personhog-identity/.sqlx/query-b4b6b473788270dd01cfc772b2885faeae60b225c63cb6329b2a17e8349275ca.json+++ b/rust/personhog-identity/.sqlx/query-903990c5873d1c4c7bafd62a0fedfd0f1b6260b05323a6567d98e86e76781efb.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n INSERT INTO lifecycle_op_person (op_id, team_id, person_id, person_uuid, role, status)\n SELECT $1, $2, u.person_id, u.person_uuid, 'victim', $5\n FROM unnest($3::bigint[], $4::uuid[]) AS u(person_id, person_uuid)\n ON CONFLICT (team_id, person_id) WHERE status IN ('marked', 'sealed') DO NOTHING\n RETURNING person_id\n ",+ "query": "\n INSERT INTO lifecycle_op_person (op_id, team_id, person_id, person_uuid, role, status, mark_active)\n SELECT $1, $2, u.person_id, u.person_uuid, 'victim', $5, true\n FROM unnest($3::bigint[], $4::uuid[]) AS u(person_id, person_uuid)\n ON CONFLICT (team_id, person_id) WHERE mark_active DO NOTHING\n RETURNING person_id\n ","describe": {"columns": [{@@ -22,5 +22,5 @@false]},- "hash": "b4b6b473788270dd01cfc772b2885faeae60b225c63cb6329b2a17e8349275ca"+ "hash": "903990c5873d1c4c7bafd62a0fedfd0f1b6260b05323a6567d98e86e76781efb"}diff --git a/rust/personhog-identity/.sqlx/query-1cbc9c47bb8f3d0d93790fdd5d2270e7d7097e5b94e1f3fdaffe27709096a74e.json b/rust/personhog-identity/.sqlx/query-90d30a324fd47a4d2dc849bf3fe7f1a2815207de45f27494f22a1e0e971e2c51.jsonsimilarity index 58%rename from rust/personhog-identity/.sqlx/query-1cbc9c47bb8f3d0d93790fdd5d2270e7d7097e5b94e1f3fdaffe27709096a74e.jsonrename to rust/personhog-identity/.sqlx/query-90d30a324fd47a4d2dc849bf3fe7f1a2815207de45f27494f22a1e0e971e2c51.jsonindex 4769f59bd456..54229eb8e360 100644--- a/rust/personhog-identity/.sqlx/query-1cbc9c47bb8f3d0d93790fdd5d2270e7d7097e5b94e1f3fdaffe27709096a74e.json+++ b/rust/personhog-identity/.sqlx/query-90d30a324fd47a4d2dc849bf3fe7f1a2815207de45f27494f22a1e0e971e2c51.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n INSERT INTO lifecycle_op_person\n (op_id, team_id, person_id, person_uuid, role, ordinal, status)\n SELECT $1, $2, u.person_id, u.person_uuid, u.role, u.ordinal, $6\n FROM unnest($3::bigint[], $4::uuid[], $5::text[], $7::int[])\n AS u(person_id, person_uuid, role, ordinal)\n ON CONFLICT (team_id, person_id) WHERE status IN ('marked', 'sealed') DO NOTHING\n RETURNING person_id\n ",+ "query": "\n INSERT INTO lifecycle_op_person\n (op_id, team_id, person_id, person_uuid, role, ordinal, status, mark_active)\n SELECT $1, $2, u.person_id, u.person_uuid, u.role, u.ordinal, $6, true\n FROM unnest($3::bigint[], $4::uuid[], $5::text[], $7::int[])\n AS u(person_id, person_uuid, role, ordinal)\n ON CONFLICT (team_id, person_id) WHERE mark_active DO NOTHING\n RETURNING person_id\n ","describe": {"columns": [{@@ -24,5 +24,5 @@false]},- "hash": "1cbc9c47bb8f3d0d93790fdd5d2270e7d7097e5b94e1f3fdaffe27709096a74e"+ "hash": "90d30a324fd47a4d2dc849bf3fe7f1a2815207de45f27494f22a1e0e971e2c51"}diff --git a/rust/personhog-identity/.sqlx/query-ac1dde53a6fb65814617b3acaaba824b10c2f96110b5e1fc0df9200e0dc85350.json b/rust/personhog-identity/.sqlx/query-9d28820660675963632ecce21cf9e464f231296561278eb30bac81c39c9f9ab7.jsonsimilarity index 58%rename from rust/personhog-identity/.sqlx/query-ac1dde53a6fb65814617b3acaaba824b10c2f96110b5e1fc0df9200e0dc85350.jsonrename to rust/personhog-identity/.sqlx/query-9d28820660675963632ecce21cf9e464f231296561278eb30bac81c39c9f9ab7.jsonindex 5a3122c38178..44460acd35de 100644--- a/rust/personhog-identity/.sqlx/query-ac1dde53a6fb65814617b3acaaba824b10c2f96110b5e1fc0df9200e0dc85350.json+++ b/rust/personhog-identity/.sqlx/query-9d28820660675963632ecce21cf9e464f231296561278eb30bac81c39c9f9ab7.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person_tmp SET status = $2\n WHERE op_id = $1 AND person_id = ANY($3) AND status IN ('marked', 'sealed')\n ",+ "query": "\n UPDATE lifecycle_op_person_tmp SET status = $2, mark_active = false\n WHERE op_id = $1 AND person_id = ANY($3) AND mark_active\n ","describe": {"columns": [],"parameters": {@@ -12,5 +12,5 @@},"nullable": []},- "hash": "ac1dde53a6fb65814617b3acaaba824b10c2f96110b5e1fc0df9200e0dc85350"+ "hash": "9d28820660675963632ecce21cf9e464f231296561278eb30bac81c39c9f9ab7"}diff --git a/rust/personhog-identity/.sqlx/query-c838686fae3baca96c8e3797f93df92b75c1f5a805ecc94b3cb074e4ca1a0cd2.json b/rust/personhog-identity/.sqlx/query-a9858a454f1374e3aeb4fa6e19444eca77c59f091137a302447b18221d06fe93.jsonsimilarity index 57%rename from rust/personhog-identity/.sqlx/query-c838686fae3baca96c8e3797f93df92b75c1f5a805ecc94b3cb074e4ca1a0cd2.jsonrename to rust/personhog-identity/.sqlx/query-a9858a454f1374e3aeb4fa6e19444eca77c59f091137a302447b18221d06fe93.jsonindex 2da24ab075e3..f8beada26551 100644--- a/rust/personhog-identity/.sqlx/query-c838686fae3baca96c8e3797f93df92b75c1f5a805ecc94b3cb074e4ca1a0cd2.json+++ b/rust/personhog-identity/.sqlx/query-a9858a454f1374e3aeb4fa6e19444eca77c59f091137a302447b18221d06fe93.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person_tmp SET status = $2\n WHERE op_id = $1 AND role = $3 AND status = $4\n ",+ "query": "\n UPDATE lifecycle_op_person_tmp SET status = $2, mark_active = false\n WHERE op_id = $1 AND role = $3 AND status = $4\n ","describe": {"columns": [],"parameters": {@@ -13,5 +13,5 @@},"nullable": []},- "hash": "c838686fae3baca96c8e3797f93df92b75c1f5a805ecc94b3cb074e4ca1a0cd2"+ "hash": "a9858a454f1374e3aeb4fa6e19444eca77c59f091137a302447b18221d06fe93"}diff --git a/rust/personhog-identity/.sqlx/query-7634df4ebfd768f0bf1af3719ac9fab2836d64f9c898a71ac4b5da7c95860fe0.json b/rust/personhog-identity/.sqlx/query-b58c270ced11ba2d1d81fbd791c9f0c5a6011ae51cf8ace46c9c6357516865b0.jsonsimilarity index 64%rename from rust/personhog-identity/.sqlx/query-7634df4ebfd768f0bf1af3719ac9fab2836d64f9c898a71ac4b5da7c95860fe0.jsonrename to rust/personhog-identity/.sqlx/query-b58c270ced11ba2d1d81fbd791c9f0c5a6011ae51cf8ace46c9c6357516865b0.jsonindex 64ab22b8bc8f..677ee64f8c3f 100644--- a/rust/personhog-identity/.sqlx/query-7634df4ebfd768f0bf1af3719ac9fab2836d64f9c898a71ac4b5da7c95860fe0.json+++ b/rust/personhog-identity/.sqlx/query-b58c270ced11ba2d1d81fbd791c9f0c5a6011ae51cf8ace46c9c6357516865b0.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT person_id FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND status IN ('marked', 'sealed')\n ORDER BY person_id\n ",+ "query": "\n SELECT person_id FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND mark_active\n ORDER BY person_id\n ","describe": {"columns": [{@@ -18,5 +18,5 @@false]},- "hash": "7634df4ebfd768f0bf1af3719ac9fab2836d64f9c898a71ac4b5da7c95860fe0"+ "hash": "b58c270ced11ba2d1d81fbd791c9f0c5a6011ae51cf8ace46c9c6357516865b0"}diff --git a/rust/personhog-identity/.sqlx/query-de27cb046ae480023e0b730c8af984215a4e60ae607515da62ff3c12165164af.json b/rust/personhog-identity/.sqlx/query-bc82156c5cb50fd21aa2cabdaf9cce3f71511f2be2b4307d3d92ca3ada077b9e.jsonsimilarity index 59%rename from rust/personhog-identity/.sqlx/query-de27cb046ae480023e0b730c8af984215a4e60ae607515da62ff3c12165164af.jsonrename to rust/personhog-identity/.sqlx/query-bc82156c5cb50fd21aa2cabdaf9cce3f71511f2be2b4307d3d92ca3ada077b9e.jsonindex 5bff85b0bba1..64f341a1384d 100644--- a/rust/personhog-identity/.sqlx/query-de27cb046ae480023e0b730c8af984215a4e60ae607515da62ff3c12165164af.json+++ b/rust/personhog-identity/.sqlx/query-bc82156c5cb50fd21aa2cabdaf9cce3f71511f2be2b4307d3d92ca3ada077b9e.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person_tmp SET status = $2\n WHERE op_id = $1 AND role = $3 AND status = $4\n ",+ "query": "\n UPDATE lifecycle_op_person_tmp SET status = $2, mark_active = false\n WHERE op_id = $1 AND role = $3 AND status = $4\n ","describe": {"columns": [],"parameters": {@@ -13,5 +13,5 @@},"nullable": []},- "hash": "de27cb046ae480023e0b730c8af984215a4e60ae607515da62ff3c12165164af"+ "hash": "bc82156c5cb50fd21aa2cabdaf9cce3f71511f2be2b4307d3d92ca3ada077b9e"}diff --git a/rust/personhog-identity/.sqlx/query-b08fe9afd0c1e3444997a79e0e63c2348dcce846cac828579d5c4b39acde2cda.json b/rust/personhog-identity/.sqlx/query-c2e20449f187ceee08cb8e99dca2e4f34af9116d2f090175f7a82b11f849d4a2.jsonsimilarity index 71%rename from rust/personhog-identity/.sqlx/query-b08fe9afd0c1e3444997a79e0e63c2348dcce846cac828579d5c4b39acde2cda.jsonrename to rust/personhog-identity/.sqlx/query-c2e20449f187ceee08cb8e99dca2e4f34af9116d2f090175f7a82b11f849d4a2.jsonindex 6cb73841b854..ed754226514c 100644--- a/rust/personhog-identity/.sqlx/query-b08fe9afd0c1e3444997a79e0e63c2348dcce846cac828579d5c4b39acde2cda.json+++ b/rust/personhog-identity/.sqlx/query-c2e20449f187ceee08cb8e99dca2e4f34af9116d2f090175f7a82b11f849d4a2.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT person_id, person_uuid FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND role = $2 AND status IN ('marked', 'sealed')\n ",+ "query": "\n SELECT person_id, person_uuid FROM lifecycle_op_person\n WHERE op_id = $1 AND role = $2 AND mark_active\n ","describe": {"columns": [{@@ -25,5 +25,5 @@false]},- "hash": "b08fe9afd0c1e3444997a79e0e63c2348dcce846cac828579d5c4b39acde2cda"+ "hash": "c2e20449f187ceee08cb8e99dca2e4f34af9116d2f090175f7a82b11f849d4a2"}diff --git a/rust/personhog-identity/.sqlx/query-b3916bffff20a5d932cefa8abce5ce8758ca406e915cbb10823308745de16b42.json b/rust/personhog-identity/.sqlx/query-cbec1aae1577838efa790c0c74adc72fccf0a93c7d1fca6f834c356d56860da5.jsonsimilarity index 79%rename from rust/personhog-identity/.sqlx/query-b3916bffff20a5d932cefa8abce5ce8758ca406e915cbb10823308745de16b42.jsonrename to rust/personhog-identity/.sqlx/query-cbec1aae1577838efa790c0c74adc72fccf0a93c7d1fca6f834c356d56860da5.jsonindex ac4cd99088c9..e117fc817179 100644--- a/rust/personhog-identity/.sqlx/query-b3916bffff20a5d932cefa8abce5ce8758ca406e915cbb10823308745de16b42.json+++ b/rust/personhog-identity/.sqlx/query-cbec1aae1577838efa790c0c74adc72fccf0a93c7d1fca6f834c356d56860da5.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person_tmp lop\n SET status = $2, sealed = jsonb_build_object('version', u.version, 'created_at', u.created_at)\n FROM unnest($3::bigint[], $4::bigint[], $5::bigint[]) AS u(person_id, version, created_at)\n WHERE lop.op_id = $1 AND lop.person_id = u.person_id\n AND lop.status IN ('marked', 'sealed')\n ",+ "query": "\n UPDATE lifecycle_op_person_tmp lop\n SET status = $2, sealed = jsonb_build_object('version', u.version, 'created_at', u.created_at)\n FROM unnest($3::bigint[], $4::bigint[], $5::bigint[]) AS u(person_id, version, created_at)\n WHERE lop.op_id = $1 AND lop.person_id = u.person_id\n AND lop.mark_active\n ","describe": {"columns": [],"parameters": {@@ -14,5 +14,5 @@},"nullable": []},- "hash": "b3916bffff20a5d932cefa8abce5ce8758ca406e915cbb10823308745de16b42"+ "hash": "cbec1aae1577838efa790c0c74adc72fccf0a93c7d1fca6f834c356d56860da5"}diff --git a/rust/personhog-identity/.sqlx/query-cf8b990cd88a4780087dcbba82b1bcca11fde4125a1df6f1e0ede518bac60e64.json b/rust/personhog-identity/.sqlx/query-cf8b990cd88a4780087dcbba82b1bcca11fde4125a1df6f1e0ede518bac60e64.jsondeleted file mode 100644index f0c983c8e3c7..000000000000--- a/rust/personhog-identity/.sqlx/query-cf8b990cd88a4780087dcbba82b1bcca11fde4125a1df6f1e0ede518bac60e64.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op_person SET status = $2 WHERE op_id = $1 AND status = $3",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Text",- "Text"- ]- },- "nullable": []- },- "hash": "cf8b990cd88a4780087dcbba82b1bcca11fde4125a1df6f1e0ede518bac60e64"-}diff --git a/rust/personhog-identity/.sqlx/query-d35c99234a5acc121ad3ffaf955ff0d837dd40443c7c643559020b901b70c847.json b/rust/personhog-identity/.sqlx/query-d35c99234a5acc121ad3ffaf955ff0d837dd40443c7c643559020b901b70c847.jsonnew file mode 100644index 000000000000..caaa2ccefaa6--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-d35c99234a5acc121ad3ffaf955ff0d837dd40443c7c643559020b901b70c847.json@@ -0,0 +1,15 @@+{+ "db_name": "PostgreSQL",+ "query": "UPDATE lifecycle_op_person SET status = $2, mark_active = false WHERE op_id = $1 AND status = 'sealed'",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "d35c99234a5acc121ad3ffaf955ff0d837dd40443c7c643559020b901b70c847"+}diff --git a/rust/personhog-identity/.sqlx/query-10399aec9f42794d6374624fab6cd9480fc81b57fa2ff5e09df6cf66c400a83c.json b/rust/personhog-identity/.sqlx/query-dd1d1f20ef23d254650b74d2bc467b137e68b5cde4502299f451b345baeff560.jsonsimilarity index 59%rename from rust/personhog-identity/.sqlx/query-10399aec9f42794d6374624fab6cd9480fc81b57fa2ff5e09df6cf66c400a83c.jsonrename to rust/personhog-identity/.sqlx/query-dd1d1f20ef23d254650b74d2bc467b137e68b5cde4502299f451b345baeff560.jsonindex 033f5b717f5a..fb102fba4498 100644--- a/rust/personhog-identity/.sqlx/query-10399aec9f42794d6374624fab6cd9480fc81b57fa2ff5e09df6cf66c400a83c.json+++ b/rust/personhog-identity/.sqlx/query-dd1d1f20ef23d254650b74d2bc467b137e68b5cde4502299f451b345baeff560.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person SET status = $2\n WHERE op_id = $1 AND person_id = ANY($3) AND status IN ('marked', 'sealed')\n ",+ "query": "\n UPDATE lifecycle_op_person SET status = $2, mark_active = false\n WHERE op_id = $1 AND person_id = ANY($3) AND mark_active\n ","describe": {"columns": [],"parameters": {@@ -12,5 +12,5 @@},"nullable": []},- "hash": "10399aec9f42794d6374624fab6cd9480fc81b57fa2ff5e09df6cf66c400a83c"+ "hash": "dd1d1f20ef23d254650b74d2bc467b137e68b5cde4502299f451b345baeff560"}diff --git a/rust/personhog-identity/.sqlx/query-45affb23f143cd23cea3ebabc6f3e43972a366cbdac5ff5a69169df1dc854c1f.json b/rust/personhog-identity/.sqlx/query-e90e6774df5a94bc1972d4597db38189975a57bda9968986ef11f406acdde356.jsonsimilarity index 58%rename from rust/personhog-identity/.sqlx/query-45affb23f143cd23cea3ebabc6f3e43972a366cbdac5ff5a69169df1dc854c1f.jsonrename to rust/personhog-identity/.sqlx/query-e90e6774df5a94bc1972d4597db38189975a57bda9968986ef11f406acdde356.jsonindex ec4f6db8dc66..d3475083118d 100644--- a/rust/personhog-identity/.sqlx/query-45affb23f143cd23cea3ebabc6f3e43972a366cbdac5ff5a69169df1dc854c1f.json+++ b/rust/personhog-identity/.sqlx/query-e90e6774df5a94bc1972d4597db38189975a57bda9968986ef11f406acdde356.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person SET status = $2\n WHERE op_id = $1 AND role = $3 AND status = $4\n ",+ "query": "\n UPDATE lifecycle_op_person SET status = $2, mark_active = false\n WHERE op_id = $1 AND role = $3 AND status = $4\n ","describe": {"columns": [],"parameters": {@@ -13,5 +13,5 @@},"nullable": []},- "hash": "45affb23f143cd23cea3ebabc6f3e43972a366cbdac5ff5a69169df1dc854c1f"+ "hash": "e90e6774df5a94bc1972d4597db38189975a57bda9968986ef11f406acdde356"}diff --git a/rust/personhog-identity/.sqlx/query-3395b5c7c26287c98b9b5a12511e27614895e3224a83f2fed2158c27bda00a57.json b/rust/personhog-identity/.sqlx/query-ebb7cf137307cc93b325697c617309790ef2e0e302a171e42afcde865d2b511a.jsonsimilarity index 50%rename from rust/personhog-identity/.sqlx/query-3395b5c7c26287c98b9b5a12511e27614895e3224a83f2fed2158c27bda00a57.jsonrename to rust/personhog-identity/.sqlx/query-ebb7cf137307cc93b325697c617309790ef2e0e302a171e42afcde865d2b511a.jsonindex 4b2926de81e2..e93a427d0de8 100644--- a/rust/personhog-identity/.sqlx/query-3395b5c7c26287c98b9b5a12511e27614895e3224a83f2fed2158c27bda00a57.json+++ b/rust/personhog-identity/.sqlx/query-ebb7cf137307cc93b325697c617309790ef2e0e302a171e42afcde865d2b511a.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n INSERT INTO lifecycle_op_person_tmp (op_id, team_id, person_id, person_uuid, role, status)\n SELECT $1, $2, u.person_id, u.person_uuid, 'victim', $5\n FROM unnest($3::bigint[], $4::uuid[]) AS u(person_id, person_uuid)\n ON CONFLICT (team_id, person_id) WHERE status IN ('marked', 'sealed') DO NOTHING\n RETURNING person_id\n ",+ "query": "\n INSERT INTO lifecycle_op_person_tmp (op_id, team_id, person_id, person_uuid, role, status, mark_active)\n SELECT $1, $2, u.person_id, u.person_uuid, 'victim', $5, true\n FROM unnest($3::bigint[], $4::uuid[]) AS u(person_id, person_uuid)\n ON CONFLICT (team_id, person_id) WHERE mark_active DO NOTHING\n RETURNING person_id\n ","describe": {"columns": [{@@ -22,5 +22,5 @@false]},- "hash": "3395b5c7c26287c98b9b5a12511e27614895e3224a83f2fed2158c27bda00a57"+ "hash": "ebb7cf137307cc93b325697c617309790ef2e0e302a171e42afcde865d2b511a"}diff --git a/rust/personhog-identity/.sqlx/query-976a7d5d788615a8fbb8abcacb9ff7bb68d486a801299b37960abc4bc731446d.json b/rust/personhog-identity/.sqlx/query-ee08c504f90b9614dc113f208adb1743e28d6be0692bcb9bbac300c1866431f6.jsonsimilarity index 58%rename from rust/personhog-identity/.sqlx/query-976a7d5d788615a8fbb8abcacb9ff7bb68d486a801299b37960abc4bc731446d.jsonrename to rust/personhog-identity/.sqlx/query-ee08c504f90b9614dc113f208adb1743e28d6be0692bcb9bbac300c1866431f6.jsonindex 7034229cb336..b97e04081739 100644--- a/rust/personhog-identity/.sqlx/query-976a7d5d788615a8fbb8abcacb9ff7bb68d486a801299b37960abc4bc731446d.json+++ b/rust/personhog-identity/.sqlx/query-ee08c504f90b9614dc113f208adb1743e28d6be0692bcb9bbac300c1866431f6.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n INSERT INTO lifecycle_op_person_tmp\n (op_id, team_id, person_id, person_uuid, role, ordinal, status)\n SELECT $1, $2, u.person_id, u.person_uuid, u.role, u.ordinal, $6\n FROM unnest($3::bigint[], $4::uuid[], $5::text[], $7::int[])\n AS u(person_id, person_uuid, role, ordinal)\n ON CONFLICT (team_id, person_id) WHERE status IN ('marked', 'sealed') DO NOTHING\n RETURNING person_id\n ",+ "query": "\n INSERT INTO lifecycle_op_person_tmp\n (op_id, team_id, person_id, person_uuid, role, ordinal, status, mark_active)\n SELECT $1, $2, u.person_id, u.person_uuid, u.role, u.ordinal, $6, true\n FROM unnest($3::bigint[], $4::uuid[], $5::text[], $7::int[])\n AS u(person_id, person_uuid, role, ordinal)\n ON CONFLICT (team_id, person_id) WHERE mark_active DO NOTHING\n RETURNING person_id\n ","describe": {"columns": [{@@ -24,5 +24,5 @@false]},- "hash": "976a7d5d788615a8fbb8abcacb9ff7bb68d486a801299b37960abc4bc731446d"+ "hash": "ee08c504f90b9614dc113f208adb1743e28d6be0692bcb9bbac300c1866431f6"}diff --git a/rust/personhog-identity/.sqlx/query-55ac7f69716cf272614a5729e1a1e0ca370e42b55bf3870a148b83c03163a8c4.json b/rust/personhog-identity/.sqlx/query-f38b2c7545775feb00f9ccd51e3a45d9c62233a8da6217fc67c571d9ef39d26f.jsonsimilarity index 66%rename from rust/personhog-identity/.sqlx/query-55ac7f69716cf272614a5729e1a1e0ca370e42b55bf3870a148b83c03163a8c4.jsonrename to rust/personhog-identity/.sqlx/query-f38b2c7545775feb00f9ccd51e3a45d9c62233a8da6217fc67c571d9ef39d26f.jsonindex 9f2a28a8c0b9..449a92dd23cf 100644--- a/rust/personhog-identity/.sqlx/query-55ac7f69716cf272614a5729e1a1e0ca370e42b55bf3870a148b83c03163a8c4.json+++ b/rust/personhog-identity/.sqlx/query-f38b2c7545775feb00f9ccd51e3a45d9c62233a8da6217fc67c571d9ef39d26f.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT count(*) as \"count!\" FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND status IN ('marked', 'sealed')\n ",+ "query": "\n SELECT count(*) as \"count!\" FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND mark_active\n ","describe": {"columns": [{@@ -18,5 +18,5 @@null]},- "hash": "55ac7f69716cf272614a5729e1a1e0ca370e42b55bf3870a148b83c03163a8c4"+ "hash": "f38b2c7545775feb00f9ccd51e3a45d9c62233a8da6217fc67c571d9ef39d26f"}diff --git a/rust/personhog-identity/.sqlx/query-3f4d3db54fa04f0aebe0a43494e3224ebaf53c319df43fb9f147ff92d26a902a.json b/rust/personhog-identity/.sqlx/query-f71d884cdf8ac8017fbb05521411a593861874242f5aab7260195186652d7e24.jsonsimilarity index 50%rename from rust/personhog-identity/.sqlx/query-3f4d3db54fa04f0aebe0a43494e3224ebaf53c319df43fb9f147ff92d26a902a.jsonrename to rust/personhog-identity/.sqlx/query-f71d884cdf8ac8017fbb05521411a593861874242f5aab7260195186652d7e24.jsonindex 00652c2e83a7..ba956caad171 100644--- a/rust/personhog-identity/.sqlx/query-3f4d3db54fa04f0aebe0a43494e3224ebaf53c319df43fb9f147ff92d26a902a.json+++ b/rust/personhog-identity/.sqlx/query-f71d884cdf8ac8017fbb05521411a593861874242f5aab7260195186652d7e24.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op_person_tmp SET status = $2 WHERE op_id = $1 AND role = $3",+ "query": "UPDATE lifecycle_op_person SET status = $2, mark_active = false WHERE op_id = $1 AND role = $3","describe": {"columns": [],"parameters": {@@ -12,5 +12,5 @@},"nullable": []},- "hash": "3f4d3db54fa04f0aebe0a43494e3224ebaf53c319df43fb9f147ff92d26a902a"+ "hash": "f71d884cdf8ac8017fbb05521411a593861874242f5aab7260195186652d7e24"}diff --git a/rust/personhog-identity/src/lifecycle/delete.rs b/rust/personhog-identity/src/lifecycle/delete.rsindex 193de97bb49b..03fac541f26f 100644--- a/rust/personhog-identity/src/lifecycle/delete.rs+++ b/rust/personhog-identity/src/lifecycle/delete.rs@@ -268,10 +268,10 @@ async fn mark(pools: &IdentityPools, tables: &IdentityTables, op: &OpRow) -> Reslet marked: Vec<i64> = mirrored_query_scalar!(tables.is_validation(),r#"- INSERT INTO {lifecycle_op_person} (op_id, team_id, person_id, person_uuid, role, status)- SELECT $1, $2, u.person_id, u.person_uuid, 'victim', $5+ INSERT INTO {lifecycle_op_person} (op_id, team_id, person_id, person_uuid, role, status, mark_active)+ SELECT $1, $2, u.person_id, u.person_uuid, 'victim', $5, trueFROM unnest($3::bigint[], $4::uuid[]) AS u(person_id, person_uuid)- ON CONFLICT (team_id, person_id) WHERE status IN ('marked', 'sealed') DO NOTHING+ ON CONFLICT (team_id, person_id) WHERE mark_active DO NOTHINGRETURNING person_id"#,op.op_id,@@ -339,7 +339,7 @@ async fn mark(pools: &IdentityPools, tables: &IdentityTables, op: &OpRow) -> Restables.is_validation(),r#"SELECT count(*) as "count!" FROM {lifecycle_op_person}- WHERE op_id = $1 AND status IN ('marked', 'sealed')+ WHERE op_id = $1 AND mark_active"#,op.op_id=> fetch_one(&mut *tx)@@ -411,7 +411,7 @@ async fn seal(tables.is_validation(),r#"SELECT person_id FROM {lifecycle_op_person}- WHERE op_id = $1 AND status IN ('marked', 'sealed')+ WHERE op_id = $1 AND mark_activeORDER BY person_id"#,op.op_id@@ -453,7 +453,7 @@ async fn seal(SET status = $2, sealed = jsonb_build_object('version', u.version, 'created_at', u.created_at)FROM unnest($3::bigint[], $4::bigint[], $5::bigint[]) AS u(person_id, version, created_at)WHERE lop.op_id = $1 AND lop.person_id = u.person_id- AND lop.status IN ('marked', 'sealed')+ AND lop.mark_active"#,op.op_id,STATUS_SEALED,@@ -467,7 +467,7 @@ async fn seal(tables.is_validation(),r#"DELETE FROM {lifecycle_op_person}- WHERE op_id = $1 AND person_id = ANY($2) AND status IN ('marked', 'sealed')+ WHERE op_id = $1 AND person_id = ANY($2) AND mark_active"#,op.op_id,&vanished@@ -694,7 +694,7 @@ async fn complete(mirrored_query!(tables.is_validation(),- "UPDATE {lifecycle_op_person} SET status = $2 WHERE op_id = $1 AND status = 'sealed'",+ "UPDATE {lifecycle_op_person} SET status = $2, mark_active = false WHERE op_id = $1 AND status = 'sealed'",op.op_id,STATUS_DELETED=> execute(&mut *tx)diff --git a/rust/personhog-identity/src/lifecycle/merge.rs b/rust/personhog-identity/src/lifecycle/merge.rsindex 9095fb95abe4..b0d9775e6ba2 100644--- a/rust/personhog-identity/src/lifecycle/merge.rs+++ b/rust/personhog-identity/src/lifecycle/merge.rs@@ -756,11 +756,11 @@ impl MergeDriver {self.tables.is_validation(),r#"INSERT INTO {lifecycle_op_person}- (op_id, team_id, person_id, person_uuid, role, ordinal, status)- SELECT $1, $2, u.person_id, u.person_uuid, u.role, u.ordinal, $6+ (op_id, team_id, person_id, person_uuid, role, ordinal, status, mark_active)+ SELECT $1, $2, u.person_id, u.person_uuid, u.role, u.ordinal, $6, trueFROM unnest($3::bigint[], $4::uuid[], $5::text[], $7::int[])AS u(person_id, person_uuid, role, ordinal)- ON CONFLICT (team_id, person_id) WHERE status IN ('marked', 'sealed') DO NOTHING+ ON CONFLICT (team_id, person_id) WHERE mark_active DO NOTHINGRETURNING person_id"#,op.op_id,@@ -862,7 +862,7 @@ impl MergeDriver {mirrored_query!(self.tables.is_validation(),r#"- UPDATE {lifecycle_op_person} SET status = $2+ UPDATE {lifecycle_op_person} SET status = $2, mark_active = falseWHERE op_id = $1 AND person_id = ANY($3) AND status = $4"#,op.op_id,@@ -882,7 +882,7 @@ impl MergeDriver {mirrored_query!(self.tables.is_validation(),r#"- UPDATE {lifecycle_op_person} SET status = $2+ UPDATE {lifecycle_op_person} SET status = $2, mark_active = falseWHERE op_id = $1 AND role = $3 AND status = $4"#,op.op_id,@@ -923,7 +923,7 @@ impl MergeDriver {async fn unmark(tx: &mut Tx<'_>, tables: &IdentityTables, op: &OpRow) -> Result<(), SagaError> {mirrored_query!(tables.is_validation(),- "UPDATE {lifecycle_op_person} SET status = $2 WHERE op_id = $1 AND status = $3",+ "UPDATE {lifecycle_op_person} SET status = $2, mark_active = false WHERE op_id = $1 AND status = $3",op.op_id,STATUS_ABORTED,STATUS_MARKED@@ -1132,7 +1132,7 @@ impl MergeDriver {SET status = $4, sealed = u.sealedFROM unnest($2::bigint[], $3::jsonb[]) AS u(person_id, sealed)WHERE lop.op_id = $1 AND lop.person_id = u.person_id- AND lop.status IN ('marked', 'sealed')+ AND lop.mark_active"#,op.op_id,&sealed_ids,@@ -1275,7 +1275,7 @@ async fn live_sources(tables.is_validation(),r#"SELECT person_id, person_uuid FROM {lifecycle_op_person}- WHERE op_id = $1 AND role = $2 AND status IN ('marked', 'sealed')+ WHERE op_id = $1 AND role = $2 AND mark_active"#,op.op_id,ROLE_SOURCE@@ -1292,8 +1292,8 @@ async fn abort_marks(mirrored_query!(tables.is_validation(),r#"- UPDATE {lifecycle_op_person} SET status = $2- WHERE op_id = $1 AND role = $3 AND status IN ('marked', 'sealed')+ UPDATE {lifecycle_op_person} SET status = $2, mark_active = false+ WHERE op_id = $1 AND role = $3 AND mark_active"#,op.op_id,STATUS_ABORTED,@@ -1319,8 +1319,8 @@ async fn settle_drops(mirrored_query!(tables.is_validation(),r#"- UPDATE {lifecycle_op_person} SET status = $2- WHERE op_id = $1 AND person_id = ANY($3) AND status IN ('marked', 'sealed')+ UPDATE {lifecycle_op_person} SET status = $2, mark_active = false+ WHERE op_id = $1 AND person_id = ANY($3) AND mark_active"#,op.op_id,STATUS_DROPPED,@@ -1813,7 +1813,7 @@ async fn clear_target_mark() -> Result<(), SagaError> {mirrored_query!(tables.is_validation(),- "UPDATE {lifecycle_op_person} SET status = $2 WHERE op_id = $1 AND role = $3",+ "UPDATE {lifecycle_op_person} SET status = $2, mark_active = false WHERE op_id = $1 AND role = $3",op.op_id,STATUS_CLEARED,ROLE_TARGET@@ -1884,7 +1884,7 @@ impl MergeDriver {mirrored_query!(self.tables.is_validation(),r#"- UPDATE {lifecycle_op_person} SET status = $2+ UPDATE {lifecycle_op_person} SET status = $2, mark_active = falseWHERE op_id = $1 AND role = $3 AND status = $4"#,op.op_id,diff --git a/rust/personhog-identity/src/storage/postgres/attach.rs b/rust/personhog-identity/src/storage/postgres/attach.rsindex efc5b2f54fc8..a218dc6f68c4 100644--- a/rust/personhog-identity/src/storage/postgres/attach.rs+++ b/rust/personhog-identity/src/storage/postgres/attach.rs@@ -43,7 +43,7 @@ pub(super) async fn attach_distinct_ids(WHERE NOT EXISTS (SELECT 1 FROM {lop} mWHERE m.team_id = p.team_id AND m.person_id = p.id- AND m.status IN ('marked', 'sealed')+ AND m.mark_active)ON CONFLICT (team_id, distinct_id) DO UPDATE SETperson_id = EXCLUDED.person_id,diff --git a/rust/personhog-identity/src/storage/postgres/stub_create.rs b/rust/personhog-identity/src/storage/postgres/stub_create.rsindex 7c3194d855ee..4cc25813acb7 100644--- a/rust/personhog-identity/src/storage/postgres/stub_create.rs+++ b/rust/personhog-identity/src/storage/postgres/stub_create.rs@@ -160,7 +160,7 @@ async fn insert_or_revive_persons(SELECT 1 FROM {lop_table} lopWHERE lop.team_id = {person_table}.team_idAND lop.person_id = {person_table}.id- AND lop.status IN ('marked', 'sealed')+ AND lop.mark_active)RETURNING {person_cols}"#,diff --git a/rust/personhog-identity/tests/lifecycle_delete_tests.rs b/rust/personhog-identity/tests/lifecycle_delete_tests.rsindex 264297b1b0b2..458559aa07d2 100644--- a/rust/personhog-identity/tests/lifecycle_delete_tests.rs+++ b/rust/personhog-identity/tests/lifecycle_delete_tests.rs@@ -310,7 +310,7 @@ async fn a_person_marked_by_another_live_op_is_skipped() {.await.expect("insert other op");sqlx::query(- "INSERT INTO lifecycle_op_person (op_id, team_id, person_id, person_uuid, role, status) VALUES ($1, $2, $3, gen_random_uuid(), 'source', 'marked')",+ "INSERT INTO lifecycle_op_person (op_id, team_id, person_id, person_uuid, role, status, mark_active) VALUES ($1, $2, $3, gen_random_uuid(), 'source', 'marked', true)",).bind(other_op).bind(ctx.team_id as i32)@@ -379,8 +379,8 @@ async fn a_victim_destroyed_between_liveness_check_and_mark_settles_as_not_found.await.expect("insert op");sqlx::query(- "INSERT INTO lifecycle_op_person (op_id, team_id, person_id, person_uuid, role, status) \- VALUES ($1, $2, $3, gen_random_uuid(), 'victim', 'marked')",+ "INSERT INTO lifecycle_op_person (op_id, team_id, person_id, person_uuid, role, status, mark_active) \+ VALUES ($1, $2, $3, gen_random_uuid(), 'victim', 'marked', true)",).bind(op_id).bind(ctx.team_id as i32)diff --git a/rust/personhog-identity/tests/lifecycle_merge_tests.rs b/rust/personhog-identity/tests/lifecycle_merge_tests.rsindex 5e904ed8af0c..0b1b82a066f9 100644--- a/rust/personhog-identity/tests/lifecycle_merge_tests.rs+++ b/rust/personhog-identity/tests/lifecycle_merge_tests.rs@@ -146,8 +146,8 @@ impl MergeHarness {.expect("insert foreign op");sqlx::query(&format!(r#"- INSERT INTO {} (op_id, team_id, person_id, person_uuid, role, status)- VALUES ($1, $2, $3, $4, 'victim', 'marked')+ INSERT INTO {} (op_id, team_id, person_id, person_uuid, role, status, mark_active)+ VALUES ($1, $2, $3, $4, 'victim', 'marked', true)"#,self.ctx.tables.lifecycle_op_person))@@ -1164,7 +1164,7 @@ async fn a_fold_without_a_live_target_mark_is_refused_and_the_op_aborts() {// bug). Unlike a scripted status, this refusal comes from the sim's// own verification, the same check the real leader runs.sqlx::query(- "UPDATE lifecycle_op_person SET status = 'cleared' WHERE op_id = $1 AND role = 'target'",+ "UPDATE lifecycle_op_person SET status = 'cleared', mark_active = false WHERE op_id = $1 AND role = 'target'",).bind(op_id).execute(&h.ctx.pool)@@ -1768,7 +1768,7 @@ async fn a_conflict_is_not_recorded_and_a_plain_retry_merges_once_released() {.await.expect("insert rival op");sqlx::query(- "INSERT INTO lifecycle_op_person (op_id, team_id, person_id, person_uuid, role, status) VALUES ($1, $2, $3, gen_random_uuid(), 'source', 'marked')",+ "INSERT INTO lifecycle_op_person (op_id, team_id, person_id, person_uuid, role, status, mark_active) VALUES ($1, $2, $3, gen_random_uuid(), 'source', 'marked', true)",).bind(rival).bind(h.ctx.team_id as i32)@@ -1798,11 +1798,13 @@ async fn a_conflict_is_not_recorded_and_a_plain_retry_merges_once_released() {// The rival releases; a retry under the SAME op id must re-run the// merge rather than replaying the recorded contention.- sqlx::query("UPDATE lifecycle_op_person SET status = 'cleared' WHERE op_id = $1")- .bind(rival)- .execute(&h.ctx.pool)- .await- .expect("release rival mark");+ sqlx::query(+ "UPDATE lifecycle_op_person SET status = 'cleared', mark_active = false WHERE op_id = $1",+ )+ .bind(rival)+ .execute(&h.ctx.pool)+ .await+ .expect("release rival mark");let retry = service.merge_persons(Request::new(rpc_request(@@ -1841,7 +1843,7 @@ async fn a_completed_op_answers_its_embedded_conflict_settled() {.await.expect("insert rival op");sqlx::query(- "INSERT INTO lifecycle_op_person (op_id, team_id, person_id, person_uuid, role, status) VALUES ($1, $2, $3, gen_random_uuid(), 'source', 'marked')",+ "INSERT INTO lifecycle_op_person (op_id, team_id, person_id, person_uuid, role, status, mark_active) VALUES ($1, $2, $3, gen_random_uuid(), 'source', 'marked', true)",).bind(rival).bind(h.ctx.team_id as i32)@@ -1875,11 +1877,13 @@ async fn a_completed_op_answers_its_embedded_conflict_settled() {// Even released, a retry replays the frozen answer rather than// re-running the held pair.- sqlx::query("UPDATE lifecycle_op_person SET status = 'cleared' WHERE op_id = $1")- .bind(rival)- .execute(&h.ctx.pool)- .await- .expect("release rival mark");+ sqlx::query(+ "UPDATE lifecycle_op_person SET status = 'cleared', mark_active = false WHERE op_id = $1",+ )+ .bind(rival)+ .execute(&h.ctx.pool)+ .await+ .expect("release rival mark");let retry = service.merge_persons(Request::new(rpc_request(h.ctx.team_id,diff --git a/rust/personhog-identity/tests/storage_tests.rs b/rust/personhog-identity/tests/storage_tests.rsindex 7d1364b4d0b4..a6d8b73a8c10 100644--- a/rust/personhog-identity/tests/storage_tests.rs+++ b/rust/personhog-identity/tests/storage_tests.rs@@ -595,8 +595,8 @@ async fn a_tombstone_under_a_live_lifecycle_mark_does_not_revive() {.await.expect("insert op");sqlx::query(- "INSERT INTO lifecycle_op_person (op_id, team_id, person_id, person_uuid, role, status) \- VALUES ($1, $2, $3, gen_random_uuid(), 'victim', 'sealed')",+ "INSERT INTO lifecycle_op_person (op_id, team_id, person_id, person_uuid, role, status, mark_active) \+ VALUES ($1, $2, $3, gen_random_uuid(), 'victim', 'sealed', true)",).bind(op).bind(ctx.team_id as i32)@@ -622,11 +622,13 @@ async fn a_tombstone_under_a_live_lifecycle_mark_does_not_revive() {assert!(resolved.is_empty(), "the tombstone stays tombstoned");// The saga finished; the mark is no longer live.- sqlx::query("UPDATE lifecycle_op_person SET status = 'deleted' WHERE op_id = $1")- .bind(op)- .execute(&ctx.pool)- .await- .expect("finish mark");+ sqlx::query(+ "UPDATE lifecycle_op_person SET status = 'deleted', mark_active = false WHERE op_id = $1",+ )+ .bind(op)+ .execute(&ctx.pool)+ .await+ .expect("finish mark");let second = ctx.storage.create_person_stubs(&[stub(&ctx, "marked-dead", &[])])@@ -882,8 +884,8 @@ async fn attach_refuses_a_person_held_by_a_live_lifecycle_op() {.await.expect("seed op row");sqlx::query(- "INSERT INTO lifecycle_op_person (op_id, team_id, person_id, person_uuid, role, status) \- VALUES ($1, $2, $3, gen_random_uuid(), 'victim', 'marked')",+ "INSERT INTO lifecycle_op_person (op_id, team_id, person_id, person_uuid, role, status, mark_active) \+ VALUES ($1, $2, $3, gen_random_uuid(), 'victim', 'marked', true)",).bind(op_id).bind(ctx.team_id as i32)