Skip to content

Add conditional filesystem rules - #182

Draft
t-kalinowski wants to merge 10 commits into
mainfrom
fix/linux-workspace-mount-targets
Draft

t-kalinowski wants to merge 10 commits into
mainfrom
fix/linux-workspace-mount-targets

Conversation

@t-kalinowski

@t-kalinowski t-kalinowski commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

On Linux, sandbox rules for missing read-only or denied paths can create empty mount targets on the host that remain after forced termination. Add read_only_if_exists and deny_if_exists filesystem options for execution and dependency preparation, including the R configuration API, so users can restrict existing paths without creating missing ones.

These rules apply only to paths that exist when the sandbox policy is selected. Missing paths keep their parent permissions: if created later, even by the host, they can remain readable and writable. Existing paths receive the usual read-only or deny restrictions. The workspace profile and ordinary read_only and deny rules retain their protection of missing paths.

Internally, Console resolves conditional rules before native runner handoff and preserves both empty and nonempty lists through configuration export. Public acceptance checks cover home expansion for both conditional rule types in worker and dependency-preparation policies. The pinned runner is unchanged.

The native Windows test client collects cell output through completion before dependent requests; input prompts and loop readiness use an explicit running-state expectation. A public R startup checkpoint reproduces the early-output race and verifies the complete output before Python is submitted. The shared transcript collector also preserves the final [done] marker across polls for combined control-and-cell calls and later continuations. A gated native R startup scenario verifies the exact prefix and completion as separate responses. These fixture changes leave production package defaults and interrupt deadlines unchanged.

On macOS, the conditional-filesystem changes passed 37 focused cases across 38 executions, including configuration export, path expansion, existing-path permissions, relay startup, and replacement startup; one Linux-only filename case was skipped. The R public configuration suites passed 101 expectations. Formatting, git diff --check, and scripts/check passed. The path-expansion failures and early-output busy rejection have local red/green evidence. The portable startup, late-error, explicit busy-rejection, input/interrupt, and SQLite callback sequences were exercised locally on macOS. Native Windows and Linux were not run locally for the completion repair.

The hosted Windows runner does not provide MXC, so native Windows sandbox execution remains unverified. Hosted checks for the current head are pending.

The controlled-completion repair was reproduced through the public native-startup scenario. On this branch, its three focused cases passed across five macOS direct/Seatbelt executions, including the gated native-startup response, replacement input, and a combined requirements/restart call. Formatting and diff checks passed; scripts/check passed at a409d07eb, and the final deadline refinement passed the gated native-startup case. Current Linux and Windows validation of that shared fixture repair is pending.

Related to #181.

Allow users to protect existing paths without Linux mount targets for
absent metadata. Capture optional rules when selecting the sandbox policy
and preserve empty and nonempty lists in CLI and R configuration exports.

Keep workspace profile protections unchanged. Cover live host visibility,
whole-tree SIGKILL, existing Git metadata, and configuration round-trips.
Support deny_if_exists alongside read_only_if_exists for execution and
preparation, preserving both through configuration export and the R API.
Capture existence once so absent paths follow their parent permissions
without creating Linux mount targets.
@t-kalinowski t-kalinowski changed the title Add conditional read-only filesystem rules Add conditional filesystem rules Oct 26, 2026
Apply the existing test-only DuckDB snapshot to direct and MXC SQL
scenarios. Assert the selected version before the long query so cold
caches cannot silently introduce the known Arrow cancellation limitation.
Preserve production defaults, interruption deadlines, and exact results.
Queue stdin while the replacement cell is held at its checkpoint, then
release it and collect the complete result. Preserve the exact output
and idle-state assertions without assuming one response completes the cell.
Assert home expansion and export of both conditional rule types for worker
and dependency-preparation policies. Retain exact complete-map assertions
and the configuration round trip instead of omitting the new fields.
Collect complete output and errors in native client expectations, with an explicit running-state expectation for prompts and loop readiness. Gate the startup smoke scenario after its first output to reproduce the busy-rejection race deterministically.
Retain native output-completion collection and its startup checkpoint while integrating the SQL dependency and shared startup fixture repairs already present on main.
Keep the required completion marker when a control-and-cell response is
split across polls. Exercise the split with a gated native R startup cell
and select the same contract in related restart continuations.

This branch has not been deployed

No deployments
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