From 1efc265e36f100ba30017511b324bfda184d3d5c Mon Sep 17 00:00:00 2001 From: Denozordec Date: Thu, 19 Nov 2026 01:46:25 +0700 Subject: [PATCH] =?UTF-8?q?fix(mcp):=20=D0=BF=D0=B5=D1=80=D0=B5=D1=87?= =?UTF-8?q?=D0=B8=D1=82=D1=8B=D0=B2=D0=B0=D1=82=D1=8C=20=D1=81=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D0=BE=D1=8F=D0=BD=D0=B8=D0=B5,=20=D0=BA=D0=BE=D0=B3?= =?UTF-8?q?=D0=B4=D0=B0=20=D0=BC=D0=B0=D1=80=D1=88=D1=80=D1=83=D1=82=20fe8?= =?UTF-8?q?0=20=D0=BC=D0=BE=D1=81=D1=82=D0=B0=20=D0=B7=D0=B0=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=D0=B6=D0=B0=D0=BB=D1=81=D1=8F=20=D0=BF=D0=BE=D1=81=D0=BB?= =?UTF-8?q?=D0=B5=20=D1=83=D1=85=D0=BE=D0=B4=D0=B0=20=D0=B8=D0=B7=20VRF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- .../vrf-production-gre-link-local.test.ts | 24 +++++++++++++++++++ .../src/services/vrf-production-transition.ts | 5 +++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/backend/src/services/vrf-production-gre-link-local.test.ts b/backend/src/services/vrf-production-gre-link-local.test.ts index 6f5eaf5a..16f9a0b8 100644 --- a/backend/src/services/vrf-production-gre-link-local.test.ts +++ b/backend/src/services/vrf-production-gre-link-local.test.ts @@ -317,6 +317,30 @@ for (const [label, current, mutate] of [ await assert.rejects(settleVrfTransition(greAfter, after => classifyVrfProductionTransition({ ...inputs[4], after }), async () => { greRereads++; return greAfter }, async () => {}), /VRF production transition refused/) assert.equal(greRereads, VRF_SETTLING_REREADS); cases++ assert.ok(joining && joining !== leaving) + // Owner decision 2026-11-19 (run v26 write 29): the isolate post-read lost the bridge LL address but still holds its + // fe80 connected route (separate GETs). Only that shape is re-read; after the bound the same refusal stands. + { + const lingering = structuredClone(transferred) + lingering.catalogs.ipv6_address = lingering.catalogs.ipv6_address.filter(row => !(row.dynamic === "true" && row.interface === leaving)) + assert.ok(lingering.catalogs.ipv6_route.some(row => linkLocalRoute(row, leaving))) + const classifyLeave = (after: VrfProductionSnapshot) => classifyVrfProductionTransition(input(reenabled, after, transfer, chainPrevious)) + let count = 0 + const settled = await settleVrfTransition(lingering, classifyLeave, async () => { count++; return structuredClone(left) }, async () => {}) + assert.equal(settled.status, "explained-native-transition"); assert.equal(count, 1) + assert.deepEqual(durable(settled.checkpoint).leftBridgeLl.map((item: { member: string }) => item.member), [leaving]); cases++ + count = 0 + const exhausted = await settleVrfTransition(lingering, classifyLeave, async () => { count++; return structuredClone(lingering) }, async () => {}).then(() => undefined, (error: unknown) => error) + assert.equal(readVrfTransitionRefusal(exhausted)?.guard, "PATCH_BRIDGE_LL_CONNECTED_ROUTE_CLOSURE"); assert.equal(count, VRF_SETTLING_REREADS); cases++ + // The same lingering route with a non-empty bridge or a changed bridge row: refused at once (earlier checks). + const portedLinger = ported(lingering) + count = 0 + await assert.rejects(settleVrfTransition(portedLinger, after => classifyVrfProductionTransition(input(ported(reenabled), after, transfer, chainPrevious)), async () => { count++; return portedLinger }, async () => {}), /PATCH bridge LL empty configuration/) + assert.equal(count, 0); cases++ + const changedLinger = structuredClone(lingering); changedLinger.catalogs.bridge.find(row => row.name === leaving)!.mtu = "1400" + count = 0 + await assert.rejects(settleVrfTransition(changedLinger, classifyLeave, async () => { count++; return changedLinger }, async () => {}), /opaque configuration drift/) + assert.equal(count, 0); cases++ + } // Owner decision 2026-11-18 (run v24 step 31): the rejoin post-read holds the owed bridge's fe80 route but not yet its // LL address (non-atomic read). That shape alone is re-read (settling); nothing is accepted without the address. { diff --git a/backend/src/services/vrf-production-transition.ts b/backend/src/services/vrf-production-transition.ts index 600390e4..41c1ca5b 100644 --- a/backend/src/services/vrf-production-transition.ts +++ b/backend/src/services/vrf-production-transition.ts @@ -300,6 +300,8 @@ function bridgeLinkLocalLoss(before: VrfProductionSnapshot, after: VrfProduction const statics = beforeSources.filter(item => item.member === name && !item.ll) return statics.some(item => item.family === 4) && statics.every(item => afterSources.some(next => next.member === name && next.resource === item.resource && !next.ll && next.row[".id"] === item.row[".id"] && next.network === item.network)) && !afterSources.some(item => item.member === name && item.ll) }, + // The proven before-route is still in a non-atomic post-read (the address and route come from separate GETs). + routeLingers: () => before.catalogs.ipv6_route.filter(linkLocalRoute).length === 1 && before.catalogs.ipv6_route.filter(linkLocalRoute)[0] === oldRoute && after.catalogs.ipv6_route.some(linkLocalRoute), connectedRouteClosure: () => before.catalogs.ipv6_route.filter(linkLocalRoute).length === 1 && before.catalogs.ipv6_route.filter(linkLocalRoute)[0] === oldRoute && !after.catalogs.ipv6_route.some(linkLocalRoute), } } @@ -332,7 +334,8 @@ function leftBridgeLinkLocal(before: VrfProductionSnapshot, after: VrfProduction must(facts.automaticProvenance(), "PATCH bridge LL automatic provenance") facts.eui64() must(facts.staticAddressClosure(), "PATCH bridge LL static address closure") - must(facts.connectedRouteClosure(), "PATCH bridge LL connected route closure") + // Owner decision 2026-11-19 (run v26 write 29): only the lingering-route shape is re-read; every other check stays immediate. + settling(() => facts.routeLingers(), () => must(facts.connectedRouteClosure(), "PATCH bridge LL connected route closure")) } /** Existing object guards must see the exact concrete parent/dependent * identities already proved by admission, not a guessed numeric namespace. */