Skip to content

chore(eslint): enforce consistent-type-imports and apply the repo-wide autofix - #683

Merged
sroussey merged 4 commits into
mainfrom
claude/libs-issues-triage-prs-mh6x2o-585
Aug 6, 2026
Merged

chore(eslint): enforce consistent-type-imports and apply the repo-wide autofix#683
sroussey merged 4 commits into
mainfrom
claude/libs-issues-triage-prs-mh6x2o-585

Conversation

@sroussey

@sroussey sroussey commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Closes #585

Measured reality first: most of this issue was already fixed on main

Before changing anything I re-measured every claim in the issue against origin/main. Most of it is stale:

Issue claim Measured on main Status
Malformed files glob (pipes instead of commas) eslint.config.js:16 already reads files: ["{packages,providers,examples}/**/*.{ts,tsx,mts,cts}"] Already fixed
Repo-wide lint no-op hiding a large dormant backlog eslint reports 0 errors / 0 warnings across 2030 files Stale — no backlog exists
Pre-existing HFI_TextGeneration.ts type error Already coerces m.content ?? "" (line 50); build:types passes 41/41 Already fixed
import type drift consistent-type-imports still absent; 612 violations across 380 files Real — fixed here

The 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:

  1. chore(eslint): enforce consistent-type-imports — one hand edit, 1 file, +13 lines.
  2. chore: apply consistent-type-imports autofix — the purely mechanical bun run format output, 380 files. No hand edits in this commit.

Measured violation counts:

  • Before the autofix: 612 problems across 380 files, all from @typescript-eslint/consistent-type-imports, 100% autofixable (0 non-autofixable).
  • After the autofix: 0 problems. A single --fix pass converges with zero residual messages.

Why disallowTypeAnnotations: false — measured, not assumed

The rule defaults disallowTypeAnnotations to true. I probed what that default would actually cost by running the identical config with only that flag flipped:

Setting Total problems Non-autofixable
disallowTypeAnnotations: false (this PR) 612 0
disallowTypeAnnotations: true (the default) 683 71 across 32 files

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") in providers/postgres/src/storage/_postgres/browser.ts and the same shape in packages/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-exports was 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 type sweep, so I checked it explicitly rather than assuming. import type is 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:

  • 612 fixes total; 320 are whole-import conversions (import { X }import type { X }), the only ones that can elide a module.
  • Of those 320, 107 use relative specifiers (a bare package specifier resolves to a package that is loaded through many other paths anyway), resolving to 47 distinct local modules.
  • Of those 47, exactly 2 have import-time side effects:
    • packages/task-graph/src/task/GraphAsTask.ts — calls registerGraphWrapperFactory(...) at module scope.
    • packages/task-graph/src/task/ReduceTask.ts — a top-level queueMicrotask(...).

Both remain value-imported elsewhere, so both modules still load and their side effects still run:

  • GraphAsTask went type-only in just 2 files (WorkflowBuilder.ts, GraphAsTaskRunner.ts) but is still value-imported by task/index.ts (plus export * from "./GraphAsTask"), WhileTask.ts, IteratorTask.ts, FallbackTask.ts, TaskJSON.ts, Workflow.ts, WorkflowTask.ts, WorkflowPipe.ts.
  • ReduceTask is still value-imported and re-exported by task/index.ts; only its config type went type-only in TaskJSON.ts.

This should be a no-op regardless: the root tsconfig sets neither verbatimModuleSyntax nor importsNotUsedAsValues, so the compiler already elides type-only-used imports today. The full build and the integration suites below are the actual proof — the graph and task integration sections exercise both of these modules directly.

⚠️ Merge-conflict cost — please sequence this deliberately

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:

  • Merge this either first or last relative to that batch — not into the middle of it.
  • If merged first, branch owners should rebase and simply re-run bun run format; the rule will re-apply the same normalization to their code.
  • Resolve conflicts by re-running the formatter, not by hand. Every hunk here is machine-generated; hand-merging import blocks is pure risk with no upside. On conflict, take either side, then run bun run format and commit the result.

Recommended follow-up (deliberately NOT done here)

There is a durability gap: this rule is only enforced by a bypassable hook.

  • There is no lint script in the root package.jsonbun run lint does not exist (the relevant script is format, which fixes rather than checks).
  • No CI workflow runs ESLint. .github/workflows/test.yml runs typecheck:budget, build, and the vitest suites — no lint step.
  • The only gate is .husky/pre-commitbunx lint-staged, which any git commit --no-verify skips.

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.

$ ./node_modules/.bin/eslint
(no output — exit 0)

# before the autofix, with the new rule active:
#   files linted: 2030
#   total problems: 612   (all @typescript-eslint/consistent-type-imports)
#   files with problems: 380
#   autofixable: 612   NOT autofixable: 0

$ git diff --stat | tail -1
 380 files changed, 1081 insertions(+), 1134 deletions(-)

$ bun run build:types
 Tasks:    41 successful, 41 total
Cached:    0 cached, 41 total          # real rebuild, not a cache replay

$ bun run build
 Tasks:    84 successful, 84 total

$ bun run typecheck:budget             # CI gates on this
typecheck-budget: OK (38 packages within budget)

$ bun scripts/test.ts vitest unit
 Test Files  379 passed | 2 skipped (381)
      Tests  4658 passed | 47 skipped (4705)

$ bun scripts/test.ts vitest integration graph task storage queue util mcp
 Test Files  44 passed (44)
      Tests  1576 passed | 42 skipped (1618)

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

sroussey commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

test-vitest-rag failed on 3576d33 for an external reason, not this diff.

Every failure in the job is an HTTP 429 from the Hugging Face Hub; there are no assertion failures:

PermanentJobError: Provider HF_TRANSFORMERS_ONNX failed for TextEmbeddingTask:
Error (429) occurred while trying to load file:
"https://huggingface.co/Xenova/all-MiniLM-L6-v2/resolve/main/config.json"

The RAG suite embeds through HF_TRANSFORMERS_ONNX, which downloads model files at test time, so the section fails whenever the Hub throttles.

Why this is not an erased import side effect — the obvious suspicion for a 380-file import type sweep. The error shows the provider was resolved and dispatched (Provider HF_TRANSFORMERS_ONNX failed for TextEmbeddingTask) and then the network call was throttled. Had registration been elided, the failure would be a missing provider/capability at lookup time, before any Hub request. Registration ran.

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 (clip-vit-base-patch32, owlvit-base-patch32) in a different section, and passed cleanly on re-run.

Actions taken:

  • Re-run queued for the failed job (GitHub refuses one while the run is still in progress; retried shortly).
  • Separately re-running the rag section locally against this branch, since it was outside the integration list used for the original verification. Result will be reported here.

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

sroussey commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

Follow-up: the rag section passes on this branch, confirming the CI failure was the Hub 429 and not a regression.

$ bun scripts/test.ts rag vitest        # on 3576d33

[e2e-rag: ingest]            39.61s
[rag-wf: ingest]             43.04s
[rag-wf: qa]                 11.94s
[rag-wf: complex-pipeline]    0.35s
[hybrid-pg]                   2.22s

 Test Files  24 passed (24)
      Tests  225 passed (225)
   Duration  167.07s

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 (graph task storage queue util mcp), so it is now covered. Combined with the earlier results on this branch — eslint 0 problems, build:types 41/41 uncached, build 84/84, typecheck:budget OK, unit 4658 passed | 47 skipped byte-identical to the pre-autofix baseline, and integration 1576 passed | 42 skipped — every suite has now run green against the autofix.

The CI re-run is still queued behind the in-progress workflow.


