From e5f2fdbb4fb242a84d83487000600fc8ed5aad7a Mon Sep 17 00:00:00 2001 From: cliffhall Date: Mon, 7 Sep 2026 20:19:30 -0400 Subject: [PATCH] test: pin the reviewer's exact cyclic-alias example `&a [1, *a]` puts the self-reference after a plain value, so a guard that only inspected the head of a sequence would miss it. Already caught; this records that it is. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01ND46Ci64DC3tzBy9aG81Nc Signed-off-by: cliffhall --- clients/web/src/test/core/mcp/skillFile.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/clients/web/src/test/core/mcp/skillFile.test.ts b/clients/web/src/test/core/mcp/skillFile.test.ts index f7399c9f..bb9e5bcf 100644 --- a/clients/web/src/test/core/mcp/skillFile.test.ts +++ b/clients/web/src/test/core/mcp/skillFile.test.ts @@ -147,6 +147,14 @@ describe("parseSkillFrontmatter (#2248)", () => { expect(parsed).toEqual({ error: expect.stringContaining("cyclic") }); }); + it("rejects a cycle that is not the first element", () => { + // `&a [1, *a]` — the self-reference sits after a plain value, so a guard + // that only inspected the head of a sequence would miss it. + expect(parseSkillFrontmatter("a: &a [1, *a]")).toEqual({ + error: expect.stringContaining("cyclic"), + }); + }); + it("rejects a cycle through a mapping, not only an array", () => { expect(parseSkillFrontmatter("a: &a\n self: *a")).toEqual({ error: expect.stringContaining("cyclic"),