Skip to content

Rename upgrade/ provider to recompute/ and align terminology#1568

Merged
qtomlinson merged 7 commits into
clearlydefined:masterfrom
qtomlinson:qt/refactor_recompute
May 1, 2026
Merged

Rename upgrade/ provider to recompute/ and align terminology#1568
qtomlinson merged 7 commits into
clearlydefined:masterfrom
qtomlinson:qt/refactor_recompute

Conversation

@qtomlinson
Copy link
Copy Markdown
Collaborator

@qtomlinson qtomlinson commented Apr 29, 2026

The upgrade subsystem handles two distinct concerns — schema upgrade and delayed compute — but its naming (upgrade/, DEFINITION_UPGRADE_PROVIDER, DefinitionUpgrader) implied only the former. This PR renames to better reflect the full scope.

Changes:

  • Move providers/upgrade/ → providers/recompute/; move test/providers/upgrade/ → test/providers/recompute/; drop
    redundant Test suffix from test file names
  • Rename DEFINITION_UPGRADE_PROVIDER / DEFINITION_UPGRADE_QUEUE_PROVIDER env vars to DEFINITION_RECOMPUTE_PROVIDER /
    DEFINITION_RECOMPUTE_QUEUE_PROVIDER; old names kept as fallbacks in bin/config.ts for backward compatibility
  • Rename DefinitionUpgrader class → DefinitionRecomputer in process.ts; update all references
  • Update providers/index.ts key from upgrade → recompute and rename associated interfaces/types
  • Fix stale JSDoc on factory functions and update default provider value (upgradeQueue → delayed)
  • Tighten invalidate() return type Promise<void[]> → Promise<undefined[]> to satisfy TypeScript strict inference (the throat callback now explicitly returns undefined)

Not renamed: DEFINITION_UPGRADE_QUEUE_* env vars (QUEUE_NAME, CONNECTION_STRING, DEQUEUE_BATCH_SIZE). These specifically configure the upgrade queue path and remain accurate.

May be easier to review commit by commit

…PUTE_*, update providers/index.ts key and interfaces
The class processes compute queue messages, not upgrade queue messages.
Rename the class and update log messages to use 'recompute' terminology,
keeping _upgradePolicy naming which correctly refers to the upgrade policy
used as a guard within the compute path.
Rename upgradeAzureQueueConfig/upgradeMemoryQueueConfig import aliases to
recomputeAzureQueueConfig/recomputeMemoryQueueConfig in providers/index.ts —
these configs provide both upgrade and compute queue factories, so the
upgrade-only prefix was misleading.

Change the fallback default in bin/config.ts from 'versionCheck' (deprecated
alias) to 'onDemand' so a clean deployment with no env var set uses the
current non-deprecated value.
biome 2.4.11 (bumped via Dependabot in 5eaae30) promoted two rules
in its recommended ruleset:

1. lint/suspicious/noConfusingVoidType (warning → error):
   `Promise<void[]>` is now an error in generic position. Fixed by
   returning `undefined` explicitly from the async lambda so
   `Promise.all` resolves to `Promise<undefined[]>`.

2. assist/source/organizeImports (implicit):
   Import order in definitionServiceTest.ts was out of alphabetical
   order after adding memoryQueueConfig and recomputeHandler imports
   during the recompute refactor. Fixed by running `biome check --write`.
@qtomlinson qtomlinson marked this pull request as ready for review May 1, 2026 00:03
@qtomlinson qtomlinson requested a review from JamieMagee May 1, 2026 00:04
@qtomlinson qtomlinson merged commit 59fbf93 into clearlydefined:master May 1, 2026
4 checks passed
@qtomlinson qtomlinson deleted the qt/refactor_recompute branch May 1, 2026 17:18
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.

2 participants