Repository navigation
fix(streaming): fail fast when a stream backend's feature is disabled - #25
Merged
Merged
Conversation
CodingAnarchy
force-pushed
the
fix/feature-matrix
branch
from
October 8, 2026 08:25
48decf0 to
d02b4bd
Compare
Without the kafka, kinesis or google-pubsub feature the placeholder processors now return a Streaming error from new(), so add_stream and from_config reject such streams at configuration time instead of faking delivery (Kafka) or failing per event (Kinesis, Pub/Sub). Remove the batch.delay.ms / test.error.rate simulation and make the placeholders uninhabited. Tests use a cfg(test) in-memory processor where they need a working stream without a broker. Re-enable postgres,streaming in the CI feature matrix. Closes #23 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CodingAnarchy
force-pushed
the
fix/streaming-placeholders
branch
from
October 8, 2026 08:37
39810a5 to
f9ee93d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #23
Stacked on #24 (base is
fix/feature-matrix, because #24 was still open and both touchci.yml). Retarget tomasterafter #24 merges.Problem
Without the
kafka/kinesis/google-pubsubfeature, placeholder processors were compiled. The Kafka one faked successful delivery (sleep frombatch.delay.ms, random failures fromtest.error.rate, simulated health check), which is silent data loss. The Kinesis and Pub/Sub ones only failed per event at send time.Change
new()returnsHammerworkError::Streaming(e.g. "Kafka support requires thekafkafeature of hammerwork"), soStreamManager::add_stream/from_configreject the stream immediately.struct KafkaProcessor(Infallible)) with aStreamProcessorimpl that cannot run. All simulation andranduse in this path is gone.randstays a dependency:retry.rsand the encryption modules still use it.add_streamis split intocreate_processorplus a privateadd_stream_with_processor.postgres,streamingadded back to the feature-combinations matrix.Tests
not(feature = ...), asserting the error fromnew()and fromadd_stream, and that no stream is registered.streaming.rsmanager tests,integration_tests.rs) useStreamManager::add_stream_for_test(cfg(test)). It uses the real processor when the backend is compiled in, else a small in-memoryStreamProcessor.Verification
clippy
-D warningsclean forpostgresplus each ofstreaming,kafka,kinesis,google-pubsub, and for the workspace with--all-features.cargo test -p hammerwork --libpasses for each of those feature sets and--all-features.cargo fmt --checkclean.🤖 Generated with Claude Code