Repository navigation
Conversation
…UNNEST writes
## 变更摘要
- 改前:
- A1/A9:`removeVmFromDb` 未清理 `_pgPendingVms` 且同步删除与 `_pgFlushChain` 异步 PG UPSERT 竞态,删槽后行可能被回写复活;`clearActiveVmFromDb` 不重置 `_lastActiveVmId` / `_pgPendingActive` 且未串入 `_pgFlushChain`。
- A2/A3/A13:`markVmAuthCooldown` / `clearClaudeAuthCooldown` 仅读写 `vm.claude.temp_unschedulable_*`,顶层过期值会遮蔽新冷却;`markVmRestriction` / `clearVmQuotaRestriction` / `clearRecoverableVmCooldown` / `bindVmProxy` / `persistVmTimezone` 写入缺少 `{ mode: 0o600 }`;`getVm` 与 `health-probe` 直接读静态 `vm.json` 或忽略顶层/合并后的 `codex_slot_runtime`。
- A5/A6/A7/A8/A10/A11/A12:`atomicWriteJson` hook 仅传路径导致 `syncVmFile` 重复读盘解析;`syncCodexQuotaSchedule` 在 local 限制下连续两次 RMW;`vm-registry` 内 13 处 `persist*` 重复 RMW 模板;`readFileCached` 未用 `bigint` `statSignature`;`vms-repo` / `vm-db-sync` 仍读写与解密死列 `access_token`/`refresh_token`/`session_key`;`reconcileVms` 循环 N 次 `r.get` 且两次 `r.list`;hook / mirror 异常被静默吞掉;存在零引用导出 `isVmJsonPath`、`persistSlotEnginePolicyMany`。
- PG9:`api-keys._applyUsageBatchToPg` 与 `rate-limit-service._applyWindowBatchToPg` 未按主键排序有跨实例 `40P01` 死锁风险,且 `api-keys` 使用变长 `VALUES`。
- 改后:
- `src/lib/vm/vm-db-sync.mjs`:`removeVmFromDb` 清理 `_pgPendingVms` 并将 PG `DELETE FROM vms WHERE id = $1` 串入 `_pgFlushChain`(含 `_pgPendingDeletes` 防失败回队复活);`clearActiveVmFromDb` 重置 `_lastActiveVmId` / `_pgPendingActive` 并串入 `_pgFlushChain`;`reconcileVms` 改单次 `SELECT id, file_mtime_ms FROM vms` + 单次 `r.list()`;`syncVmFile` 接受 hook 透传对象跳过重复 `readFileSync + JSON.parse`;移除 3 个死列写入并修正头注释;新增失败计数与按 id 限频 warn;去掉 `isVmJsonPath` 导出。
- `src/lib/db/repos/vms-repo.mjs`:停止读写与 `maybeDecrypt` 3 个死令牌列(不改 schema,保持解码对象兼容空值)。
- `src/lib/vm/vm-file.mjs`:`atomicWriteJson` / `writeJsonIfChanged` 透传对象至 `notifyVmWrite`;`readFileCached` 复用 `statSync(file, { bigint: true })` + `statSignature`;hook 异常计入失败计数并按路径限频 warn。
- `src/lib/oauth/oauth-credentials.mjs`:新增 `readVmTempPark` / `setVmTempPark` / `clearVmTempPark` SSOT 辅助,统一双处同步读写与 `until <= now` 双删,并补齐 3 处 `{ mode: 0o600 }`。
- `src/lib/vm/vm-registry.mjs`:13 处 `persist*` 收敛复用 `patchVmRecord`(统一 `0o600`,修复 `bindVmProxy` / `persistVmTimezone` 权限);合并 `syncCodexQuotaSchedule` 连续 RMW 为单次写入;导出 `mergeVmRuntime` 并让 `getVm` 默认叠加活跃 `CodexRuntimeStore`;移除零引用 `persistSlotEnginePolicyMany` 及孤立测试。
- `src/lib/admin/health-probe.mjs`:`isHealthProbeTarget` 改用 `mergeVmRuntime` + `readVmTempPark` 统一读取运行态冷却与刷票错误。
- `src/lib/admin/api-keys.mjs` & `src/lib/pool/rate-limit-service.mjs`:PG 批量写按 `keyId` / `accountId` 字典序排序,并将 `api-keys._applyUsageBatchToPg` 切换为固定 10 参 `UNNEST`。
- 未改 / 延后:不做 `vms` 表 `DROP COLUMN` 迁移;未触碰调度器禁区(`scheduler/`、`src/lib/scheduler/`、`src/lib/pool/availability.mjs`、`src/lib/pool/pool-scheduler.mjs`)、`src/lib/admin/panel-routes.mjs`、`CHANGELOG.md`、system 提示词域与 AFO 域。
## 验收记录(Run)
- 环境与基线:WSL2 Debian + Windows git.exe,工作树 `X:\vm2api-wt-r3-acct-rw`,基于 `origin/dev` `7870fa8d5`
- 已跑命令与结果:
- `npx biome format --write <17 changed .mjs files> && npx biome check <17 changed .mjs files>`: PASS (17 files clean, 0 errors)
- `find src scripts -name '*.mjs' -print0 | xargs -0 -n1 node --check`: PASS (0 syntax errors)
- `KIN_SCHEDULER_BIN=/mnt/x/vm2api-wt-gemini-format-parity/bin/kin-scheduler VM2API_TEST_CONCURRENCY=4 npm run test:ci`: PASS (13/13 isolated test files, 247/247 tests pass, 0 fail)
- `node --test --test-concurrency=4 test/unit/{vm-db-sync,vm-file,oauth-credentials,api-keys,rate-limit-service,proxy-pool-bind,schedule-state-registry,request-redis-opt,panel-vm-delete,panel-vm-deactivate,panel-vm-active-hours,panel-vm-pool-policy,health-probe,vm-rename,slot-engine,runtime-state,backup-service,legacy-import}.test.mjs`: PASS (18 files, 268/268 tests pass, 0 fail)
- `VM2API_TEST_PG_URL='postgresql://vm2api:testpass@127.0.0.1:55433/vm2api' node --test test/unit/request-redis-opt.test.mjs test/unit/pg-repos-parity.test.mjs`: PASS (17/17 tests pass on real PostgreSQL 18, 0 fail, 0 skipped)
## 回退与手破验证(Broken by hand)
- 回退 A1 `removeVmFromDb`(不清 `_pgPendingVms` 且直接走 `r.remove`)-> `PG mode removeVmFromDb cancels pending upsert and chains DELETE behind in-flight flush (A1/A8)` FAIL(`AssertionError [ERR_ASSERTION]: queued upsert must not resurrect deleted slot (true !== false)`)-> 恢复后 PASS
- 回退 A2 `markVmAuthCooldown`(仅写 `vm.claude.*` 留顶层过期值)-> `temp park SSOT keeps claude.* and top-level identical across expired quota -> auth cooldown and writes 0600 (A2/A3)` FAIL(`AssertionError [ERR_ASSERTION]: top-level until must match claude.* after auth cooldown (1796127785079 !== 1796128145079)`)-> 恢复后 PASS
- 回退 A3 `markVmRestriction`(移除 `{ mode: 0o600 }`)-> `temp park SSOT keeps claude.* and top-level identical across expired quota -> auth cooldown and writes 0600 (A2/A3)` FAIL(`AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: 420 !== 384`)-> 恢复后 PASS
## 真实使用(Real use)
- 在本地 WSL 临时隔离 `postgres:18-alpine` 容器(仅监听 `127.0.0.1:55433`,测后自动 `docker rm -f` 销毁)实跑 `request-redis-opt.test.mjs` 与 `pg-repos-parity.test.mjs`,实测验证固定 10 参 `UNNEST` 批量更新 `api_keys`(含 NULL/空串/ISO 窗口)与 `VmsRepo` 停写死列后的 SQLite↔PG18 双后端一致性(17/17 PASS);实跑 `kin-scheduler` 真实 Rust 调度器二进制通过 `test:ci` 全部 13 个隔离套件。未连接生产机 `ph24`。
## 未运行项(Not run)
- 未运行全量 556 文件 `npm run test:unit`、Web 前端构建、ARM64 与生产机 `ph24` 联调:本次改动严格限定于 Node 后端账户读写与 PG 批量写 8 个文件,已通过 `test:ci`(13 套件 / 247 用例)、全部 18 个关联单测(268 用例)与真实 PG18 集成一致性验证(17 用例)。
Contributor
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: bb39edba-880f-4103-9d1d-1380e8bdc8b0) |
Owner
Author
评审结果(只读评审,真 PG18 / Redis 8 一次性容器;head
|
dofastted
marked this pull request as draft
December 1, 2026 18:08
## 变更摘要
- 改前:
- M1:`persistOauthToVm` 调用的 `clearClaudeAuthCooldown(vm)` 无条件执行 `clearVmTempPark(vm, { clearGeneration: true })`,凭据刷新镜像会同时抹掉 `markVmRestriction` 写下的配额/429 park(`isQuotaParkReason`),导致限额槽位提前恢复可调度。
- m1:`scheduler-runtime.mjs` 的 `tempUnschedulableState` 仍采用顶层优先读取(`vm.temp_unschedulable_until ?? vm.claude?...`),存量“顶层过期 + claude 有效”的 `vm.json` 上与 `readVmTempPark` 分叉。
- m2:`routing-runtime.mjs` 中 `applyRoutingOpenAIQuota` 与 `migrateLegacyOpenAIPolicies` 用默认 `getVm`(`mergeRuntime: true`)读改写 `atomicWriteJson`,会把 `CodexRuntimeStore` 运行态覆盖写入静态 `vm.json`。
- m4:`vm-db-sync.mjs` 的 `removeVmFromDb` 在 PG `DELETE FROM vms WHERE id = $1` 失败后于 `finally` 移出 `_pgPendingDeletes` 且不再重试,PG 瞬时抖动后可能被下次启动 `reconcileVms` 重建复活。
- m3 / m5:PR 原文对 PG 排序写表述偏强(实际受执行计划形状影响,应为“降低死锁概率”);`getVmDbSyncFailureCount` / `getVmWriteHookFailureCount` 为轻量化失败计数观测读接口并服务于单测断言。
- 改后:
- `src/lib/oauth/oauth-credentials.mjs`:新增 `findPreservedQuotaPark`;`clearClaudeAuthCooldown` 在存在有效或 local 配额 park 时保留并回写双处镜像(仅清 `oauth_401_generation` 与认证类冷却),非配额认证冷却(如 `auth_failed` / `oauth_refresh_failed` / `authentication_failed_after_refresh`)照常双清;`clearVmAuthCooldown` 同步处理存量偏斜(一侧配额 + 另一侧认证冷却)。
- `src/lib/scheduler/scheduler-runtime.mjs`:`tempUnschedulableState` 复用 `readVmTempPark(vm, { now })` 统一 SSOT 读取,同时保持 `tempUnschedulableTelemetryFields` 在未激活/过期时的 `0 / null` double_option 清除语义。
- `src/lib/admin/routing-runtime.mjs`:`applyRoutingOpenAIQuota` 与 `migrateLegacyOpenAIPolicies` 的 RMW 读取改为 `getVm(..., { mergeRuntime: false })`,不再把 `CodexRuntimeStore` 运行态覆盖落盘到 `vm.json`。
- `src/lib/vm/vm-db-sync.mjs`:PG `DELETE` 纳入 `flushVmDbSyncAsync` 统一队列(与 `_pgPendingVms` 互斥去重),失败时若同 id 未被 `syncVmFile` 重建则重新入队 `_pgPendingDeletes` 并按指数退避 `.unref()` 定时器自动重试(`resetVmDbSyncState` / `stopVmWatch` / 解绑 pool 时清理);`schedulePgFlush` 通过序列号避免显式 flush 后微任务重复触发。
- 补齐 `test/unit/{oauth-credentials,scheduler-codex-quota-snapshot,routing-runtime-load,vm-db-sync}.test.mjs` 定向回归单测。
- 未改 / 延后:保持 `getVmDbSyncFailureCount` / `getVmWriteHookFailureCount` 用于故障计数观测与单测校验;未改 `availability.mjs` / `panel-api.mjs` / `codex-slot-pool.mjs` 其余存量读取点;未拆 PR、未改 `CHANGELOG.md`。
## 验收记录(Run)
- 环境与基线:WSL2 Debian (Node v24.13.0) + Windows git.exe,工作树 `X:\vm2api-wt-fix-2457`,合入最新 `origin/dev` (`a91fd8811`) 无冲突
- 已跑命令与结果:
- `npx biome format --write <8 files> && npx biome check <8 files>`: PASS (8 files clean, 0 errors)
- `find src scripts -name '*.mjs' -print0 | xargs -0 -n1 node --check`: PASS (0 syntax errors)
- `KIN_SCHEDULER_BIN=/tmp/kin-sched-target/release/kin-scheduler node --test --test-concurrency=4 test/unit/{oauth-credentials,pool-scheduler,vm-db-sync,vm-file,health-probe,routing-runtime-load,scheduler-codex-quota-snapshot,scheduler-m3-cutover,request-redis-opt,rate-limit-service,api-keys,proxy-pool-bind,schedule-state-registry,panel-vm-delete,panel-vm-deactivate,panel-vm-active-hours,panel-vm-pool-policy,vm-rename,slot-engine,runtime-state,backup-service,legacy-import}.test.mjs`: PASS (22 files, 321/321 tests pass, 0 fail, 0 skipped)
- `VM2API_TEST_CONCURRENCY=4 KIN_SCHEDULER_BIN=/tmp/kin-sched-target/release/kin-scheduler npm run test:ci`: PASS (13/13 isolated test files, 250/250 tests pass, 0 fail, 0 skipped)
## 回退与手破验证(Broken by hand)
- 临时回退 M1 守卫(`clearClaudeAuthCooldown` 改回无条件 `clearVmTempPark(vm, { clearGeneration: true })`)-> `persistOauthToVm and mirrorWorkerCredentialsToVm preserve active quota parks while clearing auth cooldowns (M1)` FAIL(`AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: undefined !== 1796153407920`)-> 恢复后 `test/unit/oauth-credentials.test.mjs` 33/33 PASS
## 真实使用(Real use)
- 本轮使用 WSL 本地编译的真实 `kin-scheduler` 二进制(`/tmp/kin-sched-target/release/kin-scheduler`)运行 `test:ci` 全部 13 个隔离套件及 `scheduler-m3-cutover` / `scheduler-codex-quota-snapshot`;未在真 PG18 容器或生产机 `ph24` 上复跑(前序 commit `e4a1a52e5` 已在真 PG18 验证 UNNEST 写入与列映射)。
## 未运行项(Not run)
- 未运行全量 553 文件 `npm run test:unit`、真 PG18 一次性容器(本次 m4 用故障注入 mock PG pool 验证重试状态机)、Web 前端构建、ARM64 与生产机 `ph24` 联调:本次修订限定于评审指出的 4 个后端源文件和 4 个单测文件(共 8 文件),已通过语法检查、Biome、22 个关联单测(321 用例)与完整 `test:ci`(13 套件 / 250 用例)。
Owner
Author
|
已针对评审意见(M1 / m1 / m2 / m3 / m4 / m5)全部修复并验证,现提交验收证据(head 变更摘要
验收记录(Run)
回退与手破验证(Broken by hand)
真实使用(Real use)
未运行项(Not run)
|
dofastted
marked this pull request as ready for review
December 1, 2026 18:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更摘要
removeVmFromDb未清理_pgPendingVms且同步删除与_pgFlushChain异步 PG UPSERT 竞态,删槽后行可能被回写复活;clearActiveVmFromDb不重置_lastActiveVmId/_pgPendingActive且未串入_pgFlushChain。markVmAuthCooldown/clearClaudeAuthCooldown仅读写vm.claude.temp_unschedulable_*,顶层过期值会遮蔽新冷却;markVmRestriction/clearVmQuotaRestriction/clearRecoverableVmCooldown/bindVmProxy/persistVmTimezone写入缺少{ mode: 0o600 };getVm与health-probe直接读静态vm.json或忽略顶层/合并后的codex_slot_runtime。atomicWriteJsonhook 仅传路径导致syncVmFile重复读盘解析;syncCodexQuotaSchedule在 local 限制下连续两次 RMW;vm-registry内 13 处persist*重复 RMW 模板;readFileCached未用bigintstatSignature;vms-repo/vm-db-sync仍读写与解密死列access_token/refresh_token/session_key;reconcileVms循环 N 次r.get且两次r.list;hook / mirror 异常被静默吞掉;存在零引用导出isVmJsonPath、persistSlotEnginePolicyMany。api-keys._applyUsageBatchToPg与rate-limit-service._applyWindowBatchToPg未按主键排序有跨实例40P01死锁风险,且api-keys使用变长VALUES。src/lib/vm/vm-db-sync.mjs:removeVmFromDb清理_pgPendingVms并将 PGDELETE FROM vms WHERE id = $1串入_pgFlushChain(含_pgPendingDeletes防失败回队复活);clearActiveVmFromDb重置_lastActiveVmId/_pgPendingActive并串入_pgFlushChain;reconcileVms改单次SELECT id, file_mtime_ms FROM vms+ 单次r.list();syncVmFile接受 hook 透传对象跳过重复readFileSync + JSON.parse;移除 3 个死列写入并修正头注释;新增失败计数与按 id 限频 warn;去掉isVmJsonPath导出。src/lib/db/repos/vms-repo.mjs:停止读写与maybeDecrypt3 个死令牌列(不改 schema,保持解码对象兼容空值)。src/lib/vm/vm-file.mjs:atomicWriteJson/writeJsonIfChanged透传对象至notifyVmWrite;readFileCached复用statSync(file, { bigint: true })+statSignature;hook 异常计入失败计数并按路径限频 warn。src/lib/oauth/oauth-credentials.mjs:新增readVmTempPark/setVmTempPark/clearVmTempParkSSOT 辅助,统一双处同步读写与until <= now双删,并补齐 3 处{ mode: 0o600 }。src/lib/vm/vm-registry.mjs:13 处persist*收敛复用patchVmRecord(统一0o600,修复bindVmProxy/persistVmTimezone权限);合并syncCodexQuotaSchedule连续 RMW 为单次写入;导出mergeVmRuntime并让getVm默认叠加活跃CodexRuntimeStore;移除零引用persistSlotEnginePolicyMany及孤立测试。src/lib/admin/health-probe.mjs:isHealthProbeTarget改用mergeVmRuntime+readVmTempPark统一读取运行态冷却与刷票错误。src/lib/admin/api-keys.mjs&src/lib/pool/rate-limit-service.mjs:PG 批量写按keyId/accountId字典序排序,并将api-keys._applyUsageBatchToPg切换为固定 10 参UNNEST。vms表DROP COLUMN迁移;未触碰调度器禁区(scheduler/、src/lib/scheduler/、src/lib/pool/availability.mjs、src/lib/pool/pool-scheduler.mjs)、src/lib/admin/panel-routes.mjs、CHANGELOG.md、system 提示词域与 AFO 域。验收记录(Run)
X:\vm2api-wt-r3-acct-rw,基于origin/dev7870fa8d5npx biome format --write <17 changed .mjs files> && npx biome check <17 changed .mjs files>: PASS (17 files clean, 0 errors)find src scripts -name '*.mjs' -print0 | xargs -0 -n1 node --check: PASS (0 syntax errors)KIN_SCHEDULER_BIN=/mnt/x/vm2api-wt-gemini-format-parity/bin/kin-scheduler VM2API_TEST_CONCURRENCY=4 npm run test:ci: PASS (13/13 isolated test files, 247/247 tests pass, 0 fail)node --test --test-concurrency=4 test/unit/{vm-db-sync,vm-file,oauth-credentials,api-keys,rate-limit-service,proxy-pool-bind,schedule-state-registry,request-redis-opt,panel-vm-delete,panel-vm-deactivate,panel-vm-active-hours,panel-vm-pool-policy,health-probe,vm-rename,slot-engine,runtime-state,backup-service,legacy-import}.test.mjs: PASS (18 files, 268/268 tests pass, 0 fail)VM2API_TEST_PG_URL='postgresql://vm2api:testpass@127.0.0.1:55433/vm2api' node --test test/unit/request-redis-opt.test.mjs test/unit/pg-repos-parity.test.mjs: PASS (17/17 tests pass on real PostgreSQL 18, 0 fail, 0 skipped)回退与手破验证(Broken by hand)
removeVmFromDb(不清_pgPendingVms且直接走r.remove)->PG mode removeVmFromDb cancels pending upsert and chains DELETE behind in-flight flush (A1/A8)FAIL(AssertionError [ERR_ASSERTION]: queued upsert must not resurrect deleted slot (true !== false))-> 恢复后 PASSmarkVmAuthCooldown(仅写vm.claude.*留顶层过期值)->temp park SSOT keeps claude.* and top-level identical across expired quota -> auth cooldown and writes 0600 (A2/A3)FAIL(AssertionError [ERR_ASSERTION]: top-level until must match claude.* after auth cooldown (1796127785079 !== 1796128145079))-> 恢复后 PASSmarkVmRestriction(移除{ mode: 0o600 })->temp park SSOT keeps claude.* and top-level identical across expired quota -> auth cooldown and writes 0600 (A2/A3)FAIL(AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: 420 !== 384)-> 恢复后 PASS真实使用(Real use)
postgres:18-alpine容器(仅监听127.0.0.1:55433,测后自动docker rm -f销毁)实跑request-redis-opt.test.mjs与pg-repos-parity.test.mjs,实测验证固定 10 参UNNEST批量更新api_keys(含 NULL/空串/ISO 窗口)与VmsRepo停写死列后的 SQLite↔PG18 双后端一致性(17/17 PASS);实跑kin-scheduler真实 Rust 调度器二进制通过test:ci全部 13 个隔离套件。未连接生产机ph24。未运行项(Not run)
npm run test:unit、Web 前端构建、ARM64 与生产机ph24联调:本次改动严格限定于 Node 后端账户读写与 PG 批量写 8 个文件,已通过test:ci(13 套件 / 247 用例)、全部 18 个关联单测(268 用例)与真实 PG18 集成一致性验证(17 用例)。Note
Medium Risk
Touches OAuth cooldown semantics, VM file/DB mirroring, and multi-instance PostgreSQL batch paths; mistakes could mis-schedule slots or resurrect deleted VM rows, though behavior is heavily covered by new unit tests.
Overview
Unifies how VMs mirror to Postgres/SQLite, how temporary “park” cooldowns are read and written, and how multi-instance PG batches avoid deadlocks.
Temp-park SSOT: Adds
readVmTempPark/setVmTempPark/clearVmTempParkso top-level andclaude.*temp_unschedulable_*fields stay in sync; auth clears preserve active quota parks. Scheduler, health probes, and summaries now use this reader; probes and defaultgetVmalso merge live Codex runtime overlay viamergeVmRuntime, while routing policy writes use disk-onlygetVm(..., { mergeRuntime: false }).VM DB mirror: Stops persisting/reading legacy token columns in
VmsRepoand PG UNNEST upserts;syncVmFilecan take the in-memory object fromatomicWriteJsonhooks (no extra disk read). PG mode queues deletes on the flush chain (with retry), cancels pending upserts on delete/recreate, fixesclearActiveVmFromDb, bulk-reconciles mtimes, and throttled failure warnings.readFileCacheduses bigintstat+ctimeNsto detect same-size external rewrites; manypersist*paths consolidate onpatchVmRecordwith0600writes.PG batch safety:
api-keysusage flush andrate-limit-servicewindow flush sort rows by primary key and use fixed-parameterUNNESTinstead of dynamicVALUES, reducing cross-instance40P01deadlocks.Reviewed by Cursor Bugbot for commit 432aaa2. Configure here.