fix(framework) Allow commas in FAB file names - #7973
Open
danielpolimac wants to merge 1 commit into
Open
Conversation
danielpolimac
requested review from
danieljanes,
jafermarq,
panh99 and
tanertopal
as code owners
August 22, 2026 14:07
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes FAB installation failures when a file path in the .info/CONTENT manifest contains commas by changing the manifest parsing logic to split from the right, preserving commas in the path portion while still extracting the fixed hash and size fields.
Changes:
- Update
_verify_hashesto parse CONTENT manifest lines withrsplit(",", maxsplit=2)so commas in file paths no longer break parsing. - Add a regression test covering a file named
metrics,round=1.jsonto ensure hash verification succeeds.
Critical issues
- None found.
Simplicity/readability suggestions
- None required.
Consistency concerns
- None found (the test’s
size_bitsfield matches the existing CONTENT manifest format inbuild.py).
Should this PR be split?
- No.
Overall verdict
- The change is minimal, targeted to the reported failure mode, and includes a regression test.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| framework/py/flwr/cli/install.py | Parse CONTENT manifest entries from the right to preserve commas in relative paths. |
| framework/py/flwr/cli/install_test.py | Add regression test ensuring _verify_hashes accepts commas in filenames. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Issue
Description
FAB installation fails when an app contains a file whose name includes a comma. The CONTENT manifest parser splits every comma, so the file path is parsed as multiple fields and raises
ValueError.Related issues/PRs
Fixes #7944.
Proposal
Explanation
Parse each CONTENT manifest entry from the right with two splits. The hash and size fields remain fixed, while any commas in the preceding relative path are preserved.
Add a regression test that verifies the hash of a file named
metrics,round=1.json.Checklist
#contributions)Any other comments?
Local verification:
python -m pytest py/flwr/cli/install_test.pypython -m ruff check py/flwr/cli/install.py py/flwr/cli/install_test.py --no-respect-gitignoreuv run --no-sync --python=3.11.14 ./dev/test.sh false