From d27d910cd7c74905206042bb86d7fe4fdf0195ae Mon Sep 17 00:00:00 2001 From: JUN Date: Thu, 12 Nov 2026 01:23:03 +0900 Subject: [PATCH] test(desktop): follow the stop message through described() after #8560 Refs #7771 --- tests/clients/desktop-cli-contracts.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/clients/desktop-cli-contracts.test.ts b/tests/clients/desktop-cli-contracts.test.ts index edf9c884c9f..5c9a24be94f 100644 --- a/tests/clients/desktop-cli-contracts.test.ts +++ b/tests/clients/desktop-cli-contracts.test.ts @@ -161,7 +161,12 @@ describe("desktop CLI contracts", () => { // The shell does not re-derive the outcome; it carries the CLI's own words into its diagnostic. expect(stopRs).toContain("summary.outcome"); expect(stopRs).toContain("summary.exit_code"); - expect(stopRs).toContain("summary.message"); + // The CLI's message reaches the diagnostic through `described()`, which starts with that + // message and only appends the additive stop-reason notes (#7771); it is never replaced. + expect(stopRs).toContain("summary.described()"); + const described = stopRs.slice(stopRs.indexOf("pub fn described("), stopRs.indexOf("pub enum StopResult")); + expect(described).toContain("format!(\"{}; {notes}\", self.message)"); + expect(described).toContain("None => self.message.clone()"); expect(stopRs).not.toContain('== "stopped"'); }); });