Skip to content

feat(framework): Add can_execute hook to FederationManager#6908

Merged
panh99 merged 15 commits intomainfrom
feat/pr1-can-execute-hook
Apr 1, 2026
Merged

feat(framework): Add can_execute hook to FederationManager#6908
panh99 merged 15 commits intomainfrom
feat/pr1-can-execute-hook

Conversation

@chongshenng
Copy link
Copy Markdown
Member

Introduce a typed authorization boundary for execution checks by adding ActionType and updating FederationManager.can_execute to accept flwr_aid, action, federation, and run_type. Keep NoOpFederationManager permissive and update federation manager tests accordingly.

@chongshenng chongshenng marked this pull request as ready for review March 31, 2026 00:07
Copilot AI review requested due to automatic review settings March 31, 2026 00:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 introduces a typed authorization boundary for “execution” decisions in the SuperLink federation layer by adding an ActionType enum and a new FederationManager.can_execute(...) hook, with a permissive implementation in NoOpFederationManager.

Changes:

  • Added ActionType (currently including START_RUN) to flwr.supercore.constant.
  • Extended the FederationManager ABC with a new abstract can_execute(flwr_aid, action, federation, run_type) -> bool method.
  • Implemented can_execute in NoOpFederationManager (always returns True) and added a corresponding unit test.

Reviewed changes

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

File Description
framework/py/flwr/superlink/federation/noop_federation_manager.py Implements the new can_execute hook permissively for no-op mode.
framework/py/flwr/superlink/federation/noop_federation_manager_test.py Adds test coverage asserting can_execute always returns True.
framework/py/flwr/superlink/federation/federation_manager.py Adds the abstract can_execute method to the FederationManager interface.
framework/py/flwr/supercore/constant.py Introduces the ActionType enum alongside existing RunType.

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

@chongshenng chongshenng self-assigned this Mar 31, 2026
@github-actions github-actions bot added the Maintainer Used to determine what PRs (mainly) come from Flower maintainers. label Mar 31, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2a207699d3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

panh99
panh99 previously approved these changes Apr 1, 2026
Copy link
Copy Markdown
Member

@panh99 panh99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8c2278f068

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@panh99 panh99 enabled auto-merge (squash) April 1, 2026 09:55
@panh99 panh99 merged commit b77ea96 into main Apr 1, 2026
128 of 129 checks passed
@panh99 panh99 deleted the feat/pr1-can-execute-hook branch April 1, 2026 10:04
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.

3 participants