Clear repository lint warnings
This commit is contained in:
1 parent
b84162246a
commit
cbef47f1ad
7 files changed
+12
-16
No files matched your search
@@ -18,7 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { readFileSync, writeFileSync } from "node:fs";
|
import { readFileSync, writeFileSync } from "node:fs";
|
||||||
import { globSync } from "node:fs";
|
|
||||||
import { fileURLToPath } from "node:url";
|
import { fileURLToPath } from "node:url";
|
||||||
import { dirname, join } from "node:path";
|
import { dirname, join } from "node:path";
|
||||||
import { execSync } from "node:child_process";
|
import { execSync } from "node:child_process";
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { readdir, stat } from "node:fs/promises";
|
|||||||
import { createReadStream } from "node:fs";
|
import { createReadStream } from "node:fs";
|
||||||
import { join } from "node:path";
|
import { join } from "node:path";
|
||||||
import { spawn } from "node:child_process";
|
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";
|
import { Upload } from "@aws-sdk/lib-storage";
|
||||||
|
|
||||||
const wranglerSingleUploadLimit = 290 * 1024 * 1024;
|
const wranglerSingleUploadLimit = 290 * 1024 * 1024;
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
import type { WorkerServiceDependencies } from "./types";
|
import type { WorkerServiceDependencies } from "./types";
|
||||||
import {
|
import { resolveWorkspaceWithLockMode } from "../../orchestration/resolve-workspace";
|
||||||
resolveWorkspaceWithLockMode,
|
|
||||||
WorkspaceConfigurationError,
|
|
||||||
} from "../../orchestration/resolve-workspace";
|
|
||||||
|
|
||||||
export function handleWorkerExit(
|
export function handleWorkerExit(
|
||||||
code: number | null,
|
code: number | null,
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ export function useCompanyData(
|
|||||||
approvals: badges.pendingApprovals > 0 ? { count: badges.pendingApprovals, tone: "warn" } : undefined,
|
approvals: badges.pendingApprovals > 0 ? { count: badges.pendingApprovals, tone: "warn" } : undefined,
|
||||||
communication: badges.unreadMessages > 0 ? { count: badges.unreadMessages, tone: "warn" } : undefined,
|
communication: badges.unreadMessages > 0 ? { count: badges.unreadMessages, tone: "warn" } : undefined,
|
||||||
};
|
};
|
||||||
}, [snapshot]);
|
}, [snapshot, currentCompany?.id]);
|
||||||
|
|
||||||
return useMemo(() => ({
|
return useMemo(() => ({
|
||||||
tasks,
|
tasks,
|
||||||
|
|||||||
@@ -432,7 +432,7 @@ describe("Process Recovery -- Context Preservation (D-02)", () => {
|
|||||||
|
|
||||||
it("session handoff markdown generated on crash", () => {
|
it("session handoff markdown generated on crash", () => {
|
||||||
const s = scaffold(db);
|
const s = scaffold(db);
|
||||||
const { taskId, runId } = createAndStartRun(db, {
|
const { runId } = createAndStartRun(db, {
|
||||||
companyId: s.companyId,
|
companyId: s.companyId,
|
||||||
agentId: s.agentId,
|
agentId: s.agentId,
|
||||||
workspaceId: s.workspaceId,
|
workspaceId: s.workspaceId,
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ describe("Edge Case: Session Rotation During Execution (D-05.3)", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("rotation triggered when run count exceeds maxRuns threshold", () => {
|
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 });
|
const sessionService = createSessionManagementService({ db, logger: mockLogger });
|
||||||
|
|
||||||
// Create a session
|
// 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", () => {
|
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 sessionService = createSessionManagementService({ db, logger: mockLogger });
|
||||||
|
|
||||||
const sessionId = db.core.tasks.createNewSession({
|
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", () => {
|
it("new session created after rotation with clean counters", () => {
|
||||||
const { companyId, agentId, taskId } = scaffold(db);
|
const { companyId, agentId } = scaffold(db);
|
||||||
|
|
||||||
// Create initial session
|
// Create initial session
|
||||||
const oldSessionId = db.core.tasks.createNewSession({
|
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)", () => {
|
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 sessionService = createSessionManagementService({ db, logger: mockLogger });
|
||||||
|
|
||||||
const sessionId = db.core.tasks.createNewSession({
|
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)", () => {
|
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 sessionService = createSessionManagementService({ db, logger: mockLogger });
|
||||||
|
|
||||||
const sessionId = db.core.tasks.createNewSession({
|
const sessionId = db.core.tasks.createNewSession({
|
||||||
|
|||||||
@@ -400,7 +400,7 @@ describe("session management service", () => {
|
|||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
describe("token accumulation", () => {
|
describe("token accumulation", () => {
|
||||||
it("accumulateTokenUsage calls db.incrementSessionUsage with correct args", () => {
|
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({
|
const sessionId = db.core.tasks.createNewSession({
|
||||||
companyId,
|
companyId,
|
||||||
agentId,
|
agentId,
|
||||||
@@ -467,7 +467,7 @@ describe("session management service", () => {
|
|||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
describe("session rotation", () => {
|
describe("session rotation", () => {
|
||||||
it("rotateSession archives old session, creates new, copies session_params", () => {
|
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({
|
const oldSessionId = db.core.tasks.createNewSession({
|
||||||
companyId,
|
companyId,
|
||||||
agentId,
|
agentId,
|
||||||
@@ -543,7 +543,7 @@ describe("session management service", () => {
|
|||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
describe("usage delta", () => {
|
describe("usage delta", () => {
|
||||||
it("getUsageDelta returns token difference between snapshot and current totals", () => {
|
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({
|
const sessionId = db.core.tasks.createNewSession({
|
||||||
companyId,
|
companyId,
|
||||||
agentId,
|
agentId,
|
||||||
|
|||||||
Reference in new issue
Block a user