diff --git a/src/main/worker/handlers/run-finished-helpers.ts b/src/main/worker/handlers/run-finished-helpers.ts index 06c04478..4d652008 100644 --- a/src/main/worker/handlers/run-finished-helpers.ts +++ b/src/main/worker/handlers/run-finished-helpers.ts @@ -1,7 +1,7 @@ import type { z } from "zod"; -import { createCircuitBreaker } from "../circuit-breaker"; -import { handleFailureEscalation, handleSuccessReset } from "../failure-escalation"; -import { persistRunEvent } from "../run-event-recorder"; +import { createCircuitBreaker } from "../observability/circuit-breaker"; +import { handleFailureEscalation, handleSuccessReset } from "../observability/failure-escalation"; +import { persistRunEvent } from "../observability/run-event-recorder"; import type { workerMessageSchema } from "../entry/types"; import type { HandlerContext, HandlerDeps, WorkerMessageEvent } from "./handler-context"; diff --git a/src/main/worker/handlers/run-log-handler.ts b/src/main/worker/handlers/run-log-handler.ts index 89f2aadc..a1457294 100644 --- a/src/main/worker/handlers/run-log-handler.ts +++ b/src/main/worker/handlers/run-log-handler.ts @@ -1,5 +1,5 @@ -import { filterRunLogChunk } from "../run-log-filter"; -import { persistRunEvent } from "../run-event-recorder"; +import { filterRunLogChunk } from "../observability/run-log-filter"; +import { persistRunEvent } from "../observability/run-event-recorder"; import type { HandlerContext, HandlerDeps, WorkerMessageEvent } from "./handler-context"; const LEASE_RENEWAL_INTERVAL_MS = 5 * 60 * 1000; // 5 minutes diff --git a/src/main/worker/handlers/run-status-handler.ts b/src/main/worker/handlers/run-status-handler.ts index a5a47d20..b08bf6f1 100644 --- a/src/main/worker/handlers/run-status-handler.ts +++ b/src/main/worker/handlers/run-status-handler.ts @@ -1,4 +1,4 @@ -import { persistRunEvent } from "../run-event-recorder"; +import { persistRunEvent } from "../observability/run-event-recorder"; import type { HandlerContext, HandlerDeps, WorkerMessageEvent } from "./handler-context"; export function handleRunStatus( diff --git a/src/main/worker/circuit-breaker.ts b/src/main/worker/observability/circuit-breaker.ts similarity index 100% rename from src/main/worker/circuit-breaker.ts rename to src/main/worker/observability/circuit-breaker.ts diff --git a/src/main/worker/failure-escalation.ts b/src/main/worker/observability/failure-escalation.ts similarity index 100% rename from src/main/worker/failure-escalation.ts rename to src/main/worker/observability/failure-escalation.ts diff --git a/src/main/worker/log-redactor.ts b/src/main/worker/observability/log-redactor.ts similarity index 100% rename from src/main/worker/log-redactor.ts rename to src/main/worker/observability/log-redactor.ts diff --git a/src/main/worker/run-event-recorder.ts b/src/main/worker/observability/run-event-recorder.ts similarity index 94% rename from src/main/worker/run-event-recorder.ts rename to src/main/worker/observability/run-event-recorder.ts index d7e3624d..0910f72b 100644 --- a/src/main/worker/run-event-recorder.ts +++ b/src/main/worker/observability/run-event-recorder.ts @@ -1,4 +1,4 @@ -import type { AppDatabase } from "../database"; +import type { AppDatabase } from "../../database"; interface PersistInput { companyId: string; diff --git a/src/main/worker/run-log-filter.ts b/src/main/worker/observability/run-log-filter.ts similarity index 100% rename from src/main/worker/run-log-filter.ts rename to src/main/worker/observability/run-log-filter.ts diff --git a/tests/unit/failure-escalation.test.ts b/tests/unit/failure-escalation.test.ts index 2cccf439..6f039e56 100644 --- a/tests/unit/failure-escalation.test.ts +++ b/tests/unit/failure-escalation.test.ts @@ -3,7 +3,7 @@ import { handleFailureEscalation, handleSuccessReset, type EscalationDeps, -} from "@main/worker/failure-escalation"; +} from "@main/worker/observability/failure-escalation"; /** * Tests for the retry-aware failure escalation pipeline. diff --git a/tests/unit/log-redactor.test.ts b/tests/unit/log-redactor.test.ts index be3650a6..9bc0aa4a 100644 --- a/tests/unit/log-redactor.test.ts +++ b/tests/unit/log-redactor.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { redactTokens } from "../../src/main/worker/log-redactor"; +import { redactTokens } from "../../src/main/worker/observability/log-redactor"; /** Verifies the worker process token redactor strips known * credential-shaped substrings from log strings before they leave the diff --git a/tests/unit/self-wake.test.ts b/tests/unit/self-wake.test.ts index d1d119e2..47d33346 100644 --- a/tests/unit/self-wake.test.ts +++ b/tests/unit/self-wake.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { createCircuitBreaker, MAX_CONSECUTIVE_WAKES } from "@main/worker/circuit-breaker"; +import { createCircuitBreaker, MAX_CONSECUTIVE_WAKES } from "@main/worker/observability/circuit-breaker"; /** * Tests for the self-wake circuit breaker used in worker-message-handler.ts.