[Humble] Remove pessimizing moves (backport #2353) #3310
All Vouch review confidence checks passed
Residual risk 0.03 = Change Risk (0.24) × (1 − Review Confidence (0.89)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.24 · 8 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.89 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.131
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
3 items
the independent loaned-message publisher/test changes are excluded.
why? can we just inlcude loaned related parts, so what we can keep the history consistent?
I initially limited this to the two reported intra-process warnings. Added the remaining loaned-message changes from #2353 in 94525e1 for consistency, preserving the original attribution.
Local validation with Codex completed all 102 Humble CTest entries with zero failures; existing skips are documented. GCC 15 reproduced both remaining warnings before the change and passed afterward.
fujitatomoya
Miko997
Description
Humble consumers calling
Publisher::publish()with GCC 13+ and-Wallreceive two-Wpessimizing-movewarnings fromintra_process_manager.hpp. Pass the two temporaryMessageUniquePtrarguments directly. This follow-up also passesloaned_msg.release()directly in the publisher and its protected test helper, completing the upstream changes for consistency.Backport of Chris Lalancette's #2353, upstream commit 7f411371b367ea402e2066c2af1ccbac6b4eb5bc (original commit 41d51dff2c0cc15f95e5677017490129a0430bb8). The existing attributed commit is unchanged; Chris's original sign-off, Miko's sign-off, and upstream references are retained. Moves from named
LoanedMessageobjects remain intact.Fixes #3308.
Is this user-facing behavior change?
Removes consumer warnings and unnecessary moves while preserving message ownership and delivery.
Did you use Generative AI?
OpenAI Codex (GPT-6) assisted with implementation.
Additional Information
-Wall, repeated with-Werror=pessimizing-move, using checkout headers first and explicit Humble dependency includes. The original Humble baseline emitted two target warnings/errors at 465:51 and 507:68; the published intra-process patch passed with no target diagnostics. One unrelated dependency deprecation remained unsuppressed.eee46290b388fd6ea00c9a13dff05bf819123ccewith follow-up commit94525e17e319c94739c422faaa51ecfd092260a9(the validated two-line patch) under the same GCC 15.2 compiler and Humble includes, using-std=c++17 -fsyntax-only -Wall -H -Werror=pessimizing-move. The unchanged ordinary-publishing fixture passed on both. A bounded fixture instantiated public loaned publication and the protected helper copied from each source version: the previous head emitted two pessimizing-move errors; the follow-up passed with no target diagnostics. All four runs retained the same unrelatedstd::wstring_convertdeprecation warning. Include traces confirmed the intended source headers and Humble dependencies. These are syntax-only checks, not GCC 15 linking/runtime validation.Incremental build passed. The full package suite passed: 102 CTest entries, zero failures, 200.65 seconds. This includes
test_publisherand its protected loaned-publish error path,test_loaned_message,test_intra_process_manager,test_intra_process_manager_with_allocators, andtest_publisher_with_type_adapter. Seven benchmarks were skipped by default. Ament skipped cppcheck 2.7; other package linters passed. Aggregate results: 2,381 tests, zero errors/failures, 336 skips. Compile dependencies and loaded libraries confirm checkout headers, the rebuilt library, and Humble dependencies.