Skip to content

node: gate the Direct*Sink test impls behind a test-support feature #1852

Closed

Description

@yigitdot

DirectWarmingCreditSink and DirectReceiptSink are both pub, #[doc(hidden)] types whose own docs say they deliberately violate their trait's non-blocking contract (they take the ledger / log lock on the caller's thread) and must never be wired onto the serve path. They are pub only because the cross-crate integration tests in tests/ cannot see #[cfg(test)] items.

That leaves a contract-violating implementation linkable into a production build, guarded by a doc sentence.

Gating both behind a test-support feature would make it a build-time property instead. Worth doing for both at once — half-applied it would be worse than the current consistent state.

Pre-existing pattern, surfaced by the #1803 review. Note #1803's follow-up already removed the related contradiction where ClientHandlerDeps::new defaulted warming_credit to DirectWarmingCreditSink; it now defaults to NoopWarmingCreditSink. receipt_sink has no default (it is a required constructor parameter), so no equivalent fix is needed there.

Activity

  1. added
    kind:chore
    area:node
    kind:test
    prio:low
    on Aug 26, 2026
  2. moved this from Backlog to Ready in deCDNon Aug 27, 2026
  3. moved this from Ready to In progress in deCDNon Aug 30, 2026
  4. moved this from In progress to Done in deCDNon Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:nodekind:chorekind:testprio:low

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions