Skip to content

fix(framework): Preserve ClientApp instruction message IDs#7392

Draft
psfoley wants to merge 1 commit into
mainfrom
fix/clientapp-reply-to-message-id
Draft

fix(framework): Preserve ClientApp instruction message IDs#7392
psfoley wants to merge 1 commit into
mainfrom
fix/clientapp-reply-to-message-id

Conversation

@psfoley

@psfoley psfoley commented Jun 16, 2026

Copy link
Copy Markdown
Member

What

  • Preserve the transport message ID when inflating ClientApp input messages.
  • Ensure replies reference the instruction message tracked by the SuperNode.

Why

Inflated messages were using the object-tree root ID as their message ID. Replies created from those messages then used the object ID as reply_to_message_id, which did not match the SuperNode message-processing timer keyed by the original instruction message ID.

Tests

uv run --project framework ruff check framework/py/flwr/supernode/runtime/run_clientapp.py framework/py/flwr/supernode/runtime/run_clientapp_test.py
uv run --project framework python -m pytest framework/py/flwr/supernode/runtime/run_clientapp_test.py
uv run --project framework black --check framework/py/flwr/supernode/runtime/run_clientapp.py framework/py/flwr/supernode/runtime/run_clientapp_test.py
uv run --project framework isort --check-only framework/py/flwr/supernode/runtime/run_clientapp.py framework/py/flwr/supernode/runtime/run_clientapp_test.py

CI is passing.

Copilot AI review requested due to automatic review settings June 16, 2026 07:17
@psfoley psfoley force-pushed the fix/clientapp-reply-to-message-id branch from 7b62624 to 8d672c5 Compare June 16, 2026 07:20

Copilot AI 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.

Pull request overview

This PR fixes a message-correlation bug in the SuperNode ClientApp runtime by ensuring that inflated ClientApp input messages keep the transport instruction message ID (from the pulled protobuf Message) instead of using the inflated object-tree root ID. This allows reply messages to set reply_to_message_id to the exact ID the SuperNode uses for message-processing timing/tracking.

Changes:

  • Update pull_task_input to set message.metadata.message_id from the transport/proto message (PullMessage response) rather than from the object-tree root ID.
  • Add a unit test verifying that pull_task_input preserves the transport instruction message ID and that replies reference it via reply_to_message_id.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
framework/py/flwr/supernode/runtime/run_clientapp.py Sets inflated input message ID from the transport message metadata so replies correlate with SuperNode tracking.
framework/py/flwr/supernode/runtime/run_clientapp_test.py Adds test coverage ensuring the preserved transport message ID is used for replies (reply_to_message_id).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions github-actions Bot added the Maintainer Used to determine what PRs (mainly) come from Flower maintainers. label Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maintainer Used to determine what PRs (mainly) come from Flower maintainers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants