[P8.6] E2B sandbox: remaining RALPH_DIR edge cases (symlink to outside, cwd /, outside-workspace mapping) · Issue #388 · frankbria/ralph-claude-code · GitHub
Skip to content

[P8.6] E2B sandbox: remaining RALPH_DIR edge cases (symlink to outside, cwd /, outside-workspace mapping) #388

Open

Description

@frankbria

Spun off from PR #387 (issue #383) during post-merge disposition.

Context

validate_e2b_sandbox_config (lib/sandbox_e2b.sh) now rejects a RALPH_DIR at the workspace root or outside the workspace for --sandbox e2b. Three shapes were left as Known Limitations in that PR; the GLM review on #387 confirmed the first two.

  1. Symlinked RALPH_DIR. The check is lexical, like the rest of the control-dir handling. An in-workspace RALPH_DIR that is a symlink to a directory outside the workspace passes validation. What the upload, download and deletion guards then do with it has not been verified.
  2. Working directory /. _e2b_control_dir strips the workspace prefix with a "$base"/* match, which never matches when the base is /. An in-workspace RALPH_DIR such as /.ralph stays absolute and is rejected as "outside the workspace". Fail-closed, and only reachable by running the loop from the filesystem root.
  3. Outside-workspace RALPH_DIR is unsupported for E2B. [P2.7] E2B sandbox: handle RALPH_DIR at the workspace root or outside the workspace #383 allowed either failing fast or mapping the control files to a fixed in-sandbox path; fix(sandbox): E2B fails fast on RALPH_DIR at the workspace root or outside it (#383) #387 took fail-fast. Nobody has asked for E2B with external control state.

Why it was not done in that PR

Out of scope per the PR body: #383's definition of done was met by failing fast, and none of these had a known user or a reproduced failure.

Definition of done

  • Symlinked RALPH_DIR under --sandbox e2b: behavior verified with a test, and either supported or rejected at startup with a clear message
  • Decide whether the / working-directory case is worth fixing; if so, an in-workspace RALPH_DIR there is accepted
  • Outside-workspace mapping: implement only if a real use case appears; otherwise close this item as not planned

Activity

  1. added
    bugSomething isn't working
    legacyThe bash loop implementation (moving to legacy/ in maintenance mode)
    on Oct 10, 2026
  2. github-actions commented on Oct 10, 2026

    @github-actions

    Triage: bug (technical debt / follow-up)

    Categorized as a bug — correctly already labeled bug and legacy. This is a legitimate follow-up tracking issue spun off from PR #387 / issue #383, capturing three remaining RALPH_DIR edge cases for --sandbox e2b. It is not a duplicate: the neighboring issue #389 covers a separate E2B upload-list defect (.ralphrc listed twice), not the control-dir validation gaps described here.

    No label changes needed. Assigning to @frankbria for disposition of the open Definition-of-Done items:

    1. Symlinked RALPH_DIR — the validation is lexical, so an in-workspace symlink pointing outside the workspace passes. Add a test and either support it or reject it at startup with a clear message.
    2. Working-directory / — currently fails closed (an in-workspace RALPH_DIR like /.ralph is rejected as "outside the workspace"); only reachable when running from the filesystem root. Decide whether it's worth fixing.
    3. Outside-workspace mapping — implement only if a concrete use case appears; otherwise close this item as not planned.

    Automated triage.

    Generated by Issue Triage Assistant for issue #388 · opus48 378.5K · ◷

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinglegacyThe bash loop implementation (moving to legacy/ in maintenance mode)

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions