chore(eslint): enforce consistent-type-imports and apply the repo-wide autofix - #683
Conversation
|
Every failure in the job is an HTTP 429 from the Hugging Face Hub; there are no assertion failures: The RAG suite embeds through Why this is not an erased import side effect — the obvious suspicion for a 380-file Contributing cause is contention: nine PRs from one triage pass (#672, #676–#683) had CI running in a short window, each pulling models from the Hub. #677 hit the identical 429 on different models ( Actions taken:
If the 429 reproduces on a clean re-run, I'll stop treating it as flaky and investigate properly rather than retrying again. Generated by Claude Code |
|
Follow-up: the The multi-second ingest phases confirm the embedding pipeline actually ran end to end — models loaded, documents chunked and embedded, retrieval exercised — rather than the suite short-circuiting. This section sat outside the integration list used for the original verification ( The CI re-run is still queued behind the in-progress workflow. Generated by Claude Code |
38468ec to
4a4ea70
Compare
Sequencing: hold this until #621 lands — measuredThis PR's body asks to be merged "either first or last" relative to the triage batch. That's now decidable: last, and specifically after #621 ( Trial-merged every combination against
The five: #621 touches 107 files, this PR 381, and they overlap on 19 — but only those 5 collide at hunk level, because most of the overlap is in files where #621's edits sit away from the import block. So: #621 currently merges cleanly into main, and merging this PR first is the only thing in the batch that would break that. Every conflict is machine-generated import normalization, so each resolves by taking #621's side and re-running Recommendation: merge #672 / #677 / #679 / #681 / #682 freely now, land #621, then merge this last and let the formatter re-normalize whatever #621 introduced. No change requested to the PR itself — it stays green and Generated by Claude Code |
4a4ea70 to
509a3ba
Compare
Adds @typescript-eslint/consistent-type-imports so type-only imports are written as `import type`. `disallowTypeAnnotations` is left off because inline `import()` type annotations are the established way optional peer dependencies are typed here without a static import. Claude-Session: https://claude.ai/code/session_01PwyJuFrJnibKvrrk8Fa4Fn
Mechanical output of `bun run format` (eslint --fix + prettier) after enabling @typescript-eslint/consistent-type-imports. No hand edits. Claude-Session: https://claude.ai/code/session_01PwyJuFrJnibKvrrk8Fa4Fn
Rebase onto current main hit conflicts in files also touched by #684 (queue-adapter deletions), #685/#686 (Usage seam, TaskInvalidInputError), and #641 (AiSessionContext). Per this PR's own conflict-resolution guidance: took main's side on every conflict, then re-ran `bun run format` to reapply the type-import conversion the autofix commit originally made to those files.
509a3ba to
27e97cc
Compare
…l seams (#682) * refactor(storage): decompose BaseTabularStorage along functional seams Move four self-contained clusters out of BaseTabularStorage.ts (1142 -> 693 LOC) into sibling modules, with no behavior change and no subclass edits: - cursorValues.ts - toCursorValue / compareKeyValues (pure) - keysetPage.ts - the runPage engine plus buildEffectiveOrderBy, sortInMemory, applyKeysetFilter, buildCursor - tabularValidation.ts - the five validate* bodies, taking schema properties as their first argument - tabularSchemaSetup.ts - constructor helpers: schema splitting, column-name validation, index normalization and unique-index dedup, auto-generated-key detection, and determineGenerationStrategy Every extracted protected method keeps its signature on the class as a one-line delegation, so out-of-repo subclasses that call or override them are unaffected. The keyset engine receives a bound-callback deps bag rather than calling siblings directly, preserving virtual dispatch for the subclass overrides of query, getAll, sortInMemory and friends that the default paging path depends on. TABULAR_REPOSITORY, ClientProvidedKeysOption and KeyGenerationStrategy stay physically in BaseTabularStorage.ts so the wholesale re-export from common.ts is unchanged; the new helper modules are internal and are not exported from any barrel. The unique-index tuple key keeps its literal NUL separator. Claude-Session: https://claude.ai/code/session_01PwyJuFrJnibKvrrk8Fa4Fn * refactor(task-graph): extract clone, JSON, and cache ops from Task Move three self-contained clusters out of Task.ts (1169 -> 1003 LOC) into sibling modules, with no behavior change and no subclass edits: - TaskCloneOps.ts - smartClone / stripSymbols (neither touched instance state) - TaskJsonOps.ts - buildTaskJson(task, options) - TaskCacheOps.ts - UUID_V4_REGEX, isDeterministicId, collectCacheVersion (prototype-chain walk), resolveCachePolicy toJSON, getCachePolicy, getCacheVersion, hasDeterministicId and the cacheable getter all keep their signatures on the class as one-line delegations. toJSON in particular stays a method because GraphAsTask, FallbackTask and ArrayTask override it and call super.toJSON(). buildTaskJson reads statics via task.constructor and calls canSerializeConfig() on the instance, so subclass overrides still take effect; it imports Task as a type only, so no value cycle is introduced. The schema-validation region of Task.ts is deliberately untouched. Claude-Session: https://claude.ai/code/session_01PwyJuFrJnibKvrrk8Fa4Fn * fix(storage): escape the NUL join separators so the extracted module stays text tabularSchemaSetup.ts carried the tuple-key separator as a raw U+0000 byte (moved verbatim out of BaseTabularStorage), which makes git classify the new file as binary — no diff, no line comments, no merge. Written as \u0000 the value is identical and the file is reviewable. Claude-Session: https://claude.ai/code/session_01PwyJuFrJnibKvrrk8Fa4Fn * refactor(task-graph): drop the dead clone delegates and export TaskCloneOps Claude-Session: https://claude.ai/code/session_01PwyJuFrJnibKvrrk8Fa4Fn * chore: reapply consistent-type-imports after rebase onto #683 Rebase onto main conflicted with #683's eslint autofix in BaseTabularStorage.ts (both touched its import block). Took this branch's decomposed-file import list, then re-ran bun run format to apply #683's type/value import split. --------- Co-authored-by: Claude <noreply@anthropic.com>
These files predate #683's eslint/prettier config changes and had never been run through the formatter.
These files predate #683's eslint/prettier config changes and had never been run through the formatter.
These files predate #683's eslint/prettier config changes and had never been run through the formatter.
## @workglow/browser-control ### Bug Fixes #### test - close the gaps the Turbo/projects wiring opened ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/task-graph ### Features - add tests for task usage duration and enhance usage line handling #### web-example - show the run's cumulative token total #### task-graph - add an opt-in run-usage recorder - report a cache hit as a stated zero cost - aggregate token usage per run - add a task-level usage event - fold mid-stream usage snapshots without double-counting - add the mid-stream usage event - ship InMemoryTaskOutputRepository from ./test ### Bug Fixes - improve usage tracking - usage tracking for owned subtasks in Task Graph #### ai,task-graph - keep heuristic usage estimates out of accounting #### task-graph - count an owned child's late charge once - scope usage sinks to the run that supplied them - drop the run_usage columns nothing can populate - roll usage up by task and by model, not one slice each - count a nested task's spend once, not once per hop - break the Task/ConditionalTask module cycle - detach the run's usage listeners at run end - reset the usage aggregator per run instead of replacing it - key usage buckets without string collision - defer the pipe-function wrapper past the Task cycle #### task-graph,ai - route a checkpoint's storage charge into the run total #### test - satisfy typecheck:tests across the usage test helpers - close the gaps the Turbo/projects wiring opened #### util - last complete object wins when skipping JSON preamble (#718) ### Refactors - decompose BaseTabularStorage.ts and Task.ts along functional seams (#682) #### task-graph - name run-usage columns like every sibling schema #### test - drop the FsFolderTaskOutputRepository shim ### Tests - run tests through Turbo and per-package vitest projects - move 174 more unit tests into their owning packages - discover test files instead of enumerating sections #### task-graph - cover the cache-hit usage emit - cover usage survival on aborted and finish-less streams - make the StreamUsage type assertion actually enforceable - relocate the remaining task-graph test infrastructure - move TestTasks into the package's ./test entry - extract the streaming task-output repository contract #### ai - pin the Usage field contract and assert disjointness ### Chores - upgrade to catalog for many deps and update the deps themselves #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/javascript ### Bug Fixes #### test - close the gaps the Turbo/projects wiring opened ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/ai ### Features - enhance provisional usage reporting in AI provider streams - implement CLI duration formatting and enhance task usage tracking #### ai - add ModelConfig.effort coarse thinking dial - add a shared usage and cost formatter - charge checkpoint cache storage at disposal - add estimateCost over disjoint usage buckets - add optional per-model pricing to the model schema - fold usage snapshots in the accumulator and publish from AiTask - add a ./test entry and drop _testOnly from the public API #### providers - emit cumulative usage snapshots mid-stream ### Bug Fixes - improve usage tracking - make the ./test entries survive a real build #### ai,task-graph - keep heuristic usage estimates out of accounting #### task-graph,ai - route a checkpoint's storage charge into the run total #### ai - delete the CheckpointEntry fields nothing reads - attribute chat spend to the chat model - charge every checkpoint's storage cost, not just the last link - count the whole prompt in the usage arrow - keep checkpoint teardown from stranding registry entries - require explicit ModelPricing rates and make the type assertion enforceable - make the OpenAI-shaped usage mappers report disjoint input #### task-graph - detach the run's usage listeners at run end #### test - close the gaps the Turbo/projects wiring opened ### Tests - run tests through Turbo and per-package vitest projects - move 174 more unit tests into their owning packages #### ai - verify OpenAI cache counters are portions of input_tokens - drop the unused binding without gutting the pricing check - pin the cumulative detail level and the detailed cached counter - drop the non-falsifiable ModelPricing round-trip ### Chores - add Lezer dependencies and update Vite configuration #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/knowledge-base ### Bug Fixes #### test - close the gaps the Turbo/projects wiring opened ### Tests - run tests through Turbo and per-package vitest projects ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## workglow ### Features #### ai - add a ./test entry and drop _testOnly from the public API ### Bug Fixes #### test - close the gaps the Turbo/projects wiring opened ### Documentation #### build - correct the surviving bun-condition count and pin it with a test (#716) ## @workglow/storage ### Features #### storage - enhance query operators to support null handling and inequality checks ### Bug Fixes #### test - close the gaps the Turbo/projects wiring opened ### Refactors - decompose BaseTabularStorage.ts and Task.ts along functional seams (#682) ### Tests - run tests through Turbo and per-package vitest projects - move 174 more unit tests into their owning packages ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/mcp ### Bug Fixes #### test - close the gaps the Turbo/projects wiring opened ### Tests - run tests through Turbo and per-package vitest projects - settle the Bun policy, close a CI gap, and pilot the __tests__ move ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/util ### Features #### util - add a ./test entry and drop _testOnly from the public API ### Bug Fixes - reunite the graph test helper with its dependents - make the ./test entries survive a real build #### util - last complete object wins when skipping JSON preamble (#718) - resolve repo-root script imports independently of the vitest root - stop TestingLogger inlining a second ConsoleLogger #### test - close the gaps the Turbo/projects wiring opened ### Performance #### util - add an incremental partial-JSON stream parser (#681) ### Tests - run tests through Turbo and per-package vitest projects - move 174 more unit tests into their owning packages - settle the Bun policy, close a CI gap, and pilot the __tests__ move - discover test files instead of enumerating sections ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/test ### Features - enhance model existence verification in AI provider streams - enhance provisional usage reporting in AI provider streams - dd prefill phase emission to HFT streaming #### models - update pricing and add new model for DeepSeek #### anthropic - honor model.effort for extended/adaptive thinking #### deepseek - map model.effort to reasoning_allowance #### openrouter - map model.effort into reasoning extras #### openai - map model.effort to Responses reasoning #### hft - report local token counts as usage, not a phase message #### gemini - report checkpoint write tokens and cache lifetime - add support for reproducible generation with sampling seed #### providers - report cache-checkpoint warm-up token cost - emit cumulative usage snapshots mid-stream #### storage - enhance query operators to support null handling and inequality checks #### task-graph - ship InMemoryTaskOutputRepository from ./test #### ai - add a ./test entry and drop _testOnly from the public API #### util - add a ./test entry and drop _testOnly from the public API ### Bug Fixes - improve usage tracking - usage tracking for owned subtasks in Task Graph - reunite the graph test helper with its dependents - make the ./test entries survive a real build #### huggingface-inference - forward provider-stated usage from text run-fns - encode Hub model ids per path segment #### anthropic - keep an in-range top_p under legacy extended thinking - build a legal request under legacy extended thinking #### ai,task-graph - keep heuristic usage estimates out of accounting #### task-graph - count an owned child's late charge once - scope usage sinks to the run that supplied them - count a nested task's spend once, not once per hop - break the Task/ConditionalTask module cycle - key usage buckets without string collision #### gemini - remove structured-generation 2048 thinking default - return cache disposal result through the queued path - report disjoint input and fold thoughts into output #### tasks - handle the SafeFetch body-pipe rejection instead of crashing the process - keep resolved credentials out of queued job payloads, add credential schemes (#677) #### task-graph,ai - route a checkpoint's storage charge into the run total #### test - satisfy typecheck:tests across the usage test helpers - update provider-api usage expectations to the disjoint contract - guard against getAll() returning undefined in PostgresTabularDateTime test #### deepseek - map the stated cache-miss count to disjoint input #### ai - make the OpenAI-shaped usage mappers report disjoint input #### job-queue - retry promptly when an idle peek finds a ready job ### Refactors - decompose BaseTabularStorage.ts and Task.ts along functional seams (#682) #### tests - streamline model info test function calls (fix type errors) #### test - drop the FsFolderTaskOutputRepository shim #### job-queue - collapse per-backend queue adapters onto wrapQueueStorage (#684) ### Performance #### util - add an incremental partial-JSON stream parser (#681) ### Tests - fix out of date assertion in test - run tests through Turbo and per-package vitest projects - delete the unused Postgres task-output and task-graph repositories - move 174 more unit tests into their owning packages - settle the Bun policy, close a CI gap, and pilot the __tests__ move - discover test files instead of enumerating sections - add unit tests for OpenAI reasoning and temperature coupling, and Postgres date handling #### huggingface-inference - pin the estimate/stated boundary for HFI #### ai - verify OpenAI cache counters are portions of input_tokens - pin the Usage field contract and assert disjointness #### task-graph - cover a nested task's spend reaching the run total - relocate the remaining task-graph test infrastructure - move TestTasks into the package's ./test entry - extract the streaming task-output repository contract #### providers - drop a plan reference from a test comment - cover checkpoint warm-up usage wiring #### storage - exercise a null criterion against a real index ### Documentation #### build - correct the surviving bun-condition count and pin it with a test (#716) ### Chores - update deps - add Lezer dependencies and update Vite configuration - upgrade to catalog for many deps and update the deps themselves - update deps #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ### Updated Dependencies - `@aws-sdk/client-sqs`: catalog: - `@cloudflare/workers-types`: catalog: - `@types/dom-chromium-ai`: catalog: - `@types/pg`: catalog: - `aws-sdk-client-mock`: catalog: - `fake-indexeddb`: catalog: - `miniflare`: ^5.20260811.0-alpha - `vitest`: catalog: ## @workglow/tasks ### Bug Fixes #### tasks - handle the SafeFetch body-pipe rejection instead of crashing the process - keep resolved credentials out of queued job payloads, add credential schemes (#677) #### test - close the gaps the Turbo/projects wiring opened ### Chores - update deps #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ### Updated Dependencies - `ipaddr.js`: ^2.5.0 - `undici`: ^8.10.0 ## @workglow/job-queue ### Bug Fixes #### test - close the gaps the Turbo/projects wiring opened #### job-queue - retry promptly when an idle peek finds a ready job ### Refactors #### job-queue - collapse per-backend queue adapters onto wrapQueueStorage (#684) ### Tests - run tests through Turbo and per-package vitest projects - move 174 more unit tests into their owning packages ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/indexeddb ### Features #### storage - enhance query operators to support null handling and inequality checks ### Bug Fixes #### indexeddb - keep a null equality criterion out of IDBKeyRange #### test - close the gaps the Turbo/projects wiring opened ### Refactors #### job-queue - collapse per-backend queue adapters onto wrapQueueStorage (#684) ### Chores - upgrade to catalog for many deps and update the deps themselves #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ### Updated Dependencies - `fake-indexeddb`: catalog: ## @workglow/openai ### Features - enhance model existence verification in AI provider streams - enhance provisional usage reporting in AI provider streams #### openai - map model.effort to Responses reasoning #### providers - report cache-checkpoint warm-up token cost ### Bug Fixes #### ai - require explicit ModelPricing rates and make the type assertion enforceable #### util - last complete object wins when skipping JSON preamble (#718) ### Performance #### util - add an incremental partial-JSON stream parser (#681) ### Tests - add unit tests for OpenAI reasoning and temperature coupling, and Postgres date handling ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/llamacpp-server ### Features - enhance usage tracking in AI providers ### Bug Fixes #### ai - require explicit ModelPricing rates and make the type assertion enforceable ## @workglow/electron ### Bug Fixes #### test - close the gaps the Turbo/projects wiring opened ## @workglow/ollama ### Features - enhance provisional usage reporting in AI provider streams ### Bug Fixes #### ai - require explicit ModelPricing rates and make the type assertion enforceable #### util - last complete object wins when skipping JSON preamble (#718) ### Performance #### util - add an incremental partial-JSON stream parser (#681) ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/node-llama-cpp ### Features - enhance usage tracking in AI providers ### Bug Fixes #### ai - require explicit ModelPricing rates and make the type assertion enforceable #### util - last complete object wins when skipping JSON preamble (#718) ### Performance #### util - add an incremental partial-JSON stream parser (#681) ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/aws ### Bug Fixes #### test - close the gaps the Turbo/projects wiring opened ### Refactors #### job-queue - collapse per-backend queue adapters onto wrapQueueStorage (#684) ### Chores - upgrade to catalog for many deps and update the deps themselves - update deps ### Updated Dependencies - `@aws-sdk/client-sqs`: catalog: - `aws-sdk-client-mock`: catalog: ## @workglow/anthropic ### Features - enhance model existence verification in AI provider streams #### anthropic - honor model.effort for extended/adaptive thinking #### providers - report cache-checkpoint warm-up token cost - emit cumulative usage snapshots mid-stream ### Bug Fixes #### anthropic - keep an in-range top_p under legacy extended thinking - build a legal request under legacy extended thinking #### ai - require explicit ModelPricing rates and make the type assertion enforceable #### util - last complete object wins when skipping JSON preamble (#718) ### Refactors #### tests - streamline model info test function calls (fix type errors) ### Performance #### util - add an incremental partial-JSON stream parser (#681) ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/duckdb ### Bug Fixes #### test - close the gaps the Turbo/projects wiring opened ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/google-gemini ### Features - enhance model existence verification in AI provider streams #### gemini - map model.effort to thinking_budget - report checkpoint write tokens and cache lifetime - add support for reproducible generation with sampling seed #### ai - charge checkpoint cache storage at disposal #### providers - emit cumulative usage snapshots mid-stream ### Bug Fixes #### gemini - remove structured-generation 2048 thinking default - return cache disposal result through the queued path - report disjoint input and fold thoughts into output #### ai - keep checkpoint teardown from stranding registry entries - require explicit ModelPricing rates and make the type assertion enforceable #### util - last complete object wins when skipping JSON preamble (#718) ### Performance #### util - add an incremental partial-JSON stream parser (#681) ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/postgres ### Bug Fixes #### test - close the gaps the Turbo/projects wiring opened ### Refactors #### job-queue - collapse per-backend queue adapters onto wrapQueueStorage (#684) ### Tests - add unit tests for OpenAI reasoning and temperature coupling, and Postgres date handling ### Chores - upgrade to catalog for many deps and update the deps themselves - update deps #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ### Updated Dependencies - `@types/pg`: catalog: ## @workglow/stable-diffusion-server ### Bug Fixes #### ai - require explicit ModelPricing rates and make the type assertion enforceable ## @workglow/supabase ### Features #### storage - enhance query operators to support null handling and inequality checks ### Bug Fixes #### supabase - keep deleteSearch's filter builder off the generic path #### test - close the gaps the Turbo/projects wiring opened ### Refactors #### job-queue - collapse per-backend queue adapters onto wrapQueueStorage (#684) ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/xai ### Features - enhance model existence verification in AI provider streams - enhance provisional usage reporting in AI provider streams #### models - update pricing and add new model for DeepSeek ### Bug Fixes #### ai - require explicit ModelPricing rates and make the type assertion enforceable #### util - last complete object wins when skipping JSON preamble (#718) ### Performance #### util - add an incremental partial-JSON stream parser (#681) ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/deepseek ### Features - enhance model existence verification in AI provider streams - enhance provisional usage reporting in AI provider streams #### models - update pricing and add new model for DeepSeek #### deepseek - map model.effort to reasoning_allowance ### Bug Fixes #### ai - require explicit ModelPricing rates and make the type assertion enforceable #### deepseek - map the stated cache-miss count to disjoint input #### util - last complete object wins when skipping JSON preamble (#718) ### Performance #### util - add an incremental partial-JSON stream parser (#681) ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/playwright ### Bug Fixes #### test - close the gaps the Turbo/projects wiring opened ## @workglow/sqlite ### Bug Fixes #### test - close the gaps the Turbo/projects wiring opened ### Refactors #### job-queue - collapse per-backend queue adapters onto wrapQueueStorage (#684) ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/cloudflare ### Bug Fixes #### test - close the gaps the Turbo/projects wiring opened ### Refactors #### job-queue - collapse per-backend queue adapters onto wrapQueueStorage (#684) ### Chores - upgrade to catalog for many deps and update the deps themselves - update deps ### Updated Dependencies - `@cloudflare/workers-types`: catalog: ## @workglow/huggingface-transformers ### Features - dd prefill phase emission to HFT streaming #### hft - report local token counts as usage, not a phase message ### Bug Fixes - better error message when HFT has issues importing #### task-graph - count a nested task's spend once, not once per hop #### ai - require explicit ModelPricing rates and make the type assertion enforceable #### HFT_Device - remove "webgpu" from device resolution logic #### util - last complete object wins when skipping JSON preamble (#718) ### Refactors - update @huggingface/transformers to peerDependency and add to devDependencies ### Performance #### util - add an incremental partial-JSON stream parser (#681) ### Chores - upgrade to catalog for many deps and update the deps themselves #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/tf-mediapipe ### Bug Fixes #### ai - require explicit ModelPricing rates and make the type assertion enforceable #### util - last complete object wins when skipping JSON preamble (#718) ### Performance #### util - add an incremental partial-JSON stream parser (#681) ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/chrome-ai ### Bug Fixes #### ai - require explicit ModelPricing rates and make the type assertion enforceable #### util - last complete object wins when skipping JSON preamble (#718) ### Performance #### util - add an incremental partial-JSON stream parser (#681) ### Tests - discover test files instead of enumerating sections ### Chores - upgrade to catalog for many deps and update the deps themselves #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ### Updated Dependencies - `@types/dom-chromium-ai`: catalog: ## @workglow/openrouter ### Features - enhance model existence verification in AI provider streams #### openrouter - map model.effort into reasoning extras ### Bug Fixes - improve usage tracking #### ai - require explicit ModelPricing rates and make the type assertion enforceable #### util - last complete object wins when skipping JSON preamble (#718) ### Performance #### util - add an incremental partial-JSON stream parser (#681) ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/huggingface-inference ### Features - enhance model existence verification in AI provider streams - enhance provisional usage reporting in AI provider streams ### Bug Fixes #### huggingface-inference - forward provider-stated usage from text run-fns - encode Hub model ids per path segment #### ai - require explicit ModelPricing rates and make the type assertion enforceable ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/cactus ### Bug Fixes #### ai - require explicit ModelPricing rates and make the type assertion enforceable ### Tests - discover test files instead of enumerating sections ### Chores #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ## @workglow/bun-webview ### Bug Fixes #### test - close the gaps the Turbo/projects wiring opened ## @workglow/eval ### Features #### models - update pricing and add new model for DeepSeek #### eval-example - record and rank token usage and cost ### Bug Fixes #### eval - price the gpt-5.6 family, drop the bogus Anthropic max_tokens ### Tests - run tests through Turbo and per-package vitest projects #### eval-example - cover the token-accounting logic the crux review flagged ### Documentation #### eval-example - stop the rate card asserting a provenance it lacks ### Chores - update CodeMirror dependencies and improve TypeScript configuration - upgrade to catalog for many deps and update the deps themselves ### Updated Dependencies - `commander`: catalog: - `hyparquet`: ^1.28.1 ## @workglow/cli ### Features - add tests for task usage duration and enhance usage line handling - implement CLI duration formatting and enhance task usage tracking #### cli-example - show live input and output token counts ### Bug Fixes - usage tracking for owned subtasks in Task Graph #### cli-example - render token usage on the actual rendered path #### ai - require explicit ModelPricing rates and make the type assertion enforceable ### Refactors #### pricing - optimize model pricing state management and improve usage line updates #### cli-example - hoist the footer's format call and drop a needless cast ### Tests - run tests through Turbo and per-package vitest projects #### cli-example - gate usage emission on a mounted row, not a fixed sleep ### Chores - update deps - update CodeMirror dependencies and improve TypeScript configuration - upgrade to catalog for many deps and update the deps themselves #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ### Updated Dependencies - `commander`: catalog: - `react`: catalog: - `smol-toml`: ^1.8.0 - `@types/react`: catalog: ## @workglow/web ### Features #### web-example - show the run's cumulative token total ### Bug Fixes - improve usage tracking #### task-graph,ai - route a checkpoint's storage charge into the run total #### task-graph - roll usage up by task and by model, not one slice each ### Chores - untrack examples/web/tsconfig.norefs.tsbuildinfo - update deps - add Lezer dependencies and update Vite configuration - update CodeMirror dependencies and improve TypeScript configuration - upgrade to catalog for many deps and update the deps themselves - update deps #### eslint - enforce consistent-type-imports and apply the repo-wide autofix (#683) ### Updated Dependencies - `@xyflow/react`: ^12.11.3 - `react`: catalog: - `@types/react`: catalog: - `vite`: ^8.2.1
Closes #585
Measured reality first: most of this issue was already fixed on
mainBefore changing anything I re-measured every claim in the issue against
origin/main. Most of it is stale:mainfilesglob (pipes instead of commas)eslint.config.js:16already readsfiles: ["{packages,providers,examples}/**/*.{ts,tsx,mts,cts}"]eslintreports 0 errors / 0 warnings across 2030 filesHFI_TextGeneration.tstype errorm.content ?? ""(line 50);build:typespasses 41/41import typedriftconsistent-type-importsstill absent; 612 violations across 380 filesThe consequence is that the issue's central worry — that repairing the glob would unleash a flood of violations from the recommended rule sets and force us to disable things — does not apply. The rule sets are already clean. So the issue's "Option 3" collapses into simply add the one missing rule. No rules were disabled in this PR.
What this PR does
Two commits, so review stays sane:
chore(eslint): enforce consistent-type-imports— one hand edit, 1 file, +13 lines.chore: apply consistent-type-imports autofix— the purely mechanicalbun run formatoutput, 380 files. No hand edits in this commit.Measured violation counts:
@typescript-eslint/consistent-type-imports, 100% autofixable (0 non-autofixable).--fixpass converges with zero residual messages.Why
disallowTypeAnnotations: false— measured, not assumedThe rule defaults
disallowTypeAnnotationstotrue. I probed what that default would actually cost by running the identical config with only that flag flipped:disallowTypeAnnotations: false(this PR)disallowTypeAnnotations: true(the default)The 71-problem delta is entirely
`import()` type annotations are forbidden.— and none of them are autofixable, so they would each need a hand edit.Those annotations are not sloppiness; they are this repo's deliberate pattern for typing an optional peer dependency without forcing a static import that would break consumers who have not installed the package — e.g.
typeof import("pg")inproviders/postgres/src/storage/_postgres/browser.tsand the same shape inpackages/tasks/src/task/adaptive.ts. Turning the option on would either break that pattern or bury 71 inline disables.The config carries a comment explaining this so a later "cleanup" does not silently flip it and break the build.
consistent-type-exportswas deliberately not added: it requires type-aware parsing (parserOptions.project), which this config does not set up.Did this break an import-for-registration side effect?
This is the first thing to ask about a 380-file
import typesweep, so I checked it explicitly rather than assuming.import typeis erased at emit, so converting a whole import of a module that self-registers on load would silently stop the registration.Scoping the actual risk surface:
import { X }→import type { X }), the only ones that can elide a module.packages/task-graph/src/task/GraphAsTask.ts— callsregisterGraphWrapperFactory(...)at module scope.packages/task-graph/src/task/ReduceTask.ts— a top-levelqueueMicrotask(...).Both remain value-imported elsewhere, so both modules still load and their side effects still run:
GraphAsTaskwent type-only in just 2 files (WorkflowBuilder.ts,GraphAsTaskRunner.ts) but is still value-imported bytask/index.ts(plusexport * from "./GraphAsTask"),WhileTask.ts,IteratorTask.ts,FallbackTask.ts,TaskJSON.ts,Workflow.ts,WorkflowTask.ts,WorkflowPipe.ts.ReduceTaskis still value-imported and re-exported bytask/index.ts; only its config type went type-only inTaskJSON.ts.This should be a no-op regardless: the root tsconfig sets neither
verbatimModuleSyntaxnorimportsNotUsedAsValues, so the compiler already elides type-only-used imports today. The full build and the integration suites below are the actual proof — thegraphandtaskintegration sections exercise both of these modules directly.This is a ~380-file mechanical diff that touches the import block of a large fraction of the repo. It will conflict with essentially every in-flight branch that adds, removes, or reorders an import.
This matters concretely right now: there are eight other open PRs from this same triage pass — #672, #676, #677, #678, #679, #680, #681, #682 — and several of them touch files this sweep also rewrites.
Recommended handling:
bun run format; the rule will re-apply the same normalization to their code.bun run formatand commit the result.Recommended follow-up (deliberately NOT done here)
There is a durability gap: this rule is only enforced by a bypassable hook.
lintscript in the rootpackage.json—bun run lintdoes not exist (the relevant script isformat, which fixes rather than checks)..github/workflows/test.ymlrunstypecheck:budget,build, and the vitest suites — no lint step..husky/pre-commit→bunx lint-staged, which anygit commit --no-verifyskips.So the drift this PR cleans up can silently return. Suggested in a separate PR (kept out of this one to preserve its mechanical, conflict-resolvable-by-formatter character): add
"lint": "eslint"to the root scripts and a CI step that runs it.Verification
All commands run on this branch after the autofix.
For reference, the pre-autofix baseline of the unit suite on this same machine was
379 passed | 2 skipped (381)/4658 passed | 47 skipped (4705)— identical to the post-autofix result, confirming the sweep changed no runtime behavior.🤖 Generated with Claude Code
https://claude.ai/code/session_01PwyJuFrJnibKvrrk8Fa4Fn
Generated by Claude Code