Skip to content

Adding new blog post with optional email signup request form#7

Open
carlengh wants to merge 15 commits into
docwire:masterfrom
carlengh:master
Open

Adding new blog post with optional email signup request form#7
carlengh wants to merge 15 commits into
docwire:masterfrom
carlengh:master

Conversation

@carlengh
Copy link
Copy Markdown

@carlengh carlengh commented Apr 20, 2026

Summary by CodeRabbit

  • Documentation
    • Added a new blog post demonstrating how to build Unix-style C++ processing pipelines with pipe-style chaining. Covers message routing and lifecycle, roles for generators/filters/sinks, how stages compose and either forward or terminate messages, options for owning vs. borrowing stage instances, auto-start behavior for simple pipelines, and a runnable example.

Added new blog post with optional email form
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 208210ac-b349-47c1-a355-00e79a6b043c

📥 Commits

Reviewing files that changed from the base of the PR and between c27835a and 6827eba.

📒 Files selected for processing (1)
  • blog/2026-04-20-unix-style-cpp-pipelines.md
✅ Files skipped from review due to trivial changes (1)
  • blog/2026-04-20-unix-style-cpp-pipelines.md

📝 Walkthrough

Walkthrough

Adds a documentation-only blog post describing an object-oriented design for Unix-style C++ pipelines: polymorphic message types, callback-driven routing, a ChainElement interface, example elements, a ref_or_owned<T> helper, a ParsingChain combinator, and operator| overloads with auto-start behavior.

Changes

Cohort / File(s) Summary
Blog Documentation
blog/2026-04-20-unix-style-cpp-pipelines.md
New article presenting Message types (Message, StartMessage, TextMessage, EndMessage), routing primitives (Continue, Msg, Callback, MessageCallbacks), ChainElement API (process, is_generator, is_leaf), example elements (SimpleParser, TextFilter, TextExporter), ref_or_owned<T>, ParsingChain combinator, `operator

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰
I hop through pipes with tiny feet,
parsing lines and passing sweet.
Callbacks chirp, messages flow,
through filters where wild words go.
A final thunk — the exporter's treat.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title mentions an optional email signup request form, but the raw summary shows the changes only add a blog post about Unix-style C++ pipelines with no mention of email signup functionality. Update the title to accurately reflect the actual changes: 'Add blog post on Unix-style C++ pipelines' or similar, removing the misleading reference to email signup form.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a blog post detailing the implementation of Unix-style C++ processing pipelines using operator overloading. The review feedback identifies several technical issues, including the failure of generators to respect downstream continuation signals, the potential for filters to block essential control messages, and a memory safety concern regarding reference captures in lambdas. Additionally, the reviewer suggests removing a stray semicolon and critiques the design of triggering pipeline execution directly within the pipe operator overload.

Comment on lines +102 to +105
next.front(std::make_shared<TextMessage>("Hello "));
next.front(std::make_shared<TextMessage>("DocWire "));
next.front(std::make_shared<TextMessage>("Pipeline!"));
next.front(std::make_shared<EndMessage>());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The return value of next.front() is ignored here. If a downstream element returns Continue::No, it indicates that the pipeline should stop processing. The generator should check this return value and cease message production accordingly to avoid unnecessary work.

Comment thread blog/2026-04-20-unix-style-cpp-pipelines.md
Comment thread blog/2026-04-20-unix-style-cpp-pipelines.md Outdated
Comment thread blog/2026-04-20-unix-style-cpp-pipelines.md Outdated
Comment on lines +236 to +240
if (chain.is_generator() && chain.is_leaf()) {
chain.process(std::make_shared<StartMessage>(),
MessageCallbacks{[](Msg) { return Continue::Yes; },
[](Msg) { return Continue::Yes; }});
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Triggering pipeline execution as a side effect of the | operator is unconventional and can lead to unexpected behavior, such as double execution if the user also calls process() manually. It is generally better to separate pipeline construction from execution.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
blog/2026-04-20-unix-style-cpp-pipelines.md (1)

112-119: Consider forwarding non-text messages.

The TextFilter returns Continue::No for non-TextMessage types, which stops propagation. Control messages like StartMessage and EndMessage may need to flow through for proper pipeline coordination. Consider forwarding them instead:

 struct TextFilter : ChainElement {
   bool is_generator() const override { return false; }
   Continue process(Msg msg, MessageCallbacks next) override {
-    if (!dynamic_cast<TextMessage *>(msg.get()))
-      return Continue::No;
-    return next.front(msg);
+    // Forward all messages; filtering logic can be more selective if needed
+    return next.front(msg);
   }
 };

Alternatively, explicitly allow control messages to pass through while filtering only data messages.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@blog/2026-04-20-unix-style-cpp-pipelines.md` around lines 112 - 119, The
process implementation in TextFilter (class ChainElement) currently returns
Continue::No for non-TextMessage types, which stops propagation; change
TextFilter::process(Msg msg, MessageCallbacks next) to forward non-text messages
by calling next.front(msg) instead of returning Continue::No, or alternatively
detect control message types (e.g., StartMessage, EndMessage) and only filter
out non-control/data messages while forwarding control messages via
next.front(msg); update the dynamic_cast(TextMessage *) check and return path
accordingly so control messages can propagate.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@blog/2026-04-20-unix-style-cpp-pipelines.md`:
- Around line 121-129: The process method in struct TextExporter contains an
extraneous semicolon after the return statement; locate the
TextExporter::process implementation (the function named process) and remove the
stray semicolon following "return Continue::Yes;" so the statement is clean
(keep the return Continue::Yes; line and delete the additional semicolon).
- Around line 282-290: The iframe's src attribute is malformed because it
contains Markdown link syntax rather than a raw URL; update the iframe element
(the src attribute on the iframe with title "DocWire Engineering Updates") to
use the direct URL
https://tally.so/embed/0QjA2Z?alignLeft=1&hideTitle=1&transparentBackground=1&dynamicHeight=1
(remove the surrounding [text](...) markup) so the iframe can load correctly
while keeping width, height, frameBorder, marginHeight and marginWidth
unchanged.

---

Nitpick comments:
In `@blog/2026-04-20-unix-style-cpp-pipelines.md`:
- Around line 112-119: The process implementation in TextFilter (class
ChainElement) currently returns Continue::No for non-TextMessage types, which
stops propagation; change TextFilter::process(Msg msg, MessageCallbacks next) to
forward non-text messages by calling next.front(msg) instead of returning
Continue::No, or alternatively detect control message types (e.g., StartMessage,
EndMessage) and only filter out non-control/data messages while forwarding
control messages via next.front(msg); update the dynamic_cast(TextMessage *)
check and return path accordingly so control messages can propagate.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 06425d80-0e24-4c86-97c8-e5d3fd2540a6

📥 Commits

Reviewing files that changed from the base of the PR and between 1812b29 and eae914d.

📒 Files selected for processing (1)
  • blog/2026-04-20-unix-style-cpp-pipelines.md

Comment thread blog/2026-04-20-unix-style-cpp-pipelines.md
Comment thread blog/2026-04-20-unix-style-cpp-pipelines.md Outdated
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