Skip to content

Commit 6d22e47

Browse files
committed
test(codex): narrow auth store assertions
1 parent ebd2c00 commit 6d22e47

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/agents/pi-embedded-runner/run.overflow-compaction.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,8 @@ describe("runEmbeddedPiAgent overflow compaction trigger routing", () => {
501501
};
502502
expect(harnessParams?.runtimePlan).toBe(runtimePlan);
503503
expect(harnessParams.authProfileStore).toBe(codexAuthStore);
504-
const authProfiles = expectRecordFields(harnessParams.authProfileStore.profiles, {});
504+
const forwardedAuthStore = expectRecordFields(harnessParams.authProfileStore, {});
505+
const authProfiles = expectRecordFields(forwardedAuthStore.profiles, {});
505506
expect(Object.keys(authProfiles)).toEqual([
506507
"openai-codex:work",
507508
"openai-codex:other",
@@ -854,7 +855,9 @@ describe("runEmbeddedPiAgent overflow compaction trigger routing", () => {
854855
toolAuthProfileStore?: unknown;
855856
};
856857
expect(harnessParams.authProfileStore).toBe(codexAuthStore);
857-
expectRecordFields(harnessParams.authProfileStore.profiles?.["xai:work"], {
858+
const forwardedAuthStore = expectRecordFields(harnessParams.authProfileStore, {});
859+
const authProfiles = expectRecordFields(forwardedAuthStore.profiles, {});
860+
expectRecordFields(authProfiles["xai:work"], {
858861
provider: "xai",
859862
});
860863
expect(harnessParams.toolAuthProfileStore).toBe(codexAuthStore);

0 commit comments

Comments
 (0)