Skip to content

refactor(rpc): rename envelope markers __async / __skip to ackOnly / noEnqueue (#3228) - #3259

Merged
zackees merged 1 commit into
masterfrom
feat/3228-rename-envelope-markers
Jun 19, 2026
Merged

zackees merged 1 commit into
masterfrom
feat/3228-rename-envelope-markers

Conversation

@zackees

@zackees zackees commented Jun 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Renames the FastLED JSON-RPC envelope control markers from the misleading double-underscore-prefixed names (which read as reserved-namespace identifiers per C/C++ tradition) to descriptive names that match their actual public-envelope-control role:

Today After
__async: true ackOnly: true
__skip: true noEnqueue: true

Producers write the new names; consumers accept either new or legacy for one release of back-compat in case external Server forks set the legacy markers directly.

Why

Per #3228: __async / __skip look reserved-namespace but are actually public envelope-control fields. They cause linter false positives, search collisions with C-runtime __async_* symbols, and they read as "private/don't touch" in the eventual OpenRPC schema (#3081) when they're actually the canonical way to signal "ACK already sent."

Closes #3228

Test plan

Files

  • src/fl/remote/rpc/rpc.cpp.hpp -- writes ackOnly instead of __async
  • src/fl/remote/remote.cpp.hpp -- writes noEnqueue instead of __skip; reads either ackOnly or legacy __async from upstream
  • src/fl/remote/rpc/server.cpp.hpp -- reads either noEnqueue or legacy __skip

Refs #3228, #3224 (Tier 1B), #3244.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • Improved async RPC response handling with enhanced internal markers for better control over response queuing and skipping behavior.
    • Updated communication protocol implementation to support refined async operation handling while maintaining backward compatibility with previous versions.

…noEnqueue (#3228)

Renames the JSON-RPC envelope control markers from the misleading
double-underscore-prefixed names (which read as reserved-namespace
identifiers) to descriptive names:

  __async -> ackOnly       (response was already sent via sendAsyncResponse;
                            queue machinery should skip pushing a duplicate)
  __skip  -> noEnqueue     (Remote::processRpc signal to skip queueing)

The producers write the new names; the consumers accept either the new
or the legacy name for one release of back-compat in case external
Server forks set them directly.

No external client depends on these markers -- they are internal to
FastLED's own RPC plumbing -- but the back-compat read costs nothing
and matches the migration plan in the issue body.

Refs #3228, #3224 (Tier 1B), #3244.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 19, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9cf5cd31-8423-4b42-af49-0bd399a5b0a2

📥 Commits

Reviewing files that changed from the base of the PR and between e637bc7 and b9a2ca9.

📒 Files selected for processing (3)
  • src/fl/remote/remote.cpp.hpp
  • src/fl/remote/rpc/rpc.cpp.hpp
  • src/fl/remote/rpc/server.cpp.hpp

📝 Walkthrough

Walkthrough

Three files in the FastLED JSON-RPC envelope stack are updated to rename __async to ackOnly and __skip to noEnqueue. Both renames include one-release backward-compatibility shims on the consumer side. No public API signatures change.

Changes

RPC Envelope Marker Rename

Layer / File(s) Summary
Rpc::handle() async marker rename
src/fl/remote/rpc/rpc.cpp.hpp
Sets response["ackOnly"] = true instead of response["__async"] = true when isAsync is true; updates surrounding comments to describe the field as a public envelope-control marker and records the rename history.
Remote::processRpc() return marker rename
src/fl/remote/remote.cpp.hpp
Detection of a pre-sent async ack now checks response.ackOnly (or legacy response.__async for back-compat). Returns an empty JSON object with noEnqueue: true instead of the old __skip: true marker.
Server::pull() skip-detection update
src/fl/remote/rpc/server.cpp.hpp
Recognizes noEnqueue as the primary skip marker; retains recognition of the legacy __skip marker for one-release backward compatibility.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Two underscores felt like a disguise,
So I hopped in and opened my eyes.
ackOnly now proudly rings true,
noEnqueue skips the queue right on cue.
The envelope's public — no secrets, no shame,
Just a bunny who cleaned up the name! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: renaming RPC envelope markers from __async/__skip to ackOnly/noEnqueue, with the issue reference.
Linked Issues check ✅ Passed All coding objectives from #3228 are met: __async renamed to ackOnly in rpc.cpp.hpp, __skip renamed to noEnqueue in remote.cpp.hpp and server.cpp.hpp, and backward compatibility is maintained.
Out of Scope Changes check ✅ Passed All changes are scoped to the intended envelope marker renames across the three RPC implementation files with no unrelated modifications.

✏️ 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/3228-rename-envelope-markers

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.

@zackees
zackees merged commit 1aa1e6a into master Jun 19, 2026
11 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 19, 2026
@zackees
zackees deleted the feat/3228-rename-envelope-markers branch August 21, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Rename RPC envelope markers '__async' / '__skip' -- they look reserved-namespace but are public envelope-control fields

1 participant