fix(message): mark KeystoneMessage.command as [[deprecated]]#545
Merged
Conversation
7874d51 to
d4c48ae
Compare
The `command` field was documented as legacy/convenience in a comment but not surfaced via the C++14 type system. Adding `[[deprecated]]` makes the compiler warn any callers that this field is on the way out and they should migrate to `payload` + `ActionType`. Closes #531 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
d4c48ae to
a88d1b1
Compare
…ommand uses
`KeystoneMessage.command` was annotated `[[deprecated(...)]]` in the PR,
but `src/core/message.cpp` still assigns `command` in three places
(legacy `create()`, action-typed `create()`, and `createCancellation()`),
causing `-Werror,-Wdeprecated-declarations` failures.
Wrap each internal assignment with `_Pragma("GCC diagnostic push/pop")`
and `_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")` so
the file-internal, backward-compat assignments do not trigger the warning.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ve of command field Declare KeystoneMessage special members out-of-line so their definitions in message.cpp can wrap with GCC diagnostic pragmas, silencing -Werror=deprecated-declarations errors triggered by compiler-generated copy/move constructors in message.cpp, message_bus.cpp, message_serializer.cpp, and message_pool.cpp. Direct external accesses to the deprecated 'command' field still emit the warning. Also add targeted pragma guards around the two direct assignments in message_serializer.cpp and the clear() in message_pool.cpp. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…g .command callsites The [[deprecated]] annotation on KeystoneMessage::command caused -Werror failures in src/agents/ and test/benchmark files that legitimately use the legacy field. Apply _Pragma push/pop suppressions to the four internal callsites (task_execution_strategy, task_agent, module_lead_agent, component_lead_agent, lead_agent_base_impl) and #pragma push/pop guards at the file level for tests and benchmarks that validate backward-compat behaviour of the field. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… files module_coordination_test.cpp and component_coordination_test.cpp were missed in the first pass; both use KeystoneMessage::command for backward-compat assertions. Add file-level #pragma push/pop guards. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…g test files The full sweep missed 10 test/integration files that access KeystoneMessage::command via -> dereference or .command field: test_agent_core, test_async_task_agent, test_chief_architect_agent, test_component_lead_agent, test_module_lead_agent, test_task_agent, test_message_bus_async, test_agent_concepts, test_interface_segregation, test_registry_integration. Add file-level #pragma push/pop guards for -Wdeprecated-declarations to silence -Werror failures. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
[[deprecated]]attribute toKeystoneMessage::commandfield ininclude/core/message.hpppayloadwithActionTypeinsteadTest plan
commandfield emit deprecation warnings at compile timeCloses #531
🤖 Generated with Claude Code