From f7f37a5c4e7d34df2a1406718962b3facbf229d5 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Tue, 25 Aug 2026 06:51:07 -0700 Subject: [PATCH] test(native-chat): cover the scope ordering the budgeted list depends on Review round 2 (both lanes) found two mutations the suite missed: deleting the final re-sort in limitSkillsAcrossScopes, and swapping SCOPE_PRIORITY. Either would ship a scope-interleaved list unnoticed. Assert the budgeted result is still scope-ordered; both mutants now fail this test. --- .../native-chat/native-chat-composer-state.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/components/native-chat/native-chat-composer-state.test.ts b/src/renderer/src/components/native-chat/native-chat-composer-state.test.ts index 713f36d2957..fe1094432f4 100644 --- a/src/renderer/src/components/native-chat/native-chat-composer-state.test.ts +++ b/src/renderer/src/components/native-chat/native-chat-composer-state.test.ts @@ -321,9 +321,9 @@ describe('native skill and command picker', () => { ] const names = buildNativeChatPickerItems([], skills, '', '/').map((item) => item.name) expect(names).toHaveLength(500) - expect(names).toContain('home-skill-0') - expect(names).toContain('home-skill-1') - expect(names).toContain('home-skill-2') + // Budgeted rows still land in scope order, so the home rows sort last. + expect(names.slice(-3)).toEqual(['home-skill-0', 'home-skill-1', 'home-skill-2']) + expect(names.slice(0, -3).every((name) => name.startsWith('repo-skill-'))).toBe(true) }) it('keeps a queried catalog in rank order rather than spreading it across scopes', () => {