Q88: a sign-in is saved only if a run can use and renew it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-08 15:02:12 -04:00
1 parent 4668396f25
commit 7eef3d459f
38 files changed
+127 -398

No files matched your search

+5 -5
View File
@@ -42,7 +42,7 @@ describe("task execution service", () => {
if (first?.role === "user") capturedPrompt = first.text;
return { text: "executed:gpt-5.4", toolCalls: [], rawResponseJson: JSON.stringify({ id: "resp-task-1" }) };
};
const providers = new ProviderService(connection.db, providerAdapters, testVault, undefined, answeringModelCheck(fakeToolTurn));
const providers = new ProviderService(connection.db, providerAdapters, testVault, answeringModelCheck(fakeToolTurn));
const skills = new SkillService(connection.db, join(tmpdir(), `agentcompany-task-skills-${randomUUID()}`));
const execution = new TaskExecutionService(connection.db, providers);
const skillDir = join(tmpdir(), `agentcompany-task-skill-${randomUUID()}`);
@@ -154,7 +154,7 @@ describe("task execution service", () => {
toolCalls: [],
rawResponseJson: JSON.stringify({ id: "resp-task-approved" }),
});
const providers = new ProviderService(connection.db, providerAdapters, testVault, undefined, answeringModelCheck(fakeToolTurn));
const providers = new ProviderService(connection.db, providerAdapters, testVault, answeringModelCheck(fakeToolTurn));
const execution = new TaskExecutionService(connection.db, providers);
let orgId = "";
let employeeId = "";
@@ -293,7 +293,7 @@ describe("task execution service", () => {
const fakeToolTurn = async (): Promise<AgentTurnResult> => {
throw new Error("provider rejected task");
};
const providers = new ProviderService(connection.db, providerAdapters, testVault, undefined, answeringModelCheck(fakeToolTurn));
const providers = new ProviderService(connection.db, providerAdapters, testVault, answeringModelCheck(fakeToolTurn));
const execution = new TaskExecutionService(connection.db, providers);
let orgId = "";
let taskId = "";
@@ -351,7 +351,7 @@ describe("task execution service", () => {
turns += 1;
return { text: "done", toolCalls: [], rawResponseJson: JSON.stringify({ id: `resp-${turns}` }) };
};
const providers = new ProviderService(connection.db, providerAdapters, testVault, undefined, answeringModelCheck(fakeToolTurn));
const providers = new ProviderService(connection.db, providerAdapters, testVault, answeringModelCheck(fakeToolTurn));
const execution = new TaskExecutionService(connection.db, providers);
let orgId = "";
let taskId = "";
@@ -850,7 +850,7 @@ describe("task execution service", () => {
const fakeToolTurn = async (): Promise<AgentTurnResult> => {
throw new ProviderHttpError("The usage limit has been reached", null, 429, false, "usage_limit_reached");
};
const providers = new ProviderService(connection.db, providerAdapters, testVault, undefined, answeringModelCheck(fakeToolTurn));
const providers = new ProviderService(connection.db, providerAdapters, testVault, answeringModelCheck(fakeToolTurn));
let nowMs = Date.now();
const execution = new TaskExecutionService(connection.db, providers, undefined, undefined, () => nowMs);
let orgId = "";