From 07aaa40bff1e0bcda2978e2d269ee4c6fb150e16 Mon Sep 17 00:00:00 2001 From: Denozordec Date: Sun, 15 Nov 2026 22:10:00 +0700 Subject: [PATCH] =?UTF-8?q?fix(test):=20=D1=83=D0=B4=D0=B0=D0=BB=D1=8F?= =?UTF-8?q?=D1=82=D1=8C=20=D1=81=D0=B5=D1=80=D0=B2=D0=B5=D1=80-=D1=84?= =?UTF-8?q?=D0=B8=D0=BA=D1=81=D1=82=D1=83=D1=80=D1=83=20=D0=BF=D0=BE=D1=81?= =?UTF-8?q?=D0=BB=D0=B5=20=D0=BF=D1=80=D0=B8=D1=91=D0=BC=D0=BE=D0=BA=20ARP?= =?UTF-8?q?=20=D0=B8=20IPv6=20ND?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Устаревший тест, не дефект продукта. Приёмки ARP и IPv6 ND оставляли свою строку servers (только enabled=false), тогда как все соседние приёмки удаляют фикстуру. После 88e82702 они создаются стабильно, и лишние строки доходили до Legacy OSPF, который по задокументированному правилу требует допуск ко всему каталогу (не более 10 серверов, все в scope). Соединение приёмки OSPF ограничено серверами [1,2], поэтому каталог отклонялся. Продуктовое правило не ослабляется: фикстуры удаляются в finally (FK на servers каскадные; на них ничего позже не ссылается). Co-Authored-By: Claude Opus 5.5 --- backend/src/modules/mcp/arp-write-acceptance.ts | 2 +- backend/src/modules/mcp/ipv6-nd-write-acceptance.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/modules/mcp/arp-write-acceptance.ts b/backend/src/modules/mcp/arp-write-acceptance.ts index 40e5bdcc..c5c358d4 100644 --- a/backend/src/modules/mcp/arp-write-acceptance.ts +++ b/backend/src/modules/mcp/arp-write-acceptance.ts @@ -160,7 +160,7 @@ export async function acceptArpWriteMcp(actor: AuthUser) { console.log("✓ ARP SQL/HTTP: verified static create/update/inverse/delete, normalized MAC, protected dynamic/DHCP records and post-approval address drift") } finally { if (connectionId) await setConnectionStatus(connectionId, "paused", actor) - if (serverId !== undefined) await pool.query("UPDATE servers SET enabled=false WHERE id=$1", [serverId]) + if (serverId !== undefined) await pool.query("DELETE FROM servers WHERE id=$1", [serverId]) router.closeAllConnections() await new Promise((resolve, reject) => router.close(error => error ? reject(error) : resolve())) } diff --git a/backend/src/modules/mcp/ipv6-nd-write-acceptance.ts b/backend/src/modules/mcp/ipv6-nd-write-acceptance.ts index ff5c9be9..752b2df4 100644 --- a/backend/src/modules/mcp/ipv6-nd-write-acceptance.ts +++ b/backend/src/modules/mcp/ipv6-nd-write-acceptance.ts @@ -294,7 +294,7 @@ export async function acceptIpv6NdWriteMcp(actor: AuthUser, listsOnly = false) { console.log("✓ IPv6 ND SQL/HTTP: verified prefix writes, RA DNS and PREF64, partial ND settings updates and inverse, interface protection and post-approval drift") } finally { if (connectionId) await setConnectionStatus(connectionId, "paused", actor) - if (serverId !== undefined) await pool.query("UPDATE servers SET enabled=false WHERE id=$1", [serverId]) + if (serverId !== undefined) await pool.query("DELETE FROM servers WHERE id=$1", [serverId]) router.closeAllConnections() await new Promise((resolve, reject) => router.close(error => error ? reject(error) : resolve())) }