Skip to content

fix(autogen-ext): fix tempdir lifecycle, cross-drive path check, url encoding, and migrate pickle to json - #8253

Open
Morendais (Morendais) wants to merge 1 commit into
microsoft:mainfrom
Morendais:fix-autogen-ext-defects
Open

Morendais (Morendais) wants to merge 1 commit into
microsoft:mainfrom
Morendais:fix-autogen-ext-defects

Conversation

@Morendais

@Morendais Morendais (Morendais) commented Sep 19, 2026

Copy link
Copy Markdown

Why are these changes needed?

This PR addresses four reliability and data-handling improvements in autogen-ext:

  1. DockerJupyterCodeExecutor: Persist the TemporaryDirectory object on the instance (self._temp_dir) instead of an immediately exited with context manager block in __init__. Added explicit cleanup in stop() and __del__().
  2. MarkdownFileBrowser: Handle ValueError raised by os.path.commonpath when testing paths that reside on different Windows drives (e.g., C:\ vs D:\).
  3. HttpTool: Use urllib.parse.quote(str(v), safe="") on path parameters before string interpolation in run() to avoid broken request URLs.
  4. Task-Centric Memory: Migrate _string_similarity_map.py and _memory_bank.py persistence from pickle to human-readable json (uid_text_dict.json and uid_memo_dict.json) while maintaining backwards-compatible fallback loading for existing .pkl files.

Related issue number

N/A

Checks

  • I've included any doc changes needed for https://microsoft.github.io/autogen/.
  • I've added tests corresponding to the changes introduced in this PR (test_markdown_file_browser.py and test_path_params_url_encoding).
  • I've made sure all auto checks have passed.

…encoding, and migrate pickle to json

- DockerJupyterCodeExecutor: persist TemporaryDirectory on instance instead of immediately exiting context manager, clean up in stop() and __del__()
- MarkdownFileBrowser: handle ValueError from os.path.commonpath when paths reside on different Windows drives
- HttpTool: URL-encode path parameters before interpolation into request path
- MemoryBank & StringSimilarityMap: replace pickle serialization with JSON, maintaining backward-compatible fallback for reading legacy pkl files
- Add unit tests for MarkdownFileBrowser cross-drive validation and HttpTool path parameter URL encoding
@Morendais

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

1 participant