Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(usage): merge Codex quota reports missing an email #27555

ClosedTsopic(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/27555/headopened View on GitHub

Showing 2 changed files with 62 additions and 1 deletion.

x
0 of 2 viewed, 2 left
49 additions and 0 deletionspackages/shared/src/usageLimits.test.tsModified
View file
@@ -566,6 +566,55 @@
]);
});
​
+ it("merges a proxy-backed Codex probe without email only with an unambiguous account ID", () => {
+ const native = provider({
+ auth: { status: "unknown", workspaceId: "ws-proxy" },
+ usageLimits: { checkedAt, windows: [{ ...weekly, usedPercent: 39 }] },
+ });
+ const hub = {
+ ...source,
+ accounts: [
+ {
+ id: "proxy.json",
+ driver: native.driver,
+ email: "same@example.com",
+ workspaceId: "ws-proxy",
+ usageLimits: { checkedAt, windows: [{ ...weekly, usedPercent: 39 }] },
+ },
+ ],
+ };
+ const collect = (accounts: typeof hub.accounts) =>
+ collectLimitAccounts(
+ new Map([
+ [
+ EnvironmentId.make("env-a"),
+ {
+ ...laptop,
+ serverConfig: { providers: [native] },
+ },