Skip to content

feat(api): add sandbox info endpoint for Agent App conversations#38390

Merged
linw1995 merged 3 commits into
mainfrom
linw/dify-2685-return-sandbox-info
Jul 3, 2026
Merged

feat(api): add sandbox info endpoint for Agent App conversations#38390
linw1995 merged 3 commits into
mainfrom
linw/dify-2685-return-sandbox-info

Conversation

@linw1995

@linw1995 linw1995 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 3, 2026
@github-actions github-actions Bot added the web This relates to changes on the web. label Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-07-03 09:29:28.710724227 +0000
+++ /tmp/pyrefly_pr.txt	2026-07-03 09:29:20.054657448 +0000
@@ -7044,13 +7044,13 @@
 ERROR Argument `_FakeWriteSession` is not assignable to parameter `session` with type `scoped_session[Unknown]` in function `services.agent_app_feature_service.AgentAppFeatureConfigService.update_features` [bad-argument-type]
    --> tests/unit_tests/services/test_agent_app_feature_service.py:102:21
 ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]
-   --> tests/unit_tests/services/test_agent_app_sandbox_service.py:151:5
+   --> tests/unit_tests/services/test_agent_app_sandbox_service.py:166:5
 ERROR Object of class `FromClause` has no attribute `drop` [missing-attribute]
-   --> tests/unit_tests/services/test_agent_app_sandbox_service.py:156:5
+   --> tests/unit_tests/services/test_agent_app_sandbox_service.py:171:5
 ERROR Object of class `object` has no attribute `session_snapshot` [missing-attribute]
-   --> tests/unit_tests/services/test_agent_app_sandbox_service.py:244:12
+   --> tests/unit_tests/services/test_agent_app_sandbox_service.py:259:12
 ERROR Object of class `object` has no attribute `session_snapshot` [missing-attribute]
-   --> tests/unit_tests/services/test_agent_app_sandbox_service.py:277:12
+   --> tests/unit_tests/services/test_agent_app_sandbox_service.py:292:12
 ERROR Argument `SimpleNamespace` is not assignable to parameter `version` with type `AgentConfigDraft | AgentConfigSnapshot` in function `services.agent_config_service.AgentConfigTarget.__init__` [bad-argument-type]
   --> tests/unit_tests/services/test_agent_config_service.py:69:17
 ERROR Object of class `FromClause` has no attribute `create` [missing-attribute]

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 52.30% 52.30% +0.01%
Strict coverage 51.81% 51.82% +0.01%
Typed symbols 32,016 32,027 +11
Untyped symbols 29,477 29,478 +1
Modules 2970 2970 0

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.23810% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.29%. Comparing base (5622e8f) to head (5d5af52).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
api/services/agent_app_sandbox_service.py 88.88% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #38390      +/-   ##
==========================================
- Coverage   85.29%   85.29%   -0.01%     
==========================================
  Files        4992     4993       +1     
  Lines      264162   264263     +101     
  Branches    50126    50136      +10     
==========================================
+ Hits       225309   225394      +85     
- Misses      34434    34448      +14     
- Partials     4419     4421       +2     
Flag Coverage Δ
api 85.52% <95.23%> (-0.01%) ⬇️
dify-ui 94.93% <ø> (ø)
web 84.86% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@linw1995 linw1995 enabled auto-merge July 3, 2026 09:29
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jul 3, 2026
@linw1995 linw1995 added this pull request to the merge queue Jul 3, 2026
Merged via the queue into main with commit 5e17af4 Jul 3, 2026
42 checks passed
@linw1995 linw1995 deleted the linw/dify-2685-return-sandbox-info branch July 3, 2026 09:58
linw1995 added a commit that referenced this pull request Jul 3, 2026
)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
(cherry picked from commit 5e17af4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants