fix: isolate anonymous rollout rate limits

This commit is contained in:
jb
2026-09-19 10:01:23 -04:00
parent 01b8b4642b
commit 6af610d9ce
6 changed files with 38 additions and 22 deletions
+2 -2
View File
@@ -24,8 +24,8 @@ test('Gitea workflow keeps source checks separate and holds unverified container
});
test('Authenticated route limits remain user-keyed after rollout gates', () => {
expect(chatRoute).toContain('chat:${current?.userId ?? event.getClientAddress()}');
expect(syncRoute).toContain('sync:${current?.userId ?? event.getClientAddress()}');
expect(chatRoute).toContain('chat:${current.userId}');
expect(syncRoute).toContain('sync:${current.userId}');
expect(chatRoute.indexOf('protectMutation')).toBeLessThan(chatRoute.indexOf('const current = await session(event)'));
expect(syncRoute.indexOf('protectMutation')).toBeLessThan(syncRoute.indexOf('const current = await session(event)'));
expect(chatRoute.indexOf("capabilityEnabled('assistant_dispatch'")).toBeLessThan(chatRoute.indexOf('const current = await session(event)'));