mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 14:17:11 +00:00
fix(analytics): avoid bridge double counting in native collectors
This commit is contained in:
1 parent
fe7cc6f9ba
commit
e95b354297
6 files changed
+75
-19
No files matched your search
@@ -280,4 +280,19 @@ describe('usage aggregator native runtime integration', () => {
|
||||
});
|
||||
expect(daily[0].modelsUsed).not.toContain('gpt-5');
|
||||
});
|
||||
|
||||
it('ignores ccs_runtime-backed codex bridge rollouts to avoid double counting', async () => {
|
||||
writeCodexFixture('ccs_runtime');
|
||||
aggregator.clearUsageCache();
|
||||
|
||||
const daily = await aggregator.getCachedDailyData();
|
||||
|
||||
expect(daily).toHaveLength(1);
|
||||
expect(daily[0]).toMatchObject({
|
||||
inputTokens: 150,
|
||||
outputTokens: 50,
|
||||
cacheReadTokens: 5,
|
||||
});
|
||||
expect(daily[0].modelsUsed).not.toContain('gpt-5');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user