Skip to content

chore(testing): drop dead context.db bag from dbPlugins#5405

Merged
adrians5j merged 1 commit into
nextfrom
adrian/drop-dead-context-db-bag
Jul 14, 2026
Merged

chore(testing): drop dead context.db bag from dbPlugins#5405
adrians5j merged 1 commit into
nextfrom
adrian/drop-dead-context-db-bag

Conversation

@adrians5j

@adrians5j adrians5j commented Jul 14, 2026

Copy link
Copy Markdown
Member

What changed

Test-only cleanup. The dbPlugins test helper used to set a legacy context.db bag, but nothing in the codebase reads context.db anymore — the DI migration moved every reader onto storage-operations and DI abstractions. So that bag (and the throwaway DynamoDB driver constructed to fill it) was pure dead weight.

dbPlugins is slimmed down to the one thing still live: registering DbRegistryFeature (the DDB+OpenSearch CMS storage resolves it in beforeInit to stage the entities it syncs). It now takes no arguments, and the DDB / DDB-ES test setups call dbPlugins() without building a driver.

This removes the last Db instantiation in the repo. No production code changes.

Scope note: this is the safe half of retiring the legacy DB glue. Fully removing DbRegistryFeature (the deeper TODO) is a separate storage-ops refactor — it's still real production wiring for the DDB+ES flavour — and is intentionally left out.

Changelog

Internal test cleanup

Removed an unused legacy database context object from the test harness. No functional change.

Squash Merge Commit

chore(testing): drop dead context.db bag from dbPlugins (#5405)

Nothing in the codebase reads `context.db` anymore (the DI migration moved every
reader onto storage-operations / DI abstractions), so the `context.db = new Db(...)`
bag that the test-only `dbPlugins` helper sets was write-only dead weight — along
with the DynamoDbDriver it constructed to feed it.

Slim `dbPlugins` down to what's still live: registering `DbRegistryFeature` (the
DDB-ES CMS storage resolves it in beforeInit). It now takes no args; the DDB and
DDB-ES test setups call `dbPlugins()` and no longer build a throwaway driver.

Removes the last `Db` instantiation in the repo. Test-only; no production change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@adrians5j

Copy link
Copy Markdown
Member Author

/vitest

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

Vitest tests have been initiated (for more information, click here). ✨

Group Status
No storage ✅ 53/53 passed
DDB ✅ 17/17 passed
DDB+OS ✅ 20/20 passed
SQL ✅ 10/10 passed

@adrians5j adrians5j changed the title Drop the dead context.db bag from dbPlugins chore(testing): drop dead context.db bag from dbPlugins Jul 14, 2026
@adrians5j
adrians5j merged commit 3ab0a94 into next Jul 14, 2026
20 checks passed
@adrians5j
adrians5j deleted the adrian/drop-dead-context-db-bag branch July 14, 2026 13:21
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.

1 participant