From 9a19d8b8ea6d0798f2027d6ece4489ca02c00ba5 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Mon, 27 Apr 2026 20:56:43 -0700 Subject: [PATCH] fix(bonjour): classify ciao IPv4 changed assertion Classify ciao's IPv4 address changed assertion spelling in the Bonjour plugin and cover the exact upstream message. --- extensions/bonjour/src/ciao.test.ts | 11 +++++++++++ extensions/bonjour/src/ciao.ts | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/extensions/bonjour/src/ciao.test.ts b/extensions/bonjour/src/ciao.test.ts index 48f7726048b..252b41399e1 100644 --- a/extensions/bonjour/src/ciao.test.ts +++ b/extensions/bonjour/src/ciao.test.ts @@ -21,6 +21,17 @@ describe("bonjour-ciao", () => { }); }); + it("classifies ciao interface assertions using changed wording", () => { + expect( + classifyCiaoUnhandledRejection( + new Error("Reached illegal state! IPv4 address changed from undefined to defined!"), + ), + ).toEqual({ + kind: "interface-assertion", + formatted: "Reached illegal state! IPv4 address changed from undefined to defined!", + }); + }); + it("classifies ciao netmask assertions separately from side effects", () => { expect( classifyCiaoUnhandledRejection( diff --git a/extensions/bonjour/src/ciao.ts b/extensions/bonjour/src/ciao.ts index b5d37a502da..da623b27856 100644 --- a/extensions/bonjour/src/ciao.ts +++ b/extensions/bonjour/src/ciao.ts @@ -2,7 +2,7 @@ import { formatBonjourError } from "./errors.js"; const CIAO_CANCELLATION_MESSAGE_RE = /^CIAO (?:ANNOUNCEMENT|PROBING) CANCELLED\b/u; const CIAO_INTERFACE_ASSERTION_MESSAGE_RE = - /REACHED ILLEGAL STATE!?\s+IPV4 ADDRESS CHANGE FROM (?:DEFINED TO UNDEFINED|UNDEFINED TO DEFINED)!?/u; + /REACHED ILLEGAL STATE!?\s+IPV4 ADDRESS CHANGED? FROM (?:DEFINED TO UNDEFINED|UNDEFINED TO DEFINED)!?/u; const CIAO_NETMASK_ASSERTION_MESSAGE_RE = /IP ADDRESS VERSION MUST MATCH\.\s+NETMASK CANNOT HAVE A VERSION DIFFERENT FROM THE ADDRESS!?/u; // Restricted sandboxes (NemoClaw, Docker-in-Docker, k3s with locked-down policy)