Skip to content

armgit / Orkas

Public Imported from GitHub
0

Orkas is an open-source (MIT), local-first AI team for your desktop: a Commander turns your goal into to-dos and coordinates 16 built-in specialist agents plus Claude Code, Codex, OpenCode, OpenClaw and Hermes, with projects, scheduled automations and connectors. Free app for macOS & Windows; built-in models or your own keys.

Test sync after contexts_tmp retirement: stop asserting it gets created

claw2980ac4debedc
diff --git a/test/main/features/users.test.ts b/test/main/features/users.test.ts
index 35e4b89a..7363b398 100644
--- a/test/main/features/users.test.ts
+++ b/test/main/features/users.test.ts
@@ -51,7 +51,6 @@ describe('features/users › activateUser', () => {
// 顶层 cloud/meta/ 已废弃,per-agent meta 落 agents/<aid>/meta/(详见
// docs/plans/agent-as-directory.md)
path.join(tmpDir, 'u1', 'cloud', 'config'),
- path.join(tmpDir, 'u1', 'local', 'contexts_tmp'),
path.join(tmpDir, 'u1', 'local', 'config'),
path.join(tmpDir, 'u1', 'local', 'search'),
path.join(tmpDir, 'u1', 'local', 'test'),
diff --git a/test/main/paths.test.ts b/test/main/paths.test.ts
index 6f4c5e77..5b693fa1 100644
--- a/test/main/paths.test.ts
+++ b/test/main/paths.test.ts
@@ -114,10 +114,9 @@ describe('paths › cloud-synced per-user', () => {
});
describe('paths › local (per-user, not synced)', () => {
- it('contexts_tmp / auth / web-search / search / test land under <uid>/local/', async () => {
+ it('auth / web-search / search / test land under <uid>/local/', async () => {
const p = await import('../../src/main/paths');
const uid = 'u1';
- expect(p.userContextsTmpDir(uid)).toBe(path.join(p.WS_ROOT, uid, 'local', 'contexts_tmp'));
expect(p.userAuthProfilesFile(uid))
.toBe(path.join(p.WS_ROOT, uid, 'local', 'config', 'auth-profiles.json'));
expect(p.userWebSearchCache(uid))
@@ -173,12 +172,14 @@ describe('paths › ensureTopLevelLayout side effect', () => {
path.join(tmpDir, 'u1', 'cloud', 'chats'),
path.join(tmpDir, 'u1', 'cloud', 'sessions'),
path.join(tmpDir, 'u1', 'cloud', 'config'),
- path.join(tmpDir, 'u1', 'local', 'contexts_tmp'),
path.join(tmpDir, 'u1', 'local', 'config'),
path.join(tmpDir, 'u1', 'local', 'search'),
path.join(tmpDir, 'u1', 'local', 'test'),
]) {
expect(fs.existsSync(d), `expected ${d} to exist`).toBe(true);
}
+ // contexts_tmp/ is retired — ensureUserLayout sweeps it on every
+ // activate; assert it is NOT present after layout init.
+ expect(fs.existsSync(path.join(tmpDir, 'u1', 'local', 'contexts_tmp'))).toBe(false);
});
});