Generated by Claude Code

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 64.05% 31177 / 48670
🔵 Statements 63.87% 32271 / 50525
🔵 Functions 65.24% 5877 / 9007
🔵 Branches 52.96% 16044 / 30292
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/storage/src/kv/FsFolderJsonKvStorage.ts 100% 100% 100% 100%
packages/storage/src/kv/IKvStorage.ts 100% 100% 100% 100%
packages/storage/src/kv/KvStorage.ts 40% 100% 14.28% 40% 59-84
packages/storage/src/kv/KvViaTabularStorage.ts 46.8% 61.9% 31.25% 48.88% 54-66, 78-84, 104-115, 121, 128-141
packages/storage/src/tabular/BaseTabularStorage.ts 18.55% 7.35% 10.14% 20.37% 78-117, 202, 204, 222, 225-227, 231, 243-250, 258, 260-270, 284, 287, 297-298, 304-307, 311-317, 326-327, 330, 335-912, 933-938, 958-967, 972-973, 976-977, 1000-1046, 1054-1142
packages/storage/src/tabular/FsFolderTabularStorage.ts 19.88% 7.81% 14.28% 21.21% 47-79, 119-146, 154-174, 184-191, 201-202, 221-232, 240, 244-333, 347-422
packages/storage/src/tabular/ITabularStorage.ts 9.09% 0% 0% 12.5% 183-299
providers/huggingface-transformers/src/ai/common/HFT_ImageEmbedding.ts 5% 0% 0% 5% 24-59
providers/huggingface-transformers/src/ai/common/HFT_ModelSchema.ts 100% 100% 100% 100%
providers/huggingface-transformers/src/ai/common/HFT_TextEmbedding.ts 3.57% 0% 0% 3.57% 28-102
Generated in workflow #2887 for commit 27e97cc by the Vitest Coverage Report Action

@sroussey
sroussey force-pushed the claude/libs-issues-triage-prs-mh6x2o-585 branch from 38468ec to 4a4ea70 Compare August 5, 2026 23:10

sroussey commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

Sequencing: hold this until #621 lands — measured

This 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 (full-stream), which is being rebased right now.

Trial-merged every combination against origin/main at 0c90d19b:

Combination Conflicts
#621 → current main (baseline) 0
#621 → main + #672 0
#621 → main + #677 0
#621 → main + #679 0
#621 → main + #681 0
#621 → main + #682 0
#621 → main + #683 (this PR) 5

The five:

packages/job-queue/src/job/JobQueueServer.ts
packages/job-queue/src/queue-storage/InMemoryQueueStorage.ts
packages/task-graph/src/storage/TaskOutputRepository.ts
packages/task-graph/src/task/CacheCoordinator.ts
packages/test/src/test/task-graph/StreamingBackpressure.test.ts

#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 bun run format — but that's five hand-resolutions imposed on an 83-commit rebase, for no benefit, when waiting costs nothing.

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 mergeable_state: clean.


Generated by Claude Code

sroussey and others added 4 commits August 6, 2026 22:52
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.
@sroussey
sroussey force-pushed the claude/libs-issues-triage-prs-mh6x2o-585 branch from 509a3ba to 27e97cc Compare August 6, 2026 23:04
@sroussey
sroussey merged commit 202e32c into main Aug 6, 2026
3 checks passed
sroussey pushed a commit that referenced this pull request Aug 6, 2026
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.
sroussey added a commit that referenced this pull request Aug 6, 2026
…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>
sroussey pushed a commit that referenced this pull request Aug 7, 2026
These files predate #683's eslint/prettier config changes and had never
been run through the formatter.
sroussey pushed a commit that referenced this pull request Aug 11, 2026
These files predate #683's eslint/prettier config changes and had never
been run through the formatter.
sroussey pushed a commit that referenced this pull request Aug 13, 2026
These files predate #683's eslint/prettier config changes and had never
been run through the formatter.
@sroussey
sroussey deleted the claude/libs-issues-triage-prs-mh6x2o-585 branch August 13, 2026 05:03
sroussey added a commit that referenced this pull request Aug 13, 2026
## @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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ESLint config matches zero files (broken files glob); enables repo-wide import type drift

2 participants