Skip to content

fix(message): mark KeystoneMessage.command as [[deprecated]]#545

Merged
mvillmow merged 6 commits into
mainfrom
531-auto-impl-easy
May 10, 2026
Merged

fix(message): mark KeystoneMessage.command as [[deprecated]]#545
mvillmow merged 6 commits into
mainfrom
531-auto-impl-easy

Conversation

@mvillmow
Copy link
Copy Markdown
Collaborator

@mvillmow mvillmow commented May 9, 2026

Summary

  • Adds [[deprecated]] attribute to KeystoneMessage::command field in include/core/message.hpp
  • Deprecation message directs callers to use payload with ActionType instead
  • The field was already documented as legacy in a comment; this surfaces it via the C++14 type system so compilers can warn on use

Test plan

  • Verify CI passes (no compilation errors from the attribute itself)
  • Confirm any callers of command field emit deprecation warnings at compile time

Closes #531

🤖 Generated with Claude Code

@mvillmow mvillmow enabled auto-merge (squash) May 9, 2026 02:44
@mvillmow mvillmow force-pushed the 531-auto-impl-easy branch from 7874d51 to d4c48ae Compare May 9, 2026 20:09
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>
@mvillmow mvillmow force-pushed the 531-auto-impl-easy branch from d4c48ae to a88d1b1 Compare May 9, 2026 23:56
mvillmow and others added 5 commits May 9, 2026 20:21
…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>
@mvillmow mvillmow merged commit 2a9270e into main May 10, 2026
20 checks passed
@mvillmow mvillmow deleted the 531-auto-impl-easy branch May 10, 2026 17:57
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.

[NITPICK] §4: KeystoneMessage.command field is 'legacy' but not marked [[deprecated]]

1 participant