Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

test(providers): 复用缓存行为覆盖以移除过时源码断言

DavidShen88c33c57b0e0
diff --git a/apps/desktop/src/renderer/__tests__/newMakerProjectPicker.test.ts b/apps/desktop/src/renderer/__tests__/newMakerProjectPicker.test.ts
index 034baa4594..78994b6776 100644
--- a/apps/desktop/src/renderer/__tests__/newMakerProjectPicker.test.ts
+++ b/apps/desktop/src/renderer/__tests__/newMakerProjectPicker.test.ts
@@ -1434,13 +1434,9 @@ describe('Shared create project picker', () => {
* fetch):任何一端被改动都会在这里失败,而不是等到用户发不出消息。
*/
it('does not evict same-device snapshots when only the workspace changes', () => {
- // 上游事实:evict 会把已挂载的 hook 推进 loading 态。
- expect(agentCapabilitiesHookSource).toContain(
- "notifyRemoteCapabilities(deviceId, agentKind, { status: 'loading' });",
- );
- expect(deviceProvidersHookSource).toMatch(
- /notifyDeviceProviders\(deviceId,\s*\{\s*status: 'loading'/,
- );
+ // 驱逐后挂载中的 loading/清空行为由 agentCapabilitiesDeviceCache、
+ // deviceProvidersRecovery 与 AuthContextInitializeCatch 的生产 hook 用例覆盖。
+ // 这里保留 #807 的跨文件竞态约束:只切项目不能让同设备永久停在 loading。
// 上游事实:fetch effect 只按 (agentKind, deviceId) 重跑,换项目不会触发它。
expect(agentCapabilitiesHookSource).toContain('}, [agentKind, deviceId]);');
expect(deviceProvidersHookSource).toContain('}, [deviceId]);');
diff --git a/scripts/test-hygiene-baseline.json b/scripts/test-hygiene-baseline.json
index 7dc1b5af30..25643d8010 100644
--- a/scripts/test-hygiene-baseline.json
+++ b/scripts/test-hygiene-baseline.json
@@ -726,9 +726,6 @@
"apps/desktop/src/renderer/__tests__/releaseNotesNormalize.test.ts": {
"resetModules": 2
},
- "apps/desktop/src/renderer/__tests__/remoteCatalogSnapshot.test.ts": {
- "resetModules": 1
- },
"apps/desktop/src/renderer/__tests__/remoteHistoryHandoff.test.ts": {
"sourceReads": 1
},