The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test(desktop): cover every Profiles-screen route's per-profile ticket
Teknium8fce2e7c9a77
diff --git a/apps/desktop/electron/local-gateway.test.ts b/apps/desktop/electron/local-gateway.test.tsindex 722d8ef3526..db5a1e0b543 100644--- a/apps/desktop/electron/local-gateway.test.ts+++ b/apps/desktop/electron/local-gateway.test.ts@@ -455,6 +455,25 @@ test('a profile SOUL route mints for the profile named in its path', () => {})})+// Every /api/profiles/<name>/* route the Profiles screen calls is checked against the path's+// profile (native_http._check_profile_scope); collection routes beneath it stay on their selector.+test('every named Profiles-screen route mints for its profile; collection routes do not', () => {+ const endpoint = { profile_id: path.resolve('hermes-home'), instance_id: 'i', authority_epoch: 1, runtime_protocol: 1, api_origin: 'http://127.0.0.1:1', capabilities: [], supervisor: 'none', control_home: null }+ const route = (p: string) => routedGatewayEndpoint(endpoint, `http://127.0.0.1:1${p}`, endpoint.profile_id).profile_id++ for (const p of ['/api/profiles/p2', '/api/profiles/p2/soul', '/api/profiles/p2/setup-command', '/api/profiles/p2/export']) {+ expect(route(p)).toBe(path.resolve('hermes-home', 'profiles', 'p2'))+ }++ expect(route('/api/profiles/default/soul')).toBe(endpoint.profile_id)++ for (const p of ['/api/profiles/active', '/api/profiles/import', '/api/profiles/projects/tree', '/api/profiles/sessions']) {+ expect(route(p)).toBe(endpoint.profile_id)+ }++ expect(route('/api/profiles/sessions?profile=p2')).toBe(path.resolve('hermes-home', 'profiles', 'p2'))+})+// The batched sidebar names its owner in `recents_profile`; a grant for the window's own profile// is refused there (profile_scope_mismatch) and the sidebar drops that profile's sessions.test('a sidebar read mints for the profile its recents_profile names', () => {