refactor(framework): Add FFS-replacement methods to LinkState/NodeState#6809
Open
danieljanes wants to merge 7 commits intomainfrom
Open
refactor(framework): Add FFS-replacement methods to LinkState/NodeState#6809danieljanes wants to merge 7 commits intomainfrom
danieljanes wants to merge 7 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds first-class FAB (Flower App Bundle) storage and retrieval APIs to the state layer (LinkState/NodeState) as a replacement for the previous FFS-style handling, including persistence via a new SQL table and migration.
Changes:
- Introduces
store_fab/get_fababstract methods onLinkStateandNodeStateand implements them for in-memory and SQL-backed state. - Adds a new
fabtable to the LinkState SQL schema plus an Alembic migration to create it. - Extends existing state test suites to cover FAB storage, deduplication-by-hash, and missing-hash behavior.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| framework/py/flwr/supernode/nodestate/nodestate_test.py | Adds NodeState tests for storing/retrieving FABs, deduplication by content hash, and missing lookups. |
| framework/py/flwr/supernode/nodestate/nodestate.py | Extends the NodeState interface with store_fab/get_fab. |
| framework/py/flwr/supernode/nodestate/in_memory_nodestate.py | Implements FAB storage in the in-memory NodeState backend keyed by SHA-256(content). |
| framework/py/flwr/supercore/state/schema/linkstate_tables.py | Adds the fab table to LinkState SQLAlchemy metadata. |
| framework/py/flwr/supercore/state/alembic/versions/rev_2026_03_21_add_fab_table.py | Introduces an Alembic migration to create/drop the fab table. |
| framework/py/flwr/supercore/state/alembic/utils_test.py | Adds a migration test asserting the fab table exists after running migrations. |
| framework/py/flwr/server/superlink/linkstate/sql_linkstate.py | Implements FAB persistence in SqlLinkState (upsert + retrieval). |
| framework/py/flwr/server/superlink/linkstate/linkstate_test.py | Adds LinkState tests for FAB store/get, deduplication, and missing hash behavior. |
| framework/py/flwr/server/superlink/linkstate/linkstate.py | Extends the LinkState interface with store_fab/get_fab. |
| framework/py/flwr/server/superlink/linkstate/in_memory_linkstate.py | Implements FAB storage in the in-memory LinkState backend keyed by SHA-256(content). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…me validation and current metadata update policy.
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.
This PR:
store_fabandget_fab)