Repository navigation
feat(redis): fault injection in pub/sub and MONITOR push streams - #17
Merged
Merged
Conversation
After a forwarded SUBSCRIBE/PSUBSCRIBE/SSUBSCRIBE/MONITOR the proxy used to splice the sockets and stop deciding. The upstream->client direction now decides per pushed frame instead: - `_push_facts` maps pub/sub message arrays and RESP3 `>` pushes to `operation:` = frame head and `resource:` = channel; MONITOR `+lines` decide as `operation: monitor`, gated on the `+<ts> [<db> <cli>]` shape so mid-mode command replies (+PONG/+OK) stay un-decided. - Effects in push mode: latency/timeout_ms delay delivery, `timeout: true` latches the stream dead, `reset` and `cut_reply.after_messages` abort the link, `error:` writes a -ERR frame in the message's place, and the new `drop: true` fault swallows the push. - c->u stays a raw splice; acks and non-message frames relay un-decided. - Every decided push emits a FiredEvent — same observability as the command path. Closes #16. Part of #6 (subscribe/stream-mode injection).
This was referenced Oct 28, 2026
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.
What
After a forwarded
SUBSCRIBE/PSUBSCRIBE/SSUBSCRIBE/MONITOR, redis mode spliced the sockets and stopped deciding — pushes were pure passthrough. Now the upstream→client direction decides per pushed frame while c→u stays a raw splice._push_factsmaps message frames (message/pmessage/smessage, RESP2*or RESP3>) tooperation:= frame head,resource:= channel; MONITOR+linesdecide asoperation: monitor, gated on the+<ts> [<db> <cli>]shape so+PONG/+OKmid-mode replies never get decided.latency/timeout_msdelay delivery,timeout: truelatches the stream dead,resetandcut_reply: {after_messages: N}abort the link,error:writes a-ERRframe in the message's place, and the newdrop: truerule fault swallows the push.|attribute frames and interleaved command replies relay un-decided. Every decided push emits aFiredEvent— same observability as the command path.dropwired through the rule DSL:from_dict/to_dict/describe.Closes #16. Part of #6 — subscribe/stream-mode injection. Next on #6: TLS termination.
Why
#6 tracks extracting the protocol-agnostic core across wire transports; stream-mode injection is the remaining functional gap for redis mode (pub/sub + MONITOR are the only un-decidable traffic left).
How verified
tests/test_resp_server.py(fake upstream gained aMONITORpush mode): drop, error-replaces-push, reset mid-stream,cut_reply.after_messages, per-push latency, channel-selectiveresource:matching, MONITOR passthrough + drop with+PONGshape disambiguation.pytest: 1690 passed, 2 skipped.ruff check src/ tests/: clean.pyright: 0 errors.