Migrated from Method backlog
GitHub Issues are now the live work tracker. Repository docs remain Method evidence.
| Field |
Value |
| Source backlog |
docs/method/backlog/bad-code/HEX_runtimehelpers-plumbing-composition-leak.md |
| Archived source |
docs/archive/backlog/github-issue-migration-2026-06-01/docs/method/backlog/bad-code/HEX_runtimehelpers-plumbing-composition-leak.md |
| Original lane |
bad-code |
| Original id |
HEX_runtimehelpers-plumbing-composition-leak |
| Original legend |
HEX |
| Original feature |
materialization-query-index |
| Original release home |
v17.0.0 |
Original backlog card
runtimeHelpers imports infrastructure adapters and branches on plumbing presence
Effort: M
What's Wrong
runtimeHelpers.ts auto-constructs CasBlobAdapter and
CborIndexStoreAdapter from domain-side helpers and uses
persistence.plumbing presence to choose the path. This is another
domain-to-infrastructure composition leak.
Why It Matters
The helper is effectively a hidden composition root inside
src/domain/**. That makes the domain depend on adapter details and
invites more .plumbing peeking over time.
Evidence
src/domain/runtimeHelpers.ts:25
src/domain/runtimeHelpers.ts:29
src/domain/runtimeHelpers.ts:32
src/domain/runtimeHelpers.ts:69
Suggested Fix
- Remove infrastructure adapter imports from
src/domain/runtimeHelpers.ts.
- Push blob storage and index store construction into a composition
root or explicit factory.
- Replace plumbing-presence inference with explicit injected
capabilities.
Migrated from Method backlog
GitHub Issues are now the live work tracker. Repository docs remain Method evidence.
docs/method/backlog/bad-code/HEX_runtimehelpers-plumbing-composition-leak.mddocs/archive/backlog/github-issue-migration-2026-06-01/docs/method/backlog/bad-code/HEX_runtimehelpers-plumbing-composition-leak.mdbad-codeHEX_runtimehelpers-plumbing-composition-leakHEXmaterialization-query-indexv17.0.0Original backlog card
runtimeHelpers imports infrastructure adapters and branches on plumbing presence
Effort: M
What's Wrong
runtimeHelpers.tsauto-constructsCasBlobAdapterandCborIndexStoreAdapterfrom domain-side helpers and usespersistence.plumbingpresence to choose the path. This is anotherdomain-to-infrastructure composition leak.
Why It Matters
The helper is effectively a hidden composition root inside
src/domain/**. That makes the domain depend on adapter details andinvites more
.plumbingpeeking over time.Evidence
src/domain/runtimeHelpers.ts:25src/domain/runtimeHelpers.ts:29src/domain/runtimeHelpers.ts:32src/domain/runtimeHelpers.ts:69Suggested Fix
src/domain/runtimeHelpers.ts.root or explicit factory.
capabilities.