From 1334a97f52812d81ff674292a2575ca2c5063337 Mon Sep 17 00:00:00 2001 From: Sawyer Cutler Date: Wed, 14 Oct 2026 13:29:08 -0700 Subject: [PATCH] chore: delete five verified-dead artifacts A no-op flag parsing clause with its fixture, a stop-policy shim whose sole caller is a newer parameter, two settings that nothing reads, the stub workflows package, and a Codex refresh constant with an unused re-export in this repo. Every item carries repo-wide zero-caller evidence at deletion time; the dead-export gate's allowlist shrank by the same two entries and re-verifies by failing on stale rows. Live artifacts (sessionMode machinery, .agent-state dual-read, scripts, bin/) stay as they are. --- bun.lock | 6 ------ scripts/check-dead-exports.test.ts | 13 +------------ scripts/dead-export-allowlist.txt | 9 --------- src/auth/codex/constants.ts | 5 ----- src/config.test.ts | 2 -- src/config/index.ts | 8 -------- src/config/settings.test.ts | 17 ----------------- src/config/settings.ts | 17 ----------------- src/session/assemble-runtime.ts | 7 ++++--- src/subagent/index.test.ts | 6 +++--- src/subagent/stop-policy.ts | 11 ++--------- src/tui/session-start.test.ts | 1 - workflows/_stub/package.json | 7 ------- 13 files changed, 10 insertions(+), 99 deletions(-) delete mode 100644 workflows/_stub/package.json diff --git a/bun.lock b/bun.lock index 6a6e90cf7..b234dfec5 100644 --- a/bun.lock +++ b/bun.lock @@ -231,10 +231,6 @@ "@types/semver": "catalog:", }, }, - "workflows/_stub": { - "name": "@corbits/workflows-stub", - "version": "0.0.0", - }, }, "overrides": { "@intx/agent": "workspace:*", @@ -322,8 +318,6 @@ "@corbits/provider-zen": ["@corbits/provider-zen@workspace:packages/zen"], - "@corbits/workflows-stub": ["@corbits/workflows-stub@workspace:workflows/_stub"], - "@corbits/xai-provider": ["@corbits/xai-provider@0.1.2", "", { "dependencies": { "arktype": "^2.2.3" }, "peerDependencies": { "@corbits/oauth-core": "^0.2.0", "@corbits/openai-responses": "^0.2.0", "@intx/inference": "^0.4.0", "@intx/types": "^0.4.0" } }, "sha512-4gCSLehuE922UG5DeAQLMA3iaq5MzSEgKNuq2Lb4aJqEYsQ85t8rTmu0DXs+T6mHNq2cbCI9eCF4aXuyv420iA=="], "@gar/promise-retry": ["@gar/promise-retry@1.0.3", "", {}, "sha512-GmzA9ckNokPypTg10pgpeHNQe7ph+iIKKmhKu3Ob9ANkswreCx7R3cKmY781K8QK3AqVL3xVh9A42JvIAbkkSA=="], diff --git a/scripts/check-dead-exports.test.ts b/scripts/check-dead-exports.test.ts index 70211f157..0662b38ca 100644 --- a/scripts/check-dead-exports.test.ts +++ b/scripts/check-dead-exports.test.ts @@ -46,18 +46,7 @@ describe("scoped exemptions", () => { test("the real allowlist covers the named flags but not a sibling probe", () => { const rules = loadAllowlist(); expect( - isAllowlisted( - rules, - "src/auth/codex/constants.ts", - "CODEX_REFRESH_SKEW_MS", - ), - ).toBe(true); - expect( - isAllowlisted( - rules, - "src/auth/codex/constants.ts", - "CODEX_HEADLESS_REFRESH_INTERVAL_MS", - ), + isAllowlisted(rules, "src/provider/reasoning-effort.ts", "satisfies"), ).toBe(true); expect( isAllowlisted(rules, "src/auth/codex/usage.ts", "someNewDeadExport"), diff --git a/scripts/dead-export-allowlist.txt b/scripts/dead-export-allowlist.txt index 516625db5..ad4428d3e 100644 --- a/scripts/dead-export-allowlist.txt +++ b/scripts/dead-export-allowlist.txt @@ -20,15 +20,6 @@ # vendor workspaces on the next sync. Prune upstream, not here. vendor/ -# Deferred Codex/xAI usage-data cleanup owned by the CL-6815 lane: these -# modules are fully dead deferred code with no live importers (not test-only -# helpers), and that lane decides their fate. Scoped to the exact ts-prune -# flags so a new dead export in these files fails the guard instead of -# hiding under a whole-file exemption. Remove each entry with the export it -# names when the owning cleanup lands. -src/auth/codex/constants.ts: CODEX_REFRESH_SKEW_MS -src/auth/codex/constants.ts: CODEX_HEADLESS_REFRESH_INTERVAL_MS - # ts-prune parser false positives: bare tokens on `as const satisfies ...` # lines inside live exports. None of these is an export declaration. src/provider/reasoning-effort.ts: satisfies diff --git a/src/auth/codex/constants.ts b/src/auth/codex/constants.ts index fac16c07d..b81fab440 100644 --- a/src/auth/codex/constants.ts +++ b/src/auth/codex/constants.ts @@ -4,7 +4,6 @@ import { codexOAuthConfig } from "@corbits/codex-provider"; export { CODEX_BASE_URL, CODEX_REDIRECT_URI, - CODEX_REFRESH_SKEW_MS, CODEX_RESPONSES_PATH, } from "@corbits/codex-provider"; @@ -38,7 +37,3 @@ export const CODEX_DEFAULT_MODELS = [ "gpt-5.6-luna", "gpt-5.4-mini", ] as const; - -// How often a headless run re-checks its Codex token and reseeds the source. -// Half the skew so the refresh window is never missed between ticks. -export const CODEX_HEADLESS_REFRESH_INTERVAL_MS = 30_000; diff --git a/src/config.test.ts b/src/config.test.ts index 4224bf38a..06b3bb79a 100644 --- a/src/config.test.ts +++ b/src/config.test.ts @@ -1744,12 +1744,10 @@ describe("buildProviderCatalog", () => { web: "exa", hiddenCommands: ["help"], onboarded: true, - compactionMode: "pruning", sessionMode: "orchestrator", agentModelFallback: "none", shell: { timeoutMs: 30_000, maxTimeoutMs: 120_000 }, tools: { timeoutMs: 60_000 }, - workflowProfiles: { fast: { implement: "fp-large" } }, }; const settings = providerCatalogToSettings( [ diff --git a/src/config/index.ts b/src/config/index.ts index bbe63150c..6d14de5a5 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -662,8 +662,6 @@ export interface Config { */ modelOverride?: boolean; - // Deprecated no-op retained for CLI compatibility. - noWorkflow: boolean; /** * Runtime settings view for provider resolution, including OAuth * projections never written to settings.json. Not for saveGlobalSettings — @@ -887,7 +885,6 @@ export async function loadConfig( let provider: string | undefined; let model: string | undefined; let profileFlag: string | undefined; - let noWorkflow = false; const positional: string[] = []; const requireValue = (flag: string, value: string | undefined): string => { @@ -949,10 +946,6 @@ export async function loadConfig( auto = false; continue; } - if (arg === "--no-workflow") { - noWorkflow = true; - continue; - } if (arg === "-p") { command = "exec"; continue; @@ -1216,7 +1209,6 @@ export async function loadConfig( ...(director !== undefined ? { director } : {}), globalSettingsPath: effectiveSettingsPath, sessionId, - noWorkflow, ...(resumeMode !== undefined ? { resumeMode, diff --git a/src/config/settings.test.ts b/src/config/settings.test.ts index 47d0626e9..03526dbf5 100644 --- a/src/config/settings.test.ts +++ b/src/config/settings.test.ts @@ -202,21 +202,6 @@ test("loadConfig --no-auto disables auto mode", async () => { }); }); -test("loadConfig --no-workflow remains a recognized flag", async () => { - await withSettings(async ({ cwd, globalSettingsPath }) => { - const { impl } = offlineFetch(); - const config = await loadConfig( - ["--cwd", cwd, "--no-workflow", "do something"], - { - globalSettingsPath, - pricing: { fetchImpl: impl }, - }, - ); - expect(config.configured).toBe(true); - if (config.configured) expect(config.noWorkflow).toBe(true); - }); -}); - test("loadConfig uses the injected pricing fetchImpl instead of the network", async () => { await withSettings(async ({ cwd, globalSettingsPath }) => { resetPricingMetadataRefreshForTests(); @@ -419,7 +404,6 @@ test("loadSettings cannot silently drop a known optional key", async () => { defaultProvider: "p", mcpServers: [{ name: "s", command: "echo" }], tiers: { fast: { provider: "p", model: "m" } }, - workflowProfiles: { default: { implement: "m" } }, plugins: { "plug-a": { enabled: true } }, pluginPaths: ["/tmp/plugin"], hooks: { "/tmp/hook.ts": { enabled: false } }, @@ -428,7 +412,6 @@ test("loadSettings cannot silently drop a known optional key", async () => { hiddenCommands: ["/help"], onboarded: true, lastChangelogVersion: "0.1.0", - compactionMode: "pruning" as const, subagentMaxTurns: 20, sessionMode: "orchestrator" as const, agentModelFallback: "none" as const, diff --git a/src/config/settings.ts b/src/config/settings.ts index aef269b65..419c6caeb 100644 --- a/src/config/settings.ts +++ b/src/config/settings.ts @@ -81,9 +81,6 @@ export interface Settings { defaultProvider?: string; providers: Record; mcpServers?: MCPServerSettingsEntry[]; - // Per-phase model overrides keyed by profile name, then workflow step - // profile key; a step's `profile` selects the entry. - workflowProfiles?: Record>; // Per-plugin config keyed by plugin id: enabled flag plus manifest-declared // credentials (e.g. an Exa API key). Global-only because it carries secrets; // the /plugins UI writes it. @@ -111,9 +108,6 @@ export interface Settings { // Last package version whose release notes were shown (or stamped on first // interactive install). lastChangelogVersion?: string; - // Deprecated: compaction is always the evidence-backed LLM handoff now. - // Legacy values still load but are ignored; new writes omit this field. - compactionMode?: "llm" | "pruning"; // Deprecated: orchestrator is the only product path. Legacy values still // load but are ignored. sessionMode?: SessionMode; @@ -665,7 +659,6 @@ const SettingsSchema = type({ // Model tiers were removed; older files may still carry this key. Accepted // and ignored so the file loads, then dropped on next save. "tiers?": "unknown", - "workflowProfiles?": type({ "[string]": type({ "[string]": "string" }) }), "plugins?": type({ "[string]": type({ "enabled?": "boolean", @@ -680,7 +673,6 @@ const SettingsSchema = type({ "hiddenCommands?": "string[]", "onboarded?": "boolean", "lastChangelogVersion?": "string", - "compactionMode?": "'llm' | 'pruning'", // Legacy disk values still load; product resolve ignores them. "sessionMode?": "'single' | 'orchestrator'", @@ -900,7 +892,6 @@ type OptionalLocalSettingsFields = { export const GLOBAL_SETTINGS_OPTIONAL_KEYS = [ "defaultProvider", "mcpServers", - "workflowProfiles", "plugins", "pluginPaths", "hooks", @@ -909,7 +900,6 @@ export const GLOBAL_SETTINGS_OPTIONAL_KEYS = [ "hiddenCommands", "onboarded", "lastChangelogVersion", - "compactionMode", "sessionMode", "agentModelFallback", "shell", @@ -1098,9 +1088,6 @@ function normalizeParsedSettings(path: string, parsed: unknown): Settings { s.mcpServers !== undefined ? normalizeMcpServers(s.mcpServers) : undefined, - workflowProfiles: s.workflowProfiles as - | Settings["workflowProfiles"] - | undefined, plugins: s.plugins as Settings["plugins"] | undefined, pluginPaths: s.pluginPaths as string[] | undefined, hooks: s.hooks as Settings["hooks"] | undefined, @@ -1113,10 +1100,6 @@ function normalizeParsedSettings(path: string, parsed: unknown): Settings { s.lastChangelogVersion.trim().length > 0 ? s.lastChangelogVersion.trim() : undefined, - compactionMode: - s.compactionMode === "llm" || s.compactionMode === "pruning" - ? s.compactionMode - : undefined, // Drop legacy "single"; keep only explicit orchestrator if present. sessionMode: s.sessionMode === "orchestrator" ? "orchestrator" : undefined, agentModelFallback: diff --git a/src/session/assemble-runtime.ts b/src/session/assemble-runtime.ts index 23cf2446b..9278259d7 100644 --- a/src/session/assemble-runtime.ts +++ b/src/session/assemble-runtime.ts @@ -551,9 +551,10 @@ export interface ChatAgentWiring { getSources: () => InferenceSource[]; getDefaultSource: () => string; /** - * Read at each build so a compaction-mode toggle is visible on rebuild. - * assemble passes the completeness gate as `wrapPruning` so fold-commit - * side effects (stub notice, onFolded prune) run only after a fold lands. + * Read at each build so operator-side compaction changes are visible on + * rebuild. assemble passes the completeness gate as `wrapPruning` so + * fold-commit side effects (stub notice, onFolded prune) run only after a + * fold lands. */ getCompactor: (wrapPruning?: (pruning: Compactor) => Compactor) => Compactor; /** diff --git a/src/subagent/index.test.ts b/src/subagent/index.test.ts index a5f60602b..e2f9bcfd5 100644 --- a/src/subagent/index.test.ts +++ b/src/subagent/index.test.ts @@ -347,7 +347,8 @@ describe("sub-agent stop helpers", () => { evaluateSubAgentStop({ hasToolCalls: false, lastAssistantText: SUMMARY_ONLY_NARRATION, - incompleteReportNudgeFired: true, + // The nudge bumps the cycle count (nudge-director wraps up here). + toolLessNarrationCycles: 2, }), ).toBe("incomplete-report-stop"); }); @@ -362,13 +363,12 @@ describe("sub-agent stop helpers", () => { ).toBe("stop"); }); - test("evaluateSubAgentStop spiral uses toolLessNarrationCycles over the deprecated flag", () => { + test("evaluateSubAgentStop nudges once on the first tool-less turn, then stops at the cap", () => { expect( evaluateSubAgentStop({ hasToolCalls: false, lastAssistantText: SUMMARY_ONLY_NARRATION, toolLessNarrationCycles: 1, - incompleteReportNudgeFired: true, }), ).toBe("incomplete-report"); expect( diff --git a/src/subagent/stop-policy.ts b/src/subagent/stop-policy.ts index 7c798fb6c..859a063bf 100644 --- a/src/subagent/stop-policy.ts +++ b/src/subagent/stop-policy.ts @@ -105,17 +105,10 @@ export function evaluateSubAgentStop(input: { thrashState?: ThrashState; /** Final assistant text; missing envelope nudges once then salvages. */ lastAssistantText: string; - /** 1-based tool-less turn count; falls back to `incompleteReportNudgeFired` when omitted. */ + /** 1-based tool-less turn count; start at 1 for the first completed tool-less turn. */ toolLessNarrationCycles?: number; - /** - * @deprecated Prefer `toolLessNarrationCycles`. True after the one-shot - * incomplete-report wrap-up nudge has been injected. - */ - incompleteReportNudgeFired?: boolean; }): SubAgentStopReason | null { - const spiralCycles = - input.toolLessNarrationCycles ?? - (input.incompleteReportNudgeFired === true ? 2 : 1); + const spiralCycles = input.toolLessNarrationCycles ?? 1; const spiralStop = (): SubAgentStopReason => evaluateToolLessNarrationSpiral(spiralCycles) === "stop" ? "incomplete-report-stop" diff --git a/src/tui/session-start.test.ts b/src/tui/session-start.test.ts index 85ab0fd4f..c685db475 100644 --- a/src/tui/session-start.test.ts +++ b/src/tui/session-start.test.ts @@ -138,7 +138,6 @@ function launchConfig(overrides: Partial = {}): Config { providers: [], mcpServerEntries: [], sessionId: "launch-session", - noWorkflow: false, ...overrides, } as Config; } diff --git a/workflows/_stub/package.json b/workflows/_stub/package.json deleted file mode 100644 index 1e5668d30..000000000 --- a/workflows/_stub/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@corbits/workflows-stub", - "version": "0.0.0", - "private": true, - "type": "module", - "license": "SEE LICENSE IN LICENSE.md" -}