Merge remote-tracking branch 'origin/dev' into codex/fix-cliproxy-v3-snapshot-migration-issue

# Conflicts:
#	src/web-server/usage/cliproxy-usage-transformer.ts
#	tests/unit/web-server/cliproxy-usage-transformer.test.ts
This commit is contained in:
Tam Nhu Tran committed 2026-05-30 16:13:49 -04:00
commit ced9317565
210 files changed
+5627 -1065

No files matched your search

@@ -112,6 +112,21 @@ describe('cliproxy usage syncer', () => {
const snapshotPath = path.join(ccsDir, 'cache', 'cliproxy-usage', 'latest.json');
expect(fs.existsSync(snapshotPath)).toBe(true);
const snapshot = JSON.parse(fs.readFileSync(snapshotPath, 'utf-8')) as {
details: Array<Record<string, unknown>>;
};
expect(snapshot.details[0]).not.toHaveProperty('source');
expect(snapshot.details[0]).not.toHaveProperty('authIndex');
if (process.platform !== 'win32') {
const cacheDir = path.join(ccsDir, 'cache');
const cliproxyCacheDir = path.dirname(snapshotPath);
expect(fs.statSync(ccsDir).mode & 0o777).toBe(0o700);
expect(fs.statSync(cacheDir).mode & 0o777).toBe(0o700);
expect(fs.statSync(cliproxyCacheDir).mode & 0o777).toBe(0o700);
expect(fs.statSync(snapshotPath).mode & 0o777).toBe(0o600);
}
const cached = await runWithScopedConfigDir(ccsDir, async () => {
return await loadCachedCliproxyData();
});