Files
openclaw/scripts/deadcode-exports.baseline.mjs
Peter Steinberger 674dd37cd0 refactor(deadcode): privatize core test seams (#108325)
* refactor(entry): privatize compile cache internals

* refactor(logging): privatize diagnostic test seams

* refactor(plugin-state): privatize store test seams

* refactor(skills): privatize lifecycle test seams

* refactor(node-host): privatize invoke test seam

* refactor(system-agent): privatize turn test seam

* chore(deadcode): shrink core test seam baseline
2026-07-15 06:37:40 -07:00

125 lines
8.2 KiB
JavaScript

// Pre-existing unused exports awaiting deletion.
// New entries fail CI. After deleting dead code, run `pnpm deadcode:exports:update`.
// Do not add entries to avoid fixing new findings.
export const KNIP_UNUSED_EXPORT_BASELINE = [
"src/agents/agent-hooks/compaction-safeguard.ts: testing",
"src/agents/agent-tools.before-tool-call.ts: testing",
"src/agents/apply-patch.ts: applyPatch",
"src/agents/code-mode.ts: testing",
"src/agents/command/attempt-execution.helpers.ts: claudeCliSessionTranscriptPath",
"src/agents/command/attempt-execution.helpers.ts: formatClaudeCliFallbackPrelude",
"src/agents/compaction.ts: buildCompactionSummarizationInstructions",
"src/agents/compaction.ts: summarizeWithFallback",
"src/agents/embedded-agent-runner/extra-params.ts: testing",
"src/agents/embedded-agent-runner/run.ts: testing",
"src/agents/embedded-agent-runner/runs.ts: testing",
"src/agents/embedded-agent-runner/session-manager-cache.ts: createSessionManagerCache",
"src/agents/embedded-agent-subscribe.handlers.messages.ts: buildAssistantStreamData",
"src/agents/embedded-agent-subscribe.handlers.messages.ts: recordPendingAssistantReplyDirectives",
"src/agents/embedded-agent-subscribe.handlers.messages.ts: resolveSilentReplyFallbackText",
"src/agents/embedded-agent-subscribe.tools.ts: isToolResultMediaTrusted",
"src/agents/harness/lifecycle-hook-helpers.ts: clearAgentHarnessFinalizeRetryBudget",
"src/agents/model-fallback.ts: testing",
"src/agents/modes/interactive/theme/theme.ts: setTheme",
"src/agents/openai-completions-compat.ts: resolveOpenAICompletionsCompatDefaults",
"src/agents/session-suspension.ts: testing",
"src/agents/sessions/tools/bash.ts: resolveBashTimeoutMs",
"src/agents/tool-search.ts: testing",
"src/agents/tool-search.ts: ToolSearchCatalogSession",
"src/agents/tools/image-generate-tool.ts: resolveImageGenerationModelConfigForTool",
"src/agents/tools/image-tool.ts: resolveImageModelConfigForTool",
"src/agents/tools/image-tool.ts: testing",
"src/agents/tools/model-config.helpers.ts: hasDirectProviderApiKeyAuthForTool",
"src/agents/tools/sessions-resolution.ts: testing",
"src/agents/tools/sessions-send-tool.a2a.ts: testing",
"src/agents/tools/video-generate-tool.ts: resolveVideoGenerationModelConfigForTool",
"src/agents/tools/web-fetch.ts: sanitizeWebFetchUrl",
"src/agents/utils/tools-manager.ts: testing",
"src/auto-reply/reply/abort.ts: testing",
"src/auto-reply/reply/acp-reset-target.ts: testing",
"src/auto-reply/reply/agent-runner-context-recovery.ts: computeContextAwareReserveTokensFloor",
"src/auto-reply/reply/agent-runner-memory.ts: setAgentRunnerMemoryTestDeps",
"src/auto-reply/reply/agent-runner-session-reset.ts: setAgentRunnerSessionResetTestDeps",
"src/auto-reply/reply/commands-login.ts: testing",
"src/auto-reply/reply/dispatch-from-config.ts: testing",
"src/auto-reply/reply/queue/cleanup.ts: testing",
"src/auto-reply/reply/queue/enqueue.ts: resetRecentQueuedMessageIdDedupe",
"src/auto-reply/reply/reply-run-registry.ts: testing",
"src/auto-reply/reply/stage-sandbox-media.ts: testing",
"src/auto-reply/usage-bar/template.ts: clearUsageBarTemplateCacheForTest",
"src/cli/channel-options.ts: testing",
"src/cli/command-secret-gateway.ts: testing",
"src/cli/gateway-cli/run.ts: testing",
"src/cli/plugins-install-command.ts: loadConfigForInstall",
"src/cli/plugins-list-format.ts: formatPluginLine",
"src/cli/startup-metadata.ts: testing",
"src/cli/update-cli/update-command-plugins.ts: buildInvalidConfigPostCoreUpdateResult",
"src/cli/update-cli/update-command-plugins.ts: collectMissingPluginInstallPayloads",
"src/cli/update-cli/update-command-plugins.ts: resolvePostSyncPluginUpdateSkipIds",
"src/cli/update-cli/update-command-service.ts: formatPostUpdateGatewayRecoveryInstructions",
"src/cli/update-cli/update-command-service.ts: recoverInstalledLaunchAgentAfterUpdate",
"src/cli/update-cli/update-command-service.ts: recoverLaunchAgentAndRecheckGatewayHealth",
"src/cli/update-cli/update-command-service.ts: shouldUseLegacyProcessRestartAfterUpdate",
"src/commands/audit.ts: testApi",
"src/commands/backup-shared.ts: resolveBackupPlanFromPaths",
"src/commands/doctor-auth-oauth-sidecar.ts: testing",
"src/commands/doctor-auth.ts: legacyCodexProviderOverrideToHealthFinding",
"src/commands/doctor-heartbeat-main-session-repair.ts: moveHeartbeatMainSessionEntry",
"src/commands/doctor-heartbeat-main-session-repair.ts: resolveHeartbeatMainSessionRepairCandidate",
"src/commands/doctor-sandbox.ts: resolveSandboxScript",
"src/commands/doctor-session-snapshots.ts: resolveSessionSnapshotBundledSkillsDir",
"src/commands/doctor-session-snapshots.ts: scanSessionStoreForStaleRuntimeSnapshotPaths",
"src/commands/doctor-whatsapp-responsiveness.ts: listLocalTuiProcesses",
"src/commands/doctor-whatsapp-responsiveness.ts: terminateLocalTuiProcesses",
"src/commands/doctor/shared/codex-native-assets.ts: scanCodexNativeAssets",
"src/commands/doctor/shared/codex-route-warnings.ts: repairCodexSessionStoreRoutes",
"src/commands/doctor/shared/legacy-oauth-sidecar.ts: legacyOAuthSidecarInternalTestUtils",
"src/commands/doctor/shared/plugin-dependency-cleanup.ts: testing",
"src/commands/doctor/shared/stale-auth-order.ts: repairStaleConfiguredAuthOrders",
"src/commands/doctor/shared/stale-oauth-profile-shadows.ts: testing",
"src/commands/onboard-inference.ts: detectNativeCodexAppServer",
"src/commands/onboard-non-interactive/local.ts: resolveGatewayHealthProbeToken",
"src/commands/onboard-non-interactive/local.ts: resolveInstallDaemonGatewayHealthTiming",
"src/commands/onboard-skills.ts: testing",
"src/commands/onboarding-plugin-install.ts: testing",
"src/commands/sessions-tail.ts: setSessionsTailFollowIntervalMsForTests",
"src/commands/sessions.ts: testing",
"src/commands/status.command.ts: resolvePairingRecoveryContext",
"src/commitments/extraction.ts: validateCommitmentCandidates",
"src/commitments/runtime.ts: configureCommitmentExtractionRuntime",
"src/commitments/runtime.ts: drainCommitmentExtractionQueue",
"src/commitments/runtime.ts: resetCommitmentExtractionRuntimeForTests",
"src/cron/isolated-agent/delivery-dispatch.ts: getCompletedDirectCronDeliveriesCountForTests",
"src/cron/isolated-agent/delivery-dispatch.ts: resetCompletedDirectCronDeliveriesForTests",
"src/cron/schedule.ts: clearCronScheduleCacheForTest",
"src/cron/schedule.ts: getCronScheduleCacheMaxForTest",
"src/cron/schedule.ts: getCronScheduleCacheSizeForTest",
"src/cron/schedule.ts: hasCronInCacheForTest",
"src/cron/service/active-run-cancellation.ts: cancelActiveCronTaskRun",
"src/cron/service/active-run-cancellation.ts: resetActiveCronTaskRunsForTests",
"src/cron/service/timer.ts: executeJobCore",
"src/cron/service/timer.ts: onTimer",
"src/cron/session-reaper.ts: resetReaperThrottle",
"src/flows/doctor-health-contributions.ts: createDoctorHealthContribution",
"src/flows/doctor-health-contributions.ts: resolveDoctorHealthContributions",
"src/logging/redact-internal.ts: withFullContextToolPayloadRedaction",
"src/sessions/session-lifecycle-admission.ts: runExclusiveSessionLifecycle",
"src/sessions/session-upstream-monitor.ts: runSessionUpstreamMonitorTick",
"src/sessions/user-turn-transcript.ts: persistUserTurnTranscript",
"src/tasks/detached-task-runtime.ts: resetDetachedTaskLifecycleRuntimeForTests",
"src/tasks/detached-task-runtime.ts: setDetachedTaskLifecycleRuntime",
"src/tasks/generated-media-task-activity.ts: resetGeneratedMediaTaskActivityForTests",
"src/tasks/task-flow-registry.store.ts: configureTaskFlowRegistryRuntime",
"src/tasks/task-flow-registry.ts: createFlowRecord",
"src/tasks/task-flow-registry.ts: resetTaskFlowRegistryForTests",
"src/tasks/task-registry.ts: maybeDeliverTaskStateChangeUpdate",
"src/tasks/task-registry.ts: resetTaskRegistryControlRuntimeForTests",
"src/tasks/task-registry.ts: resetTaskRegistryDeliveryRuntimeForTests",
"src/tasks/task-registry.ts: resetTaskRegistryForTests",
"src/tasks/task-registry.ts: setTaskRegistryControlRuntimeForTests",
"src/tasks/task-registry.ts: setTaskRegistryDeliveryRuntimeForTests",
];
// Platform-variant findings. Allowed when present; never required.
export const KNIP_OPTIONAL_UNUSED_EXPORT_BASELINE = [];