diff --git a/scripts/codemod/remove-appdatabase-passthrough.mjs b/scripts/codemod/remove-appdatabase-passthrough.mjs index be4ed448..00bc986d 100644 --- a/scripts/codemod/remove-appdatabase-passthrough.mjs +++ b/scripts/codemod/remove-appdatabase-passthrough.mjs @@ -18,7 +18,6 @@ */ import { readFileSync, writeFileSync } from "node:fs"; -import { globSync } from "node:fs"; import { fileURLToPath } from "node:url"; import { dirname, join } from "node:path"; import { execSync } from "node:child_process"; diff --git a/scripts/release-local/r2.mjs b/scripts/release-local/r2.mjs index 79218853..70c5008f 100644 --- a/scripts/release-local/r2.mjs +++ b/scripts/release-local/r2.mjs @@ -2,7 +2,7 @@ import { readdir, stat } from "node:fs/promises"; import { createReadStream } from "node:fs"; import { join } from "node:path"; import { spawn } from "node:child_process"; -import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3"; +import { S3Client } from "@aws-sdk/client-s3"; import { Upload } from "@aws-sdk/lib-storage"; const wranglerSingleUploadLimit = 290 * 1024 * 1024; diff --git a/src/main/worker/entry/crash-recovery.ts b/src/main/worker/entry/crash-recovery.ts index d451391f..7dcb1e80 100644 --- a/src/main/worker/entry/crash-recovery.ts +++ b/src/main/worker/entry/crash-recovery.ts @@ -1,8 +1,5 @@ import type { WorkerServiceDependencies } from "./types"; -import { - resolveWorkspaceWithLockMode, - WorkspaceConfigurationError, -} from "../../orchestration/resolve-workspace"; +import { resolveWorkspaceWithLockMode } from "../../orchestration/resolve-workspace"; export function handleWorkerExit( code: number | null, diff --git a/src/renderer/hooks/useCompanyData.ts b/src/renderer/hooks/useCompanyData.ts index d836ad22..edf66e24 100644 --- a/src/renderer/hooks/useCompanyData.ts +++ b/src/renderer/hooks/useCompanyData.ts @@ -95,7 +95,7 @@ export function useCompanyData( approvals: badges.pendingApprovals > 0 ? { count: badges.pendingApprovals, tone: "warn" } : undefined, communication: badges.unreadMessages > 0 ? { count: badges.unreadMessages, tone: "warn" } : undefined, }; - }, [snapshot]); + }, [snapshot, currentCompany?.id]); return useMemo(() => ({ tasks, diff --git a/tests/integration/process-recovery.spec.ts b/tests/integration/process-recovery.spec.ts index cb8b21e2..678762ab 100644 --- a/tests/integration/process-recovery.spec.ts +++ b/tests/integration/process-recovery.spec.ts @@ -432,7 +432,7 @@ describe("Process Recovery -- Context Preservation (D-02)", () => { it("session handoff markdown generated on crash", () => { const s = scaffold(db); - const { taskId, runId } = createAndStartRun(db, { + const { runId } = createAndStartRun(db, { companyId: s.companyId, agentId: s.agentId, workspaceId: s.workspaceId, diff --git a/tests/unit/edge-case-session.test.ts b/tests/unit/edge-case-session.test.ts index 7155db63..3659a813 100644 --- a/tests/unit/edge-case-session.test.ts +++ b/tests/unit/edge-case-session.test.ts @@ -110,7 +110,7 @@ describe("Edge Case: Session Rotation During Execution (D-05.3)", () => { }); it("rotation triggered when run count exceeds maxRuns threshold", () => { - const { companyId, agentId, taskId } = scaffold(db); + const { companyId, agentId } = scaffold(db); const sessionService = createSessionManagementService({ db, logger: mockLogger }); // Create a session @@ -137,7 +137,7 @@ describe("Edge Case: Session Rotation During Execution (D-05.3)", () => { }); it("rotation triggered when token count exceeds maxTokens threshold", () => { - const { companyId, agentId, taskId } = scaffold(db); + const { companyId, agentId } = scaffold(db); const sessionService = createSessionManagementService({ db, logger: mockLogger }); const sessionId = db.core.tasks.createNewSession({ @@ -214,7 +214,7 @@ describe("Edge Case: Session Rotation During Execution (D-05.3)", () => { }); it("new session created after rotation with clean counters", () => { - const { companyId, agentId, taskId } = scaffold(db); + const { companyId, agentId } = scaffold(db); // Create initial session const oldSessionId = db.core.tasks.createNewSession({ @@ -249,7 +249,7 @@ describe("Edge Case: Session Rotation During Execution (D-05.3)", () => { }); it("claude connector triggers rotation under pi-mono (no native exemption)", () => { - const { companyId, agentId, taskId } = scaffold(db, "gemini-cli"); + const { companyId, agentId } = scaffold(db, "gemini-cli"); const sessionService = createSessionManagementService({ db, logger: mockLogger }); const sessionId = db.core.tasks.createNewSession({ @@ -271,7 +271,7 @@ describe("Edge Case: Session Rotation During Execution (D-05.3)", () => { }); it("codex connector triggers rotation under pi-mono (no native exemption)", () => { - const { companyId, agentId, taskId } = scaffold(db, "gemini-cli"); + const { companyId, agentId } = scaffold(db, "gemini-cli"); const sessionService = createSessionManagementService({ db, logger: mockLogger }); const sessionId = db.core.tasks.createNewSession({ diff --git a/tests/unit/session-management.test.ts b/tests/unit/session-management.test.ts index 27b51f3c..59ace39b 100644 --- a/tests/unit/session-management.test.ts +++ b/tests/unit/session-management.test.ts @@ -400,7 +400,7 @@ describe("session management service", () => { // ------------------------------------------------------------------------- describe("token accumulation", () => { it("accumulateTokenUsage calls db.incrementSessionUsage with correct args", () => { - const { taskId, companyId, agentId } = scaffold(db); + const { companyId, agentId } = scaffold(db); const sessionId = db.core.tasks.createNewSession({ companyId, agentId, @@ -467,7 +467,7 @@ describe("session management service", () => { // ------------------------------------------------------------------------- describe("session rotation", () => { it("rotateSession archives old session, creates new, copies session_params", () => { - const { taskId, companyId, agentId } = scaffold(db); + const { companyId, agentId } = scaffold(db); const oldSessionId = db.core.tasks.createNewSession({ companyId, agentId, @@ -543,7 +543,7 @@ describe("session management service", () => { // ------------------------------------------------------------------------- describe("usage delta", () => { it("getUsageDelta returns token difference between snapshot and current totals", () => { - const { taskId, companyId, agentId } = scaffold(db); + const { companyId, agentId } = scaffold(db); const sessionId = db.core.tasks.createNewSession({ companyId, agentId,