Skip to content

fix: preserve JSON escapes when normalizing DependencyFile paths - #2167

Open
dingzhencoding wants to merge 1 commit into
FoundationAgents:mainfrom
dingzhencoding:fix/2166-dependency-file-unicode-paths
Open

dingzhencoding wants to merge 1 commit into
FoundationAgents:mainfrom
dingzhencoding:fix/2166-dependency-file-unicode-paths

Conversation

@dingzhencoding

Copy link
Copy Markdown

Features

Influence

  • Dependency metadata with non-ASCII or quoted filenames can be saved and loaded again (previously src/主程序.py came back as set()).
  • Legacy .dependencies.json files that used backslash separators still load correctly.
  • No change to the on-disk format or the public DependencyFile API.

Result

  • Focused DependencyFile verification (isolated module load, real temp files):
    • original test_dependency_file persistence flow: pass
    • Unicode / emoji / quoted path roundtrip: pass
    • legacy Windows separator normalization: pass
    • delete Unicode entry: pass
  • Full MetaGPT package suite was not run locally (Windows env missing optional provider deps); CI should cover it.

Other
Closes #2166

DependencyFile.load() rewrote backslashes in the raw JSON text before
decoding, so Unicode escapes (\\uXXXX) and escaped quotes were treated as
Windows path separators. Decode first, then normalize separators on the
decoded keys and dependency paths.

Fixes FoundationAgents#2166

This branch had an error being deployed

1 failed deployment
unittest — cc8c9767 Deployed Sep 29, 2026 by dingzhencoding via build (3.9) #1740
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.

DependencyFile.load corrupts Unicode paths and escaped quotes during save/load round trips

2 participants