Skip to content

test(6/N): update daytona/vercel sandbox cwd assertions to match builtin cd wrapper - #7

Merged
Bartok9 merged 1 commit into
mainfrom
fix/test-suite-green-6n-sandbox-cwd
May 30, 2026
Merged

test(6/N): update daytona/vercel sandbox cwd assertions to match builtin cd wrapper#7
Bartok9 merged 1 commit into
mainfrom
fix/test-suite-green-6n-sandbox-cwd

Conversation

@Bartok9

@Bartok9 Bartok9 commented May 30, 2026

Copy link
Copy Markdown
Owner

Context

PR 6/N in the test-suite-green effort. Targets 2 sandbox cwd-handling tests that share a single root cause.

Tests fixed (2)

  • tests/tools/test_daytona_environment.py::TestExecute::test_custom_cwd_in_command_wrapper
  • tests/tools/test_vercel_sandbox_environment.py::TestExecute::test_execute_runs_command_from_workspace_root_and_updates_cwd

Root cause

Both tests assert the literal substring "cd /tmp" appears in the bash command string produced by BaseEnvironment._wrap_command(). The wrapper (tools/environments/base.py:409) actually emits the more robust form:

builtin cd -- /tmp || exit 126

builtin cd -- /tmp does not contain the substring cd /tmp (it's cd -- /tmp), so both assertions fail. The production code comments document this on purpose:

  • builtin avoids any user-defined cd shell function override
  • -- prevents hyphen-prefixed directory names from being parsed as cd options

Why this is a test-update, not a production-update

The wrapper's builtin cd -- <dir> form is the intentional, more-correct behavior (present since the file was introduced in this history; no prior cd /tmp form ever existed). The wrapper is functionally equivalent and strictly more robust than a bare cd. The test assertions are stale relative to the improved wrapper. Both assertions are updated to look for builtin cd -- /tmp, preserving each test's original intent (verify cwd is embedded in the command string via _wrap_command, not passed as a kwarg). No production code changed.

Validation

pytest tests/tools/test_daytona_environment.py tests/tools/test_vercel_sandbox_environment.py -q
44 passed in 8.24s

(was 42 passed / 2 failed before this change)

Remaining-on-main

38 pre-existing failures noted on main before this effort. This PR removes 2 of them; the rest are out of scope for 6/N.


Note

Low Risk
Test-only comment and assertion updates; no runtime behavior changes.

Overview
Aligns Daytona and Vercel Sandbox execute tests with how BaseEnvironment._wrap_command() embeds working directory changes: assertions now expect builtin cd -- /tmp in the bash -c script instead of the substring cd /tmp.

Comments in both tests document why (builtin avoids cd overrides; -- protects hyphen-prefixed paths). No production code changes—only test expectations and documentation so CI matches the existing wrapper.

Reviewed by Cursor Bugbot for commit ee33f69. Bugbot is set up for automated code reviews on this repo. Configure here.

@Bartok9
Bartok9 merged commit 00be33c into main May 30, 2026
7 of 8 checks passed
@Bartok9
Bartok9 deleted the fix/test-suite-green-6n-sandbox-cwd branch May 30, 2026 06:50
@github-actions

Copy link
Copy Markdown

🔎 Lint report: fix/test-suite-green-6n-sandbox-cwd vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 7746 on HEAD, 7746 on base (➖ 0)

🆕 New issues (3):

Rule Count
invalid-argument-type 3
First entries
run_agent.py:12539: [invalid-argument-type] invalid-argument-type: Argument to function `_is_oauth_token` is incorrect: Expected `str`, found `str | dict[Unknown, Unknown] | Any | ... omitted 3 union elements`
run_agent.py:6649: [invalid-argument-type] invalid-argument-type: Argument to function `build_anthropic_client` is incorrect: Expected `str`, found `str | dict[Unknown, Unknown] | Any | ... omitted 3 union elements`
run_agent.py:12542: [invalid-argument-type] invalid-argument-type: Argument to function `len` is incorrect: Expected `Sized`, found `(str & ~AlwaysFalsy) | (dict[Unknown, Unknown] & ~AlwaysFalsy) | (Any & ~AlwaysFalsy) | ... omitted 3 union elements`

✅ Fixed issues (3):

Rule Count
invalid-argument-type 3
First entries
run_agent.py:12542: [invalid-argument-type] invalid-argument-type: Argument to function `len` is incorrect: Expected `Sized`, found `(str & ~AlwaysFalsy) | (dict[Unknown | str, Unknown | str | dict[str, str]] & ~AlwaysFalsy) | (Any & ~AlwaysFalsy) | ... omitted 3 union elements`
run_agent.py:6649: [invalid-argument-type] invalid-argument-type: Argument to function `build_anthropic_client` is incorrect: Expected `str`, found `str | dict[Unknown | str, Unknown | str | dict[str, str]] | Any | ... omitted 3 union elements`
run_agent.py:12539: [invalid-argument-type] invalid-argument-type: Argument to function `_is_oauth_token` is incorrect: Expected `str`, found `str | dict[Unknown | str, Unknown | str | dict[str, str]] | Any | ... omitted 3 union elements`

Unchanged: 4073 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

Bartok9 pushed a commit that referenced this pull request Jun 29, 2026
Bartok9 pushed a commit that referenced this pull request Aug 2, 2026
…ovider

Cancelling the API-key prompt mid-wizard (Enter → 'Cancelled.') let the
wizard continue through Terminal/Gateway/Tools and finish 'successfully'
with no model configured — the user exits believing they're set up, then
hits a broken chat.

_print_setup_summary() (called by every setup path: full, quick,
blank-slate, portal) now probes resolve_provider() and, when nothing is
configured, prints an unmissable warning with the two one-line fixes
(hermes model / hermes setup --portal).

Consumer-onboarding audit finding #7 (sev 4), Aug 2026.
Bartok9 pushed a commit that referenced this pull request Aug 3, 2026
… (re-review #7)

- website/docs/user-guide/configuration.md (en) and the zh-Hans
  translation gain a 'Session Stall Watchdog' section: default 300,
  0=disabled, notify-only semantics (never kills the turn — contrast
  gateway_timeout), one notification per stall episode, and the exact
  stall message text so it is greppable.
- cli-config.yaml.example: the two in-agent compression timeout keys
  (compression.context_timeout_seconds /
  compression.context_total_ceiling_seconds) are shown as commented
  lines next to session_stall_timeout's example for discoverability.
Bartok9 pushed a commit that referenced this pull request Aug 18, 2026
test(relay): document stream priming boundary
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