Skip to content

fix(helm): align provisioner state root for PVC mounts - #5625

Merged
WillemJiang merged 2 commits into
bytedance:mainfrom
jamespud:fix/helm-provisioner-state-root
Sep 23, 2026
Merged

WillemJiang merged 2 commits into
bytedance:mainfrom
jamespud:fix/helm-provisioner-state-root

Conversation

@jamespud

Copy link
Copy Markdown
Contributor

Summary

  • pass the Gateway's logical DeerFlow state root to the provisioner when the shared home PVC is enabled
  • add a Helm render regression check that keeps the Gateway and provisioner DEER_FLOW_HOST_BASE_DIR values aligned
  • keep the provisioner state-root env unset when persistence.home.enabled=false

Why

The Gateway emits sandbox skill projection mounts as host-path-shaped entries rooted at its DEER_FLOW_HOST_BASE_DIR (/app/backend/.deer-flow in the chart).

In USERDATA_PVC_NAME mode, the provisioner first validates those paths against its own DEER_FLOW_HOST_BASE_DIR, then converts the relative suffix into a deer-flow/<suffix> PVC subPath.

The chart currently sets the Gateway root but leaves the provisioner on the runtime default /.deer-flow. As a result, valid Gateway projection paths such as:

/app/backend/.deer-flow/skills_view/public

are outside the provisioner's allowed base and can be rejected before sandbox creation.

With the shared home PVC enabled, both components should use the same logical root so the path maps to:

deer-flow/skills_view/public

on the PVC.

Testing

Added scripts/check_chart_sandbox_storage.sh, wired into the chart workflow. It renders Gateway and provisioner deployments separately and asserts:

  • both expose the same DEER_FLOW_HOST_BASE_DIR with the default shared home PVC
  • that root is /app/backend/.deer-flow
  • USERDATA_PVC_NAME is present in the provisioner
  • the provisioner does not receive DEER_FLOW_HOST_BASE_DIR when home persistence is disabled

Refs #4030

@github-actions github-actions Bot added area:ci GitHub Actions, CI config, repo tooling risk:high High risk: backend API, agents, sandbox, auth, deps, CI size/M PR changes 100-300 lines labels Sep 20, 2026
@jamespud
jamespud marked this pull request as draft September 21, 2026 03:57

@willem-bd willem-bd 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.

Verified the fix is correct and needed: the Gateway emits skill projection extra mounts rooted at its DEER_FLOW_HOST_BASE_DIR (/app/backend/.deer-flow in the chart), while the provisioner previously fell back to /.deer-flow, so _is_path_under_base rejected valid paths with HTTP 400 before any PVC subPath translation. With both roots aligned, _extra_mount_pvc_sub_path now yields deer-flow/<suffix>, which matches the Gateway's own subPath: deer-flow mount of the same home PVC. I executed scripts/check_chart_sandbox_storage.sh at this head with helm v3.16.4: all assertions pass, and reverting just the provisioner env from the template makes it fail with 2 assertion failures, so the regression tripwire works. One suggestion inline about pinning the remaining leg of the path contract.

Comment thread scripts/check_chart_sandbox_storage.sh Resolved
@jamespud
jamespud marked this pull request as ready for review September 22, 2026 12:53
@WillemJiang WillemJiang added this to the 2.2.0 milestone Sep 23, 2026
@WillemJiang
WillemJiang merged commit 73e2be2 into bytedance:main Sep 23, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci GitHub Actions, CI config, repo tooling risk:high High risk: backend API, agents, sandbox, auth, deps, CI size/M PR changes 100-300 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants