Skip to content

Python: Move approval storage to platform supplied durable dir - #7495

Closed
TaoChenOSU wants to merge 2 commits into
microsoft:mainfrom
TaoChenOSU:taochen/issue-7414
Closed

Python: Move approval storage to platform supplied durable dir#7495
TaoChenOSU wants to merge 2 commits into
microsoft:mainfrom
TaoChenOSU:taochen/issue-7414

Conversation

@TaoChenOSU

@TaoChenOSU TaoChenOSU commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Motivation & Context

Addresses #7414
Follow up to #7220

Description & Review Guide

  • What are the major changes?
    • Move FHA approval storage to the platform supplied $HOME dir when hosted.
  • What is the impact of these changes?
    • Files will be persisted durably now.
  • What do you want reviewers to focus on?
    • The path derivation

Related Issue

Fixes #7414

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

@TaoChenOSU TaoChenOSU self-assigned this Aug 3, 2026
Copilot AI review requested due to automatic review settings August 3, 2026 22:33
@TaoChenOSU TaoChenOSU added foundry Usage: [Issues, PRs], Target: all Foundry integrations hosting Usage: [Issues, PRs], Target: all hosting related solutions labels Aug 3, 2026
@agent-framework-automation agent-framework-automation Bot added the python Usage: [Issues, PRs], Target: Python label Aug 3, 2026
@github-actions github-actions Bot changed the title Move approval storage to platform supplied durable C:\Users\taochen dir Python: Move approval storage to platform supplied durable C:\Users\taochen dir Aug 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the Python Foundry Hosting ResponsesHostServer to root its file-backed storage (sessions, workflow checkpoints, and function approval requests) under the platform-provided durable home directory when running in hosted mode, aligning approval storage behavior with the earlier checkpoint fix.

Changes:

  • Added _resolve_storage_path(...) helper to resolve hosted storage paths under $HOME (with /home/session fallback) and local paths under the current working directory.
  • Updated ResponsesHostServer to use the resolved paths for checkpoint storage, session store, and file-based function approval storage (including per-user approval storage paths).
  • Expanded unit tests to validate hosted vs local path derivation and fallback behavior when HOME is unusable.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
python/packages/foundry_hosting/agent_framework_foundry_hosting/_responses.py Introduces shared hosted/local storage path resolution and applies it to sessions, checkpoints, and approval storage.
python/packages/foundry_hosting/tests/test_responses.py Updates/extends tests to validate the new hosted storage rooting and fallbacks for sessions and approvals.

Comment thread python/packages/foundry_hosting/agent_framework_foundry_hosting/_responses.py Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated Code Review

Reviewers: 5 | Confidence: 48% | Result: All clear

Reviewed: Correctness, Security Reliability, Test Coverage, Failure Modes, Design Approach


Automated review by TaoChenOSU's agents

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@moonbox3

moonbox3 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

@TaoChenOSU is the PR title accurate?

@TaoChenOSU TaoChenOSU changed the title Python: Move approval storage to platform supplied durable C:\Users\taochen dir Python: Move approval storage to platform supplied durable dir Aug 4, 2026
@TaoChenOSU TaoChenOSU closed this Aug 4, 2026
@TaoChenOSU

Copy link
Copy Markdown
Contributor Author

@TaoChenOSU is the PR title accurate?

No, closing this PR because we are moving to a Foundry supplied solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

foundry Usage: [Issues, PRs], Target: all Foundry integrations hosting Usage: [Issues, PRs], Target: all hosting related solutions python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: [Bug]: Move FHA file-based approval storage to under $HOME

3 participants