Repository navigation
fix(harness): honor active sandbox workspace roots - #3646
Conversation
|
Thanks for picking this up — the scope looks right. On the compatibility question: fail-fast for explicit conflicts is what I'd prefer, with one distinction that I think is the crux of the original report:
If the implementation already tracks that distinction, could you add an explicit regression test for the "only For persisted state, keeping the saved execution directory authoritative and only aligning the manifest is the right call. Relocating an existing workspace would be far more disruptive than the mismatch itself. Thanks. |
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
|
Thanks for clarifying the compatibility requirement. I added the exact regression case with only The additional tests exposed a related gap: supplying a The follow-up covers:
Added a JSON/copy regression test as well: the serialized shape is unchanged, a root present in JSON is explicit, and an absent root retains default semantics. Validation: the targeted Harness/E2B suite reports 286 tests, 268 passed and 18 skipped, with no failures/errors; formatting and documentation tests, link checks, and build validation passed. Full offline Maven |
juruoO-o
left a comment
There was a problem hiding this comment.
Reviewed call-scoped workspace root resolution, E2B root alignment and restored-state handling. Approving the explicit conflicting-root fail-fast policy described in the PR.
No blocking findings in the reviewed diff. This was a static review of source and tests; local Java/Maven tests were not run.
juruoO-o
left a comment
There was a problem hiding this comment.
Resolved current-main conflicts using the PR root configuration and call-scoped resolver, retaining unrelated current backend/host prompt behavior and existing tests. Also fixed restored-state root alignment to run before the superclass caches its workspace materializer root, and added a public start-path regression verifying entry placement under the saved execution root. Updated the existing core JSON assertion to the strict contract from the separately approved #3697 merge.
Conflict resolutions pass git diff --check. Local Java/Maven is unavailable; the updated head is being validated by the repository CI.
Resolve conflicts using the PR root configuration and call-scoped resolver while retaining current host/backend prompt behavior and existing regressions. Align restored E2B roots before superclass materializer initialization and cover entry placement under the saved execution root.
a937655 to
463b902
Compare
juruoO-o
left a comment
There was a problem hiding this comment.
Re-approving the latest conflict-resolution head after correcting the author/committer identity to the authenticated GitHub account. The source tree is identical to the previously reviewed resolution. CI is validating this head; local Java/Maven tests were not run.
juruoO-o
left a comment
There was a problem hiding this comment.
Reviewed the latest integration follow-ups: strict JSON decoding assertions, heartbeat test synchronization after the recovered request body is available, and deterministic exact comparison of skill upload paths. Existing content/containment and generation assertions remain intact. Resume now consistently retains the saved execution root, with the conflicting legacy root-policy tests updated to that contract; constructor-time root alignment and the entry-placement regression are retained.
Diff whitespace checks pass. Full repository CI is running on this head; local Java/Maven was unavailable.
|
Integration validation update:
Recording the remaining Linux CI exception explicitly rather than claiming an all-green run. The requested workspace-root conflict resolutions and follow-up fixes are complete; proceeding with the maintainer-authorized normal squash merge, subject to GitHub branch protections. |
Backport the verified fix to the 2.0.x implementation and retain its existing public contracts where the upstream kernel differs. (cherry picked from commit 6ff7590) Backport-review-patch: 20ac0cdde54e10c902c5a939f516ef3bd563b0b4 Constraint: No AgentScope Service or SDK migration Confidence: high Not-tested: Whole-repository verification pending after lane integration
AgentScope-Java Version
2.1.0-SNAPSHOT, based on main
40a4a57ad79e82f8505572d3b195d0264ec7efcb.Description
Fixes #3645.
The sandbox workspace paragraph and file-tool path normalizer used
/workspaceeven when the active sandbox used a different directory. E2B also kept its execution root and workspace manifest root independent, including the default/home/userversus/workspacemismatch.Changes
RuntimeContext, not a shared filesystem field. Use this for the workspace paragraph and registered filesystem/artifact path normalization. Restored state takes precedence over build-time defaults; released acquisitions are rejected./home/useras the default; either root setter can configure the directory. Copy the caller's specification so entries/environment survive without mutating it./workspace.Compatibility decision for review
As asked in the issue comment, this implementation rejects explicitly conflicting
workspaceRoot(...)andworkspaceSpec(...).rootvalues when building the context, independent of setter order (trailing slashes are ignored). This policy is proposed for review, not yet maintainer-approved. Existing persisted E2B state is handled differently: its saved execution root stays authoritative so resuming does not relocate the workspace. Please confirm whether fail-fast is preferred for new conflicting configurations.Validation
JDK 21, Java 17 compilation target, Maven 3.10.0. No real model or E2B service was contacted.
Before the fix, three new offline assertions failed: the prompt advertised
/workspacefor an active/home/usersandbox, and default/custom E2B roots did not reach the workspace specification. The two existing sandbox-prompt tests passed.Final command from the repository root:
read_filetool, prefix boundaries and released acquisitions.git diff --checkpassed.docs/:npm testpassed 13 tests;npm run checkpassed for 430 pages/584 redirects;npm run broken-linksreported no broken links.Remaining validation gaps: full-repository offline
clean verifycould not start becausemaven-clean-plugin:3.5.0was not cached.npm run validatepassed the local checker but the Mintlify build did not complete (initial network-check exception, then a network-enabled retry remained atvalidating buildand was interrupted). No full-suite or remote-sandbox success is claimed.Checklist
mvn spotless:applymvn test) — targeted results above; full suite not completed