: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
feat(personhog): tag every identity service statement with its operation (#102011)
Nick Best2e79c78145cf
diff --git a/rust/common/sqlx-macros/README.md b/rust/common/sqlx-macros/README.mdindex df70e11c966a..43ec92bed0dd 100644--- a/rust/common/sqlx-macros/README.md+++ b/rust/common/sqlx-macros/README.md@@ -16,6 +16,7 @@ let rows = mirrored_query_as!()?;```+- `op = "name",` before the SQL tags both expansions with `/* service='<crate name>', operation='name' */`, the SQLCommenter query-tag shape pganalyze and pgcollector read. See `rust/pgcollector/docs/query-tags.md` for the key vocabulary.- `{name}` expands to `name` for the real set and `name_tmp` for the mirror.- `{real|mirror}` names both sides explicitly, for tables outside the suffix convention.- `{{` and `}}` are literal braces.diff --git a/rust/common/sqlx-macros/src/lib.rs b/rust/common/sqlx-macros/src/lib.rsindex afa9c06d4db4..8a881d3a6186 100644--- a/rust/common/sqlx-macros/src/lib.rs+++ b/rust/common/sqlx-macros/src/lib.rs@@ -6,6 +6,9 @@//! The executor call after `=>` is part of the macro because each `sqlx`//! expansion has its own row type; awaiting inside each branch is what//! lets the two unify.+//!+//! `op = "name"` prefixes both expansions with the query tag+//! `/* service='<crate>', operation='name' */` that pganalyze and pgcollector read.use proc_macro::TokenStream;use proc_macro2::TokenStream as TokenStream2;@@ -18,6 +21,7 @@ const MIRROR_SUFFIX: &str = "_tmp";struct MirroredQuery {row: Option<Type>,mirror: Expr,+ op: Option<LitStr>,sql: LitStr,args: Vec<Expr>,method: Ident,@@ -35,6 +39,18 @@ impl MirroredQuery {};let mirror: Expr = input.parse()?;input.parse::<Token![,]>()?;+ let op = if input.peek(Ident) && input.peek2(Token![=]) {+ let key: Ident = input.parse()?;+ if key != "op" {+ return Err(syn::Error::new(key.span(), "expected `op = \"...\"`"));+ }+ input.parse::<Token![=]>()?;+ let op: LitStr = input.parse()?;+ input.parse::<Token![,]>()?;+ Some(op)+ } else {+ None+ };let sql: LitStr = input.parse()?;let mut args = Vec::new();while input.peek(Token![,]) {@@ -52,6 +68,7 @@ impl MirroredQuery {Ok(Self {row,mirror,+ op,sql,args,method,@@ -66,6 +83,19 @@ impl MirroredQuery {return syn::Error::new(self.sql.span(), message).to_compile_error();}};+ let (real, mirror) = match &self.op {+ Some(op) => {+ // The using crate's rustc invocation carries its package name.+ let service = std::env::var("CARGO_PKG_NAME").unwrap_or_default();+ match tag(&service, &op.value()) {+ Ok(prefix) => (format!("{prefix}{real}"), format!("{prefix}{mirror}")),+ Err(message) => {+ return syn::Error::new(op.span(), message).to_compile_error();+ }+ }+ }+ None => (real, mirror),+ };let real = LitStr::new(&real, self.sql.span());let mirror = LitStr::new(&mirror, self.sql.span());let row = self.row.map(|row| quote!(#row,));@@ -98,6 +128,24 @@ impl Parse for WithRow {}}+/// A value with a quote or a comment marker would end the tag early, so both are rejected.+fn tag(service: &str, operation: &str) -> Result<String, String> {+ for (what, value) in [("service", service), ("operation", operation)] {+ if value.is_empty()+ || !value+ .chars()+ .all(|c| c.is_ascii_alphanumeric() || matches!(c, '_' | '-' | '.' | '/' | ':'))+ {+ return Err(format!(+ "query tag {what} {value:?} must be a plain identifier"+ ));+ }+ }+ Ok(format!(+ "/* service='{service}', operation='{operation}' */ "+ ))+}+fn rewrite(sql: &str) -> Result<(String, String), String> {let mut real = String::with_capacity(sql.len());let mut mirror = String::with_capacity(sql.len());@@ -178,7 +226,17 @@ pub fn mirrored_query_scalar(input: TokenStream) -> TokenStream {#[cfg(test)]mod tests {- use super::rewrite;+ use super::{rewrite, tag};++ #[test]+ fn the_tag_is_a_sqlcommenter_prefix_and_rejects_values_that_would_break_it() {+ assert_eq!(+ tag("personhog-identity", "merge_flip").unwrap(),+ "/* service='personhog-identity', operation='merge_flip' */ "+ );+ assert!(tag("personhog-identity", "it's").is_err());+ assert!(tag("", "x").is_err());+ }#[test]fn a_bare_placeholder_gets_the_mirror_suffix() {diff --git a/rust/personhog-common/src/lib.rs b/rust/personhog-common/src/lib.rsindex f8f8e5734aa9..274c8ff87e33 100644--- a/rust/personhog-common/src/lib.rs+++ b/rust/personhog-common/src/lib.rs@@ -6,6 +6,7 @@ pub mod partitioning;pub mod persons;mod pool_monitor;pub mod properties;+pub mod query_tags;pub mod storage_error;pub use pool_monitor::{spawn_pool_monitor, MonitoredPool};diff --git a/rust/personhog-common/src/query_tags.rs b/rust/personhog-common/src/query_tags.rsnew file mode 100644index 000000000000..92ea683b039a--- /dev/null+++ b/rust/personhog-common/src/query_tags.rs@@ -0,0 +1,49 @@+//! Query tags for statements built at runtime, in the SQLCommenter shape pganalyze+//! and pgcollector both parse. The comment goes in front because+//! `pg_stat_activity.query` is cut at `track_activity_query_size`.++/// A quote or `*/` in a value would end the comment early, so any character outside+/// the identifier set becomes `_`; the tag stays a comment whatever it is given.+pub fn tagged(service: &str, operation: &str, sql: &str) -> String {+ let clean = |v: &str| -> String {+ v.chars()+ .map(|c| {+ if c.is_ascii_alphanumeric() || matches!(c, '_' | '-' | '.' | '/' | ':') {+ c+ } else {+ '_'+ }+ })+ .collect()+ };+ format!(+ "/* service='{}', operation='{}' */ {sql}",+ clean(service),+ clean(operation)+ )+}++/// `query_tag!("merge_flip_lock_persons", sql)`; `service` is the calling crate's name.+#[macro_export]+macro_rules! query_tag {+ ($operation:literal, $sql:expr) => {+ $crate::query_tags::tagged(env!("CARGO_PKG_NAME"), $operation, &$sql)+ };+}++#[cfg(test)]+mod tests {+ #[test]+ fn the_prefix_names_the_calling_crate() {+ assert_eq!(+ crate::query_tag!("warm_pool", "SELECT 1"),+ "/* service='personhog-common', operation='warm_pool' */ SELECT 1"+ );+ let sql = String::from("SELECT 2");+ assert!(crate::query_tag!("x", sql).ends_with("SELECT 2"));+ assert_eq!(+ super::tagged("svc", "a*/ DROP TABLE t; --", "SELECT 3"),+ "/* service='svc', operation='a_/_DROP_TABLE_t__--' */ SELECT 3"+ );+ }+}diff --git a/rust/personhog-identity/.sqlx/query-006edc728d1b692910b3a0bf74a0c2f7393fb2763567c47cb4a2ccffdd1703a8.json b/rust/personhog-identity/.sqlx/query-006edc728d1b692910b3a0bf74a0c2f7393fb2763567c47cb4a2ccffdd1703a8.jsonnew file mode 100644index 000000000000..a0748837d7d7--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-006edc728d1b692910b3a0bf74a0c2f7393fb2763567c47cb4a2ccffdd1703a8.json@@ -0,0 +1,28 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_claim_mark' */ \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": [+ {+ "ordinal": 0,+ "name": "person_id",+ "type_info": "Int8"+ }+ ],+ "parameters": {+ "Left": [+ "Uuid",+ "Int4",+ "Int8Array",+ "UuidArray",+ "TextArray",+ "Text",+ "Int4Array"+ ]+ },+ "nullable": [+ false+ ]+ },+ "hash": "006edc728d1b692910b3a0bf74a0c2f7393fb2763567c47cb4a2ccffdd1703a8"+}diff --git a/rust/personhog-identity/.sqlx/query-01244922af743b8c14562a138bd0fc8b68c173ccdab90e6e16d4023835969e9a.json b/rust/personhog-identity/.sqlx/query-01244922af743b8c14562a138bd0fc8b68c173ccdab90e6e16d4023835969e9a.jsonnew file mode 100644index 000000000000..34564d2aad7f--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-01244922af743b8c14562a138bd0fc8b68c173ccdab90e6e16d4023835969e9a.json@@ -0,0 +1,15 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_release_lease' */ UPDATE lifecycle_op SET lease_expires_at = NULL WHERE op_id = $1 AND completed_at IS NULL AND attempt = $2",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Int4"+ ]+ },+ "nullable": []+ },+ "hash": "01244922af743b8c14562a138bd0fc8b68c173ccdab90e6e16d4023835969e9a"+}diff --git a/rust/personhog-identity/.sqlx/query-042df1ea1da1cdde3d12a0d7c48cd0d5d637aa453f5b432e8f34f5c7a31149b5.json b/rust/personhog-identity/.sqlx/query-042df1ea1da1cdde3d12a0d7c48cd0d5d637aa453f5b432e8f34f5c7a31149b5.jsonnew file mode 100644index 000000000000..3136c24450e9--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-042df1ea1da1cdde3d12a0d7c48cd0d5d637aa453f5b432e8f34f5c7a31149b5.json@@ -0,0 +1,14 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_discard_claim_abort_persons' */ DELETE FROM lifecycle_op_person_tmp WHERE op_id = $1",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid"+ ]+ },+ "nullable": []+ },+ "hash": "042df1ea1da1cdde3d12a0d7c48cd0d5d637aa453f5b432e8f34f5c7a31149b5"+}diff --git a/rust/personhog-identity/.sqlx/query-09621f1029ea0f60c14857875c91489b0befe416607cc1160db1ecab7cb77a7e.json b/rust/personhog-identity/.sqlx/query-09621f1029ea0f60c14857875c91489b0befe416607cc1160db1ecab7cb77a7e.jsondeleted file mode 100644index 585187b0f839..000000000000--- a/rust/personhog-identity/.sqlx/query-09621f1029ea0f60c14857875c91489b0befe416607cc1160db1ecab7cb77a7e.json+++ /dev/null@@ -1,16 +0,0 @@-{- "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-0a3ac7233bfdc74a1314c636438f3e37c263922e0d15fe8af8d6c69143e254a2.json b/rust/personhog-identity/.sqlx/query-0a3ac7233bfdc74a1314c636438f3e37c263922e0d15fe8af8d6c69143e254a2.jsonnew file mode 100644index 000000000000..d7faf261c941--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-0a3ac7233bfdc74a1314c636438f3e37c263922e0d15fe8af8d6c69143e254a2.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='delete_unmap_record_moved' */ \n UPDATE lifecycle_op_person_tmp lop\n SET moved = u.moved\n FROM unnest($2::bigint[], $3::jsonb[]) AS u(person_id, moved)\n WHERE lop.op_id = $1 AND lop.person_id = u.person_id\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Int8Array",+ "JsonbArray"+ ]+ },+ "nullable": []+ },+ "hash": "0a3ac7233bfdc74a1314c636438f3e37c263922e0d15fe8af8d6c69143e254a2"+}diff --git a/rust/personhog-identity/.sqlx/query-0a698d74f1c84d076282ab9bfaae012d4d3b3d14485972648afe15c599682530.json b/rust/personhog-identity/.sqlx/query-0a698d74f1c84d076282ab9bfaae012d4d3b3d14485972648afe15c599682530.jsondeleted file mode 100644index 018ca7af3a50..000000000000--- a/rust/personhog-identity/.sqlx/query-0a698d74f1c84d076282ab9bfaae012d4d3b3d14485972648afe15c599682530.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_tmp\n SET lease_expires_at = now() + make_interval(secs => $2)\n WHERE op_id = $1 AND completed_at IS NULL AND attempt = $3\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Float8",- "Int4"- ]- },- "nullable": []- },- "hash": "0a698d74f1c84d076282ab9bfaae012d4d3b3d14485972648afe15c599682530"-}diff --git a/rust/personhog-identity/.sqlx/query-eb0d1e16eed55534b6f443fc08952770230df349729b248934f125bbc38e7bcd.json b/rust/personhog-identity/.sqlx/query-0b0801aecfb35e317442dc60a8c078f6c286d777c57d284f624edd7bc27b9130.jsonsimilarity index 69%rename from rust/personhog-identity/.sqlx/query-eb0d1e16eed55534b6f443fc08952770230df349729b248934f125bbc38e7bcd.jsonrename to rust/personhog-identity/.sqlx/query-0b0801aecfb35e317442dc60a8c078f6c286d777c57d284f624edd7bc27b9130.jsonindex 53707d66e9ab..bfabbf8bc338 100644--- a/rust/personhog-identity/.sqlx/query-eb0d1e16eed55534b6f443fc08952770230df349729b248934f125bbc38e7bcd.json+++ b/rust/personhog-identity/.sqlx/query-0b0801aecfb35e317442dc60a8c078f6c286d777c57d284f624edd7bc27b9130.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT op_id, op_type, team_id::bigint as \"team_id!\", step, attempt,\n request as \"request: Value\", outcome as \"outcome: Value\",\n created_at, completed_at,\n (lease_expires_at IS NOT NULL AND lease_expires_at >= now())\n as \"lease_live!\"\n FROM lifecycle_op\n WHERE op_id = $1\n ",+ "query": "/* service='personhog-identity', operation='op_load' */ \n SELECT op_id, op_type, team_id::bigint as \"team_id!\", step, attempt,\n request as \"request: Value\", outcome as \"outcome: Value\",\n created_at, completed_at,\n (lease_expires_at IS NOT NULL AND lease_expires_at >= now())\n as \"lease_live!\"\n FROM lifecycle_op_tmp\n WHERE op_id = $1\n ","describe": {"columns": [{@@ -72,5 +72,5 @@null]},- "hash": "eb0d1e16eed55534b6f443fc08952770230df349729b248934f125bbc38e7bcd"+ "hash": "0b0801aecfb35e317442dc60a8c078f6c286d777c57d284f624edd7bc27b9130"}diff --git a/rust/personhog-identity/.sqlx/query-0b4720343b45a096df113ef1569fc7c888e2840e3c66b85697ed4c64bf0fe7c4.json b/rust/personhog-identity/.sqlx/query-0b4720343b45a096df113ef1569fc7c888e2840e3c66b85697ed4c64bf0fe7c4.jsonnew file mode 100644index 000000000000..e1ad7948fef7--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-0b4720343b45a096df113ef1569fc7c888e2840e3c66b85697ed4c64bf0fe7c4.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_park' */ \n UPDATE lifecycle_op_tmp\n SET parked_at = now(), parked_reason = $3, lease_expires_at = NULL\n WHERE op_id = $1 AND completed_at IS NULL AND attempt = $2\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Int4",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "0b4720343b45a096df113ef1569fc7c888e2840e3c66b85697ed4c64bf0fe7c4"+}diff --git a/rust/personhog-identity/.sqlx/query-0e120bb92582b62872a069b94d1dfd54ab6eff24bdb493dbe36d9c81448f6084.json b/rust/personhog-identity/.sqlx/query-0e120bb92582b62872a069b94d1dfd54ab6eff24bdb493dbe36d9c81448f6084.jsonnew file mode 100644index 000000000000..a657fd53c856--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-0e120bb92582b62872a069b94d1dfd54ab6eff24bdb493dbe36d9c81448f6084.json@@ -0,0 +1,22 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='delete_mark_active_claims' */ \n SELECT count(*) as \"count!\" FROM lifecycle_op_person\n WHERE op_id = $1 AND mark_active\n ",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "count!",+ "type_info": "Int8"+ }+ ],+ "parameters": {+ "Left": [+ "Uuid"+ ]+ },+ "nullable": [+ null+ ]+ },+ "hash": "0e120bb92582b62872a069b94d1dfd54ab6eff24bdb493dbe36d9c81448f6084"+}diff --git a/rust/personhog-identity/.sqlx/query-0f56b36fb53017960bb82b2554a95a1ea67d2cb6ffa7bb12c5ac07018fb151b6.json b/rust/personhog-identity/.sqlx/query-0f56b36fb53017960bb82b2554a95a1ea67d2cb6ffa7bb12c5ac07018fb151b6.jsondeleted file mode 100644index bdaace7e1aa1..000000000000--- a/rust/personhog-identity/.sqlx/query-0f56b36fb53017960bb82b2554a95a1ea67d2cb6ffa7bb12c5ac07018fb151b6.json+++ /dev/null@@ -1,17 +0,0 @@-{- "db_name": "PostgreSQL",- "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": {- "Left": [- "Uuid",- "Text",- "Text",- "Text"- ]- },- "nullable": []- },- "hash": "0f56b36fb53017960bb82b2554a95a1ea67d2cb6ffa7bb12c5ac07018fb151b6"-}diff --git a/rust/personhog-identity/.sqlx/query-0fa4368ca4526d4867790ef2284f7d3a19826851dfb20a08ecb079f3120ab2e1.json b/rust/personhog-identity/.sqlx/query-0fa4368ca4526d4867790ef2284f7d3a19826851dfb20a08ecb079f3120ab2e1.jsonnew file mode 100644index 000000000000..546dbf76b1ba--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-0fa4368ca4526d4867790ef2284f7d3a19826851dfb20a08ecb079f3120ab2e1.json@@ -0,0 +1,22 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='delete_mark_active_claims' */ \n SELECT count(*) as \"count!\" FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND mark_active\n ",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "count!",+ "type_info": "Int8"+ }+ ],+ "parameters": {+ "Left": [+ "Uuid"+ ]+ },+ "nullable": [+ null+ ]+ },+ "hash": "0fa4368ca4526d4867790ef2284f7d3a19826851dfb20a08ecb079f3120ab2e1"+}diff --git a/rust/personhog-identity/.sqlx/query-0ff62701ff2aa1352e6479707c611e34baeae4fc9a05a3e4478888dcf663ef07.json b/rust/personhog-identity/.sqlx/query-0ff62701ff2aa1352e6479707c611e34baeae4fc9a05a3e4478888dcf663ef07.jsonnew file mode 100644index 000000000000..d9ad983105c9--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-0ff62701ff2aa1352e6479707c611e34baeae4fc9a05a3e4478888dcf663ef07.json@@ -0,0 +1,20 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_sweep_backlog' */ SELECT count(*) AS \"count!\" FROM lifecycle_op WHERE completed_at IS NULL AND parked_at IS NOT NULL",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "count!",+ "type_info": "Int8"+ }+ ],+ "parameters": {+ "Left": []+ },+ "nullable": [+ null+ ]+ },+ "hash": "0ff62701ff2aa1352e6479707c611e34baeae4fc9a05a3e4478888dcf663ef07"+}diff --git a/rust/personhog-identity/.sqlx/query-13abc8ab80be969ca87a77f927f275db61c32be1bba5dcf8bca1c84bc61d5b7e.json b/rust/personhog-identity/.sqlx/query-1158d60d0a4cc90c6868753ab5bb40a17f4cc1fa9828bc80f173d84edc8f8a73.jsonsimilarity index 55%rename from rust/personhog-identity/.sqlx/query-13abc8ab80be969ca87a77f927f275db61c32be1bba5dcf8bca1c84bc61d5b7e.jsonrename to rust/personhog-identity/.sqlx/query-1158d60d0a4cc90c6868753ab5bb40a17f4cc1fa9828bc80f173d84edc8f8a73.jsonindex 6971ee1a73fd..3d8f101fe89d 100644--- a/rust/personhog-identity/.sqlx/query-13abc8ab80be969ca87a77f927f275db61c32be1bba5dcf8bca1c84bc61d5b7e.json+++ b/rust/personhog-identity/.sqlx/query-1158d60d0a4cc90c6868753ab5bb40a17f4cc1fa9828bc80f173d84edc8f8a73.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT person_id FROM lifecycle_op_person\n WHERE op_id = $1 AND mark_active\n ORDER BY person_id\n ",+ "query": "/* service='personhog-identity', operation='delete_mark_existing' */ SELECT person_id FROM lifecycle_op_person_tmp WHERE op_id = $1","describe": {"columns": [{@@ -18,5 +18,5 @@false]},- "hash": "13abc8ab80be969ca87a77f927f275db61c32be1bba5dcf8bca1c84bc61d5b7e"+ "hash": "1158d60d0a4cc90c6868753ab5bb40a17f4cc1fa9828bc80f173d84edc8f8a73"}diff --git a/rust/personhog-identity/.sqlx/query-1198230cecbe993cd59b40e8c20af56ae488f5075ece4e96fbc5b988df6afe75.json b/rust/personhog-identity/.sqlx/query-1198230cecbe993cd59b40e8c20af56ae488f5075ece4e96fbc5b988df6afe75.jsondeleted file mode 100644index 6047eb863aec..000000000000--- a/rust/personhog-identity/.sqlx/query-1198230cecbe993cd59b40e8c20af56ae488f5075ece4e96fbc5b988df6afe75.json+++ /dev/null@@ -1,15 +0,0 @@-{- "db_name": "PostgreSQL",- "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": {- "Left": [- "Uuid",- "Int8Array"- ]- },- "nullable": []- },- "hash": "1198230cecbe993cd59b40e8c20af56ae488f5075ece4e96fbc5b988df6afe75"-}diff --git a/rust/personhog-identity/.sqlx/query-1bcdfcfce1a90c8b39d703e846caf4c2cb2ab689669697b476b305a7975ed816.json b/rust/personhog-identity/.sqlx/query-1bcdfcfce1a90c8b39d703e846caf4c2cb2ab689669697b476b305a7975ed816.jsondeleted file mode 100644index d450290e000a..000000000000--- a/rust/personhog-identity/.sqlx/query-1bcdfcfce1a90c8b39d703e846caf4c2cb2ab689669697b476b305a7975ed816.json+++ /dev/null@@ -1,19 +0,0 @@-{- "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, $5, $6\n FROM unnest($3::bigint[], $4::uuid[]) AS u(person_id, person_uuid)\n ON CONFLICT (op_id, person_id) DO NOTHING\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Int4",- "Int8Array",- "UuidArray",- "Text",- "Text"- ]- },- "nullable": []- },- "hash": "1bcdfcfce1a90c8b39d703e846caf4c2cb2ab689669697b476b305a7975ed816"-}diff --git a/rust/personhog-identity/.sqlx/query-1cab216d81775fa045fb1a9d8bd50ff9b3b0a014c35ebc97c07eff5577541a6b.json b/rust/personhog-identity/.sqlx/query-1cab216d81775fa045fb1a9d8bd50ff9b3b0a014c35ebc97c07eff5577541a6b.jsondeleted file mode 100644index 7a38ef79d4ae..000000000000--- a/rust/personhog-identity/.sqlx/query-1cab216d81775fa045fb1a9d8bd50ff9b3b0a014c35ebc97c07eff5577541a6b.json+++ /dev/null@@ -1,15 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n DELETE FROM lifecycle_op\n WHERE op_id IN (\n SELECT op_id FROM lifecycle_op\n WHERE completed_at IS NOT NULL\n AND completed_at < now() - make_interval(secs => $1)\n LIMIT $2\n )\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Float8",- "Int8"- ]- },- "nullable": []- },- "hash": "1cab216d81775fa045fb1a9d8bd50ff9b3b0a014c35ebc97c07eff5577541a6b"-}diff --git a/rust/personhog-identity/.sqlx/query-1cf99f783598a58cc02737140f7c3a1b15428cc884af22452006ed2cf03778e5.json b/rust/personhog-identity/.sqlx/query-1cf99f783598a58cc02737140f7c3a1b15428cc884af22452006ed2cf03778e5.jsonnew file mode 100644index 000000000000..c8f8631c1930--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-1cf99f783598a58cc02737140f7c3a1b15428cc884af22452006ed2cf03778e5.json@@ -0,0 +1,14 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='delete_unmap_cohort_membership' */ DELETE FROM posthog_cohortpeople WHERE person_id = ANY($1)",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Int8Array"+ ]+ },+ "nullable": []+ },+ "hash": "1cf99f783598a58cc02737140f7c3a1b15428cc884af22452006ed2cf03778e5"+}diff --git a/rust/personhog-identity/.sqlx/query-1d27524127cd4d136b9051c5e26192171cc017d9a0d0681bed5900b62c8e721a.json b/rust/personhog-identity/.sqlx/query-1d27524127cd4d136b9051c5e26192171cc017d9a0d0681bed5900b62c8e721a.jsondeleted file mode 100644index 98ea1a0b422b..000000000000--- a/rust/personhog-identity/.sqlx/query-1d27524127cd4d136b9051c5e26192171cc017d9a0d0681bed5900b62c8e721a.json+++ /dev/null@@ -1,17 +0,0 @@-{- "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.mark_active\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Int8Array",- "JsonbArray",- "Text"- ]- },- "nullable": []- },- "hash": "1d27524127cd4d136b9051c5e26192171cc017d9a0d0681bed5900b62c8e721a"-}diff --git a/rust/personhog-identity/.sqlx/query-1d7171ba1445785d92ca6f82bcd00020fc8855c706f0d730164bb6938169d189.json b/rust/personhog-identity/.sqlx/query-1d7171ba1445785d92ca6f82bcd00020fc8855c706f0d730164bb6938169d189.jsondeleted file mode 100644index 16b4142327ed..000000000000--- a/rust/personhog-identity/.sqlx/query-1d7171ba1445785d92ca6f82bcd00020fc8855c706f0d730164bb6938169d189.json+++ /dev/null@@ -1,16 +0,0 @@-{- "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-1d9bbbca7e556ac4851177dbc0b9a9ada897a718ec0f1f551b83f126a0b6fddb.json b/rust/personhog-identity/.sqlx/query-1d9bbbca7e556ac4851177dbc0b9a9ada897a718ec0f1f551b83f126a0b6fddb.jsondeleted file mode 100644index d98a6ed618c1..000000000000--- a/rust/personhog-identity/.sqlx/query-1d9bbbca7e556ac4851177dbc0b9a9ada897a718ec0f1f551b83f126a0b6fddb.json+++ /dev/null@@ -1,22 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n SELECT person_id FROM lifecycle_op_person\n WHERE op_id = $1 AND status = 'sealed'\n ",- "describe": {- "columns": [- {- "ordinal": 0,- "name": "person_id",- "type_info": "Int8"- }- ],- "parameters": {- "Left": [- "Uuid"- ]- },- "nullable": [- false- ]- },- "hash": "1d9bbbca7e556ac4851177dbc0b9a9ada897a718ec0f1f551b83f126a0b6fddb"-}diff --git a/rust/personhog-identity/.sqlx/query-34428f9dee5307dacef6de994ec97a88d882fc10825c3697f7834d6534903a31.json b/rust/personhog-identity/.sqlx/query-1f51931d9b9fd5920b2bb3b3364b658f089890152da256a53b39c052b2bd93cf.jsonsimilarity index 50%rename from rust/personhog-identity/.sqlx/query-34428f9dee5307dacef6de994ec97a88d882fc10825c3697f7834d6534903a31.jsonrename to rust/personhog-identity/.sqlx/query-1f51931d9b9fd5920b2bb3b3364b658f089890152da256a53b39c052b2bd93cf.jsonindex 7fe0f1b14ea0..594a13027372 100644--- a/rust/personhog-identity/.sqlx/query-34428f9dee5307dacef6de994ec97a88d882fc10825c3697f7834d6534903a31.json+++ b/rust/personhog-identity/.sqlx/query-1f51931d9b9fd5920b2bb3b3364b658f089890152da256a53b39c052b2bd93cf.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 = 'sealed'\n ",+ "query": "/* service='personhog-identity', operation='delete_unmap_victims' */ \n SELECT person_id FROM lifecycle_op_person\n WHERE op_id = $1 AND status = 'sealed'\n ","describe": {"columns": [{@@ -18,5 +18,5 @@false]},- "hash": "34428f9dee5307dacef6de994ec97a88d882fc10825c3697f7834d6534903a31"+ "hash": "1f51931d9b9fd5920b2bb3b3364b658f089890152da256a53b39c052b2bd93cf"}diff --git a/rust/personhog-identity/.sqlx/query-21c156f4c600fd8580f84ef440bcb84bff70c4f65f55409ab5abec37f6ae26ba.json b/rust/personhog-identity/.sqlx/query-21c156f4c600fd8580f84ef440bcb84bff70c4f65f55409ab5abec37f6ae26ba.jsonnew file mode 100644index 000000000000..6e5510ac6f95--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-21c156f4c600fd8580f84ef440bcb84bff70c4f65f55409ab5abec37f6ae26ba.json@@ -0,0 +1,17 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_seal' */ \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": {+ "Left": [+ "Uuid",+ "Int8Array",+ "JsonbArray",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "21c156f4c600fd8580f84ef440bcb84bff70c4f65f55409ab5abec37f6ae26ba"+}diff --git a/rust/personhog-identity/.sqlx/query-22953a6b95cadbb6a3430b501d3537614c28efb0f118ad5550d44927b0cd3020.json b/rust/personhog-identity/.sqlx/query-22953a6b95cadbb6a3430b501d3537614c28efb0f118ad5550d44927b0cd3020.jsonnew file mode 100644index 000000000000..73dec585fb41--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-22953a6b95cadbb6a3430b501d3537614c28efb0f118ad5550d44927b0cd3020.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_settle_drops' */ \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": {+ "Left": [+ "Uuid",+ "Text",+ "Int8Array"+ ]+ },+ "nullable": []+ },+ "hash": "22953a6b95cadbb6a3430b501d3537614c28efb0f118ad5550d44927b0cd3020"+}diff --git a/rust/personhog-identity/.sqlx/query-2485008c9660ac8b84305abbf19a9b5e5c507a7d1f6070fd5d23f69de3f2e6d4.json b/rust/personhog-identity/.sqlx/query-2485008c9660ac8b84305abbf19a9b5e5c507a7d1f6070fd5d23f69de3f2e6d4.jsonnew file mode 100644index 000000000000..9e82f2825206--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-2485008c9660ac8b84305abbf19a9b5e5c507a7d1f6070fd5d23f69de3f2e6d4.json@@ -0,0 +1,29 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_sweep_abandoned' */ \n SELECT op_id, op_type\n FROM lifecycle_op\n WHERE completed_at IS NULL\n AND parked_at IS NULL\n AND ((lease_expires_at IS NULL AND created_at < now() - make_interval(secs => $1))\n OR lease_expires_at < now())\n ORDER BY created_at\n LIMIT $2\n ",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "op_id",+ "type_info": "Uuid"+ },+ {+ "ordinal": 1,+ "name": "op_type",+ "type_info": "Text"+ }+ ],+ "parameters": {+ "Left": [+ "Float8",+ "Int8"+ ]+ },+ "nullable": [+ false,+ false+ ]+ },+ "hash": "2485008c9660ac8b84305abbf19a9b5e5c507a7d1f6070fd5d23f69de3f2e6d4"+}diff --git a/rust/personhog-identity/.sqlx/query-ebb7cf137307cc93b325697c617309790ef2e0e302a171e42afcde865d2b511a.json b/rust/personhog-identity/.sqlx/query-27338164e524b407fe21ffce9493354bd2b016273a266551df572a3fc29f462b.jsonsimilarity index 76%rename from rust/personhog-identity/.sqlx/query-ebb7cf137307cc93b325697c617309790ef2e0e302a171e42afcde865d2b511a.jsonrename to rust/personhog-identity/.sqlx/query-27338164e524b407fe21ffce9493354bd2b016273a266551df572a3fc29f462b.jsonindex e93a427d0de8..5b0c16b04024 100644--- a/rust/personhog-identity/.sqlx/query-ebb7cf137307cc93b325697c617309790ef2e0e302a171e42afcde865d2b511a.json+++ b/rust/personhog-identity/.sqlx/query-27338164e524b407fe21ffce9493354bd2b016273a266551df572a3fc29f462b.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, 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 ",+ "query": "/* service='personhog-identity', operation='delete_mark_victims' */ \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": "ebb7cf137307cc93b325697c617309790ef2e0e302a171e42afcde865d2b511a"+ "hash": "27338164e524b407fe21ffce9493354bd2b016273a266551df572a3fc29f462b"}diff --git a/rust/personhog-identity/.sqlx/query-e982d1b2cb225fe19e84ab0f31a09e5c5c6f0e5671347f4ff011a49545a1c26d.json b/rust/personhog-identity/.sqlx/query-277aaf055b57f571bb1077623ddf77214586d710412779ddad28c12f10e13175.jsonsimilarity index 54%rename from rust/personhog-identity/.sqlx/query-e982d1b2cb225fe19e84ab0f31a09e5c5c6f0e5671347f4ff011a49545a1c26d.jsonrename to rust/personhog-identity/.sqlx/query-277aaf055b57f571bb1077623ddf77214586d710412779ddad28c12f10e13175.jsonindex afb72f4140ec..0e32af4d5660 100644--- a/rust/personhog-identity/.sqlx/query-e982d1b2cb225fe19e84ab0f31a09e5c5c6f0e5671347f4ff011a49545a1c26d.json+++ b/rust/personhog-identity/.sqlx/query-277aaf055b57f571bb1077623ddf77214586d710412779ddad28c12f10e13175.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "SELECT moved FROM lifecycle_op_person_tmp WHERE op_id = $1 AND role = $2",+ "query": "/* service='personhog-identity', operation='merge_load_claim_record' */ SELECT moved FROM lifecycle_op_person_tmp WHERE op_id = $1 AND role = $2","describe": {"columns": [{@@ -19,5 +19,5 @@true]},- "hash": "e982d1b2cb225fe19e84ab0f31a09e5c5c6f0e5671347f4ff011a49545a1c26d"+ "hash": "277aaf055b57f571bb1077623ddf77214586d710412779ddad28c12f10e13175"}diff --git a/rust/personhog-identity/.sqlx/query-289618d35032bcfca36505d95002f7fd52567dcf9f04a1f39ac930ee277ddf55.json b/rust/personhog-identity/.sqlx/query-289618d35032bcfca36505d95002f7fd52567dcf9f04a1f39ac930ee277ddf55.jsonnew file mode 100644index 000000000000..27aad77905c3--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-289618d35032bcfca36505d95002f7fd52567dcf9f04a1f39ac930ee277ddf55.json@@ -0,0 +1,17 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_claim_abort_marks' */ \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": {+ "Left": [+ "Uuid",+ "Text",+ "Text",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "289618d35032bcfca36505d95002f7fd52567dcf9f04a1f39ac930ee277ddf55"+}diff --git a/rust/personhog-identity/.sqlx/query-2b56dd5ffbaec1b2fc5e5bb3d79c30ca9a749263a4429cc0fdcc40f97b762380.json b/rust/personhog-identity/.sqlx/query-2b56dd5ffbaec1b2fc5e5bb3d79c30ca9a749263a4429cc0fdcc40f97b762380.jsonnew file mode 100644index 000000000000..3331b9a70f98--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-2b56dd5ffbaec1b2fc5e5bb3d79c30ca9a749263a4429cc0fdcc40f97b762380.json@@ -0,0 +1,24 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_flip_sources' */ \n SELECT person_id FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND role = $2 AND status = $3\n ",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "person_id",+ "type_info": "Int8"+ }+ ],+ "parameters": {+ "Left": [+ "Uuid",+ "Text",+ "Text"+ ]+ },+ "nullable": [+ false+ ]+ },+ "hash": "2b56dd5ffbaec1b2fc5e5bb3d79c30ca9a749263a4429cc0fdcc40f97b762380"+}diff --git a/rust/personhog-identity/.sqlx/query-2bc0abfc06c474ebe9f698a73bb9dbaf0a83a50433ca1417580a5fd16cd1e7f2.json b/rust/personhog-identity/.sqlx/query-2bc0abfc06c474ebe9f698a73bb9dbaf0a83a50433ca1417580a5fd16cd1e7f2.jsondeleted file mode 100644index 6eae6f0ddbe7..000000000000--- a/rust/personhog-identity/.sqlx/query-2bc0abfc06c474ebe9f698a73bb9dbaf0a83a50433ca1417580a5fd16cd1e7f2.json+++ /dev/null@@ -1,14 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n DELETE FROM lifecycle_op\n WHERE op_id = $1\n AND completed_at IS NOT NULL\n AND (outcome->>'claim_abort')::boolean IS TRUE\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid"- ]- },- "nullable": []- },- "hash": "2bc0abfc06c474ebe9f698a73bb9dbaf0a83a50433ca1417580a5fd16cd1e7f2"-}diff --git a/rust/personhog-identity/.sqlx/query-2e3d6691f8df92d92119ec2b9971134aec4df67f5ee6cce83b6001aeabeabb99.json b/rust/personhog-identity/.sqlx/query-2e3d6691f8df92d92119ec2b9971134aec4df67f5ee6cce83b6001aeabeabb99.jsondeleted file mode 100644index 621b12ae080b..000000000000--- a/rust/personhog-identity/.sqlx/query-2e3d6691f8df92d92119ec2b9971134aec4df67f5ee6cce83b6001aeabeabb99.json+++ /dev/null@@ -1,15 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n DELETE FROM lifecycle_op_person\n WHERE op_id = $1 AND person_id = ANY($2) AND mark_active\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Int8Array"- ]- },- "nullable": []- },- "hash": "2e3d6691f8df92d92119ec2b9971134aec4df67f5ee6cce83b6001aeabeabb99"-}diff --git a/rust/personhog-identity/.sqlx/query-3090615263a5880537d3961664062e1d6936c600b38e8665b89ad194d864afcc.json b/rust/personhog-identity/.sqlx/query-3090615263a5880537d3961664062e1d6936c600b38e8665b89ad194d864afcc.jsonnew file mode 100644index 000000000000..fc3affbffc98--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-3090615263a5880537d3961664062e1d6936c600b38e8665b89ad194d864afcc.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_advance_step' */ UPDATE lifecycle_op SET step = $3 WHERE op_id = $1 AND step = $2",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Text",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "3090615263a5880537d3961664062e1d6936c600b38e8665b89ad194d864afcc"+}diff --git a/rust/personhog-identity/.sqlx/query-316c8c75ee8090135340d797980d5e38f17de35b54f11c2e9ec830417dcdf5f5.json b/rust/personhog-identity/.sqlx/query-316c8c75ee8090135340d797980d5e38f17de35b54f11c2e9ec830417dcdf5f5.jsondeleted file mode 100644index c852e83130ad..000000000000--- a/rust/personhog-identity/.sqlx/query-316c8c75ee8090135340d797980d5e38f17de35b54f11c2e9ec830417dcdf5f5.json+++ /dev/null@@ -1,17 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_tmp\n SET step = $3, outcome = $4, completed_at = now(), lease_expires_at = NULL\n WHERE op_id = $1 AND step = $2\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Text",- "Text",- "Jsonb"- ]- },- "nullable": []- },- "hash": "316c8c75ee8090135340d797980d5e38f17de35b54f11c2e9ec830417dcdf5f5"-}diff --git a/rust/personhog-identity/.sqlx/query-330d13be9e77b45d9785a43bc05f0c941fd73f140042d1aa86dcaba01ac08e96.json b/rust/personhog-identity/.sqlx/query-330d13be9e77b45d9785a43bc05f0c941fd73f140042d1aa86dcaba01ac08e96.jsonnew file mode 100644index 000000000000..f523f6ce5ac4--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-330d13be9e77b45d9785a43bc05f0c941fd73f140042d1aa86dcaba01ac08e96.json@@ -0,0 +1,20 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_sweep_backlog' */ SELECT count(*) AS \"count!\" FROM lifecycle_op_tmp WHERE completed_at IS NULL AND parked_at IS NOT NULL",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "count!",+ "type_info": "Int8"+ }+ ],+ "parameters": {+ "Left": []+ },+ "nullable": [+ null+ ]+ },+ "hash": "330d13be9e77b45d9785a43bc05f0c941fd73f140042d1aa86dcaba01ac08e96"+}diff --git a/rust/personhog-identity/.sqlx/query-360abbc4844a3656861cb3f1f9b716f88b618aba70dce5fa5d8bb05f3290651a.json b/rust/personhog-identity/.sqlx/query-360abbc4844a3656861cb3f1f9b716f88b618aba70dce5fa5d8bb05f3290651a.jsondeleted file mode 100644index 91feee30cfcb..000000000000--- a/rust/personhog-identity/.sqlx/query-360abbc4844a3656861cb3f1f9b716f88b618aba70dce5fa5d8bb05f3290651a.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op SET step = $3 WHERE op_id = $1 AND step = $2",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Text",- "Text"- ]- },- "nullable": []- },- "hash": "360abbc4844a3656861cb3f1f9b716f88b618aba70dce5fa5d8bb05f3290651a"-}diff --git a/rust/personhog-identity/.sqlx/query-39ab1966818f47096125777241a761565dbfce330ff1c1635c64c3f516e4c981.json b/rust/personhog-identity/.sqlx/query-39ab1966818f47096125777241a761565dbfce330ff1c1635c64c3f516e4c981.jsonnew file mode 100644index 000000000000..03310adfac8e--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-39ab1966818f47096125777241a761565dbfce330ff1c1635c64c3f516e4c981.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_renew_lease' */ \n UPDATE lifecycle_op_tmp\n SET lease_expires_at = now() + make_interval(secs => $2)\n WHERE op_id = $1 AND completed_at IS NULL AND attempt = $3\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Float8",+ "Int4"+ ]+ },+ "nullable": []+ },+ "hash": "39ab1966818f47096125777241a761565dbfce330ff1c1635c64c3f516e4c981"+}diff --git a/rust/personhog-identity/.sqlx/query-358ad441e0296658f0f58d180b9753f5759e3b7c1b8bcc60325af5d894bc3c39.json b/rust/personhog-identity/.sqlx/query-3aac6d5cdf1022d2f26128adb426094d99225ade1c12dd882c6d3062d3ee6f60.jsonsimilarity index 62%rename from rust/personhog-identity/.sqlx/query-358ad441e0296658f0f58d180b9753f5759e3b7c1b8bcc60325af5d894bc3c39.jsonrename to rust/personhog-identity/.sqlx/query-3aac6d5cdf1022d2f26128adb426094d99225ade1c12dd882c6d3062d3ee6f60.jsonindex 6ec52802cacf..0ff89d874a1c 100644--- a/rust/personhog-identity/.sqlx/query-358ad441e0296658f0f58d180b9753f5759e3b7c1b8bcc60325af5d894bc3c39.json+++ b/rust/personhog-identity/.sqlx/query-3aac6d5cdf1022d2f26128adb426094d99225ade1c12dd882c6d3062d3ee6f60.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT person_id, person_uuid, ordinal as \"ordinal!\", sealed as \"sealed!\"\n FROM lifecycle_op_person\n WHERE op_id = $1 AND role = $2 AND status = $3\n ORDER BY ordinal\n ",+ "query": "/* service='personhog-identity', operation='merge_sealed_sources' */ \n SELECT person_id, person_uuid, ordinal as \"ordinal!\", sealed as \"sealed!\"\n FROM lifecycle_op_person\n WHERE op_id = $1 AND role = $2 AND status = $3\n ORDER BY ordinal\n ","describe": {"columns": [{@@ -38,5 +38,5 @@true]},- "hash": "358ad441e0296658f0f58d180b9753f5759e3b7c1b8bcc60325af5d894bc3c39"+ "hash": "3aac6d5cdf1022d2f26128adb426094d99225ade1c12dd882c6d3062d3ee6f60"}diff --git a/rust/personhog-identity/.sqlx/query-3d9bc04d09ce7b7feb3fd38bc2522b61ad8500c1eaebd55551b3b6fc3c51668d.json b/rust/personhog-identity/.sqlx/query-3d9bc04d09ce7b7feb3fd38bc2522b61ad8500c1eaebd55551b3b6fc3c51668d.jsondeleted file mode 100644index cffbd62767c2..000000000000--- a/rust/personhog-identity/.sqlx/query-3d9bc04d09ce7b7feb3fd38bc2522b61ad8500c1eaebd55551b3b6fc3c51668d.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person_tmp lop\n SET moved = u.moved\n FROM unnest($2::bigint[], $3::jsonb[]) AS u(person_id, moved)\n WHERE lop.op_id = $1 AND lop.person_id = u.person_id\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Int8Array",- "JsonbArray"- ]- },- "nullable": []- },- "hash": "3d9bc04d09ce7b7feb3fd38bc2522b61ad8500c1eaebd55551b3b6fc3c51668d"-}diff --git a/rust/personhog-identity/.sqlx/query-3ed92f32cd3520df4c1188aa58798273a971f2642499a2fe3e0e0bd13df66ece.json b/rust/personhog-identity/.sqlx/query-3ed92f32cd3520df4c1188aa58798273a971f2642499a2fe3e0e0bd13df66ece.jsonnew file mode 100644index 000000000000..d54856fb6d08--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-3ed92f32cd3520df4c1188aa58798273a971f2642499a2fe3e0e0bd13df66ece.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_unmark' */ 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": "3ed92f32cd3520df4c1188aa58798273a971f2642499a2fe3e0e0bd13df66ece"+}diff --git a/rust/personhog-identity/.sqlx/query-c17bc9977f44ae4790a0deb637076ec701a74f4b5f99a8d0476509226d930f96.json b/rust/personhog-identity/.sqlx/query-40fec37faa1478341406ebdd60193ba65ccf2ccf9d778ad288021744bb02aae7.jsonsimilarity index 62%rename from rust/personhog-identity/.sqlx/query-c17bc9977f44ae4790a0deb637076ec701a74f4b5f99a8d0476509226d930f96.jsonrename to rust/personhog-identity/.sqlx/query-40fec37faa1478341406ebdd60193ba65ccf2ccf9d778ad288021744bb02aae7.jsonindex 51d840fc22fc..9f6648bdf215 100644--- a/rust/personhog-identity/.sqlx/query-c17bc9977f44ae4790a0deb637076ec701a74f4b5f99a8d0476509226d930f96.json+++ b/rust/personhog-identity/.sqlx/query-40fec37faa1478341406ebdd60193ba65ccf2ccf9d778ad288021744bb02aae7.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "SELECT person_id, status FROM lifecycle_op_person WHERE op_id = $1",+ "query": "/* service='personhog-identity', operation='delete_outcome' */ SELECT person_id, status FROM lifecycle_op_person_tmp WHERE op_id = $1","describe": {"columns": [{@@ -24,5 +24,5 @@false]},- "hash": "c17bc9977f44ae4790a0deb637076ec701a74f4b5f99a8d0476509226d930f96"+ "hash": "40fec37faa1478341406ebdd60193ba65ccf2ccf9d778ad288021744bb02aae7"}diff --git a/rust/personhog-identity/.sqlx/query-41747a4030536c952037549c97eb304ab6f80c3e34946fb829ae31d605ffbb79.json b/rust/personhog-identity/.sqlx/query-41747a4030536c952037549c97eb304ab6f80c3e34946fb829ae31d605ffbb79.jsonnew file mode 100644index 000000000000..c3430315c439--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-41747a4030536c952037549c97eb304ab6f80c3e34946fb829ae31d605ffbb79.json@@ -0,0 +1,22 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='delete_unmap_victims' */ \n SELECT person_id FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND status = 'sealed'\n ",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "person_id",+ "type_info": "Int8"+ }+ ],+ "parameters": {+ "Left": [+ "Uuid"+ ]+ },+ "nullable": [+ false+ ]+ },+ "hash": "41747a4030536c952037549c97eb304ab6f80c3e34946fb829ae31d605ffbb79"+}diff --git a/rust/personhog-identity/.sqlx/query-3305b73a22a319b0f2ea02441e4778683d8cea5a8aa15142ff6329cb3a848a6d.json b/rust/personhog-identity/.sqlx/query-42279bec6c125039305d4178d92d6e91aba71ccc21b32be2cabe50c0625455ad.jsonsimilarity index 72%rename from rust/personhog-identity/.sqlx/query-3305b73a22a319b0f2ea02441e4778683d8cea5a8aa15142ff6329cb3a848a6d.jsonrename to rust/personhog-identity/.sqlx/query-42279bec6c125039305d4178d92d6e91aba71ccc21b32be2cabe50c0625455ad.jsonindex f81504ccecaa..51c239047697 100644--- a/rust/personhog-identity/.sqlx/query-3305b73a22a319b0f2ea02441e4778683d8cea5a8aa15142ff6329cb3a848a6d.json+++ b/rust/personhog-identity/.sqlx/query-42279bec6c125039305d4178d92d6e91aba71ccc21b32be2cabe50c0625455ad.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.mark_active\n ",+ "query": "/* service='personhog-identity', operation='delete_seal' */ \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": "3305b73a22a319b0f2ea02441e4778683d8cea5a8aa15142ff6329cb3a848a6d"+ "hash": "42279bec6c125039305d4178d92d6e91aba71ccc21b32be2cabe50c0625455ad"}diff --git a/rust/personhog-identity/.sqlx/query-7a6d44a6e1ea0c2f6da0ce42b8077946a128fd64c4a8751b59cbb26062dc0809.json b/rust/personhog-identity/.sqlx/query-431cf00171afa60e5c7448c745c52bdaced9f495ddce68449e04ea56431343d4.jsonsimilarity index 62%rename from rust/personhog-identity/.sqlx/query-7a6d44a6e1ea0c2f6da0ce42b8077946a128fd64c4a8751b59cbb26062dc0809.jsonrename to rust/personhog-identity/.sqlx/query-431cf00171afa60e5c7448c745c52bdaced9f495ddce68449e04ea56431343d4.jsonindex 6e480d38cdf0..25e641e897cf 100644--- a/rust/personhog-identity/.sqlx/query-7a6d44a6e1ea0c2f6da0ce42b8077946a128fd64c4a8751b59cbb26062dc0809.json+++ b/rust/personhog-identity/.sqlx/query-431cf00171afa60e5c7448c745c52bdaced9f495ddce68449e04ea56431343d4.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT person_id, person_uuid, ordinal as \"ordinal!\", sealed as \"sealed!\"\n FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND role = $2 AND status = $3\n ORDER BY ordinal\n ",+ "query": "/* service='personhog-identity', operation='merge_sealed_sources' */ \n SELECT person_id, person_uuid, ordinal as \"ordinal!\", sealed as \"sealed!\"\n FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND role = $2 AND status = $3\n ORDER BY ordinal\n ","describe": {"columns": [{@@ -38,5 +38,5 @@true]},- "hash": "7a6d44a6e1ea0c2f6da0ce42b8077946a128fd64c4a8751b59cbb26062dc0809"+ "hash": "431cf00171afa60e5c7448c745c52bdaced9f495ddce68449e04ea56431343d4"}diff --git a/rust/personhog-identity/.sqlx/query-43aad46e2173968b635c5a3b31e3accfc8ed461054bf89f2f5baad93e8c69e48.json b/rust/personhog-identity/.sqlx/query-43aad46e2173968b635c5a3b31e3accfc8ed461054bf89f2f5baad93e8c69e48.jsonnew file mode 100644index 000000000000..4f993ca4e62b--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-43aad46e2173968b635c5a3b31e3accfc8ed461054bf89f2f5baad93e8c69e48.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_abort_marks' */ \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": {+ "Left": [+ "Uuid",+ "Text",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "43aad46e2173968b635c5a3b31e3accfc8ed461054bf89f2f5baad93e8c69e48"+}diff --git a/rust/personhog-identity/.sqlx/query-45c402233ab33f49bff19a95ee3af20fea952aab54db011e8d85101d572d1f23.json b/rust/personhog-identity/.sqlx/query-45c402233ab33f49bff19a95ee3af20fea952aab54db011e8d85101d572d1f23.jsonnew file mode 100644index 000000000000..54af629c09b8--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-45c402233ab33f49bff19a95ee3af20fea952aab54db011e8d85101d572d1f23.json@@ -0,0 +1,22 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='delete_seal_victims' */ \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": [+ {+ "ordinal": 0,+ "name": "person_id",+ "type_info": "Int8"+ }+ ],+ "parameters": {+ "Left": [+ "Uuid"+ ]+ },+ "nullable": [+ false+ ]+ },+ "hash": "45c402233ab33f49bff19a95ee3af20fea952aab54db011e8d85101d572d1f23"+}diff --git a/rust/personhog-identity/.sqlx/query-46544d4ca5cae8b992970ec52d36dad56f3ab5f7e29cd229c59994d0c367d9c7.json b/rust/personhog-identity/.sqlx/query-46544d4ca5cae8b992970ec52d36dad56f3ab5f7e29cd229c59994d0c367d9c7.jsonnew file mode 100644index 000000000000..e5f4be29b23d--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-46544d4ca5cae8b992970ec52d36dad56f3ab5f7e29cd229c59994d0c367d9c7.json@@ -0,0 +1,18 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='delete_seal' */ \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": {+ "Left": [+ "Uuid",+ "Text",+ "Int8Array",+ "Int8Array",+ "Int8Array"+ ]+ },+ "nullable": []+ },+ "hash": "46544d4ca5cae8b992970ec52d36dad56f3ab5f7e29cd229c59994d0c367d9c7"+}diff --git a/rust/personhog-identity/.sqlx/query-d5f075f020ee0cbf9110c35ad78cfdd0dc7d1da6a643e83518f79206cb29932a.json b/rust/personhog-identity/.sqlx/query-48e61b9f4f038a5bf56ea5bb795629eb7ee7fd840a12b44329e36b31cc9c0ab9.jsonsimilarity index 55%rename from rust/personhog-identity/.sqlx/query-d5f075f020ee0cbf9110c35ad78cfdd0dc7d1da6a643e83518f79206cb29932a.jsonrename to rust/personhog-identity/.sqlx/query-48e61b9f4f038a5bf56ea5bb795629eb7ee7fd840a12b44329e36b31cc9c0ab9.jsonindex 0a2b7a5ea6c1..496371406a37 100644--- a/rust/personhog-identity/.sqlx/query-d5f075f020ee0cbf9110c35ad78cfdd0dc7d1da6a643e83518f79206cb29932a.json+++ b/rust/personhog-identity/.sqlx/query-48e61b9f4f038a5bf56ea5bb795629eb7ee7fd840a12b44329e36b31cc9c0ab9.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "SELECT moved FROM lifecycle_op_person WHERE op_id = $1 AND role = $2",+ "query": "/* service='personhog-identity', operation='merge_load_claim_record' */ SELECT moved FROM lifecycle_op_person WHERE op_id = $1 AND role = $2","describe": {"columns": [{@@ -19,5 +19,5 @@true]},- "hash": "d5f075f020ee0cbf9110c35ad78cfdd0dc7d1da6a643e83518f79206cb29932a"+ "hash": "48e61b9f4f038a5bf56ea5bb795629eb7ee7fd840a12b44329e36b31cc9c0ab9"}diff --git a/rust/personhog-identity/.sqlx/query-5121f35d8db57bf3fe0c0e9bba74ea0a5293dabb718e54d380c9b8053396d182.json b/rust/personhog-identity/.sqlx/query-4a69e645ef6fe4dd9bc78aa5265d57bd9b5f7b7d0c8bc80e591a6f6cabc6e7f1.jsonsimilarity index 52%rename from rust/personhog-identity/.sqlx/query-5121f35d8db57bf3fe0c0e9bba74ea0a5293dabb718e54d380c9b8053396d182.jsonrename to rust/personhog-identity/.sqlx/query-4a69e645ef6fe4dd9bc78aa5265d57bd9b5f7b7d0c8bc80e591a6f6cabc6e7f1.jsonindex ba9364f3d85b..fe4f4cd36f7a 100644--- a/rust/personhog-identity/.sqlx/query-5121f35d8db57bf3fe0c0e9bba74ea0a5293dabb718e54d380c9b8053396d182.json+++ b/rust/personhog-identity/.sqlx/query-4a69e645ef6fe4dd9bc78aa5265d57bd9b5f7b7d0c8bc80e591a6f6cabc6e7f1.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT person_id FROM lifecycle_op_person\n WHERE op_id = $1 AND role = $2 AND status = $3\n ",+ "query": "/* service='personhog-identity', operation='merge_flip_sources' */ \n SELECT person_id FROM lifecycle_op_person\n WHERE op_id = $1 AND role = $2 AND status = $3\n ","describe": {"columns": [{@@ -20,5 +20,5 @@false]},- "hash": "5121f35d8db57bf3fe0c0e9bba74ea0a5293dabb718e54d380c9b8053396d182"+ "hash": "4a69e645ef6fe4dd9bc78aa5265d57bd9b5f7b7d0c8bc80e591a6f6cabc6e7f1"}diff --git a/rust/personhog-identity/.sqlx/query-4e3c9c62013c50b65d37f023397364dda2f63c9db2c031a6f3e2b77bb9b62e9f.json b/rust/personhog-identity/.sqlx/query-4e3c9c62013c50b65d37f023397364dda2f63c9db2c031a6f3e2b77bb9b62e9f.jsonnew file mode 100644index 000000000000..de8414ee6f9d--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-4e3c9c62013c50b65d37f023397364dda2f63c9db2c031a6f3e2b77bb9b62e9f.json@@ -0,0 +1,15 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='delete_seal_drop_vanished' */ \n DELETE FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND person_id = ANY($2) AND mark_active\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Int8Array"+ ]+ },+ "nullable": []+ },+ "hash": "4e3c9c62013c50b65d37f023397364dda2f63c9db2c031a6f3e2b77bb9b62e9f"+}diff --git a/rust/personhog-identity/.sqlx/query-4f05a26794c3c6f2239f59a351655d29c270d739c8373bd7de9dd0581a248585.json b/rust/personhog-identity/.sqlx/query-4f05a26794c3c6f2239f59a351655d29c270d739c8373bd7de9dd0581a248585.jsonnew file mode 100644index 000000000000..41715beb2854--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-4f05a26794c3c6f2239f59a351655d29c270d739c8373bd7de9dd0581a248585.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_record_moved_mappings' */ \n UPDATE lifecycle_op_person lop\n SET moved = u.moved\n FROM unnest($2::bigint[], $3::jsonb[]) AS u(person_id, moved)\n WHERE lop.op_id = $1 AND lop.person_id = u.person_id\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Int8Array",+ "JsonbArray"+ ]+ },+ "nullable": []+ },+ "hash": "4f05a26794c3c6f2239f59a351655d29c270d739c8373bd7de9dd0581a248585"+}diff --git a/rust/personhog-identity/.sqlx/query-c6930abebbc067b91d8a32bd42345980966f7d690949a1825f8a1e6fcaa93b12.json b/rust/personhog-identity/.sqlx/query-5163fe53c08dbd8a93960bcd2579b5a5748167cc5b8c7d71ec71faaea38b0e59.jsonsimilarity index 55%rename from rust/personhog-identity/.sqlx/query-c6930abebbc067b91d8a32bd42345980966f7d690949a1825f8a1e6fcaa93b12.jsonrename to rust/personhog-identity/.sqlx/query-5163fe53c08dbd8a93960bcd2579b5a5748167cc5b8c7d71ec71faaea38b0e59.jsonindex d439deddb7ed..17ed5b730cf9 100644--- a/rust/personhog-identity/.sqlx/query-c6930abebbc067b91d8a32bd42345980966f7d690949a1825f8a1e6fcaa93b12.json+++ b/rust/personhog-identity/.sqlx/query-5163fe53c08dbd8a93960bcd2579b5a5748167cc5b8c7d71ec71faaea38b0e59.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "SELECT person_id FROM lifecycle_op_person_tmp WHERE op_id = $1",+ "query": "/* service='personhog-identity', operation='delete_mark_existing' */ SELECT person_id FROM lifecycle_op_person WHERE op_id = $1","describe": {"columns": [{@@ -18,5 +18,5 @@false]},- "hash": "c6930abebbc067b91d8a32bd42345980966f7d690949a1825f8a1e6fcaa93b12"+ "hash": "5163fe53c08dbd8a93960bcd2579b5a5748167cc5b8c7d71ec71faaea38b0e59"}diff --git a/rust/personhog-identity/.sqlx/query-5358edf9ca67bc42fb9692da3c73af78562e8de0e90709aad4934cdb88c8e6f3.json b/rust/personhog-identity/.sqlx/query-5358edf9ca67bc42fb9692da3c73af78562e8de0e90709aad4934cdb88c8e6f3.jsondeleted file mode 100644index 27c4a5ec6a7f..000000000000--- a/rust/personhog-identity/.sqlx/query-5358edf9ca67bc42fb9692da3c73af78562e8de0e90709aad4934cdb88c8e6f3.json+++ /dev/null@@ -1,14 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "DELETE FROM posthog_cohortpeople WHERE person_id = ANY($1)",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Int8Array"- ]- },- "nullable": []- },- "hash": "5358edf9ca67bc42fb9692da3c73af78562e8de0e90709aad4934cdb88c8e6f3"-}diff --git a/rust/personhog-identity/.sqlx/query-54ae5835e6160a73187bcb859a895cebda5b92e2266a6af8d03913848410cc70.json b/rust/personhog-identity/.sqlx/query-54ae5835e6160a73187bcb859a895cebda5b92e2266a6af8d03913848410cc70.jsonnew file mode 100644index 000000000000..6460a82fafc9--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-54ae5835e6160a73187bcb859a895cebda5b92e2266a6af8d03913848410cc70.json@@ -0,0 +1,28 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_claim_mark' */ \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": [+ {+ "ordinal": 0,+ "name": "person_id",+ "type_info": "Int8"+ }+ ],+ "parameters": {+ "Left": [+ "Uuid",+ "Int4",+ "Int8Array",+ "UuidArray",+ "TextArray",+ "Text",+ "Int4Array"+ ]+ },+ "nullable": [+ false+ ]+ },+ "hash": "54ae5835e6160a73187bcb859a895cebda5b92e2266a6af8d03913848410cc70"+}diff --git a/rust/personhog-identity/.sqlx/query-ef3b40cf647bda64a199a2496280cdc4560ecb69953a6a66cd8e64b773512b9f.json b/rust/personhog-identity/.sqlx/query-55e63de95e8529b4730172649355c145042c65db9a3447b814dee6bf0cfb9166.jsonsimilarity index 55%rename from rust/personhog-identity/.sqlx/query-ef3b40cf647bda64a199a2496280cdc4560ecb69953a6a66cd8e64b773512b9f.jsonrename to rust/personhog-identity/.sqlx/query-55e63de95e8529b4730172649355c145042c65db9a3447b814dee6bf0cfb9166.jsonindex 031c702f7e82..52ae9cd31833 100644--- a/rust/personhog-identity/.sqlx/query-ef3b40cf647bda64a199a2496280cdc4560ecb69953a6a66cd8e64b773512b9f.json+++ b/rust/personhog-identity/.sqlx/query-55e63de95e8529b4730172649355c145042c65db9a3447b814dee6bf0cfb9166.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "SELECT sealed FROM lifecycle_op_person WHERE op_id = $1 AND role = $2",+ "query": "/* service='personhog-identity', operation='merge_outcome_sealed' */ SELECT sealed FROM lifecycle_op_person WHERE op_id = $1 AND role = $2","describe": {"columns": [{@@ -19,5 +19,5 @@true]},- "hash": "ef3b40cf647bda64a199a2496280cdc4560ecb69953a6a66cd8e64b773512b9f"+ "hash": "55e63de95e8529b4730172649355c145042c65db9a3447b814dee6bf0cfb9166"}diff --git a/rust/personhog-identity/.sqlx/query-5d37082df24b4f99dc26e5ebe5d10baaf89fbb079f48ce6d2fc7890e1088a905.json b/rust/personhog-identity/.sqlx/query-5d37082df24b4f99dc26e5ebe5d10baaf89fbb079f48ce6d2fc7890e1088a905.jsondeleted file mode 100644index 4ccb0e40b250..000000000000--- a/rust/personhog-identity/.sqlx/query-5d37082df24b4f99dc26e5ebe5d10baaf89fbb079f48ce6d2fc7890e1088a905.json+++ /dev/null@@ -1,20 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "SELECT count(*) AS \"count!\" FROM lifecycle_op WHERE completed_at IS NULL AND parked_at IS NOT NULL",- "describe": {- "columns": [- {- "ordinal": 0,- "name": "count!",- "type_info": "Int8"- }- ],- "parameters": {- "Left": []- },- "nullable": [- null- ]- },- "hash": "5d37082df24b4f99dc26e5ebe5d10baaf89fbb079f48ce6d2fc7890e1088a905"-}diff --git a/rust/personhog-identity/.sqlx/query-60053b14842e9bf4e3c9b7288f643db11f563d4526f687c7059e6bf16c021dfc.json b/rust/personhog-identity/.sqlx/query-60053b14842e9bf4e3c9b7288f643db11f563d4526f687c7059e6bf16c021dfc.jsonnew file mode 100644index 000000000000..79f2f094473b--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-60053b14842e9bf4e3c9b7288f643db11f563d4526f687c7059e6bf16c021dfc.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_abort_marks' */ \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": {+ "Left": [+ "Uuid",+ "Text",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "60053b14842e9bf4e3c9b7288f643db11f563d4526f687c7059e6bf16c021dfc"+}diff --git a/rust/personhog-identity/.sqlx/query-38561c01028859a64ff36b334b57f7b7dbf0724e2d31805cd63d067ae81f50e8.json b/rust/personhog-identity/.sqlx/query-626a145ec90a44835ecf01707dcf5875919cf63b1c6f80f044a370901d91c7cc.jsonsimilarity index 52%rename from rust/personhog-identity/.sqlx/query-38561c01028859a64ff36b334b57f7b7dbf0724e2d31805cd63d067ae81f50e8.jsonrename to rust/personhog-identity/.sqlx/query-626a145ec90a44835ecf01707dcf5875919cf63b1c6f80f044a370901d91c7cc.jsonindex c991ab6e170b..2ad3225142b4 100644--- a/rust/personhog-identity/.sqlx/query-38561c01028859a64ff36b334b57f7b7dbf0724e2d31805cd63d067ae81f50e8.json+++ b/rust/personhog-identity/.sqlx/query-626a145ec90a44835ecf01707dcf5875919cf63b1c6f80f044a370901d91c7cc.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op_person_tmp SET status = $2, mark_active = false WHERE op_id = $1 AND status = 'sealed'",+ "query": "/* service='personhog-identity', operation='delete_complete' */ UPDATE lifecycle_op_person_tmp SET status = $2, mark_active = false WHERE op_id = $1 AND status = 'sealed'","describe": {"columns": [],"parameters": {@@ -11,5 +11,5 @@},"nullable": []},- "hash": "38561c01028859a64ff36b334b57f7b7dbf0724e2d31805cd63d067ae81f50e8"+ "hash": "626a145ec90a44835ecf01707dcf5875919cf63b1c6f80f044a370901d91c7cc"}diff --git a/rust/personhog-identity/.sqlx/query-62b8ad4f14755c4d530156d810eb076aaff21445f0676b8a2d901d41b23a4a40.json b/rust/personhog-identity/.sqlx/query-62b8ad4f14755c4d530156d810eb076aaff21445f0676b8a2d901d41b23a4a40.jsonnew file mode 100644index 000000000000..77205a6ee9dc--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-62b8ad4f14755c4d530156d810eb076aaff21445f0676b8a2d901d41b23a4a40.json@@ -0,0 +1,18 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='delete_mark_conflicts' */ \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 (op_id, person_id) DO NOTHING\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Int4",+ "Int8Array",+ "UuidArray",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "62b8ad4f14755c4d530156d810eb076aaff21445f0676b8a2d901d41b23a4a40"+}diff --git a/rust/personhog-identity/.sqlx/query-62e4cad720796efa7b7a3549604edfe22ddb937259ce4b84075edec522c717c8.json b/rust/personhog-identity/.sqlx/query-62e4cad720796efa7b7a3549604edfe22ddb937259ce4b84075edec522c717c8.jsondeleted file mode 100644index b1460a2ede0e..000000000000--- a/rust/personhog-identity/.sqlx/query-62e4cad720796efa7b7a3549604edfe22ddb937259ce4b84075edec522c717c8.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person_tmp lop\n SET moved = u.moved\n FROM unnest($2::bigint[], $3::jsonb[]) AS u(person_id, moved)\n WHERE lop.op_id = $1 AND lop.person_id = u.person_id\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Int8Array",- "JsonbArray"- ]- },- "nullable": []- },- "hash": "62e4cad720796efa7b7a3549604edfe22ddb937259ce4b84075edec522c717c8"-}diff --git a/rust/personhog-identity/.sqlx/query-63aa22b837ff5f79d49811215c781ba8d6947659cbd7d20bb91dc2e998007597.json b/rust/personhog-identity/.sqlx/query-63aa22b837ff5f79d49811215c781ba8d6947659cbd7d20bb91dc2e998007597.jsondeleted file mode 100644index ec59310370aa..000000000000--- a/rust/personhog-identity/.sqlx/query-63aa22b837ff5f79d49811215c781ba8d6947659cbd7d20bb91dc2e998007597.json+++ /dev/null@@ -1,29 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n SELECT op_id, op_type\n FROM lifecycle_op_tmp\n WHERE completed_at IS NULL\n AND parked_at IS NULL\n AND ((lease_expires_at IS NULL AND created_at < now() - make_interval(secs => $1))\n OR lease_expires_at < now())\n ORDER BY created_at\n LIMIT $2\n ",- "describe": {- "columns": [- {- "ordinal": 0,- "name": "op_id",- "type_info": "Uuid"- },- {- "ordinal": 1,- "name": "op_type",- "type_info": "Text"- }- ],- "parameters": {- "Left": [- "Float8",- "Int8"- ]- },- "nullable": [- false,- false- ]- },- "hash": "63aa22b837ff5f79d49811215c781ba8d6947659cbd7d20bb91dc2e998007597"-}diff --git a/rust/personhog-identity/.sqlx/query-63cc7113e122f98c5408aa855f10a9cad31fb8a761dbdb8ff449aa84734fd7d2.json b/rust/personhog-identity/.sqlx/query-63cc7113e122f98c5408aa855f10a9cad31fb8a761dbdb8ff449aa84734fd7d2.jsondeleted file mode 100644index 3d80ed75b619..000000000000--- a/rust/personhog-identity/.sqlx/query-63cc7113e122f98c5408aa855f10a9cad31fb8a761dbdb8ff449aa84734fd7d2.json+++ /dev/null@@ -1,24 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op\n SET lease_expires_at = now() + make_interval(secs => $2),\n attempt = attempt + 1,\n parked_at = NULL,\n parked_reason = NULL\n WHERE op_id IN (\n SELECT op_id FROM lifecycle_op\n WHERE op_id = $1 AND completed_at IS NULL\n AND (lease_expires_at IS NULL OR lease_expires_at < now())\n AND (parked_at IS NULL OR $3)\n FOR UPDATE SKIP LOCKED\n )\n RETURNING attempt\n ",- "describe": {- "columns": [- {- "ordinal": 0,- "name": "attempt",- "type_info": "Int4"- }- ],- "parameters": {- "Left": [- "Uuid",- "Float8",- "Bool"- ]- },- "nullable": [- false- ]- },- "hash": "63cc7113e122f98c5408aa855f10a9cad31fb8a761dbdb8ff449aa84734fd7d2"-}diff --git a/rust/personhog-identity/.sqlx/query-b67ee4c93677a7c1ebc77814acba6ad51cd1a09ccbfe469af2ae1f3ffc19549a.json b/rust/personhog-identity/.sqlx/query-64db9ad5d0ed85d34200223378f9734acfb74987cdf38c0fa015e80a6b0633ce.jsonsimilarity index 61%rename from rust/personhog-identity/.sqlx/query-b67ee4c93677a7c1ebc77814acba6ad51cd1a09ccbfe469af2ae1f3ffc19549a.jsonrename to rust/personhog-identity/.sqlx/query-64db9ad5d0ed85d34200223378f9734acfb74987cdf38c0fa015e80a6b0633ce.jsonindex f690248d2ae9..897b3b15734c 100644--- a/rust/personhog-identity/.sqlx/query-b67ee4c93677a7c1ebc77814acba6ad51cd1a09ccbfe469af2ae1f3ffc19549a.json+++ b/rust/personhog-identity/.sqlx/query-64db9ad5d0ed85d34200223378f9734acfb74987cdf38c0fa015e80a6b0633ce.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "SELECT person_id, status FROM lifecycle_op_person WHERE op_id = $1 AND role = $2",+ "query": "/* service='personhog-identity', operation='merge_outcome_statuses' */ SELECT person_id, status FROM lifecycle_op_person WHERE op_id = $1 AND role = $2","describe": {"columns": [{@@ -25,5 +25,5 @@false]},- "hash": "b67ee4c93677a7c1ebc77814acba6ad51cd1a09ccbfe469af2ae1f3ffc19549a"+ "hash": "64db9ad5d0ed85d34200223378f9734acfb74987cdf38c0fa015e80a6b0633ce"}diff --git a/rust/personhog-identity/.sqlx/query-43ffcbbecab243f07c49c6c8c6648f2e4d78e9804e1de5ac4f36bf263f545689.json b/rust/personhog-identity/.sqlx/query-677b1346b493cac714317f3b9c975841157cd79c43335203db7ba15a6b8e2be8.jsonsimilarity index 55%rename from rust/personhog-identity/.sqlx/query-43ffcbbecab243f07c49c6c8c6648f2e4d78e9804e1de5ac4f36bf263f545689.jsonrename to rust/personhog-identity/.sqlx/query-677b1346b493cac714317f3b9c975841157cd79c43335203db7ba15a6b8e2be8.jsonindex da54f0741b30..9c3e02d4b520 100644--- a/rust/personhog-identity/.sqlx/query-43ffcbbecab243f07c49c6c8c6648f2e4d78e9804e1de5ac4f36bf263f545689.json+++ b/rust/personhog-identity/.sqlx/query-677b1346b493cac714317f3b9c975841157cd79c43335203db7ba15a6b8e2be8.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "SELECT person_id FROM lifecycle_op_person WHERE op_id = $1 AND role = $2",+ "query": "/* service='personhog-identity', operation='merge_flip_target' */ SELECT person_id FROM lifecycle_op_person_tmp WHERE op_id = $1 AND role = $2","describe": {"columns": [{@@ -19,5 +19,5 @@false]},- "hash": "43ffcbbecab243f07c49c6c8c6648f2e4d78e9804e1de5ac4f36bf263f545689"+ "hash": "677b1346b493cac714317f3b9c975841157cd79c43335203db7ba15a6b8e2be8"}diff --git a/rust/personhog-identity/.sqlx/query-69a0347566d3d27e18843accb1aab747f89e86c85eaa011e5c8d1e9aa415370d.json b/rust/personhog-identity/.sqlx/query-69a0347566d3d27e18843accb1aab747f89e86c85eaa011e5c8d1e9aa415370d.jsonnew file mode 100644index 000000000000..f079abf719df--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-69a0347566d3d27e18843accb1aab747f89e86c85eaa011e5c8d1e9aa415370d.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_clear_target_mark' */ 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": "69a0347566d3d27e18843accb1aab747f89e86c85eaa011e5c8d1e9aa415370d"+}diff --git a/rust/personhog-identity/.sqlx/query-69fb2a1f74603a103f6809ce15c80e7256c7d796a29ab5ccbcdf1a9160073b09.json b/rust/personhog-identity/.sqlx/query-69fb2a1f74603a103f6809ce15c80e7256c7d796a29ab5ccbcdf1a9160073b09.jsonnew file mode 100644index 000000000000..4db2c678a1be--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-69fb2a1f74603a103f6809ce15c80e7256c7d796a29ab5ccbcdf1a9160073b09.json@@ -0,0 +1,17 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_claim_drop_pending' */ \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": {+ "Left": [+ "Uuid",+ "Text",+ "Int8Array",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "69fb2a1f74603a103f6809ce15c80e7256c7d796a29ab5ccbcdf1a9160073b09"+}diff --git a/rust/personhog-identity/.sqlx/query-6a9186ef8fa50c5169882a2030235bde29c74654892cca574f3983de10b7401f.json b/rust/personhog-identity/.sqlx/query-6a9186ef8fa50c5169882a2030235bde29c74654892cca574f3983de10b7401f.jsondeleted file mode 100644index 64cb1a84f7d1..000000000000--- a/rust/personhog-identity/.sqlx/query-6a9186ef8fa50c5169882a2030235bde29c74654892cca574f3983de10b7401f.json+++ /dev/null@@ -1,17 +0,0 @@-{- "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.mark_active\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Int8Array",- "JsonbArray",- "Text"- ]- },- "nullable": []- },- "hash": "6a9186ef8fa50c5169882a2030235bde29c74654892cca574f3983de10b7401f"-}diff --git a/rust/personhog-identity/.sqlx/query-6b7d28bf1b0cee4bf6545649333c6c6d0099204ae7ae86eb99985bc4b0443ee5.json b/rust/personhog-identity/.sqlx/query-6b7d28bf1b0cee4bf6545649333c6c6d0099204ae7ae86eb99985bc4b0443ee5.jsonnew file mode 100644index 000000000000..5b4804ba1ccb--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-6b7d28bf1b0cee4bf6545649333c6c6d0099204ae7ae86eb99985bc4b0443ee5.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_write_claim_record' */ UPDATE lifecycle_op_person SET moved = $2 WHERE op_id = $1 AND role = $3",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Jsonb",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "6b7d28bf1b0cee4bf6545649333c6c6d0099204ae7ae86eb99985bc4b0443ee5"+}diff --git a/rust/personhog-identity/.sqlx/query-6cc77f114a2d7432de4d6aa4b39c3066aeacf159d123a7b679b754708328b15a.json b/rust/personhog-identity/.sqlx/query-6cc77f114a2d7432de4d6aa4b39c3066aeacf159d123a7b679b754708328b15a.jsondeleted file mode 100644index c94c3688640b..000000000000--- a/rust/personhog-identity/.sqlx/query-6cc77f114a2d7432de4d6aa4b39c3066aeacf159d123a7b679b754708328b15a.json+++ /dev/null@@ -1,15 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op_tmp SET lease_expires_at = NULL WHERE op_id = $1 AND completed_at IS NULL AND attempt = $2",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Int4"- ]- },- "nullable": []- },- "hash": "6cc77f114a2d7432de4d6aa4b39c3066aeacf159d123a7b679b754708328b15a"-}diff --git a/rust/personhog-identity/.sqlx/query-26d83ce65bccd87ce92d585722cd7912eb6f735368db2f5bd8159decc7b2d748.json b/rust/personhog-identity/.sqlx/query-6cdb1f090edba1fda09eeb288ea1734fce0c8596784c8fb2115c94d6b2727779.jsonsimilarity index 69%rename from rust/personhog-identity/.sqlx/query-26d83ce65bccd87ce92d585722cd7912eb6f735368db2f5bd8159decc7b2d748.jsonrename to rust/personhog-identity/.sqlx/query-6cdb1f090edba1fda09eeb288ea1734fce0c8596784c8fb2115c94d6b2727779.jsonindex 9c9be1dc3c00..39a5711cfc24 100644--- a/rust/personhog-identity/.sqlx/query-26d83ce65bccd87ce92d585722cd7912eb6f735368db2f5bd8159decc7b2d748.json+++ b/rust/personhog-identity/.sqlx/query-6cdb1f090edba1fda09eeb288ea1734fce0c8596784c8fb2115c94d6b2727779.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT op_id, op_type, team_id::bigint as \"team_id!\", step, attempt,\n request as \"request: Value\", outcome as \"outcome: Value\",\n created_at, completed_at,\n (lease_expires_at IS NOT NULL AND lease_expires_at >= now())\n as \"lease_live!\"\n FROM lifecycle_op_tmp\n WHERE op_id = $1\n ",+ "query": "/* service='personhog-identity', operation='op_load' */ \n SELECT op_id, op_type, team_id::bigint as \"team_id!\", step, attempt,\n request as \"request: Value\", outcome as \"outcome: Value\",\n created_at, completed_at,\n (lease_expires_at IS NOT NULL AND lease_expires_at >= now())\n as \"lease_live!\"\n FROM lifecycle_op\n WHERE op_id = $1\n ","describe": {"columns": [{@@ -72,5 +72,5 @@null]},- "hash": "26d83ce65bccd87ce92d585722cd7912eb6f735368db2f5bd8159decc7b2d748"+ "hash": "6cdb1f090edba1fda09eeb288ea1734fce0c8596784c8fb2115c94d6b2727779"}diff --git a/rust/personhog-identity/.sqlx/query-c2e20449f187ceee08cb8e99dca2e4f34af9116d2f090175f7a82b11f849d4a2.json b/rust/personhog-identity/.sqlx/query-6dc0491f3d7a11163e8bd7f85042a00a0908e3cf4c007ef7ce7d9212bf98d92b.jsonsimilarity index 61%rename from rust/personhog-identity/.sqlx/query-c2e20449f187ceee08cb8e99dca2e4f34af9116d2f090175f7a82b11f849d4a2.jsonrename to rust/personhog-identity/.sqlx/query-6dc0491f3d7a11163e8bd7f85042a00a0908e3cf4c007ef7ce7d9212bf98d92b.jsonindex ed754226514c..e5a2d46df0f0 100644--- a/rust/personhog-identity/.sqlx/query-c2e20449f187ceee08cb8e99dca2e4f34af9116d2f090175f7a82b11f849d4a2.json+++ b/rust/personhog-identity/.sqlx/query-6dc0491f3d7a11163e8bd7f85042a00a0908e3cf4c007ef7ce7d9212bf98d92b.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 mark_active\n ",+ "query": "/* service='personhog-identity', operation='merge_target_row' */ SELECT person_id, person_uuid FROM lifecycle_op_person_tmp WHERE op_id = $1 AND role = $2","describe": {"columns": [{@@ -25,5 +25,5 @@false]},- "hash": "c2e20449f187ceee08cb8e99dca2e4f34af9116d2f090175f7a82b11f849d4a2"+ "hash": "6dc0491f3d7a11163e8bd7f85042a00a0908e3cf4c007ef7ce7d9212bf98d92b"}diff --git a/rust/personhog-identity/.sqlx/query-6e26f63eeb15d8f8ba7c124a5ef93948fba9fff8d070a96a7e17adddf49825dd.json b/rust/personhog-identity/.sqlx/query-6e26f63eeb15d8f8ba7c124a5ef93948fba9fff8d070a96a7e17adddf49825dd.jsondeleted file mode 100644index d6c9fa258835..000000000000--- a/rust/personhog-identity/.sqlx/query-6e26f63eeb15d8f8ba7c124a5ef93948fba9fff8d070a96a7e17adddf49825dd.json+++ /dev/null@@ -1,18 +0,0 @@-{- "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 (op_id, person_id) DO NOTHING\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Int4",- "Int8Array",- "UuidArray",- "Text"- ]- },- "nullable": []- },- "hash": "6e26f63eeb15d8f8ba7c124a5ef93948fba9fff8d070a96a7e17adddf49825dd"-}diff --git a/rust/personhog-identity/.sqlx/query-6eeea11d4e0f152e3035373d6ef11786c433cd83493e25daad40c2bc0a441971.json b/rust/personhog-identity/.sqlx/query-6eeea11d4e0f152e3035373d6ef11786c433cd83493e25daad40c2bc0a441971.jsonnew file mode 100644index 000000000000..d0e59907abea--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-6eeea11d4e0f152e3035373d6ef11786c433cd83493e25daad40c2bc0a441971.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_renew_lease' */ \n UPDATE lifecycle_op\n SET lease_expires_at = now() + make_interval(secs => $2)\n WHERE op_id = $1 AND completed_at IS NULL AND attempt = $3\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Float8",+ "Int4"+ ]+ },+ "nullable": []+ },+ "hash": "6eeea11d4e0f152e3035373d6ef11786c433cd83493e25daad40c2bc0a441971"+}diff --git a/rust/personhog-identity/.sqlx/query-6ff46c9c3d1a688fc569cee674ded4a39aee6b9423579d498bd8e1dfe3f6f8d9.json b/rust/personhog-identity/.sqlx/query-6ff46c9c3d1a688fc569cee674ded4a39aee6b9423579d498bd8e1dfe3f6f8d9.jsondeleted file mode 100644index 957c8aacae2e..000000000000--- a/rust/personhog-identity/.sqlx/query-6ff46c9c3d1a688fc569cee674ded4a39aee6b9423579d498bd8e1dfe3f6f8d9.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op_person SET status = $2, mark_active = false WHERE op_id = $1 AND status = $3",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Text",- "Text"- ]- },- "nullable": []- },- "hash": "6ff46c9c3d1a688fc569cee674ded4a39aee6b9423579d498bd8e1dfe3f6f8d9"-}diff --git a/rust/personhog-identity/.sqlx/query-d72b3ff8a3a8e26fdf5468df52e23c8011d97a31dd867f7f8ae2f79803564135.json b/rust/personhog-identity/.sqlx/query-7148a208d36485226fbc898d83a2e08351452bb7d6e464a026255293b0dd226b.jsonsimilarity index 63%rename from rust/personhog-identity/.sqlx/query-d72b3ff8a3a8e26fdf5468df52e23c8011d97a31dd867f7f8ae2f79803564135.jsonrename to rust/personhog-identity/.sqlx/query-7148a208d36485226fbc898d83a2e08351452bb7d6e464a026255293b0dd226b.jsonindex a29a5620dd82..538074e58a6c 100644--- a/rust/personhog-identity/.sqlx/query-d72b3ff8a3a8e26fdf5468df52e23c8011d97a31dd867f7f8ae2f79803564135.json+++ b/rust/personhog-identity/.sqlx/query-7148a208d36485226fbc898d83a2e08351452bb7d6e464a026255293b0dd226b.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n INSERT INTO lifecycle_op_tmp (op_id, op_type, team_id, step, request)\n VALUES ($1, $2, $3, $4, $5)\n ON CONFLICT (op_id) DO NOTHING\n ",+ "query": "/* service='personhog-identity', operation='op_create_or_attach' */ \n INSERT INTO lifecycle_op (op_id, op_type, team_id, step, request)\n VALUES ($1, $2, $3, $4, $5)\n ON CONFLICT (op_id) DO NOTHING\n ","describe": {"columns": [],"parameters": {@@ -14,5 +14,5 @@},"nullable": []},- "hash": "d72b3ff8a3a8e26fdf5468df52e23c8011d97a31dd867f7f8ae2f79803564135"+ "hash": "7148a208d36485226fbc898d83a2e08351452bb7d6e464a026255293b0dd226b"}diff --git a/rust/personhog-identity/.sqlx/query-7366328119735644117a1f2aca2f107da878c40cc8137ae027a4c277dbc044c2.json b/rust/personhog-identity/.sqlx/query-7366328119735644117a1f2aca2f107da878c40cc8137ae027a4c277dbc044c2.jsonnew file mode 100644index 000000000000..e4218f068179--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-7366328119735644117a1f2aca2f107da878c40cc8137ae027a4c277dbc044c2.json@@ -0,0 +1,15 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_release_lease' */ UPDATE lifecycle_op_tmp SET lease_expires_at = NULL WHERE op_id = $1 AND completed_at IS NULL AND attempt = $2",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Int4"+ ]+ },+ "nullable": []+ },+ "hash": "7366328119735644117a1f2aca2f107da878c40cc8137ae027a4c277dbc044c2"+}diff --git a/rust/personhog-identity/.sqlx/query-7384ba223d7166ffde1e59fe6f565e866415007b9564e09b91ef09343e605b34.json b/rust/personhog-identity/.sqlx/query-7384ba223d7166ffde1e59fe6f565e866415007b9564e09b91ef09343e605b34.jsondeleted file mode 100644index 51c6ccf76206..000000000000--- a/rust/personhog-identity/.sqlx/query-7384ba223d7166ffde1e59fe6f565e866415007b9564e09b91ef09343e605b34.json+++ /dev/null@@ -1,22 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "SELECT person_id FROM lifecycle_op_person WHERE op_id = $1",- "describe": {- "columns": [- {- "ordinal": 0,- "name": "person_id",- "type_info": "Int8"- }- ],- "parameters": {- "Left": [- "Uuid"- ]- },- "nullable": [- false- ]- },- "hash": "7384ba223d7166ffde1e59fe6f565e866415007b9564e09b91ef09343e605b34"-}diff --git a/rust/personhog-identity/.sqlx/query-762804628e7f33f4c8acdc8008cef41ff53c5e8851aa30feceef385c7d47a6bf.json b/rust/personhog-identity/.sqlx/query-762804628e7f33f4c8acdc8008cef41ff53c5e8851aa30feceef385c7d47a6bf.jsondeleted file mode 100644index 285de1302519..000000000000--- a/rust/personhog-identity/.sqlx/query-762804628e7f33f4c8acdc8008cef41ff53c5e8851aa30feceef385c7d47a6bf.json+++ /dev/null@@ -1,22 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n SELECT count(*) as \"count!\" FROM lifecycle_op_person\n WHERE op_id = $1 AND mark_active\n ",- "describe": {- "columns": [- {- "ordinal": 0,- "name": "count!",- "type_info": "Int8"- }- ],- "parameters": {- "Left": [- "Uuid"- ]- },- "nullable": [- null- ]- },- "hash": "762804628e7f33f4c8acdc8008cef41ff53c5e8851aa30feceef385c7d47a6bf"-}diff --git a/rust/personhog-identity/.sqlx/query-76c9588081cc9e2bce47fcab57dad5e309530b99d8ae1697db2a4753a4471850.json b/rust/personhog-identity/.sqlx/query-76c9588081cc9e2bce47fcab57dad5e309530b99d8ae1697db2a4753a4471850.jsonnew file mode 100644index 000000000000..0791aabcd552--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-76c9588081cc9e2bce47fcab57dad5e309530b99d8ae1697db2a4753a4471850.json@@ -0,0 +1,18 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_create_or_attach' */ \n INSERT INTO lifecycle_op_tmp (op_id, op_type, team_id, step, request)\n VALUES ($1, $2, $3, $4, $5)\n ON CONFLICT (op_id) DO NOTHING\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Text",+ "Int4",+ "Text",+ "Jsonb"+ ]+ },+ "nullable": []+ },+ "hash": "76c9588081cc9e2bce47fcab57dad5e309530b99d8ae1697db2a4753a4471850"+}diff --git a/rust/personhog-identity/.sqlx/query-7836d15b52e70cdf3f9db55f5f15d51358ac7454740d16a267e88854fb539436.json b/rust/personhog-identity/.sqlx/query-7836d15b52e70cdf3f9db55f5f15d51358ac7454740d16a267e88854fb539436.jsonnew file mode 100644index 000000000000..c97a85dd4ce6--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-7836d15b52e70cdf3f9db55f5f15d51358ac7454740d16a267e88854fb539436.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_record_moved_mappings' */ \n UPDATE lifecycle_op_person_tmp lop\n SET moved = u.moved\n FROM unnest($2::bigint[], $3::jsonb[]) AS u(person_id, moved)\n WHERE lop.op_id = $1 AND lop.person_id = u.person_id\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Int8Array",+ "JsonbArray"+ ]+ },+ "nullable": []+ },+ "hash": "7836d15b52e70cdf3f9db55f5f15d51358ac7454740d16a267e88854fb539436"+}diff --git a/rust/personhog-identity/.sqlx/query-78a7520c3265e0eac1b0991d49e4ad2db7074c6b441d1d36e553cc1f88eed859.json b/rust/personhog-identity/.sqlx/query-78a7520c3265e0eac1b0991d49e4ad2db7074c6b441d1d36e553cc1f88eed859.jsondeleted file mode 100644index 43508c358c14..000000000000--- a/rust/personhog-identity/.sqlx/query-78a7520c3265e0eac1b0991d49e4ad2db7074c6b441d1d36e553cc1f88eed859.json+++ /dev/null@@ -1,17 +0,0 @@-{- "db_name": "PostgreSQL",- "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": {- "Left": [- "Uuid",- "Text",- "Int8Array",- "Text"- ]- },- "nullable": []- },- "hash": "78a7520c3265e0eac1b0991d49e4ad2db7074c6b441d1d36e553cc1f88eed859"-}diff --git a/rust/personhog-identity/.sqlx/query-7acca91633e6b80f627f0515d923a6f34af922a2f72045836d63dd0b13309927.json b/rust/personhog-identity/.sqlx/query-7acca91633e6b80f627f0515d923a6f34af922a2f72045836d63dd0b13309927.jsondeleted file mode 100644index 9ed4757b0e42..000000000000--- a/rust/personhog-identity/.sqlx/query-7acca91633e6b80f627f0515d923a6f34af922a2f72045836d63dd0b13309927.json+++ /dev/null@@ -1,17 +0,0 @@-{- "db_name": "PostgreSQL",- "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": {- "Left": [- "Uuid",- "Text",- "Int8Array",- "Text"- ]- },- "nullable": []- },- "hash": "7acca91633e6b80f627f0515d923a6f34af922a2f72045836d63dd0b13309927"-}diff --git a/rust/personhog-identity/.sqlx/query-7e2d32739341dee936762ee4cf28b8f5d65d5a5e331288be76c2b77ed172c0ae.json b/rust/personhog-identity/.sqlx/query-7e2d32739341dee936762ee4cf28b8f5d65d5a5e331288be76c2b77ed172c0ae.jsondeleted file mode 100644index 8515e022bf31..000000000000--- a/rust/personhog-identity/.sqlx/query-7e2d32739341dee936762ee4cf28b8f5d65d5a5e331288be76c2b77ed172c0ae.json+++ /dev/null@@ -1,15 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "UPDATE posthog_cohortpeople SET person_id = $2 WHERE person_id = ANY($1)",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Int8Array",- "Int8"- ]- },- "nullable": []- },- "hash": "7e2d32739341dee936762ee4cf28b8f5d65d5a5e331288be76c2b77ed172c0ae"-}diff --git a/rust/personhog-identity/.sqlx/query-7b9dc54935ae723e504b17a5ce3386bfad3a3df8f759243ab17c4ea86818afe4.json b/rust/personhog-identity/.sqlx/query-8211951a90b7255892a802a2407cf7c70c536e111e1f59f78e46ab4cf8f5b1ef.jsonsimilarity index 50%rename from rust/personhog-identity/.sqlx/query-7b9dc54935ae723e504b17a5ce3386bfad3a3df8f759243ab17c4ea86818afe4.jsonrename to rust/personhog-identity/.sqlx/query-8211951a90b7255892a802a2407cf7c70c536e111e1f59f78e46ab4cf8f5b1ef.jsonindex 1922463f1b53..7a51b443a0e6 100644--- a/rust/personhog-identity/.sqlx/query-7b9dc54935ae723e504b17a5ce3386bfad3a3df8f759243ab17c4ea86818afe4.json+++ b/rust/personhog-identity/.sqlx/query-8211951a90b7255892a802a2407cf7c70c536e111e1f59f78e46ab4cf8f5b1ef.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op_tmp SET step = $3 WHERE op_id = $1 AND step = $2",+ "query": "/* service='personhog-identity', operation='op_advance_step' */ UPDATE lifecycle_op_tmp SET step = $3 WHERE op_id = $1 AND step = $2","describe": {"columns": [],"parameters": {@@ -12,5 +12,5 @@},"nullable": []},- "hash": "7b9dc54935ae723e504b17a5ce3386bfad3a3df8f759243ab17c4ea86818afe4"+ "hash": "8211951a90b7255892a802a2407cf7c70c536e111e1f59f78e46ab4cf8f5b1ef"}diff --git a/rust/personhog-identity/.sqlx/query-827046e2e02493238bf397aafd920b907c505c1e67185621f3df42b6971988f1.json b/rust/personhog-identity/.sqlx/query-827046e2e02493238bf397aafd920b907c505c1e67185621f3df42b6971988f1.jsondeleted file mode 100644index e0353e15d4f9..000000000000--- a/rust/personhog-identity/.sqlx/query-827046e2e02493238bf397aafd920b907c505c1e67185621f3df42b6971988f1.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "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": {- "Left": [- "Uuid",- "Text",- "Text"- ]- },- "nullable": []- },- "hash": "827046e2e02493238bf397aafd920b907c505c1e67185621f3df42b6971988f1"-}diff --git a/rust/personhog-identity/.sqlx/query-835cb83dbfb269bb3b18e6a7caab8a0cf107ae44d3fc9e583c07c551c7fd8dc4.json b/rust/personhog-identity/.sqlx/query-835cb83dbfb269bb3b18e6a7caab8a0cf107ae44d3fc9e583c07c551c7fd8dc4.jsonnew file mode 100644index 000000000000..5f9ec5307951--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-835cb83dbfb269bb3b18e6a7caab8a0cf107ae44d3fc9e583c07c551c7fd8dc4.json@@ -0,0 +1,14 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_discard_claim_abort_op' */ \n DELETE FROM lifecycle_op_tmp\n WHERE op_id = $1\n AND completed_at IS NOT NULL\n AND (outcome->>'claim_abort')::boolean IS TRUE\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid"+ ]+ },+ "nullable": []+ },+ "hash": "835cb83dbfb269bb3b18e6a7caab8a0cf107ae44d3fc9e583c07c551c7fd8dc4"+}diff --git a/rust/personhog-identity/.sqlx/query-861000d503a7b397d7dd8c8ea9013180941367370f7b229ddf3c6c5509d64264.json b/rust/personhog-identity/.sqlx/query-861000d503a7b397d7dd8c8ea9013180941367370f7b229ddf3c6c5509d64264.jsondeleted file mode 100644index 5c446b923bd5..000000000000--- a/rust/personhog-identity/.sqlx/query-861000d503a7b397d7dd8c8ea9013180941367370f7b229ddf3c6c5509d64264.json+++ /dev/null@@ -1,14 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n DELETE FROM lifecycle_op_tmp\n WHERE op_id = $1\n AND completed_at IS NOT NULL\n AND (outcome->>'claim_abort')::boolean IS TRUE\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid"- ]- },- "nullable": []- },- "hash": "861000d503a7b397d7dd8c8ea9013180941367370f7b229ddf3c6c5509d64264"-}diff --git a/rust/personhog-identity/.sqlx/query-867fbc06ae766c181011a8a95527f8396c8866c06f8f0a567dc1f1bf699abd0a.json b/rust/personhog-identity/.sqlx/query-867fbc06ae766c181011a8a95527f8396c8866c06f8f0a567dc1f1bf699abd0a.jsondeleted file mode 100644index 9d7237de7a7e..000000000000--- a/rust/personhog-identity/.sqlx/query-867fbc06ae766c181011a8a95527f8396c8866c06f8f0a567dc1f1bf699abd0a.json+++ /dev/null@@ -1,18 +0,0 @@-{- "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 (op_id, person_id) DO NOTHING\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Int4",- "Int8Array",- "UuidArray",- "Text"- ]- },- "nullable": []- },- "hash": "867fbc06ae766c181011a8a95527f8396c8866c06f8f0a567dc1f1bf699abd0a"-}diff --git a/rust/personhog-identity/.sqlx/query-88c5c79bf91abf98a71cac3239c6002efe488df90268884cc0bb866ced94d021.json b/rust/personhog-identity/.sqlx/query-88c5c79bf91abf98a71cac3239c6002efe488df90268884cc0bb866ced94d021.jsondeleted file mode 100644index 0df932a62eb3..000000000000--- a/rust/personhog-identity/.sqlx/query-88c5c79bf91abf98a71cac3239c6002efe488df90268884cc0bb866ced94d021.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op_person SET sealed = $2 WHERE op_id = $1 AND role = $3",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Jsonb",- "Text"- ]- },- "nullable": []- },- "hash": "88c5c79bf91abf98a71cac3239c6002efe488df90268884cc0bb866ced94d021"-}diff --git a/rust/personhog-identity/.sqlx/query-8ca7c456a258145c2f769e1c65fb4c56d7f9e6612e035cfe63d997680e2f9c5c.json b/rust/personhog-identity/.sqlx/query-8ca7c456a258145c2f769e1c65fb4c56d7f9e6612e035cfe63d997680e2f9c5c.jsondeleted file mode 100644index 91e91111367a..000000000000--- a/rust/personhog-identity/.sqlx/query-8ca7c456a258145c2f769e1c65fb4c56d7f9e6612e035cfe63d997680e2f9c5c.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "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": {- "Left": [- "Uuid",- "Text",- "Text"- ]- },- "nullable": []- },- "hash": "8ca7c456a258145c2f769e1c65fb4c56d7f9e6612e035cfe63d997680e2f9c5c"-}diff --git a/rust/personhog-identity/.sqlx/query-8fae6eb15212326a969ec961f6d95af64df6b3e84d0d65eddc53f7947fa72371.json b/rust/personhog-identity/.sqlx/query-8fae6eb15212326a969ec961f6d95af64df6b3e84d0d65eddc53f7947fa72371.jsonnew file mode 100644index 000000000000..89e5021ac47a--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-8fae6eb15212326a969ec961f6d95af64df6b3e84d0d65eddc53f7947fa72371.json@@ -0,0 +1,19 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_claim_record_conflicts' */ \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, $5, $6\n FROM unnest($3::bigint[], $4::uuid[]) AS u(person_id, person_uuid)\n ON CONFLICT (op_id, person_id) DO NOTHING\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Int4",+ "Int8Array",+ "UuidArray",+ "Text",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "8fae6eb15212326a969ec961f6d95af64df6b3e84d0d65eddc53f7947fa72371"+}diff --git a/rust/personhog-identity/.sqlx/query-903990c5873d1c4c7bafd62a0fedfd0f1b6260b05323a6567d98e86e76781efb.json b/rust/personhog-identity/.sqlx/query-903990c5873d1c4c7bafd62a0fedfd0f1b6260b05323a6567d98e86e76781efb.jsondeleted file mode 100644index 30bd68e793a1..000000000000--- a/rust/personhog-identity/.sqlx/query-903990c5873d1c4c7bafd62a0fedfd0f1b6260b05323a6567d98e86e76781efb.json+++ /dev/null@@ -1,26 +0,0 @@-{- "db_name": "PostgreSQL",- "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": [- {- "ordinal": 0,- "name": "person_id",- "type_info": "Int8"- }- ],- "parameters": {- "Left": [- "Uuid",- "Int4",- "Int8Array",- "UuidArray",- "Text"- ]- },- "nullable": [- false- ]- },- "hash": "903990c5873d1c4c7bafd62a0fedfd0f1b6260b05323a6567d98e86e76781efb"-}diff --git a/rust/personhog-identity/.sqlx/query-90d30a324fd47a4d2dc849bf3fe7f1a2815207de45f27494f22a1e0e971e2c51.json b/rust/personhog-identity/.sqlx/query-90d30a324fd47a4d2dc849bf3fe7f1a2815207de45f27494f22a1e0e971e2c51.jsondeleted file mode 100644index 54229eb8e360..000000000000--- a/rust/personhog-identity/.sqlx/query-90d30a324fd47a4d2dc849bf3fe7f1a2815207de45f27494f22a1e0e971e2c51.json+++ /dev/null@@ -1,28 +0,0 @@-{- "db_name": "PostgreSQL",- "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": [- {- "ordinal": 0,- "name": "person_id",- "type_info": "Int8"- }- ],- "parameters": {- "Left": [- "Uuid",- "Int4",- "Int8Array",- "UuidArray",- "TextArray",- "Text",- "Int4Array"- ]- },- "nullable": [- false- ]- },- "hash": "90d30a324fd47a4d2dc849bf3fe7f1a2815207de45f27494f22a1e0e971e2c51"-}diff --git a/rust/personhog-identity/.sqlx/query-91779825be1dc7d9435af92d63cd6387b0e7cad66ca0ebf8c08e2b38ce33c8ae.json b/rust/personhog-identity/.sqlx/query-91779825be1dc7d9435af92d63cd6387b0e7cad66ca0ebf8c08e2b38ce33c8ae.jsonnew file mode 100644index 000000000000..3e3ba5922c94--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-91779825be1dc7d9435af92d63cd6387b0e7cad66ca0ebf8c08e2b38ce33c8ae.json@@ -0,0 +1,14 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_discard_claim_abort_persons' */ DELETE FROM lifecycle_op_person WHERE op_id = $1",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid"+ ]+ },+ "nullable": []+ },+ "hash": "91779825be1dc7d9435af92d63cd6387b0e7cad66ca0ebf8c08e2b38ce33c8ae"+}diff --git a/rust/personhog-identity/.sqlx/query-91d9dbaa08c3a452ceffa3973531e90b8d550614f6d35ba0f2268477daf6c154.json b/rust/personhog-identity/.sqlx/query-91d9dbaa08c3a452ceffa3973531e90b8d550614f6d35ba0f2268477daf6c154.jsondeleted file mode 100644index 577b50457287..000000000000--- a/rust/personhog-identity/.sqlx/query-91d9dbaa08c3a452ceffa3973531e90b8d550614f6d35ba0f2268477daf6c154.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op_person_tmp SET moved = $2 WHERE op_id = $1 AND role = $3",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Jsonb",- "Text"- ]- },- "nullable": []- },- "hash": "91d9dbaa08c3a452ceffa3973531e90b8d550614f6d35ba0f2268477daf6c154"-}diff --git a/rust/personhog-identity/.sqlx/query-92e196ea6783df5abef1ca0b0c3e7eb67bbd30ba8866de5c9d353b597fa26b5a.json b/rust/personhog-identity/.sqlx/query-92e196ea6783df5abef1ca0b0c3e7eb67bbd30ba8866de5c9d353b597fa26b5a.jsondeleted file mode 100644index d873fd2b80fa..000000000000--- a/rust/personhog-identity/.sqlx/query-92e196ea6783df5abef1ca0b0c3e7eb67bbd30ba8866de5c9d353b597fa26b5a.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op_person SET moved = $2 WHERE op_id = $1 AND role = $3",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Jsonb",- "Text"- ]- },- "nullable": []- },- "hash": "92e196ea6783df5abef1ca0b0c3e7eb67bbd30ba8866de5c9d353b597fa26b5a"-}diff --git a/rust/personhog-identity/.sqlx/query-9572d09afa803bfb970dfb621c3b869e15c9a4e033f64acc1c6ef0b575cff996.json b/rust/personhog-identity/.sqlx/query-9572d09afa803bfb970dfb621c3b869e15c9a4e033f64acc1c6ef0b575cff996.jsonnew file mode 100644index 000000000000..93bcab69928c--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-9572d09afa803bfb970dfb621c3b869e15c9a4e033f64acc1c6ef0b575cff996.json@@ -0,0 +1,15 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='delete_seal_drop_vanished' */ \n DELETE FROM lifecycle_op_person\n WHERE op_id = $1 AND person_id = ANY($2) AND mark_active\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Int8Array"+ ]+ },+ "nullable": []+ },+ "hash": "9572d09afa803bfb970dfb621c3b869e15c9a4e033f64acc1c6ef0b575cff996"+}diff --git a/rust/personhog-identity/.sqlx/query-95afd2d938db6c6053af6011ae04f7622a8c540b13e44574022568dcbc283fbc.json b/rust/personhog-identity/.sqlx/query-95afd2d938db6c6053af6011ae04f7622a8c540b13e44574022568dcbc283fbc.jsondeleted file mode 100644index fde4150c5c78..000000000000--- a/rust/personhog-identity/.sqlx/query-95afd2d938db6c6053af6011ae04f7622a8c540b13e44574022568dcbc283fbc.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person lop\n SET moved = u.moved\n FROM unnest($2::bigint[], $3::jsonb[]) AS u(person_id, moved)\n WHERE lop.op_id = $1 AND lop.person_id = u.person_id\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Int8Array",- "JsonbArray"- ]- },- "nullable": []- },- "hash": "95afd2d938db6c6053af6011ae04f7622a8c540b13e44574022568dcbc283fbc"-}diff --git a/rust/personhog-identity/.sqlx/query-17ea4152a4838f54308b61bdad18debc5664a40c1aafd4c7706f0a78d95bafdc.json b/rust/personhog-identity/.sqlx/query-95b4bf329ffa16c2abe3c3f3fc0d72a3d2687d7f7ccb5754edbb9149bc95501c.jsonsimilarity index 55%rename from rust/personhog-identity/.sqlx/query-17ea4152a4838f54308b61bdad18debc5664a40c1aafd4c7706f0a78d95bafdc.jsonrename to rust/personhog-identity/.sqlx/query-95b4bf329ffa16c2abe3c3f3fc0d72a3d2687d7f7ccb5754edbb9149bc95501c.jsonindex dc0afde3f1ad..f6933e5e2411 100644--- a/rust/personhog-identity/.sqlx/query-17ea4152a4838f54308b61bdad18debc5664a40c1aafd4c7706f0a78d95bafdc.json+++ b/rust/personhog-identity/.sqlx/query-95b4bf329ffa16c2abe3c3f3fc0d72a3d2687d7f7ccb5754edbb9149bc95501c.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "SELECT sealed FROM lifecycle_op_person_tmp WHERE op_id = $1 AND role = $2",+ "query": "/* service='personhog-identity', operation='merge_outcome_sealed' */ SELECT sealed FROM lifecycle_op_person_tmp WHERE op_id = $1 AND role = $2","describe": {"columns": [{@@ -19,5 +19,5 @@true]},- "hash": "17ea4152a4838f54308b61bdad18debc5664a40c1aafd4c7706f0a78d95bafdc"+ "hash": "95b4bf329ffa16c2abe3c3f3fc0d72a3d2687d7f7ccb5754edbb9149bc95501c"}diff --git a/rust/personhog-identity/.sqlx/query-973ce899b16bd0cac92d145b047f8ebdd91fff98774e933712815148354a2928.json b/rust/personhog-identity/.sqlx/query-973ce899b16bd0cac92d145b047f8ebdd91fff98774e933712815148354a2928.jsonnew file mode 100644index 000000000000..63516aeda38d--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-973ce899b16bd0cac92d145b047f8ebdd91fff98774e933712815148354a2928.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_fold_record_target' */ UPDATE lifecycle_op_person SET sealed = $2 WHERE op_id = $1 AND role = $3",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Jsonb",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "973ce899b16bd0cac92d145b047f8ebdd91fff98774e933712815148354a2928"+}diff --git a/rust/personhog-identity/.sqlx/query-98224085819d17f751847d04069037c8f9affc8d667c855a262b456c5dbc127f.json b/rust/personhog-identity/.sqlx/query-98224085819d17f751847d04069037c8f9affc8d667c855a262b456c5dbc127f.jsondeleted file mode 100644index 28e9063e4892..000000000000--- a/rust/personhog-identity/.sqlx/query-98224085819d17f751847d04069037c8f9affc8d667c855a262b456c5dbc127f.json+++ /dev/null@@ -1,14 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "DELETE FROM lifecycle_op_person WHERE op_id = $1",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid"- ]- },- "nullable": []- },- "hash": "98224085819d17f751847d04069037c8f9affc8d667c855a262b456c5dbc127f"-}diff --git a/rust/personhog-identity/.sqlx/query-9b92df4f0a2c7a80eaccf250d8324737b0a64d7f8809bf5a4aa8bae924b69605.json b/rust/personhog-identity/.sqlx/query-9b92df4f0a2c7a80eaccf250d8324737b0a64d7f8809bf5a4aa8bae924b69605.jsondeleted file mode 100644index c8244ad4fe8e..000000000000--- a/rust/personhog-identity/.sqlx/query-9b92df4f0a2c7a80eaccf250d8324737b0a64d7f8809bf5a4aa8bae924b69605.json+++ /dev/null@@ -1,18 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n INSERT INTO lifecycle_op (op_id, op_type, team_id, step, request)\n VALUES ($1, $2, $3, $4, $5)\n ON CONFLICT (op_id) DO NOTHING\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Text",- "Int4",- "Text",- "Jsonb"- ]- },- "nullable": []- },- "hash": "9b92df4f0a2c7a80eaccf250d8324737b0a64d7f8809bf5a4aa8bae924b69605"-}diff --git a/rust/personhog-identity/.sqlx/query-9d28820660675963632ecce21cf9e464f231296561278eb30bac81c39c9f9ab7.json b/rust/personhog-identity/.sqlx/query-9d28820660675963632ecce21cf9e464f231296561278eb30bac81c39c9f9ab7.jsondeleted file mode 100644index 44460acd35de..000000000000--- a/rust/personhog-identity/.sqlx/query-9d28820660675963632ecce21cf9e464f231296561278eb30bac81c39c9f9ab7.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "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": {- "Left": [- "Uuid",- "Text",- "Int8Array"- ]- },- "nullable": []- },- "hash": "9d28820660675963632ecce21cf9e464f231296561278eb30bac81c39c9f9ab7"-}diff --git a/rust/personhog-identity/.sqlx/query-a007ed0c33229298558f8e524c06c2d2b05261da6df92f236f7942d2cf63f875.json b/rust/personhog-identity/.sqlx/query-a007ed0c33229298558f8e524c06c2d2b05261da6df92f236f7942d2cf63f875.jsondeleted file mode 100644index b906a1f5ebf6..000000000000--- a/rust/personhog-identity/.sqlx/query-a007ed0c33229298558f8e524c06c2d2b05261da6df92f236f7942d2cf63f875.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_tmp\n SET parked_at = now(), parked_reason = $3, lease_expires_at = NULL\n WHERE op_id = $1 AND completed_at IS NULL AND attempt = $2\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Int4",- "Text"- ]- },- "nullable": []- },- "hash": "a007ed0c33229298558f8e524c06c2d2b05261da6df92f236f7942d2cf63f875"-}diff --git a/rust/personhog-identity/.sqlx/query-a4e12b7721e50cb9d26c91de4ffdd37687e4b60c37159bd0b6f35b1210ed12a5.json b/rust/personhog-identity/.sqlx/query-a4e12b7721e50cb9d26c91de4ffdd37687e4b60c37159bd0b6f35b1210ed12a5.jsondeleted file mode 100644index 58e8fe7099b1..000000000000--- a/rust/personhog-identity/.sqlx/query-a4e12b7721e50cb9d26c91de4ffdd37687e4b60c37159bd0b6f35b1210ed12a5.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op\n SET lease_expires_at = now() + make_interval(secs => $2)\n WHERE op_id = $1 AND completed_at IS NULL AND attempt = $3\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Float8",- "Int4"- ]- },- "nullable": []- },- "hash": "a4e12b7721e50cb9d26c91de4ffdd37687e4b60c37159bd0b6f35b1210ed12a5"-}diff --git a/rust/personhog-identity/.sqlx/query-a83e3c0af018a7f1398f44017bf6ed51a427df4ae71c2e65cf041e50abb6cd57.json b/rust/personhog-identity/.sqlx/query-a83e3c0af018a7f1398f44017bf6ed51a427df4ae71c2e65cf041e50abb6cd57.jsonnew file mode 100644index 000000000000..ecef66f27372--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-a83e3c0af018a7f1398f44017bf6ed51a427df4ae71c2e65cf041e50abb6cd57.json@@ -0,0 +1,17 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_claim_drop_pending' */ \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": {+ "Left": [+ "Uuid",+ "Text",+ "Int8Array",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "a83e3c0af018a7f1398f44017bf6ed51a427df4ae71c2e65cf041e50abb6cd57"+}diff --git a/rust/personhog-identity/.sqlx/query-a8d533a9a6717df488806571957394aebc1b5e5ea725f4d9b4d2fcfd529d5a16.json b/rust/personhog-identity/.sqlx/query-a8d533a9a6717df488806571957394aebc1b5e5ea725f4d9b4d2fcfd529d5a16.jsonnew file mode 100644index 000000000000..ff88a8523c0c--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-a8d533a9a6717df488806571957394aebc1b5e5ea725f4d9b4d2fcfd529d5a16.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_clear_target_mark' */ UPDATE lifecycle_op_person SET status = $2, mark_active = false WHERE op_id = $1 AND role = $3",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Text",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "a8d533a9a6717df488806571957394aebc1b5e5ea725f4d9b4d2fcfd529d5a16"+}diff --git a/rust/personhog-identity/.sqlx/query-92c29db912ef3e1b6e957026d5c403933a4d51e930677b5cf4ff6f1ed1d8f828.json b/rust/personhog-identity/.sqlx/query-a8ea22a74070826c30e9120c8a76ef982d30e7b98b4cdd0493a5a425a782bf24.jsonsimilarity index 61%rename from rust/personhog-identity/.sqlx/query-92c29db912ef3e1b6e957026d5c403933a4d51e930677b5cf4ff6f1ed1d8f828.jsonrename to rust/personhog-identity/.sqlx/query-a8ea22a74070826c30e9120c8a76ef982d30e7b98b4cdd0493a5a425a782bf24.jsonindex 66045a1438b7..91c5cbf9d13f 100644--- a/rust/personhog-identity/.sqlx/query-92c29db912ef3e1b6e957026d5c403933a4d51e930677b5cf4ff6f1ed1d8f828.json+++ b/rust/personhog-identity/.sqlx/query-a8ea22a74070826c30e9120c8a76ef982d30e7b98b4cdd0493a5a425a782bf24.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "SELECT person_id, status FROM lifecycle_op_person_tmp WHERE op_id = $1 AND role = $2",+ "query": "/* service='personhog-identity', operation='merge_outcome_statuses' */ SELECT person_id, status FROM lifecycle_op_person_tmp WHERE op_id = $1 AND role = $2","describe": {"columns": [{@@ -25,5 +25,5 @@false]},- "hash": "92c29db912ef3e1b6e957026d5c403933a4d51e930677b5cf4ff6f1ed1d8f828"+ "hash": "a8ea22a74070826c30e9120c8a76ef982d30e7b98b4cdd0493a5a425a782bf24"}diff --git a/rust/personhog-identity/.sqlx/query-a9858a454f1374e3aeb4fa6e19444eca77c59f091137a302447b18221d06fe93.json b/rust/personhog-identity/.sqlx/query-a9858a454f1374e3aeb4fa6e19444eca77c59f091137a302447b18221d06fe93.jsondeleted file mode 100644index f8beada26551..000000000000--- a/rust/personhog-identity/.sqlx/query-a9858a454f1374e3aeb4fa6e19444eca77c59f091137a302447b18221d06fe93.json+++ /dev/null@@ -1,17 +0,0 @@-{- "db_name": "PostgreSQL",- "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": {- "Left": [- "Uuid",- "Text",- "Text",- "Text"- ]- },- "nullable": []- },- "hash": "a9858a454f1374e3aeb4fa6e19444eca77c59f091137a302447b18221d06fe93"-}diff --git a/rust/personhog-identity/.sqlx/query-aa0a74ff48703882937a4cec52921ed601c32b74e8546a009682c2584aad94b6.json b/rust/personhog-identity/.sqlx/query-aa0a74ff48703882937a4cec52921ed601c32b74e8546a009682c2584aad94b6.jsonnew file mode 100644index 000000000000..d66ba1e6457d--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-aa0a74ff48703882937a4cec52921ed601c32b74e8546a009682c2584aad94b6.json@@ -0,0 +1,24 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_try_claim' */ \n UPDATE lifecycle_op\n SET lease_expires_at = now() + make_interval(secs => $2),\n attempt = attempt + 1,\n parked_at = NULL,\n parked_reason = NULL\n WHERE op_id IN (\n SELECT op_id FROM lifecycle_op\n WHERE op_id = $1 AND completed_at IS NULL\n AND (lease_expires_at IS NULL OR lease_expires_at < now())\n AND (parked_at IS NULL OR $3)\n FOR UPDATE SKIP LOCKED\n )\n RETURNING attempt\n ",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "attempt",+ "type_info": "Int4"+ }+ ],+ "parameters": {+ "Left": [+ "Uuid",+ "Float8",+ "Bool"+ ]+ },+ "nullable": [+ false+ ]+ },+ "hash": "aa0a74ff48703882937a4cec52921ed601c32b74e8546a009682c2584aad94b6"+}diff --git a/rust/personhog-identity/.sqlx/query-abda8ca4d754afc61ca36187c775fe1285cb2ae144f76faef5c3d872067376e6.json b/rust/personhog-identity/.sqlx/query-abda8ca4d754afc61ca36187c775fe1285cb2ae144f76faef5c3d872067376e6.jsonnew file mode 100644index 000000000000..a3b8310a0f75--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-abda8ca4d754afc61ca36187c775fe1285cb2ae144f76faef5c3d872067376e6.json@@ -0,0 +1,17 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_complete' */ \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": {+ "Left": [+ "Uuid",+ "Text",+ "Text",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "abda8ca4d754afc61ca36187c775fe1285cb2ae144f76faef5c3d872067376e6"+}diff --git a/rust/personhog-identity/.sqlx/query-ae66e881849ca01dc27fb79726d84d267612ecf13b39431bdeb81dcefc23a912.json b/rust/personhog-identity/.sqlx/query-ae66e881849ca01dc27fb79726d84d267612ecf13b39431bdeb81dcefc23a912.jsonnew file mode 100644index 000000000000..bfa9d95e14b2--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-ae66e881849ca01dc27fb79726d84d267612ecf13b39431bdeb81dcefc23a912.json@@ -0,0 +1,15 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_gc' */ \n DELETE FROM lifecycle_op_tmp\n WHERE op_id IN (\n SELECT op_id FROM lifecycle_op_tmp\n WHERE completed_at IS NOT NULL\n AND completed_at < now() - make_interval(secs => $1)\n LIMIT $2\n )\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Float8",+ "Int8"+ ]+ },+ "nullable": []+ },+ "hash": "ae66e881849ca01dc27fb79726d84d267612ecf13b39431bdeb81dcefc23a912"+}diff --git a/rust/personhog-identity/.sqlx/query-afcf6f2f27fe6f75f27360fcc60f8566e57cd4275614984f382fd41099a28397.json b/rust/personhog-identity/.sqlx/query-afcf6f2f27fe6f75f27360fcc60f8566e57cd4275614984f382fd41099a28397.jsonnew file mode 100644index 000000000000..f38628d9aae1--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-afcf6f2f27fe6f75f27360fcc60f8566e57cd4275614984f382fd41099a28397.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_unmark' */ UPDATE lifecycle_op_person SET status = $2, mark_active = false WHERE op_id = $1 AND status = $3",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Text",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "afcf6f2f27fe6f75f27360fcc60f8566e57cd4275614984f382fd41099a28397"+}diff --git a/rust/personhog-identity/.sqlx/query-b26e88364a9b7d920e9f23b50401a5a93eae7a3f6dd7f49d702c9d67e3eae082.json b/rust/personhog-identity/.sqlx/query-b26e88364a9b7d920e9f23b50401a5a93eae7a3f6dd7f49d702c9d67e3eae082.jsonnew file mode 100644index 000000000000..dc5dfc5eb01f--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-b26e88364a9b7d920e9f23b50401a5a93eae7a3f6dd7f49d702c9d67e3eae082.json@@ -0,0 +1,15 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_move_cohort_membership' */ UPDATE posthog_cohortpeople SET person_id = $2 WHERE person_id = ANY($1)",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Int8Array",+ "Int8"+ ]+ },+ "nullable": []+ },+ "hash": "b26e88364a9b7d920e9f23b50401a5a93eae7a3f6dd7f49d702c9d67e3eae082"+}diff --git a/rust/personhog-identity/.sqlx/query-2291c5f5ecbd8c3254413064ba987ed11445da486366938c04c43c7b2b3756e1.json b/rust/personhog-identity/.sqlx/query-b4a474dd071a79543139d44e87d8b01fa8f592e91b6f286698984d0b394ed060.jsonsimilarity index 58%rename from rust/personhog-identity/.sqlx/query-2291c5f5ecbd8c3254413064ba987ed11445da486366938c04c43c7b2b3756e1.jsonrename to rust/personhog-identity/.sqlx/query-b4a474dd071a79543139d44e87d8b01fa8f592e91b6f286698984d0b394ed060.jsonindex 6963ad486395..5681d4a4ce13 100644--- a/rust/personhog-identity/.sqlx/query-2291c5f5ecbd8c3254413064ba987ed11445da486366938c04c43c7b2b3756e1.json+++ b/rust/personhog-identity/.sqlx/query-b4a474dd071a79543139d44e87d8b01fa8f592e91b6f286698984d0b394ed060.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "SELECT person_id, person_uuid FROM lifecycle_op_person WHERE op_id = $1 AND role = $2",+ "query": "/* service='personhog-identity', operation='merge_live_sources' */ \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": "2291c5f5ecbd8c3254413064ba987ed11445da486366938c04c43c7b2b3756e1"+ "hash": "b4a474dd071a79543139d44e87d8b01fa8f592e91b6f286698984d0b394ed060"}diff --git a/rust/personhog-identity/.sqlx/query-39689d5bf4b2e19a21d2f73dd57bc1963d006a10413b72c248a48a0840858bd2.json b/rust/personhog-identity/.sqlx/query-b70a3e3c7cc109d1d948a1a97bfaa0bcc8912ffda521a917bbf979365113ab34.jsonsimilarity index 55%rename from rust/personhog-identity/.sqlx/query-39689d5bf4b2e19a21d2f73dd57bc1963d006a10413b72c248a48a0840858bd2.jsonrename to rust/personhog-identity/.sqlx/query-b70a3e3c7cc109d1d948a1a97bfaa0bcc8912ffda521a917bbf979365113ab34.jsonindex 90d22c697214..f3b8f6e1ebb1 100644--- a/rust/personhog-identity/.sqlx/query-39689d5bf4b2e19a21d2f73dd57bc1963d006a10413b72c248a48a0840858bd2.json+++ b/rust/personhog-identity/.sqlx/query-b70a3e3c7cc109d1d948a1a97bfaa0bcc8912ffda521a917bbf979365113ab34.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT person_id FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND role = $2 AND status = $3\n ",+ "query": "/* service='personhog-identity', operation='merge_flip_target' */ SELECT person_id FROM lifecycle_op_person WHERE op_id = $1 AND role = $2","describe": {"columns": [{@@ -12,7 +12,6 @@"parameters": {"Left": ["Uuid",- "Text","Text"]},@@ -20,5 +19,5 @@false]},- "hash": "39689d5bf4b2e19a21d2f73dd57bc1963d006a10413b72c248a48a0840858bd2"+ "hash": "b70a3e3c7cc109d1d948a1a97bfaa0bcc8912ffda521a917bbf979365113ab34"}diff --git a/rust/personhog-identity/.sqlx/query-b86c31af0c46a6bb91be5a4855fc8d7afa5a12d6fcde2caebd2b0ead42349db6.json b/rust/personhog-identity/.sqlx/query-b86c31af0c46a6bb91be5a4855fc8d7afa5a12d6fcde2caebd2b0ead42349db6.jsonnew file mode 100644index 000000000000..285fef9861f6--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-b86c31af0c46a6bb91be5a4855fc8d7afa5a12d6fcde2caebd2b0ead42349db6.json@@ -0,0 +1,17 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_complete' */ \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": {+ "Left": [+ "Uuid",+ "Text",+ "Text",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "b86c31af0c46a6bb91be5a4855fc8d7afa5a12d6fcde2caebd2b0ead42349db6"+}diff --git a/rust/personhog-identity/.sqlx/query-b975d5dde18eabd1037f9b8b74814ed721b37914a116a9dac7276773bb3ca2bd.json b/rust/personhog-identity/.sqlx/query-b975d5dde18eabd1037f9b8b74814ed721b37914a116a9dac7276773bb3ca2bd.jsondeleted file mode 100644index 4edfb2e58a98..000000000000--- a/rust/personhog-identity/.sqlx/query-b975d5dde18eabd1037f9b8b74814ed721b37914a116a9dac7276773bb3ca2bd.json+++ /dev/null@@ -1,15 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n DELETE FROM lifecycle_op_tmp\n WHERE op_id IN (\n SELECT op_id FROM lifecycle_op_tmp\n WHERE completed_at IS NOT NULL\n AND completed_at < now() - make_interval(secs => $1)\n LIMIT $2\n )\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Float8",- "Int8"- ]- },- "nullable": []- },- "hash": "b975d5dde18eabd1037f9b8b74814ed721b37914a116a9dac7276773bb3ca2bd"-}diff --git a/rust/personhog-identity/.sqlx/query-4aa59a46f66aef31f0ca7f4384fec8da471bc5948d6cae950ae013227fba4b3a.json b/rust/personhog-identity/.sqlx/query-bae77f70504d923a2c97d39fdb77b2385a9e12ecf810df1d85acf9574276cc52.jsonsimilarity index 60%rename from rust/personhog-identity/.sqlx/query-4aa59a46f66aef31f0ca7f4384fec8da471bc5948d6cae950ae013227fba4b3a.jsonrename to rust/personhog-identity/.sqlx/query-bae77f70504d923a2c97d39fdb77b2385a9e12ecf810df1d85acf9574276cc52.jsonindex 9d387bb906d8..413f33f48d78 100644--- a/rust/personhog-identity/.sqlx/query-4aa59a46f66aef31f0ca7f4384fec8da471bc5948d6cae950ae013227fba4b3a.json+++ b/rust/personhog-identity/.sqlx/query-bae77f70504d923a2c97d39fdb77b2385a9e12ecf810df1d85acf9574276cc52.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op\n SET step = $3, outcome = $4, completed_at = now(), lease_expires_at = NULL\n WHERE op_id = $1 AND step = $2\n ",+ "query": "/* service='personhog-identity', operation='op_complete' */ \n UPDATE lifecycle_op_tmp\n SET step = $3, outcome = $4, completed_at = now(), lease_expires_at = NULL\n WHERE op_id = $1 AND step = $2\n ","describe": {"columns": [],"parameters": {@@ -13,5 +13,5 @@},"nullable": []},- "hash": "4aa59a46f66aef31f0ca7f4384fec8da471bc5948d6cae950ae013227fba4b3a"+ "hash": "bae77f70504d923a2c97d39fdb77b2385a9e12ecf810df1d85acf9574276cc52"}diff --git a/rust/personhog-identity/.sqlx/query-bc82156c5cb50fd21aa2cabdaf9cce3f71511f2be2b4307d3d92ca3ada077b9e.json b/rust/personhog-identity/.sqlx/query-bc82156c5cb50fd21aa2cabdaf9cce3f71511f2be2b4307d3d92ca3ada077b9e.jsondeleted file mode 100644index 64f341a1384d..000000000000--- a/rust/personhog-identity/.sqlx/query-bc82156c5cb50fd21aa2cabdaf9cce3f71511f2be2b4307d3d92ca3ada077b9e.json+++ /dev/null@@ -1,17 +0,0 @@-{- "db_name": "PostgreSQL",- "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": {- "Left": [- "Uuid",- "Text",- "Text",- "Text"- ]- },- "nullable": []- },- "hash": "bc82156c5cb50fd21aa2cabdaf9cce3f71511f2be2b4307d3d92ca3ada077b9e"-}diff --git a/rust/personhog-identity/.sqlx/query-bf19eecd29cbfb50fc0a303224da409cfae83b42fc45a8d70b3d0790c46b69a6.json b/rust/personhog-identity/.sqlx/query-bf19eecd29cbfb50fc0a303224da409cfae83b42fc45a8d70b3d0790c46b69a6.jsonnew file mode 100644index 000000000000..2a0e516e90fc--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-bf19eecd29cbfb50fc0a303224da409cfae83b42fc45a8d70b3d0790c46b69a6.json@@ -0,0 +1,29 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_sweep_abandoned' */ \n SELECT op_id, op_type\n FROM lifecycle_op_tmp\n WHERE completed_at IS NULL\n AND parked_at IS NULL\n AND ((lease_expires_at IS NULL AND created_at < now() - make_interval(secs => $1))\n OR lease_expires_at < now())\n ORDER BY created_at\n LIMIT $2\n ",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "op_id",+ "type_info": "Uuid"+ },+ {+ "ordinal": 1,+ "name": "op_type",+ "type_info": "Text"+ }+ ],+ "parameters": {+ "Left": [+ "Float8",+ "Int8"+ ]+ },+ "nullable": [+ false,+ false+ ]+ },+ "hash": "bf19eecd29cbfb50fc0a303224da409cfae83b42fc45a8d70b3d0790c46b69a6"+}diff --git a/rust/personhog-identity/.sqlx/query-c06236beb4d3303a998ede6b8a950b2344d0ee3963d07816ba16f67090e90f65.json b/rust/personhog-identity/.sqlx/query-c06236beb4d3303a998ede6b8a950b2344d0ee3963d07816ba16f67090e90f65.jsondeleted file mode 100644index 9f9838481ef3..000000000000--- a/rust/personhog-identity/.sqlx/query-c06236beb4d3303a998ede6b8a950b2344d0ee3963d07816ba16f67090e90f65.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op\n SET parked_at = now(), parked_reason = $3, lease_expires_at = NULL\n WHERE op_id = $1 AND completed_at IS NULL AND attempt = $2\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Int4",- "Text"- ]- },- "nullable": []- },- "hash": "c06236beb4d3303a998ede6b8a950b2344d0ee3963d07816ba16f67090e90f65"-}diff --git a/rust/personhog-identity/.sqlx/query-c0736e311d2bfdff45adc0d0ba4be941b911b291f39070a1c235fe1e71b5fd19.json b/rust/personhog-identity/.sqlx/query-c0736e311d2bfdff45adc0d0ba4be941b911b291f39070a1c235fe1e71b5fd19.jsonnew file mode 100644index 000000000000..711c4895a118--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-c0736e311d2bfdff45adc0d0ba4be941b911b291f39070a1c235fe1e71b5fd19.json@@ -0,0 +1,19 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_claim_record_conflicts' */ \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, $5, $6\n FROM unnest($3::bigint[], $4::uuid[]) AS u(person_id, person_uuid)\n ON CONFLICT (op_id, person_id) DO NOTHING\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Int4",+ "Int8Array",+ "UuidArray",+ "Text",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "c0736e311d2bfdff45adc0d0ba4be941b911b291f39070a1c235fe1e71b5fd19"+}diff --git a/rust/personhog-identity/.sqlx/query-6d22ddca76775b9c8f906b4460f880b79adfeffa05e706c2f715f813fe6e73c3.json b/rust/personhog-identity/.sqlx/query-c22610b4e38fce3127722dfe1e65880b5ead6f11eb125e99eb40f73b63fed602.jsonsimilarity index 62%rename from rust/personhog-identity/.sqlx/query-6d22ddca76775b9c8f906b4460f880b79adfeffa05e706c2f715f813fe6e73c3.jsonrename to rust/personhog-identity/.sqlx/query-c22610b4e38fce3127722dfe1e65880b5ead6f11eb125e99eb40f73b63fed602.jsonindex 19026810a1c4..449157616f6d 100644--- a/rust/personhog-identity/.sqlx/query-6d22ddca76775b9c8f906b4460f880b79adfeffa05e706c2f715f813fe6e73c3.json+++ b/rust/personhog-identity/.sqlx/query-c22610b4e38fce3127722dfe1e65880b5ead6f11eb125e99eb40f73b63fed602.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 mark_active\n ",+ "query": "/* service='personhog-identity', operation='merge_target_row' */ SELECT person_id, person_uuid FROM lifecycle_op_person WHERE op_id = $1 AND role = $2","describe": {"columns": [{@@ -25,5 +25,5 @@false]},- "hash": "6d22ddca76775b9c8f906b4460f880b79adfeffa05e706c2f715f813fe6e73c3"+ "hash": "c22610b4e38fce3127722dfe1e65880b5ead6f11eb125e99eb40f73b63fed602"}diff --git a/rust/personhog-identity/.sqlx/query-99eaa599f1e6ccfb66a2f35ed78a49841cf5ead9316ab84c0a82344bdff1748b.json b/rust/personhog-identity/.sqlx/query-c51bf6a5375d04bbfb0238ca59aac5235df3864b23824208d113d9d748d103b0.jsonsimilarity index 59%rename from rust/personhog-identity/.sqlx/query-99eaa599f1e6ccfb66a2f35ed78a49841cf5ead9316ab84c0a82344bdff1748b.jsonrename to rust/personhog-identity/.sqlx/query-c51bf6a5375d04bbfb0238ca59aac5235df3864b23824208d113d9d748d103b0.jsonindex 63144b6d929b..d42b991bc0ae 100644--- a/rust/personhog-identity/.sqlx/query-99eaa599f1e6ccfb66a2f35ed78a49841cf5ead9316ab84c0a82344bdff1748b.json+++ b/rust/personhog-identity/.sqlx/query-c51bf6a5375d04bbfb0238ca59aac5235df3864b23824208d113d9d748d103b0.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "SELECT step, completed_at IS NOT NULL AS \"completed!\" FROM lifecycle_op_tmp WHERE op_id = $1",+ "query": "/* service='personhog-identity', operation='merge_op_moved_on' */ SELECT step, completed_at IS NOT NULL AS \"completed!\" FROM lifecycle_op_tmp WHERE op_id = $1","describe": {"columns": [{@@ -24,5 +24,5 @@null]},- "hash": "99eaa599f1e6ccfb66a2f35ed78a49841cf5ead9316ab84c0a82344bdff1748b"+ "hash": "c51bf6a5375d04bbfb0238ca59aac5235df3864b23824208d113d9d748d103b0"}diff --git a/rust/personhog-identity/.sqlx/query-c7b69fa9c1c3b52181bdfe1d014e8f430a8595b3f34ac6ce81155ba6d5736145.json b/rust/personhog-identity/.sqlx/query-c7b69fa9c1c3b52181bdfe1d014e8f430a8595b3f34ac6ce81155ba6d5736145.jsondeleted file mode 100644index 7d47d079030c..000000000000--- a/rust/personhog-identity/.sqlx/query-c7b69fa9c1c3b52181bdfe1d014e8f430a8595b3f34ac6ce81155ba6d5736145.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op_person_tmp SET sealed = $2 WHERE op_id = $1 AND role = $3",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Jsonb",- "Text"- ]- },- "nullable": []- },- "hash": "c7b69fa9c1c3b52181bdfe1d014e8f430a8595b3f34ac6ce81155ba6d5736145"-}diff --git a/rust/personhog-identity/.sqlx/query-ca22305afd5cd863bf9438805dc90a17393e0089548d49122e99f09ccfdd51af.json b/rust/personhog-identity/.sqlx/query-ca22305afd5cd863bf9438805dc90a17393e0089548d49122e99f09ccfdd51af.jsondeleted file mode 100644index 8318d9996f6a..000000000000--- a/rust/personhog-identity/.sqlx/query-ca22305afd5cd863bf9438805dc90a17393e0089548d49122e99f09ccfdd51af.json+++ /dev/null@@ -1,29 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n SELECT op_id, op_type\n FROM lifecycle_op\n WHERE completed_at IS NULL\n AND parked_at IS NULL\n AND ((lease_expires_at IS NULL AND created_at < now() - make_interval(secs => $1))\n OR lease_expires_at < now())\n ORDER BY created_at\n LIMIT $2\n ",- "describe": {- "columns": [- {- "ordinal": 0,- "name": "op_id",- "type_info": "Uuid"- },- {- "ordinal": 1,- "name": "op_type",- "type_info": "Text"- }- ],- "parameters": {- "Left": [- "Float8",- "Int8"- ]- },- "nullable": [- false,- false- ]- },- "hash": "ca22305afd5cd863bf9438805dc90a17393e0089548d49122e99f09ccfdd51af"-}diff --git a/rust/personhog-identity/.sqlx/query-cb0980ab3f1f0fa3afd777c15e2c7fbac625f9ab49afb5036ab606de81564e2b.json b/rust/personhog-identity/.sqlx/query-cb0980ab3f1f0fa3afd777c15e2c7fbac625f9ab49afb5036ab606de81564e2b.jsonnew file mode 100644index 000000000000..0abe9c367500--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-cb0980ab3f1f0fa3afd777c15e2c7fbac625f9ab49afb5036ab606de81564e2b.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='delete_unmap_record_moved' */ \n UPDATE lifecycle_op_person lop\n SET moved = u.moved\n FROM unnest($2::bigint[], $3::jsonb[]) AS u(person_id, moved)\n WHERE lop.op_id = $1 AND lop.person_id = u.person_id\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Int8Array",+ "JsonbArray"+ ]+ },+ "nullable": []+ },+ "hash": "cb0980ab3f1f0fa3afd777c15e2c7fbac625f9ab49afb5036ab606de81564e2b"+}diff --git a/rust/personhog-identity/.sqlx/query-cbec1aae1577838efa790c0c74adc72fccf0a93c7d1fca6f834c356d56860da5.json b/rust/personhog-identity/.sqlx/query-cbec1aae1577838efa790c0c74adc72fccf0a93c7d1fca6f834c356d56860da5.jsondeleted file mode 100644index e117fc817179..000000000000--- a/rust/personhog-identity/.sqlx/query-cbec1aae1577838efa790c0c74adc72fccf0a93c7d1fca6f834c356d56860da5.json+++ /dev/null@@ -1,18 +0,0 @@-{- "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.mark_active\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Text",- "Int8Array",- "Int8Array",- "Int8Array"- ]- },- "nullable": []- },- "hash": "cbec1aae1577838efa790c0c74adc72fccf0a93c7d1fca6f834c356d56860da5"-}diff --git a/rust/personhog-identity/.sqlx/query-cd17e34ddaf04576e99a499e08fb518fca6855ff225d1192557dedcdcc1c0e83.json b/rust/personhog-identity/.sqlx/query-cd17e34ddaf04576e99a499e08fb518fca6855ff225d1192557dedcdcc1c0e83.jsonnew file mode 100644index 000000000000..41de112a0bc5--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-cd17e34ddaf04576e99a499e08fb518fca6855ff225d1192557dedcdcc1c0e83.json@@ -0,0 +1,24 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_try_claim' */ \n UPDATE lifecycle_op_tmp\n SET lease_expires_at = now() + make_interval(secs => $2),\n attempt = attempt + 1,\n parked_at = NULL,\n parked_reason = NULL\n WHERE op_id IN (\n SELECT op_id FROM lifecycle_op_tmp\n WHERE op_id = $1 AND completed_at IS NULL\n AND (lease_expires_at IS NULL OR lease_expires_at < now())\n AND (parked_at IS NULL OR $3)\n FOR UPDATE SKIP LOCKED\n )\n RETURNING attempt\n ",+ "describe": {+ "columns": [+ {+ "ordinal": 0,+ "name": "attempt",+ "type_info": "Int4"+ }+ ],+ "parameters": {+ "Left": [+ "Uuid",+ "Float8",+ "Bool"+ ]+ },+ "nullable": [+ false+ ]+ },+ "hash": "cd17e34ddaf04576e99a499e08fb518fca6855ff225d1192557dedcdcc1c0e83"+}diff --git a/rust/personhog-identity/.sqlx/query-2a85ebab2debd88588c5949491546038a90605dfebc728c8101d580ccff2df71.json b/rust/personhog-identity/.sqlx/query-d524872c6e41125f331b248319c9dd667f3060372332ae87a5e20c97682b0ce0.jsonsimilarity index 55%rename from rust/personhog-identity/.sqlx/query-2a85ebab2debd88588c5949491546038a90605dfebc728c8101d580ccff2df71.jsonrename to rust/personhog-identity/.sqlx/query-d524872c6e41125f331b248319c9dd667f3060372332ae87a5e20c97682b0ce0.jsonindex a3602cfd9541..590f4623437e 100644--- a/rust/personhog-identity/.sqlx/query-2a85ebab2debd88588c5949491546038a90605dfebc728c8101d580ccff2df71.json+++ b/rust/personhog-identity/.sqlx/query-d524872c6e41125f331b248319c9dd667f3060372332ae87a5e20c97682b0ce0.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT person_id, person_uuid,\n (sealed->>'version')::bigint AS \"sealed_version!\",\n (sealed->>'created_at')::bigint AS \"sealed_created_at!\"\n FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND status = 'sealed' AND sealed ? 'created_at'\n ORDER BY person_id\n ",+ "query": "/* service='personhog-identity', operation='delete_complete_fenced' */ \n SELECT person_id, person_uuid,\n (sealed->>'version')::bigint AS \"sealed_version!\",\n (sealed->>'created_at')::bigint AS \"sealed_created_at!\"\n FROM lifecycle_op_person\n WHERE op_id = $1 AND status = 'sealed' AND sealed ? 'created_at'\n ORDER BY person_id\n ","describe": {"columns": [{@@ -36,5 +36,5 @@null]},- "hash": "2a85ebab2debd88588c5949491546038a90605dfebc728c8101d580ccff2df71"+ "hash": "d524872c6e41125f331b248319c9dd667f3060372332ae87a5e20c97682b0ce0"}diff --git a/rust/personhog-identity/.sqlx/query-b58c270ced11ba2d1d81fbd791c9f0c5a6011ae51cf8ace46c9c6357516865b0.json b/rust/personhog-identity/.sqlx/query-d77361194ff29a871dcfbac4863702e92d3673e586f4af8ec8dc973098c30101.jsonsimilarity index 52%rename from rust/personhog-identity/.sqlx/query-b58c270ced11ba2d1d81fbd791c9f0c5a6011ae51cf8ace46c9c6357516865b0.jsonrename to rust/personhog-identity/.sqlx/query-d77361194ff29a871dcfbac4863702e92d3673e586f4af8ec8dc973098c30101.jsonindex 677ee64f8c3f..430e49c8b1a9 100644--- a/rust/personhog-identity/.sqlx/query-b58c270ced11ba2d1d81fbd791c9f0c5a6011ae51cf8ace46c9c6357516865b0.json+++ b/rust/personhog-identity/.sqlx/query-d77361194ff29a871dcfbac4863702e92d3673e586f4af8ec8dc973098c30101.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT person_id FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND mark_active\n ORDER BY person_id\n ",+ "query": "/* service='personhog-identity', operation='delete_seal_victims' */ \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": "b58c270ced11ba2d1d81fbd791c9f0c5a6011ae51cf8ace46c9c6357516865b0"+ "hash": "d77361194ff29a871dcfbac4863702e92d3673e586f4af8ec8dc973098c30101"}diff --git a/rust/personhog-identity/.sqlx/query-dd1d1f20ef23d254650b74d2bc467b137e68b5cde4502299f451b345baeff560.json b/rust/personhog-identity/.sqlx/query-dd1d1f20ef23d254650b74d2bc467b137e68b5cde4502299f451b345baeff560.jsondeleted file mode 100644index fb102fba4498..000000000000--- a/rust/personhog-identity/.sqlx/query-dd1d1f20ef23d254650b74d2bc467b137e68b5cde4502299f451b345baeff560.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "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": {- "Left": [- "Uuid",- "Text",- "Int8Array"- ]- },- "nullable": []- },- "hash": "dd1d1f20ef23d254650b74d2bc467b137e68b5cde4502299f451b345baeff560"-}diff --git a/rust/personhog-identity/.sqlx/query-ddf12809e2725d7c250b921bb382dc0e9d2f9a46765995ccc761d83bfaea2c1f.json b/rust/personhog-identity/.sqlx/query-ddf12809e2725d7c250b921bb382dc0e9d2f9a46765995ccc761d83bfaea2c1f.jsondeleted file mode 100644index 7c566d17ba6d..000000000000--- a/rust/personhog-identity/.sqlx/query-ddf12809e2725d7c250b921bb382dc0e9d2f9a46765995ccc761d83bfaea2c1f.json+++ /dev/null@@ -1,24 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_tmp\n SET lease_expires_at = now() + make_interval(secs => $2),\n attempt = attempt + 1,\n parked_at = NULL,\n parked_reason = NULL\n WHERE op_id IN (\n SELECT op_id FROM lifecycle_op_tmp\n WHERE op_id = $1 AND completed_at IS NULL\n AND (lease_expires_at IS NULL OR lease_expires_at < now())\n AND (parked_at IS NULL OR $3)\n FOR UPDATE SKIP LOCKED\n )\n RETURNING attempt\n ",- "describe": {- "columns": [- {- "ordinal": 0,- "name": "attempt",- "type_info": "Int4"- }- ],- "parameters": {- "Left": [- "Uuid",- "Float8",- "Bool"- ]- },- "nullable": [- false- ]- },- "hash": "ddf12809e2725d7c250b921bb382dc0e9d2f9a46765995ccc761d83bfaea2c1f"-}diff --git a/rust/personhog-identity/.sqlx/query-df433868efab5ae0da20f6ed72757feff21409b32b4f82d52da3cfce47c0a00f.json b/rust/personhog-identity/.sqlx/query-df433868efab5ae0da20f6ed72757feff21409b32b4f82d52da3cfce47c0a00f.jsonnew file mode 100644index 000000000000..e599ad1ca29c--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-df433868efab5ae0da20f6ed72757feff21409b32b4f82d52da3cfce47c0a00f.json@@ -0,0 +1,26 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='delete_mark_victims' */ \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": [+ {+ "ordinal": 0,+ "name": "person_id",+ "type_info": "Int8"+ }+ ],+ "parameters": {+ "Left": [+ "Uuid",+ "Int4",+ "Int8Array",+ "UuidArray",+ "Text"+ ]+ },+ "nullable": [+ false+ ]+ },+ "hash": "df433868efab5ae0da20f6ed72757feff21409b32b4f82d52da3cfce47c0a00f"+}diff --git a/rust/personhog-identity/.sqlx/query-f986c4fea2c4b8a56c903568483947304cb503d897e25b635135c83f8201d707.json b/rust/personhog-identity/.sqlx/query-e093dbe9a953632d6909e10522e4d367b58c48bc8f27841624b1429ce825dc12.jsonsimilarity index 55%rename from rust/personhog-identity/.sqlx/query-f986c4fea2c4b8a56c903568483947304cb503d897e25b635135c83f8201d707.jsonrename to rust/personhog-identity/.sqlx/query-e093dbe9a953632d6909e10522e4d367b58c48bc8f27841624b1429ce825dc12.jsonindex 7f87c8dc3402..b9f306355ca9 100644--- a/rust/personhog-identity/.sqlx/query-f986c4fea2c4b8a56c903568483947304cb503d897e25b635135c83f8201d707.json+++ b/rust/personhog-identity/.sqlx/query-e093dbe9a953632d6909e10522e4d367b58c48bc8f27841624b1429ce825dc12.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "\n SELECT person_id, person_uuid,\n (sealed->>'version')::bigint AS \"sealed_version!\",\n (sealed->>'created_at')::bigint AS \"sealed_created_at!\"\n FROM lifecycle_op_person\n WHERE op_id = $1 AND status = 'sealed' AND sealed ? 'created_at'\n ORDER BY person_id\n ",+ "query": "/* service='personhog-identity', operation='delete_complete_fenced' */ \n SELECT person_id, person_uuid,\n (sealed->>'version')::bigint AS \"sealed_version!\",\n (sealed->>'created_at')::bigint AS \"sealed_created_at!\"\n FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND status = 'sealed' AND sealed ? 'created_at'\n ORDER BY person_id\n ","describe": {"columns": [{@@ -36,5 +36,5 @@null]},- "hash": "f986c4fea2c4b8a56c903568483947304cb503d897e25b635135c83f8201d707"+ "hash": "e093dbe9a953632d6909e10522e4d367b58c48bc8f27841624b1429ce825dc12"}diff --git a/rust/personhog-identity/.sqlx/query-e1c252814f3106c54c990bd5c5fdf1a00ea056549bb2c823e223d30968af65a0.json b/rust/personhog-identity/.sqlx/query-e1c252814f3106c54c990bd5c5fdf1a00ea056549bb2c823e223d30968af65a0.jsondeleted file mode 100644index 36721ee49138..000000000000--- a/rust/personhog-identity/.sqlx/query-e1c252814f3106c54c990bd5c5fdf1a00ea056549bb2c823e223d30968af65a0.json+++ /dev/null@@ -1,23 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "SELECT person_id FROM lifecycle_op_person_tmp WHERE op_id = $1 AND role = $2",- "describe": {- "columns": [- {- "ordinal": 0,- "name": "person_id",- "type_info": "Int8"- }- ],- "parameters": {- "Left": [- "Uuid",- "Text"- ]- },- "nullable": [- false- ]- },- "hash": "e1c252814f3106c54c990bd5c5fdf1a00ea056549bb2c823e223d30968af65a0"-}diff --git a/rust/personhog-identity/.sqlx/query-e30146cb33d6e652c0341094a6665c064de4a7e59511684d322965a7b996aea0.json b/rust/personhog-identity/.sqlx/query-e30146cb33d6e652c0341094a6665c064de4a7e59511684d322965a7b996aea0.jsondeleted file mode 100644index 1758984d15cf..000000000000--- a/rust/personhog-identity/.sqlx/query-e30146cb33d6e652c0341094a6665c064de4a7e59511684d322965a7b996aea0.json+++ /dev/null@@ -1,15 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op SET lease_expires_at = NULL WHERE op_id = $1 AND completed_at IS NULL AND attempt = $2",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Int4"- ]- },- "nullable": []- },- "hash": "e30146cb33d6e652c0341094a6665c064de4a7e59511684d322965a7b996aea0"-}diff --git a/rust/personhog-identity/.sqlx/query-e5e93ac197eca5a005228ed9c9ba6f32ff4f2b9aa242ef10e680eae80f740370.json b/rust/personhog-identity/.sqlx/query-e5e93ac197eca5a005228ed9c9ba6f32ff4f2b9aa242ef10e680eae80f740370.jsonnew file mode 100644index 000000000000..cc8a7c1a8be9--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-e5e93ac197eca5a005228ed9c9ba6f32ff4f2b9aa242ef10e680eae80f740370.json@@ -0,0 +1,17 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_complete' */ \n UPDATE lifecycle_op\n SET step = $3, outcome = $4, completed_at = now(), lease_expires_at = NULL\n WHERE op_id = $1 AND step = $2\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Text",+ "Text",+ "Jsonb"+ ]+ },+ "nullable": []+ },+ "hash": "e5e93ac197eca5a005228ed9c9ba6f32ff4f2b9aa242ef10e680eae80f740370"+}diff --git a/rust/personhog-identity/.sqlx/query-99d01a6a317b43b7ca38c44dba30b85b011f34aa9f880622b58957b0791176eb.json b/rust/personhog-identity/.sqlx/query-e683747323268bda8b009f9a6040243fefd0ba9c1f236167d92b826d4786e840.jsonsimilarity index 60%rename from rust/personhog-identity/.sqlx/query-99d01a6a317b43b7ca38c44dba30b85b011f34aa9f880622b58957b0791176eb.jsonrename to rust/personhog-identity/.sqlx/query-e683747323268bda8b009f9a6040243fefd0ba9c1f236167d92b826d4786e840.jsonindex 583439dcfcb4..7ec53c40ebad 100644--- a/rust/personhog-identity/.sqlx/query-99d01a6a317b43b7ca38c44dba30b85b011f34aa9f880622b58957b0791176eb.json+++ b/rust/personhog-identity/.sqlx/query-e683747323268bda8b009f9a6040243fefd0ba9c1f236167d92b826d4786e840.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "SELECT step, completed_at IS NOT NULL AS \"completed!\" FROM lifecycle_op WHERE op_id = $1",+ "query": "/* service='personhog-identity', operation='merge_op_moved_on' */ SELECT step, completed_at IS NOT NULL AS \"completed!\" FROM lifecycle_op WHERE op_id = $1","describe": {"columns": [{@@ -24,5 +24,5 @@null]},- "hash": "99d01a6a317b43b7ca38c44dba30b85b011f34aa9f880622b58957b0791176eb"+ "hash": "e683747323268bda8b009f9a6040243fefd0ba9c1f236167d92b826d4786e840"}diff --git a/rust/personhog-identity/.sqlx/query-97ee021ad5a713ee978c00ca5888553fc946343e4067325ecfbd5d68a26cb61f.json b/rust/personhog-identity/.sqlx/query-e75ca0169536ff50f10ef5881226139227f2efefb595081391234426d2bf895a.jsonsimilarity index 57%rename from rust/personhog-identity/.sqlx/query-97ee021ad5a713ee978c00ca5888553fc946343e4067325ecfbd5d68a26cb61f.jsonrename to rust/personhog-identity/.sqlx/query-e75ca0169536ff50f10ef5881226139227f2efefb595081391234426d2bf895a.jsonindex c6c11f44be8d..0b2b6e260982 100644--- a/rust/personhog-identity/.sqlx/query-97ee021ad5a713ee978c00ca5888553fc946343e4067325ecfbd5d68a26cb61f.json+++ b/rust/personhog-identity/.sqlx/query-e75ca0169536ff50f10ef5881226139227f2efefb595081391234426d2bf895a.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "SELECT person_id, person_uuid FROM lifecycle_op_person_tmp WHERE op_id = $1 AND role = $2",+ "query": "/* service='personhog-identity', operation='merge_live_sources' */ \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": "97ee021ad5a713ee978c00ca5888553fc946343e4067325ecfbd5d68a26cb61f"+ "hash": "e75ca0169536ff50f10ef5881226139227f2efefb595081391234426d2bf895a"}diff --git a/rust/personhog-identity/.sqlx/query-e90e6774df5a94bc1972d4597db38189975a57bda9968986ef11f406acdde356.json b/rust/personhog-identity/.sqlx/query-e90e6774df5a94bc1972d4597db38189975a57bda9968986ef11f406acdde356.jsondeleted file mode 100644index d3475083118d..000000000000--- a/rust/personhog-identity/.sqlx/query-e90e6774df5a94bc1972d4597db38189975a57bda9968986ef11f406acdde356.json+++ /dev/null@@ -1,17 +0,0 @@-{- "db_name": "PostgreSQL",- "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": {- "Left": [- "Uuid",- "Text",- "Text",- "Text"- ]- },- "nullable": []- },- "hash": "e90e6774df5a94bc1972d4597db38189975a57bda9968986ef11f406acdde356"-}diff --git a/rust/personhog-identity/.sqlx/query-9741cc608fcf8b1b7b0a0b373d033ae6983a7a6bd85dc3e9c80c1a918f171c52.json b/rust/personhog-identity/.sqlx/query-eae79d01a57bf14f32e7b347cdcaab99c680e54031d80f3385cfc3151b61f4f0.jsonsimilarity index 63%rename from rust/personhog-identity/.sqlx/query-9741cc608fcf8b1b7b0a0b373d033ae6983a7a6bd85dc3e9c80c1a918f171c52.jsonrename to rust/personhog-identity/.sqlx/query-eae79d01a57bf14f32e7b347cdcaab99c680e54031d80f3385cfc3151b61f4f0.jsonindex 8b1a0e4b21cc..0215e71e96be 100644--- a/rust/personhog-identity/.sqlx/query-9741cc608fcf8b1b7b0a0b373d033ae6983a7a6bd85dc3e9c80c1a918f171c52.json+++ b/rust/personhog-identity/.sqlx/query-eae79d01a57bf14f32e7b347cdcaab99c680e54031d80f3385cfc3151b61f4f0.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "SELECT person_id, status FROM lifecycle_op_person_tmp WHERE op_id = $1",+ "query": "/* service='personhog-identity', operation='delete_outcome' */ SELECT person_id, status FROM lifecycle_op_person WHERE op_id = $1","describe": {"columns": [{@@ -24,5 +24,5 @@false]},- "hash": "9741cc608fcf8b1b7b0a0b373d033ae6983a7a6bd85dc3e9c80c1a918f171c52"+ "hash": "eae79d01a57bf14f32e7b347cdcaab99c680e54031d80f3385cfc3151b61f4f0"}diff --git a/rust/personhog-identity/.sqlx/query-d35c99234a5acc121ad3ffaf955ff0d837dd40443c7c643559020b901b70c847.json b/rust/personhog-identity/.sqlx/query-eb1006fb53186c089c3e85269935581c37d992802c19e3f5e92288348ac2cdaa.jsonsimilarity index 52%rename from rust/personhog-identity/.sqlx/query-d35c99234a5acc121ad3ffaf955ff0d837dd40443c7c643559020b901b70c847.jsonrename to rust/personhog-identity/.sqlx/query-eb1006fb53186c089c3e85269935581c37d992802c19e3f5e92288348ac2cdaa.jsonindex caaa2ccefaa6..031e11eaa912 100644--- a/rust/personhog-identity/.sqlx/query-d35c99234a5acc121ad3ffaf955ff0d837dd40443c7c643559020b901b70c847.json+++ b/rust/personhog-identity/.sqlx/query-eb1006fb53186c089c3e85269935581c37d992802c19e3f5e92288348ac2cdaa.json@@ -1,6 +1,6 @@{"db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op_person SET status = $2, mark_active = false WHERE op_id = $1 AND status = 'sealed'",+ "query": "/* service='personhog-identity', operation='delete_complete' */ UPDATE lifecycle_op_person SET status = $2, mark_active = false WHERE op_id = $1 AND status = 'sealed'","describe": {"columns": [],"parameters": {@@ -11,5 +11,5 @@},"nullable": []},- "hash": "d35c99234a5acc121ad3ffaf955ff0d837dd40443c7c643559020b901b70c847"+ "hash": "eb1006fb53186c089c3e85269935581c37d992802c19e3f5e92288348ac2cdaa"}diff --git a/rust/personhog-identity/.sqlx/query-ed5d9f2c07a384eeeb28263d78d0dbf1e6aad8c292f04e1946789162f7645bc1.json b/rust/personhog-identity/.sqlx/query-ed5d9f2c07a384eeeb28263d78d0dbf1e6aad8c292f04e1946789162f7645bc1.jsondeleted file mode 100644index 12a5e568daa2..000000000000--- a/rust/personhog-identity/.sqlx/query-ed5d9f2c07a384eeeb28263d78d0dbf1e6aad8c292f04e1946789162f7645bc1.json+++ /dev/null@@ -1,14 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "DELETE FROM lifecycle_op_person_tmp WHERE op_id = $1",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid"- ]- },- "nullable": []- },- "hash": "ed5d9f2c07a384eeeb28263d78d0dbf1e6aad8c292f04e1946789162f7645bc1"-}diff --git a/rust/personhog-identity/.sqlx/query-ee08c504f90b9614dc113f208adb1743e28d6be0692bcb9bbac300c1866431f6.json b/rust/personhog-identity/.sqlx/query-ee08c504f90b9614dc113f208adb1743e28d6be0692bcb9bbac300c1866431f6.jsondeleted file mode 100644index b97e04081739..000000000000--- a/rust/personhog-identity/.sqlx/query-ee08c504f90b9614dc113f208adb1743e28d6be0692bcb9bbac300c1866431f6.json+++ /dev/null@@ -1,28 +0,0 @@-{- "db_name": "PostgreSQL",- "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": [- {- "ordinal": 0,- "name": "person_id",- "type_info": "Int8"- }- ],- "parameters": {- "Left": [- "Uuid",- "Int4",- "Int8Array",- "UuidArray",- "TextArray",- "Text",- "Int4Array"- ]- },- "nullable": [- false- ]- },- "hash": "ee08c504f90b9614dc113f208adb1743e28d6be0692bcb9bbac300c1866431f6"-}diff --git a/rust/personhog-identity/.sqlx/query-ee7476c0062cdf53dc29ed1cee9e66c867ef88d926aeebc005cbdcc398f97182.json b/rust/personhog-identity/.sqlx/query-ee7476c0062cdf53dc29ed1cee9e66c867ef88d926aeebc005cbdcc398f97182.jsonnew file mode 100644index 000000000000..6e5163f4fdde--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-ee7476c0062cdf53dc29ed1cee9e66c867ef88d926aeebc005cbdcc398f97182.json@@ -0,0 +1,17 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_claim_abort_marks' */ \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": {+ "Left": [+ "Uuid",+ "Text",+ "Text",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "ee7476c0062cdf53dc29ed1cee9e66c867ef88d926aeebc005cbdcc398f97182"+}diff --git a/rust/personhog-identity/.sqlx/query-efaa179f9f914c40ee24a2f614a4abcfeb3c41a39015f3c716fffd70becac1ea.json b/rust/personhog-identity/.sqlx/query-efaa179f9f914c40ee24a2f614a4abcfeb3c41a39015f3c716fffd70becac1ea.jsondeleted file mode 100644index d34484af7511..000000000000--- a/rust/personhog-identity/.sqlx/query-efaa179f9f914c40ee24a2f614a4abcfeb3c41a39015f3c716fffd70becac1ea.json+++ /dev/null@@ -1,19 +0,0 @@-{- "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, $5, $6\n FROM unnest($3::bigint[], $4::uuid[]) AS u(person_id, person_uuid)\n ON CONFLICT (op_id, person_id) DO NOTHING\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Int4",- "Int8Array",- "UuidArray",- "Text",- "Text"- ]- },- "nullable": []- },- "hash": "efaa179f9f914c40ee24a2f614a4abcfeb3c41a39015f3c716fffd70becac1ea"-}diff --git a/rust/personhog-identity/.sqlx/query-f22aa52a89ef82c0f6db4b477bc998fe173e3d672e2e5d3a4f0178b94ca30792.json b/rust/personhog-identity/.sqlx/query-f22aa52a89ef82c0f6db4b477bc998fe173e3d672e2e5d3a4f0178b94ca30792.jsonnew file mode 100644index 000000000000..9ddad7af3a4c--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-f22aa52a89ef82c0f6db4b477bc998fe173e3d672e2e5d3a4f0178b94ca30792.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_park' */ \n UPDATE lifecycle_op\n SET parked_at = now(), parked_reason = $3, lease_expires_at = NULL\n WHERE op_id = $1 AND completed_at IS NULL AND attempt = $2\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Int4",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "f22aa52a89ef82c0f6db4b477bc998fe173e3d672e2e5d3a4f0178b94ca30792"+}diff --git a/rust/personhog-identity/.sqlx/query-f2cc527fb20cb2d049918b76a47abaff1d5b0fc456873e2bfb5850aa5ce5a103.json b/rust/personhog-identity/.sqlx/query-f2cc527fb20cb2d049918b76a47abaff1d5b0fc456873e2bfb5850aa5ce5a103.jsondeleted file mode 100644index 8b439286e28a..000000000000--- a/rust/personhog-identity/.sqlx/query-f2cc527fb20cb2d049918b76a47abaff1d5b0fc456873e2bfb5850aa5ce5a103.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n UPDATE lifecycle_op_person lop\n SET moved = u.moved\n FROM unnest($2::bigint[], $3::jsonb[]) AS u(person_id, moved)\n WHERE lop.op_id = $1 AND lop.person_id = u.person_id\n ",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Int8Array",- "JsonbArray"- ]- },- "nullable": []- },- "hash": "f2cc527fb20cb2d049918b76a47abaff1d5b0fc456873e2bfb5850aa5ce5a103"-}diff --git a/rust/personhog-identity/.sqlx/query-f31872b535cf9bf44236a3d2b741f7c3e7f03b212cb38a0c2283539c2123fd73.json b/rust/personhog-identity/.sqlx/query-f31872b535cf9bf44236a3d2b741f7c3e7f03b212cb38a0c2283539c2123fd73.jsonnew file mode 100644index 000000000000..8b36a6808fb3--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-f31872b535cf9bf44236a3d2b741f7c3e7f03b212cb38a0c2283539c2123fd73.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_write_claim_record' */ UPDATE lifecycle_op_person_tmp SET moved = $2 WHERE op_id = $1 AND role = $3",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Jsonb",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "f31872b535cf9bf44236a3d2b741f7c3e7f03b212cb38a0c2283539c2123fd73"+}diff --git a/rust/personhog-identity/.sqlx/query-f38b2c7545775feb00f9ccd51e3a45d9c62233a8da6217fc67c571d9ef39d26f.json b/rust/personhog-identity/.sqlx/query-f38b2c7545775feb00f9ccd51e3a45d9c62233a8da6217fc67c571d9ef39d26f.jsondeleted file mode 100644index 449a92dd23cf..000000000000--- a/rust/personhog-identity/.sqlx/query-f38b2c7545775feb00f9ccd51e3a45d9c62233a8da6217fc67c571d9ef39d26f.json+++ /dev/null@@ -1,22 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "\n SELECT count(*) as \"count!\" FROM lifecycle_op_person_tmp\n WHERE op_id = $1 AND mark_active\n ",- "describe": {- "columns": [- {- "ordinal": 0,- "name": "count!",- "type_info": "Int8"- }- ],- "parameters": {- "Left": [- "Uuid"- ]- },- "nullable": [- null- ]- },- "hash": "f38b2c7545775feb00f9ccd51e3a45d9c62233a8da6217fc67c571d9ef39d26f"-}diff --git a/rust/personhog-identity/.sqlx/query-f444c6da29350b382c7787ed897788b88c7e32a0ed89f484aa78fe0be2e7016b.json b/rust/personhog-identity/.sqlx/query-f444c6da29350b382c7787ed897788b88c7e32a0ed89f484aa78fe0be2e7016b.jsonnew file mode 100644index 000000000000..c69720df3545--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-f444c6da29350b382c7787ed897788b88c7e32a0ed89f484aa78fe0be2e7016b.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_fold_record_target' */ UPDATE lifecycle_op_person_tmp SET sealed = $2 WHERE op_id = $1 AND role = $3",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Jsonb",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "f444c6da29350b382c7787ed897788b88c7e32a0ed89f484aa78fe0be2e7016b"+}diff --git a/rust/personhog-identity/.sqlx/query-f71d884cdf8ac8017fbb05521411a593861874242f5aab7260195186652d7e24.json b/rust/personhog-identity/.sqlx/query-f71d884cdf8ac8017fbb05521411a593861874242f5aab7260195186652d7e24.jsondeleted file mode 100644index ba956caad171..000000000000--- a/rust/personhog-identity/.sqlx/query-f71d884cdf8ac8017fbb05521411a593861874242f5aab7260195186652d7e24.json+++ /dev/null@@ -1,16 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "UPDATE lifecycle_op_person SET status = $2, mark_active = false WHERE op_id = $1 AND role = $3",- "describe": {- "columns": [],- "parameters": {- "Left": [- "Uuid",- "Text",- "Text"- ]- },- "nullable": []- },- "hash": "f71d884cdf8ac8017fbb05521411a593861874242f5aab7260195186652d7e24"-}diff --git a/rust/personhog-identity/.sqlx/query-f7ce11431bec19f71efa05e40b55d4b281137fe7119b51a9cac8aed9ed88baac.json b/rust/personhog-identity/.sqlx/query-f7ce11431bec19f71efa05e40b55d4b281137fe7119b51a9cac8aed9ed88baac.jsonnew file mode 100644index 000000000000..61c1c5a04c5f--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-f7ce11431bec19f71efa05e40b55d4b281137fe7119b51a9cac8aed9ed88baac.json@@ -0,0 +1,14 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_discard_claim_abort_op' */ \n DELETE FROM lifecycle_op\n WHERE op_id = $1\n AND completed_at IS NOT NULL\n AND (outcome->>'claim_abort')::boolean IS TRUE\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid"+ ]+ },+ "nullable": []+ },+ "hash": "f7ce11431bec19f71efa05e40b55d4b281137fe7119b51a9cac8aed9ed88baac"+}diff --git a/rust/personhog-identity/.sqlx/query-fad4fa7daa65822c9b233deff9620b1126353e31c4951259815716ef4814ca72.json b/rust/personhog-identity/.sqlx/query-fad4fa7daa65822c9b233deff9620b1126353e31c4951259815716ef4814ca72.jsonnew file mode 100644index 000000000000..eab55cc5f83e--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-fad4fa7daa65822c9b233deff9620b1126353e31c4951259815716ef4814ca72.json@@ -0,0 +1,15 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='op_gc' */ \n DELETE FROM lifecycle_op\n WHERE op_id IN (\n SELECT op_id FROM lifecycle_op\n WHERE completed_at IS NOT NULL\n AND completed_at < now() - make_interval(secs => $1)\n LIMIT $2\n )\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Float8",+ "Int8"+ ]+ },+ "nullable": []+ },+ "hash": "fad4fa7daa65822c9b233deff9620b1126353e31c4951259815716ef4814ca72"+}diff --git a/rust/personhog-identity/.sqlx/query-fb0f051e3a549ee828b6cfd121b5ee7fec61b86a7ae9efb27bd0762af8f26970.json b/rust/personhog-identity/.sqlx/query-fb0f051e3a549ee828b6cfd121b5ee7fec61b86a7ae9efb27bd0762af8f26970.jsonnew file mode 100644index 000000000000..9c05951c5854--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-fb0f051e3a549ee828b6cfd121b5ee7fec61b86a7ae9efb27bd0762af8f26970.json@@ -0,0 +1,16 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_settle_drops' */ \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": {+ "Left": [+ "Uuid",+ "Text",+ "Int8Array"+ ]+ },+ "nullable": []+ },+ "hash": "fb0f051e3a549ee828b6cfd121b5ee7fec61b86a7ae9efb27bd0762af8f26970"+}diff --git a/rust/personhog-identity/.sqlx/query-fb5d7e6f0cadd899d20997f107f302ccfac9fa853207a03b65dc68e195292a7a.json b/rust/personhog-identity/.sqlx/query-fb5d7e6f0cadd899d20997f107f302ccfac9fa853207a03b65dc68e195292a7a.jsondeleted file mode 100644index 56bdac6ee405..000000000000--- a/rust/personhog-identity/.sqlx/query-fb5d7e6f0cadd899d20997f107f302ccfac9fa853207a03b65dc68e195292a7a.json+++ /dev/null@@ -1,20 +0,0 @@-{- "db_name": "PostgreSQL",- "query": "SELECT count(*) AS \"count!\" FROM lifecycle_op_tmp WHERE completed_at IS NULL AND parked_at IS NOT NULL",- "describe": {- "columns": [- {- "ordinal": 0,- "name": "count!",- "type_info": "Int8"- }- ],- "parameters": {- "Left": []- },- "nullable": [- null- ]- },- "hash": "fb5d7e6f0cadd899d20997f107f302ccfac9fa853207a03b65dc68e195292a7a"-}diff --git a/rust/personhog-identity/.sqlx/query-fcdf85e9c970fd057762ea687428d90b02910aad44c3806d804c7ea54b59e98e.json b/rust/personhog-identity/.sqlx/query-fcdf85e9c970fd057762ea687428d90b02910aad44c3806d804c7ea54b59e98e.jsonnew file mode 100644index 000000000000..1f6260635032--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-fcdf85e9c970fd057762ea687428d90b02910aad44c3806d804c7ea54b59e98e.json@@ -0,0 +1,17 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='merge_seal' */ \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": {+ "Left": [+ "Uuid",+ "Int8Array",+ "JsonbArray",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "fcdf85e9c970fd057762ea687428d90b02910aad44c3806d804c7ea54b59e98e"+}diff --git a/rust/personhog-identity/.sqlx/query-fe299a6039dcee7b7dbe072917dd14ee0068f9e23a960fae2c8482cf9b9a3032.json b/rust/personhog-identity/.sqlx/query-fe299a6039dcee7b7dbe072917dd14ee0068f9e23a960fae2c8482cf9b9a3032.jsonnew file mode 100644index 000000000000..2483ec1a7540--- /dev/null+++ b/rust/personhog-identity/.sqlx/query-fe299a6039dcee7b7dbe072917dd14ee0068f9e23a960fae2c8482cf9b9a3032.json@@ -0,0 +1,18 @@+{+ "db_name": "PostgreSQL",+ "query": "/* service='personhog-identity', operation='delete_mark_conflicts' */ \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 (op_id, person_id) DO NOTHING\n ",+ "describe": {+ "columns": [],+ "parameters": {+ "Left": [+ "Uuid",+ "Int4",+ "Int8Array",+ "UuidArray",+ "Text"+ ]+ },+ "nullable": []+ },+ "hash": "fe299a6039dcee7b7dbe072917dd14ee0068f9e23a960fae2c8482cf9b9a3032"+}diff --git a/rust/personhog-identity/README.md b/rust/personhog-identity/README.mdindex 1462af27cda2..65e32a9af1bd 100644--- a/rust/personhog-identity/README.md+++ b/rust/personhog-identity/README.md@@ -38,6 +38,13 @@ Tests need the persons database (`posthog_persons`) with `rust/persons_migrationcargo test -p personhog-identity```+## Query tags++Every statement carries `/* service='personhog-identity', operation='<name>' */` in front, the SQLCommenter shape both pganalyze and pgcollector parse, so load and latency can be cut by code path.+Compile-time checked queries get it from `op = "..."` on the `mirrored_query*!` macros; statements built at runtime wrap their SQL in `personhog_common::query_tag!("<name>", sql)`.+Operation names are `<saga or store>_<step>_<what>`, for example `merge_flip_lock_persons` or `stub_create_mappings`.+See `rust/pgcollector/docs/query-tags.md` for the key vocabulary.+## Parked lifecycle opsA lifecycle op parks when the leader answers a semantic refusal after the point of no return: retrying a definitive refusal cannot succeed, so the op holds its fences and only an explicit retry under the same op id resumes it (the sweeper is barred). Refusals before the point of no return abort instead, recording `skipped_refused` for their sources and releasing fences in the same settlement. The sweeper re-drives interrupted sagas to a terminal state and defaults on; a fleet that disables it converts every orphaned saga into fences an operator must clear. The surface is the `personhog_lifecycle_ops_parked` gauge and the park's ERROR log carrying the op id and reason; resolution is a retry with the recorded op id.diff --git a/rust/personhog-identity/src/lifecycle/delete.rs b/rust/personhog-identity/src/lifecycle/delete.rsindex 03fac541f26f..a1b973c7a77d 100644--- a/rust/personhog-identity/src/lifecycle/delete.rs+++ b/rust/personhog-identity/src/lifecycle/delete.rs@@ -40,6 +40,7 @@ use crate::lifecycle::leader_calls::{fence_victims, release_fenced, Fenced, FencedVictim, LeaderCalls,};use crate::pools::{IdentityPools, Lane};+use personhog_common::query_tag;// Derived from the shared enum so the op-type string cannot drift from// the leader's fence records or the lifecycle_op CHECK constraint.@@ -232,6 +233,7 @@ async fn mark(pools: &IdentityPools, tables: &IdentityTables, op: &OpRow) -> Res// the advance): whatever they claimed stays claimed.let existing: Vec<i64> = mirrored_query_scalar!(tables.is_validation(),+ op = "delete_mark_existing","SELECT person_id FROM {lifecycle_op_person} WHERE op_id = $1",op.op_id=> fetch_all(&mut *tx)@@ -255,7 +257,7 @@ async fn mark(pools: &IdentityPools, tables: &IdentityTables, op: &OpRow) -> ResORDER BY id"#);- let live: Vec<(i64, Uuid)> = sqlx::query_as(&live_sql)+ let live: Vec<(i64, Uuid)> = sqlx::query_as(&query_tag!("delete_mark_live_persons", live_sql)).bind(team_id).bind(&to_claim).fetch_all(&mut *tx)@@ -267,6 +269,7 @@ async fn mark(pools: &IdentityPools, tables: &IdentityTables, op: &OpRow) -> Res// on the partial mark index IS the conflict with another live op.let marked: Vec<i64> = mirrored_query_scalar!(tables.is_validation(),+ op = "delete_mark_victims",r#"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, true@@ -298,6 +301,7 @@ async fn mark(pools: &IdentityPools, tables: &IdentityTables, op: &OpRow) -> Resif !conflicted_ids.is_empty() {mirrored_query!(tables.is_validation(),+ op = "delete_mark_conflicts",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@@ -329,7 +333,7 @@ async fn mark(pools: &IdentityPools, tables: &IdentityTables, op: &OpRow) -> Res"#,lop_table = tables.lifecycle_op_person,);- sqlx::query(&corpse_sql)+ sqlx::query(&query_tag!("delete_mark_drop_corpses", corpse_sql)).bind(op.op_id).bind(team_id).execute(&mut *tx)@@ -337,6 +341,7 @@ async fn mark(pools: &IdentityPools, tables: &IdentityTables, op: &OpRow) -> Reslet claims: i64 = mirrored_query_scalar!(tables.is_validation(),+ op = "delete_mark_active_claims",r#"SELECT count(*) as "count!" FROM {lifecycle_op_person}WHERE op_id = $1 AND mark_active@@ -409,6 +414,7 @@ async fn seal() -> Result<(), SagaError> {let victims: Vec<i64> = mirrored_query_scalar!(tables.is_validation(),+ op = "delete_seal_victims",r#"SELECT person_id FROM {lifecycle_op_person}WHERE op_id = $1 AND mark_active@@ -448,6 +454,7 @@ async fn seal(let mut tx = pools.begin(Lane::Heavy).await?;mirrored_query!(tables.is_validation(),+ op = "delete_seal",r#"UPDATE {lifecycle_op_person} lopSET status = $2, sealed = jsonb_build_object('version', u.version, 'created_at', u.created_at)@@ -465,6 +472,7 @@ async fn seal(if !vanished.is_empty() {mirrored_query!(tables.is_validation(),+ op = "delete_seal_drop_vanished",r#"DELETE FROM {lifecycle_op_person}WHERE op_id = $1 AND person_id = ANY($2) AND mark_active@@ -510,6 +518,7 @@ async fn unmap(let mut victims: Vec<i64> = mirrored_query_scalar!(tables.is_validation(),+ op = "delete_unmap_victims",r#"SELECT person_id FROM {lifecycle_op_person}WHERE op_id = $1 AND status = 'sealed'@@ -530,7 +539,7 @@ async fn unmap("SELECT id FROM {person_table} WHERE team_id = $1 AND id = ANY($2) ORDER BY id FOR UPDATE",person_table = tables.person,);- sqlx::query(&lock_persons_sql)+ sqlx::query(&query_tag!("delete_unmap_lock_persons", lock_persons_sql)).bind(team_id).bind(&victims).execute(&mut *tx)@@ -539,7 +548,7 @@ async fn unmap("SELECT id FROM {pdi_table} WHERE team_id = $1 AND person_id = ANY($2) ORDER BY id FOR UPDATE",pdi_table = tables.person_distinct_id,);- sqlx::query(&lock_pdi_sql)+ sqlx::query(&query_tag!("delete_unmap_lock_distinct_ids", lock_pdi_sql)).bind(team_id).bind(&victims).execute(&mut *tx)@@ -554,11 +563,14 @@ async fn unmap("#,pdi_table = tables.person_distinct_id,);- let tombstoned: Vec<(i64, String, i64)> = sqlx::query_as(&tombstone_pdi_sql)- .bind(team_id)- .bind(&victims)- .fetch_all(&mut *tx)- .await?;+ let tombstoned: Vec<(i64, String, i64)> = sqlx::query_as(&query_tag!(+ "delete_unmap_tombstone_distinct_ids",+ tombstone_pdi_sql+ ))+ .bind(team_id)+ .bind(&victims)+ .fetch_all(&mut *tx)+ .await?;// Record the tombstoned mappings per victim in the same commit — this is// what a later ClickHouse emission (or an operator) reads back.@@ -580,6 +592,7 @@ async fn unmap(if !moved_ids.is_empty() {mirrored_query!(tables.is_validation(),+ op = "delete_unmap_record_moved",r#"UPDATE {lifecycle_op_person} lopSET moved = u.moved@@ -599,7 +612,7 @@ async fn unmap(// collide with unrelated persons' cohort rows — skip the clear entirely.if tables.person == "posthog_person" {sqlx::query!(- "DELETE FROM posthog_cohortpeople WHERE person_id = ANY($1)",+ "/* service='personhog-identity', operation='delete_unmap_cohort_membership' */ DELETE FROM posthog_cohortpeople WHERE person_id = ANY($1)",&victims).execute(&mut *tx)@@ -610,11 +623,14 @@ async fn unmap("DELETE FROM {} WHERE team_id = $1 AND person_id = ANY($2)",tables.ff_hash_key_override);- sqlx::query(&delete_overrides_sql)- .bind(team_id)- .bind(&victims)- .execute(&mut *tx)- .await?;+ sqlx::query(&query_tag!(+ "delete_unmap_hash_key_overrides",+ delete_overrides_sql+ ))+ .bind(team_id)+ .bind(&victims)+ .execute(&mut *tx)+ .await?;let tombstone_sql = format!(r#"@@ -631,7 +647,7 @@ async fn unmap(person_table = tables.person,lop_table = tables.lifecycle_op_person,);- sqlx::query(&tombstone_sql)+ sqlx::query(&query_tag!("delete_unmap_tombstone_persons", tombstone_sql)).bind(op.op_id).bind(team_id).execute(&mut *tx)@@ -677,6 +693,7 @@ async fn complete(let fenced = mirrored_query_as!(FencedVictim,tables.is_validation(),+ op = "delete_complete_fenced",r#"SELECT person_id, person_uuid,(sealed->>'version')::bigint AS "sealed_version!",@@ -694,6 +711,7 @@ async fn complete(mirrored_query!(tables.is_validation(),+ op = "delete_complete","UPDATE {lifecycle_op_person} SET status = $2, mark_active = false WHERE op_id = $1 AND status = 'sealed'",op.op_id,STATUS_DELETED@@ -734,6 +752,7 @@ async fn build_outcome(let rows = mirrored_query_as!(PersonStatus,tables.is_validation(),+ op = "delete_outcome","SELECT person_id, status FROM {lifecycle_op_person} WHERE op_id = $1",op_id=> fetch_all(&mut **tx)diff --git a/rust/personhog-identity/src/lifecycle/engine.rs b/rust/personhog-identity/src/lifecycle/engine.rsindex c9722b5a0555..77a815e70d09 100644--- a/rust/personhog-identity/src/lifecycle/engine.rs+++ b/rust/personhog-identity/src/lifecycle/engine.rs@@ -267,6 +267,7 @@ impl Engine {) -> Result<OpRow, SagaError> {let inserted = mirrored_query!(self.tables.is_validation(),+ op = "op_create_or_attach",r#"INSERT INTO {lifecycle_op} (op_id, op_type, team_id, step, request)VALUES ($1, $2, $3, $4, $5)@@ -529,6 +530,7 @@ impl Engine {mirrored_query_as!(OpRow,self.tables.is_validation(),+ op = "op_load",r#"SELECT op_id, op_type, team_id::bigint as "team_id!", step, attempt,request as "request: Value", outcome as "outcome: Value",@@ -564,6 +566,7 @@ impl Engine {async fn try_claim(&self, op_id: Uuid, unpark: bool) -> Result<Option<i32>, sqlx::Error> {mirrored_query_scalar!(self.tables.is_validation(),+ op = "op_try_claim",r#"UPDATE {lifecycle_op}SET lease_expires_at = now() + make_interval(secs => $2),@@ -600,6 +603,7 @@ impl Engine {let reason = personhog_common::grpc::refusal_reason_label(status).to_string();let parked = mirrored_query!(self.tables.is_validation(),+ op = "op_park",r#"UPDATE {lifecycle_op}SET parked_at = now(), parked_reason = $3, lease_expires_at = NULL@@ -638,6 +642,7 @@ impl Engine {async fn renew_lease(&self, op_id: Uuid, attempt: i32) -> Result<bool, sqlx::Error> {let result = mirrored_query!(self.tables.is_validation(),+ op = "op_renew_lease",r#"UPDATE {lifecycle_op}SET lease_expires_at = now() + make_interval(secs => $2)@@ -654,6 +659,7 @@ impl Engine {async fn release_lease(&self, op_id: Uuid, attempt: i32) -> Result<(), sqlx::Error> {mirrored_query!(self.tables.is_validation(),+ op = "op_release_lease","UPDATE {lifecycle_op} SET lease_expires_at = NULL WHERE op_id = $1 AND completed_at IS NULL AND attempt = $2",op_id,attempt@@ -670,6 +676,7 @@ impl Engine {let abandoned = mirrored_query_as!(AbandonedOp,self.tables.is_validation(),+ op = "op_sweep_abandoned",r#"SELECT op_id, op_typeFROM {lifecycle_op}@@ -716,6 +723,7 @@ impl Engine {// only: a failure must not fail a pass whose resumes succeeded.match mirrored_query_scalar!(self.tables.is_validation(),+ op = "op_sweep_backlog",r#"SELECT count(*) AS "count!" FROM {lifecycle_op} WHERE completed_at IS NULL AND parked_at IS NOT NULL"#=> fetch_one(self.pools.fast())) {@@ -732,6 +740,7 @@ impl Engine {pub async fn gc(&self, retention: Duration) -> Result<u64, SagaError> {let result = mirrored_query!(self.tables.is_validation(),+ op = "op_gc",r#"DELETE FROM {lifecycle_op}WHERE op_id IN (@@ -767,6 +776,7 @@ pub async fn advance_step_in_tx() -> Result<bool, sqlx::Error> {let result = mirrored_query!(tables.is_validation(),+ op = "op_advance_step","UPDATE {lifecycle_op} SET step = $3 WHERE op_id = $1 AND step = $2",op_id,from,@@ -788,6 +798,7 @@ pub async fn complete_op_in_tx() -> Result<bool, sqlx::Error> {let result = mirrored_query!(tables.is_validation(),+ op = "op_complete",r#"UPDATE {lifecycle_op}SET step = $3, outcome = $4, completed_at = now(), lease_expires_at = NULLdiff --git a/rust/personhog-identity/src/lifecycle/merge.rs b/rust/personhog-identity/src/lifecycle/merge.rsindex b0d9775e6ba2..c0a53749978d 100644--- a/rust/personhog-identity/src/lifecycle/merge.rs+++ b/rust/personhog-identity/src/lifecycle/merge.rs@@ -55,6 +55,7 @@ use crate::lifecycle::engine::{STEP_COMPLETED,};use crate::pools::{IdentityPools, Lane};+use personhog_common::query_tag;// Derived from the shared enum so the op-type string cannot drift from// the leader's fence records or the lifecycle_op CHECK constraint.@@ -141,6 +142,7 @@ async fn op_moved_on(let current = mirrored_query_as!(OpProgress,tables.is_validation(),+ op = "merge_op_moved_on",r#"SELECT step, completed_at IS NOT NULL AS "completed!" FROM {lifecycle_op} WHERE op_id = $1"#,op.op_id=> fetch_optional(pools.fast())@@ -415,6 +417,7 @@ impl MergeOpExecutor {let tables = self.engine.tables();let deleted = mirrored_query!(tables.is_validation(),+ op = "merge_discard_claim_abort_op",r#"DELETE FROM {lifecycle_op}WHERE op_id = $1@@ -428,6 +431,7 @@ impl MergeOpExecutor {if deleted.rows_affected() > 0 {mirrored_query!(tables.is_validation(),+ op = "merge_discard_claim_abort_persons","DELETE FROM {lifecycle_op_person} WHERE op_id = $1",op_id=> execute(&mut *tx)@@ -586,11 +590,12 @@ async fn resolve_dids(pdi_table = tables.person_distinct_id,person_table = tables.person,);- let rows: Vec<(String, i64, Uuid, bool)> = sqlx::query_as(&resolve_sql)- .bind(team_id)- .bind(dids)- .fetch_all(&mut **tx)- .await?;+ let rows: Vec<(String, i64, Uuid, bool)> =+ sqlx::query_as(&query_tag!("merge_resolve_dids", resolve_sql))+ .bind(team_id)+ .bind(dids)+ .fetch_all(&mut **tx)+ .await?;Ok(rows.into_iter().map(|(distinct_id, person_id, person_uuid, is_identified)| {@@ -720,7 +725,7 @@ impl MergeDriver {"#,pdi_table = self.tables.person_distinct_id,);- let over: Vec<i64> = sqlx::query_scalar(&over_sql)+ let over: Vec<i64> = sqlx::query_scalar(&query_tag!("merge_claim_over_limit", over_sql)).bind(team_id).bind(&candidate_ids).bind(request.move_limit)@@ -754,6 +759,7 @@ impl MergeDriver {let marked: Vec<i64> = mirrored_query_scalar!(self.tables.is_validation(),+ op = "merge_claim_mark",r#"INSERT INTO {lifecycle_op_person}(op_id, team_id, person_id, person_uuid, role, ordinal, status, mark_active)@@ -802,6 +808,7 @@ impl MergeDriver {let conflicted_uuids: Vec<Uuid> = conflicted.iter().map(|c| c.1).collect();mirrored_query!(self.tables.is_validation(),+ op = "merge_claim_record_conflicts",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, $5, $6@@ -861,6 +868,7 @@ impl MergeDriver {if !dropped.is_empty() {mirrored_query!(self.tables.is_validation(),+ op = "merge_claim_drop_pending",r#"UPDATE {lifecycle_op_person} SET status = $2, mark_active = falseWHERE op_id = $1 AND person_id = ANY($3) AND status = $4@@ -881,6 +889,7 @@ impl MergeDriver {// and end the op. No fences exist yet.mirrored_query!(self.tables.is_validation(),+ op = "merge_claim_abort_marks",r#"UPDATE {lifecycle_op_person} SET status = $2, mark_active = falseWHERE op_id = $1 AND role = $3 AND status = $4@@ -923,6 +932,7 @@ impl MergeDriver {async fn unmark(tx: &mut Tx<'_>, tables: &IdentityTables, op: &OpRow) -> Result<(), SagaError> {mirrored_query!(tables.is_validation(),+ op = "merge_unmark","UPDATE {lifecycle_op_person} SET status = $2, mark_active = false WHERE op_id = $1 AND status = $3",op.op_id,STATUS_ABORTED,@@ -940,6 +950,7 @@ async fn write_claim_record() -> Result<(), SagaError> {mirrored_query!(tables.is_validation(),+ op = "merge_write_claim_record","UPDATE {lifecycle_op_person} SET moved = $2 WHERE op_id = $1 AND role = $3",op.op_id,record,@@ -1127,6 +1138,7 @@ impl MergeDriver {.map_err(|e| SagaError::CorruptState(format!("failed to serialize seal: {e}")))?;mirrored_query!(self.tables.is_validation(),+ op = "merge_seal",r#"UPDATE {lifecycle_op_person} lopSET status = $4, sealed = u.sealed@@ -1273,6 +1285,7 @@ async fn live_sources(Ok(mirrored_query_as!(PersonRef,tables.is_validation(),+ op = "merge_live_sources",r#"SELECT person_id, person_uuid FROM {lifecycle_op_person}WHERE op_id = $1 AND role = $2 AND mark_active@@ -1291,6 +1304,7 @@ async fn abort_marks() -> Result<(), SagaError> {mirrored_query!(tables.is_validation(),+ op = "merge_abort_marks",r#"UPDATE {lifecycle_op_person} SET status = $2, mark_active = falseWHERE op_id = $1 AND role = $3 AND mark_active@@ -1318,6 +1332,7 @@ async fn settle_drops(}mirrored_query!(tables.is_validation(),+ op = "merge_settle_drops",r#"UPDATE {lifecycle_op_person} SET status = $2, mark_active = falseWHERE op_id = $1 AND person_id = ANY($3) AND mark_active@@ -1469,6 +1484,7 @@ impl MergeDriver {let mut tx = pools.begin(Lane::Heavy).await?;mirrored_query!(self.tables.is_validation(),+ op = "merge_fold_record_target","UPDATE {lifecycle_op_person} SET sealed = $2 WHERE op_id = $1 AND role = $3",op.op_id,survivor,@@ -1504,6 +1520,7 @@ async fn target_row(Ok(mirrored_query_as!(PersonRef,tables.is_validation(),+ op = "merge_target_row","SELECT person_id, person_uuid FROM {lifecycle_op_person} WHERE op_id = $1 AND role = $2",op.op_id,ROLE_TARGET@@ -1519,6 +1536,7 @@ async fn sealed_sources(Ok(mirrored_query_as!(SealedSource,tables.is_validation(),+ op = "merge_sealed_sources",r#"SELECT person_id, person_uuid, ordinal as "ordinal!", sealed as "sealed!"FROM {lifecycle_op_person}@@ -1552,6 +1570,7 @@ async fn flip(pools: &IdentityPools, tables: &IdentityTables, op: &OpRow) -> Reslet target: i64 = mirrored_query_scalar!(tables.is_validation(),+ op = "merge_flip_target","SELECT person_id FROM {lifecycle_op_person} WHERE op_id = $1 AND role = $2",op.op_id,ROLE_TARGET@@ -1559,6 +1578,7 @@ async fn flip(pools: &IdentityPools, tables: &IdentityTables, op: &OpRow) -> Res)?;let mut sources: Vec<i64> = mirrored_query_scalar!(tables.is_validation(),+ op = "merge_flip_sources",r#"SELECT person_id FROM {lifecycle_op_person}WHERE op_id = $1 AND role = $2 AND status = $3@@ -1580,7 +1600,7 @@ async fn flip(pools: &IdentityPools, tables: &IdentityTables, op: &OpRow) -> Res"SELECT id FROM {person_table} WHERE team_id = $1 AND id = ANY($2) ORDER BY id FOR UPDATE",person_table = tables.person,);- sqlx::query(&lock_persons_sql)+ sqlx::query(&query_tag!("merge_flip_lock_persons", lock_persons_sql)).bind(team_id).bind(&lock_ids).execute(&mut *tx)@@ -1589,7 +1609,7 @@ async fn flip(pools: &IdentityPools, tables: &IdentityTables, op: &OpRow) -> Res"SELECT id FROM {pdi_table} WHERE team_id = $1 AND person_id = ANY($2) ORDER BY id FOR UPDATE",pdi_table = tables.person_distinct_id,);- sqlx::query(&lock_pdi_sql)+ sqlx::query(&query_tag!("merge_flip_lock_distinct_ids", lock_pdi_sql)).bind(team_id).bind(&sources).execute(&mut *tx)@@ -1653,12 +1673,13 @@ async fn repoint_distinct_ids("#,pdi_table = tables.person_distinct_id,);- let rows: Vec<(i64, String, i64)> = sqlx::query_as(&repoint_sql)- .bind(team_id)- .bind(sources)- .bind(target)- .fetch_all(&mut **tx)- .await?;+ let rows: Vec<(i64, String, i64)> =+ sqlx::query_as(&query_tag!("merge_repoint_distinct_ids", repoint_sql))+ .bind(team_id)+ .bind(sources)+ .bind(target)+ .fetch_all(&mut **tx)+ .await?;Ok(rows.into_iter().map(|(old_person_id, distinct_id, version)| RepointedDid {@@ -1696,6 +1717,7 @@ async fn record_moved_mappings(}mirrored_query!(tables.is_validation(),+ op = "merge_record_moved_mappings",r#"UPDATE {lifecycle_op_person} lopSET moved = u.moved@@ -1728,7 +1750,7 @@ async fn move_cohort_membership(return Ok(());}sqlx::query!(- "UPDATE posthog_cohortpeople SET person_id = $2 WHERE person_id = ANY($1)",+ "/* service='personhog-identity', operation='merge_move_cohort_membership' */ UPDATE posthog_cohortpeople SET person_id = $2 WHERE person_id = ANY($1)",sources,target,)@@ -1759,7 +1781,7 @@ async fn move_hash_key_overrides("#,override_table = tables.ff_hash_key_override,);- sqlx::query(&move_sql)+ sqlx::query(&query_tag!("merge_move_hash_key_overrides", move_sql)).bind(team_id).bind(sources).bind(target)@@ -1792,7 +1814,7 @@ async fn tombstone_sealed_sources(person_table = tables.person,lop_table = tables.lifecycle_op_person,);- sqlx::query(&tombstone_sql)+ sqlx::query(&query_tag!("merge_tombstone_sealed_sources", tombstone_sql)).bind(op.op_id).bind(team_id).bind(ROLE_SOURCE)@@ -1813,6 +1835,7 @@ async fn clear_target_mark() -> Result<(), SagaError> {mirrored_query!(tables.is_validation(),+ op = "merge_clear_target_mark","UPDATE {lifecycle_op_person} SET status = $2, mark_active = false WHERE op_id = $1 AND role = $3",op.op_id,STATUS_CLEARED,@@ -1883,6 +1906,7 @@ impl MergeDriver {let mut tx = pools.begin(Lane::Heavy).await?;mirrored_query!(self.tables.is_validation(),+ op = "merge_complete",r#"UPDATE {lifecycle_op_person} SET status = $2, mark_active = falseWHERE op_id = $1 AND role = $3 AND status = $4@@ -1921,6 +1945,7 @@ async fn claim_record() -> Result<ClaimRecord, SagaError> {let moved = mirrored_query_scalar!(tables.is_validation(),+ op = "merge_load_claim_record","SELECT moved FROM {lifecycle_op_person} WHERE op_id = $1 AND role = $2",op.op_id,ROLE_TARGET@@ -1952,6 +1977,7 @@ async fn build_outcome(let statuses: HashMap<i64, String> = mirrored_query_as!(PersonStatus,tables.is_validation(),+ op = "merge_outcome_statuses","SELECT person_id, status FROM {lifecycle_op_person} WHERE op_id = $1 AND role = $2",op.op_id,ROLE_SOURCE@@ -1966,6 +1992,7 @@ async fn build_outcome(} else {mirrored_query_scalar!(tables.is_validation(),+ op = "merge_outcome_sealed","SELECT sealed FROM {lifecycle_op_person} WHERE op_id = $1 AND role = $2",op.op_id,ROLE_TARGETdiff --git a/rust/personhog-identity/src/main.rs b/rust/personhog-identity/src/main.rsindex 00b3667cc014..401e628026c2 100644--- a/rust/personhog-identity/src/main.rs+++ b/rust/personhog-identity/src/main.rs@@ -21,6 +21,7 @@ use tracing_subscriber::util::SubscriberInitExt;use tracing_subscriber::EnvFilter;use personhog_common::client::RouterClient;+use personhog_common::query_tag;use personhog_coordination::store::PersonhogStore;use personhog_identity::config::Config;use personhog_identity::leader::LifecycleLeader;@@ -73,7 +74,10 @@ async fn warm_pool(pool: &PgPool, lane: Lane, min_connections: u32, server_warmu}let mut server_warmed = 0u32;for conn in conns.iter_mut().take(server_warmup_count) {- match sqlx::query("SELECT 1").execute(&mut **conn).await {+ match sqlx::query(&query_tag!("warm_pool", "SELECT 1"))+ .execute(&mut **conn)+ .await+ {Ok(_) => server_warmed += 1,Err(e) => {tracing::warn!(pool = lane.label(), error = %e, "Failed to warm server-side connection");diff --git a/rust/personhog-identity/src/storage/postgres/attach.rs b/rust/personhog-identity/src/storage/postgres/attach.rsindex a218dc6f68c4..6c8e56114378 100644--- a/rust/personhog-identity/src/storage/postgres/attach.rs+++ b/rust/personhog-identity/src/storage/postgres/attach.rs@@ -9,6 +9,7 @@ use crate::config::IdentityTables;use crate::pools::{IdentityPools, Lane};use crate::storage::error::StorageResult;use crate::storage::types::AttachOutcome;+use personhog_common::query_tag;/// Fresh inserts get version 1, like a stub's extra distinct ids: with no/// personless table there is no proof the id never sent events, and 1 is@@ -57,7 +58,7 @@ pub(super) async fn attach_distinct_ids(lop = tables.lifecycle_op_person,);let mut conn = pools.acquire(Lane::Heavy).await?;- let written = sqlx::query(&insert_sql)+ let written = sqlx::query(&query_tag!("attach_mappings", insert_sql)).bind(&sorted).bind(person_id).bind(team_id as i32)@@ -89,7 +90,7 @@ pub(super) async fn attach_distinct_ids("#,pdi = tables.person_distinct_id,);- let rows = sqlx::query(&losers_sql)+ let rows = sqlx::query(&query_tag!("attach_losers", losers_sql)).bind(team_id as i32).bind(&losers).fetch_all(&mut *conn)diff --git a/rust/personhog-identity/src/storage/postgres/distinct_ids.rs b/rust/personhog-identity/src/storage/postgres/distinct_ids.rsindex 5514bda7844f..61d5deb3aeba 100644--- a/rust/personhog-identity/src/storage/postgres/distinct_ids.rs+++ b/rust/personhog-identity/src/storage/postgres/distinct_ids.rs@@ -3,6 +3,7 @@ use sqlx::Row;use crate::storage::error::StorageResult;use crate::storage::types::DistinctIdMapping;+use personhog_common::query_tag;/// Expand person ids to live distinct id rows on the primary. With a/// per-person limit, identified ids survive the cut (the regex mirrors@@ -39,7 +40,7 @@ pub(super) async fn get_distinct_ids_for_persons() l"#);- sqlx::query(&sql)+ sqlx::query(&query_tag!("distinct_ids_capped", sql)).bind(team_id as i32).bind(person_ids).bind(limit)@@ -54,7 +55,7 @@ pub(super) async fn get_distinct_ids_for_persons(WHERE team_id = $1 AND person_id = ANY($2) AND is_deleted = false"#);- sqlx::query(&sql)+ sqlx::query(&query_tag!("distinct_ids", sql)).bind(team_id as i32).bind(person_ids).fetch_all(pool)diff --git a/rust/personhog-identity/src/storage/postgres/resolve.rs b/rust/personhog-identity/src/storage/postgres/resolve.rsindex 0003cefea89f..dc617c19ce3c 100644--- a/rust/personhog-identity/src/storage/postgres/resolve.rs+++ b/rust/personhog-identity/src/storage/postgres/resolve.rs@@ -7,6 +7,7 @@ use crate::pools::{IdentityPools, Lane};use crate::storage::error::StorageResult;use crate::storage::postgres::{person_columns, person_from_row};use crate::storage::types::Person;+use personhog_common::query_tag;/// Batch-resolve (team_id, distinct_id) keys to their live persons on the/// primary. Tombstoned mappings and persons are invisible; unresolved keys@@ -40,7 +41,7 @@ pub(super) async fn resolve_distinct_ids(person_table = tables.person,);let mut conn = pools.acquire(Lane::Fast).await?;- let rows = sqlx::query(&sql)+ let rows = sqlx::query(&query_tag!("resolve_persons", sql)).bind(&team_ids).bind(&distinct_ids).fetch_all(&mut *conn)diff --git a/rust/personhog-identity/src/storage/postgres/stub_create.rs b/rust/personhog-identity/src/storage/postgres/stub_create.rsindex 4cc25813acb7..02b299dc545a 100644--- a/rust/personhog-identity/src/storage/postgres/stub_create.rs+++ b/rust/personhog-identity/src/storage/postgres/stub_create.rs@@ -36,6 +36,7 @@ use crate::pools::{IdentityPools, Lane};use crate::storage::error::StorageResult;use crate::storage::postgres::{person_columns, person_from_row};use crate::storage::types::{Person, PersonStub, StubOutcome};+use personhog_common::query_tag;type Tx<'a> = sqlx::Transaction<'a, sqlx::Postgres>;@@ -167,7 +168,7 @@ async fn insert_or_revive_persons(person_cols = person_columns(person_table),lop_table = tables.lifecycle_op_person,);- let inserted = sqlx::query(&sql)+ let inserted = sqlx::query(&query_tag!("stub_create_persons", sql)).bind(&sorted_created_ats).bind(&sorted_team_ids).bind(&sorted_is_identified)@@ -221,7 +222,7 @@ async fn fetch_conflict_winners("#,person_cols = person_columns("p"),);- let winners = sqlx::query(&sql)+ let winners = sqlx::query(&query_tag!("stub_create_conflict_winners", sql)).bind(&conflicted_teams).bind(&conflicted_uuids).fetch_all(&mut **tx)@@ -307,7 +308,7 @@ async fn insert_distinct_id_mappings((xmax = 0) AS inserted"#);- let rows = sqlx::query(&sql)+ let rows = sqlx::query(&query_tag!("stub_create_mappings", sql)).bind(&pdi_dids).bind(&pdi_person_ids).bind(&pdi_teams)@@ -365,11 +366,12 @@ async fn resolve_stub_outcomes("SELECT person_id FROM {} WHERE team_id = $1 AND distinct_id = $2 AND is_deleted = false",tables.person_distinct_id);- let existing: Option<i64> = sqlx::query_scalar(&existing_sql)- .bind(stub.team_id as i32)- .bind(&stub.distinct_id)- .fetch_optional(&mut **tx)- .await?;+ let existing: Option<i64> =+ sqlx::query_scalar(&query_tag!("stub_create_existing_mapping", existing_sql))+ .bind(stub.team_id as i32)+ .bind(&stub.distinct_id)+ .fetch_optional(&mut **tx)+ .await?;if existing == Some(resolved.person.id) {outcomes.push(StubOutcome::Committed {person: resolved.person.clone(),@@ -414,20 +416,26 @@ async fn undo_created_person(WHERE team_id = $1 AND distinct_id = ANY($2)"#);- sqlx::query(&retombstone_sql)- .bind(team_id as i32)- .bind(&revived_dids)- .execute(&mut **tx)- .await?;+ sqlx::query(&query_tag!(+ "stub_create_undo_retombstone_mappings",+ retombstone_sql+ ))+ .bind(team_id as i32)+ .bind(&revived_dids)+ .execute(&mut **tx)+ .await?;}let delete_mappings_sql = format!("DELETE FROM {pdi_table} WHERE team_id = $1 AND person_id = $2 AND is_deleted = false");- sqlx::query(&delete_mappings_sql)- .bind(team_id as i32)- .bind(resolved.person.id)- .execute(&mut **tx)- .await?;+ sqlx::query(&query_tag!(+ "stub_create_undo_delete_mappings",+ delete_mappings_sql+ ))+ .bind(team_id as i32)+ .bind(resolved.person.id)+ .execute(&mut **tx)+ .await?;if resolved.revived_tombstone {let sql = format!(r#"@@ -437,14 +445,14 @@ async fn undo_created_person(WHERE team_id = $1 AND id = $2"#);- sqlx::query(&sql)+ sqlx::query(&query_tag!("stub_create_undo_retombstone_person", sql)).bind(team_id as i32).bind(resolved.person.id).execute(&mut **tx).await?;} else {let sql = format!("DELETE FROM {person_table} WHERE team_id = $1 AND id = $2");- sqlx::query(&sql)+ sqlx::query(&query_tag!("stub_create_undo_delete_person", sql)).bind(team_id as i32).bind(resolved.person.id).execute(&mut **tx)diff --git a/rust/pgcollector/docs/query-tags.md b/rust/pgcollector/docs/query-tags.mdindex 0952df39e05d..369e5d29d056 100644--- a/rust/pgcollector/docs/query-tags.md+++ b/rust/pgcollector/docs/query-tags.md@@ -12,6 +12,7 @@ Three comment shapes are accepted, because all three already run against our clu| shape | example | where it comes from || --- | --- | --- || SQLCommenter | `/* route='/api/x', controller='PersonViewSet' */` | OpenTelemetry and Datadog instrumentation; values are percent-encoded |+| SQLCommenter | `/* service='personhog-identity', operation='merge_flip_lock_persons' */` | Rust services: `op = "..."` on `common_sqlx_macros::mirrored_query!` and `personhog_common::query_tag!` for statements built at runtime || colon pairs | `/* team_id:42 query_type:recording_api_list_blocks */` | the shape PostHog uses for ClickHouse, reused by the CDP and replay services || ingestion prefix | `/* nodejs:PERSONS_WRITE:Tx<insertPerson:ingestion/merge> */` | `nodejs/src/common/utils/db/postgres.ts` |@@ -35,12 +36,12 @@ Use these names so different services line up:| key | meaning | example || --- | --- | --- |-| `service` | the process type | `web`, `celery`, `temporal`, `nodejs` |+| `service` | the process type or crate | `web`, `celery`, `temporal`, `nodejs`, `personhog-identity` || `route` | HTTP route pattern | `/api/projects/{id}/persons/` || `controller`, `action` | handler and method | `PersonViewSet`, `list` || `task` | Celery task name | `posthog.tasks.calculate_cohort` || `workflow`, `activity` | Temporal workflow and activity types | `batch-export`, `insert_into_s3` |-| `operation` | the named query in a repository | `updatePersonsBatch` |+| `operation` | the named query in a repository or service | `updatePersonsBatch`, `merge_flip_lock_persons` || `caller` | the call site behind an operation | `ingestion/person-update-conflict` || `db_use` | which pool a Node service used | `PERSONS_WRITE` || `tx` | `true` when the statement ran inside an explicit transaction | |