Skip to content

feat: S08.11 switching_transport BDD scenario (UDP↔TCP) on QEMU#344

Merged
DavidCozens merged 1 commit into
mainfrom
feat/s08-11-switching-transport-qemu
May 11, 2026
Merged

feat: S08.11 switching_transport BDD scenario (UDP↔TCP) on QEMU#344
DavidCozens merged 1 commit into
mainfrom
feat/s08-11-switching-transport-qemu

Conversation

@DavidCozens

@DavidCozens DavidCozens commented May 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Wire BddTargetSwitchConfig_SetByName as the onSwitch callback in the FreeRTOS BDD target so the switch <transport> UART command flips the SwitchingSender at runtime (mirrors Linux/Windows targets)
  • Tag the non-@tls switching_transport scenario @udp @tcp so bdd-freertos-qemu's (@udp or @tcp) clause admits it; @tls sibling stays excluded until S08.07
  • Docs: CLAUDE.md row for SolidSyslogFreeRtosTcpStream.h, SolidSyslogStreamSender.h row lists FreeRTOS-Plus-TCP; Bdd/Targets/FreeRtos/README.md notes the switching sender + switch command

Closes #340. Final slice of S08.06 (#271).

Test plan

  • bdd-freertos-qemu passes the new admitted switching_transport.feature non-@tls scenario
  • All existing UDP-tagged + S08.09 tcp_transport + S08.10 tcp_reconnect scenarios stay green on FreeRTOS
  • bdd-linux-syslog-ng and bdd-windows-otel unchanged (only feature-file change is a scenario-level tag addition — Linux/Windows tag filters don't require those tags)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added runtime transport switching capability, allowing dynamic switching between UDP and TCP for the FreeRTOS logging pipeline via interactive commands.
  • Documentation

    • Updated FreeRTOS target documentation to reflect the new switching transport mechanism.
    • Expanded public API documentation with new TCP stream setup header details.
  • Tests

    • Added scenario tags to enable selective testing of UDP-to-TCP switching functionality.

Review Change Stack

Wire BddTargetSwitchConfig_SetByName as the onSwitch callback in the
FreeRTOS BDD target so the runtime `switch tcp` / `switch udp` UART
commands flip the SwitchingSender's active inner, matching the Linux
and Windows targets. Tag the non-@tls switching_transport scenario
@udp @tcp so the bdd-freertos-qemu (@udp or @tcp) admission clause
picks it up; the @tls sibling stays excluded until S08.07.

Closes #340.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

The PR completes the S08.11 switching-transport work by wiring the FreeRTOS BDD target's interactive UART command handler to the runtime transport selector, enabling switch udp/switch tcp commands to dynamically flip between UDP and TCP delivery. The callback change is minimal; the bulk is documentation clarifying the switching sender architecture and updating the public header index.

Changes

Interactive Transport Switching on FreeRTOS

Layer / File(s) Summary
Interactive Callback Wiring
Bdd/Targets/FreeRtos/main.c
InteractiveTask now passes BddTargetSwitchConfig_SetByName instead of NULL to BddTargetInteractive_Run, enabling the switch udp/switch tcp command to drive transport selection.
FreeRTOS Target Documentation
Bdd/Targets/FreeRtos/README.md
Behavioral overview and "How it works" section updated to describe the SolidSyslogSwitchingSender wrapping UDP and TCP transports, with runtime switching via UART command routed through BddTargetSwitchConfig.
BDD Test Annotation
Bdd/features/switching_transport.feature
"Switch from UDP to TCP mid-run delivers via both" scenario tagged with @udp @tcp`` for test filtering.
Documentation & Metadata
CLAUDE.md, DEVLOG.md, ci/docker-compose.bdd.yml
Public header table adds SolidSyslogFreeRtosTcpStream.h entry; DEVLOG records S08.11 callback-wiring decision and test coverage notes; docker-compose comments clarify S08.11 tag rationale.

Possibly related issues

  • #338: Implements the FreeRTOS TCP stream and SwitchingSender plumbing; this PR completes the path by wiring the interactive command into the selector.
  • #271: Parent epic for TCP-on-FreeRTOS; the switching callback and documentation directly enable that work.

Possibly related PRs

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A switch mid-stream, UDP to TCP flies,
One callback wired, the transport multiplies.
From UART's command, the sender now bends,
Round-robin through docs—where the story transcends! 🎯

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: implementing the S08.11 switching_transport BDD scenario for UDP↔TCP on QEMU, which is the primary objective of this PR.
Description check ✅ Passed The description provides clear purpose, change details, test evidence (test plan checklist), and affected areas. It follows the template structure and explains the wiring change, tagging decision, and documentation updates comprehensively.
Linked Issues check ✅ Passed The PR fully addresses all coding requirements from #340: wires BddTargetSwitchConfig_SetByName callback in main.c, tags switching_transport scenario with @udp @tcp, and documents the TCP stream header and switching sender in CLAUDE.md and FreeRTOS README.
Out of Scope Changes check ✅ Passed All changes directly support the S08.11 objectives: FreeRTOS BDD target wiring, feature scenario tagging, and documentation updates for the public header surface. No unrelated modifications detected.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/s08-11-switching-transport-qemu

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.

@coderabbitai coderabbitai Bot left a comment

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.

🧹 Nitpick comments (1)
DEVLOG.md (1)

48-49: ⚡ Quick win

Keep INTERACTIVE_TASK_STACK_DEPTH on one line for grepability.

Splitting the symbol into INTERACTIVE_TASK_ + STACK_DEPTH makes searching and cross-referencing harder in follow-up debugging/docs work.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@DEVLOG.md` around lines 48 - 49, The documentation split the symbol into
`INTERACTIVE_TASK_` and `STACK_DEPTH`, which breaks grepability; restore the
identifier to a single token `INTERACTIVE_TASK_STACK_DEPTH` on one line in the
DEVLOG entry so searches and cross-references find the symbol reliably (edit the
text fragment containing `INTERACTIVE_TASK_ STACK_DEPTH` and concatenate it back
to `INTERACTIVE_TASK_STACK_DEPTH`).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@DEVLOG.md`:
- Around line 48-49: The documentation split the symbol into `INTERACTIVE_TASK_`
and `STACK_DEPTH`, which breaks grepability; restore the identifier to a single
token `INTERACTIVE_TASK_STACK_DEPTH` on one line in the DEVLOG entry so searches
and cross-references find the symbol reliably (edit the text fragment containing
`INTERACTIVE_TASK_ STACK_DEPTH` and concatenate it back to
`INTERACTIVE_TASK_STACK_DEPTH`).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: acc0819d-5f9a-4048-b922-1f33f1df147f

📥 Commits

Reviewing files that changed from the base of the PR and between f08476a and 5cd391f.

📒 Files selected for processing (6)
  • Bdd/Targets/FreeRtos/README.md
  • Bdd/Targets/FreeRtos/main.c
  • Bdd/features/switching_transport.feature
  • CLAUDE.md
  • DEVLOG.md
  • ci/docker-compose.bdd.yml

@github-actions

Copy link
Copy Markdown
Contributor

☀️   Quality Summary

   🚦   build-linux-gcc: 100% successful (✔️ 1111 passed, 🙈 3 skipped)
   🚦   build-freertos-host-tdd: 100% successful (✔️ 1198 passed, 🙈 3 skipped)
   🚦   build-linux-clang: 100% successful (✔️ 1063 passed, 🙈 3 skipped)
   🚦   sanitize-linux-gcc: 100% successful (✔️ 1063 passed, 🙈 3 skipped)
   🚦   integration-linux-openssl: 100% successful (✔️ 9 passed)
   🚦   integration-windows-openssl: 100% successful (✔️ 9 passed)
   🚦   bdd-linux-syslog-ng: 94% successful (✔️ 46 passed, 🙈 3 skipped)
   🚦   bdd-windows-otel: 90% successful (✔️ 44 passed, 🙈 5 skipped)
   🚦   bdd-freertos-qemu: 59% successful (✔️ 29 passed, 🙈 20 skipped)
   🚦   build-windows-msvc: 100% successful (✔️ 975 passed, 🙈 1 skipped)
   ⚠️   Clang-Tidy: No warnings
   ⚠️   CPPCheck: No warnings


Created by Quality Monitor v1.14.0 (#f3859fd). More details are shown in the GitHub Checks Result.

@DavidCozens DavidCozens merged commit 257064e into main May 11, 2026
19 checks passed
@DavidCozens DavidCozens deleted the feat/s08-11-switching-transport-qemu branch May 11, 2026 21:10
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.

S08.11: switching_transport BDD scenario (UDP↔TCP) on QEMU

1 participant