Skip to content

test: enforce strict replay sandboxing in e2e fixtures#79

Merged
jy-tan merged 6 commits intomainfrom
sohan/require-strict-sandboxing
Mar 20, 2026
Merged

test: enforce strict replay sandboxing in e2e fixtures#79
jy-tan merged 6 commits intomainfrom
sohan/require-strict-sandboxing

Conversation

@sohankshirsagar
Copy link
Contributor

@sohankshirsagar sohankshirsagar commented Mar 17, 2026

Summary

Enable strict replay sandboxing across the Python e2e and stack-test fixtures so local/CI replay runs exercise the sandboxed path instead of silently falling back. This also updates sandbox-sensitive HTTP fixtures to install SOCKS support, since strict replay routes outbound HTTP through a SOCKS proxy.

Changes

  • set replay.sandbox.mode: strict in all checked-in e2e and stack-test .tusk/config.yaml fixtures
  • add the required Docker sandbox permissions to each app service in the test docker-compose.yml files:
    • cap_add: [SYS_ADMIN]
    • security_opt: [seccomp=unconfined, apparmor=unconfined]
  • install bubblewrap and socat in the shared python-e2e-base image used by the test containers
  • update the httpx and fastapi e2e test requirements to use httpx[socks] and document why that extra is needed under strict replay sandboxing
  • keep the fixture changes centralized in shared test infrastructure where possible rather than duplicating setup per test image

Notes

  • strict sandbox replay exposed protocol-specific fixture requirements rather than changing app logic
  • httpx-based fixtures needed SOCKS support because replay now intercepts outbound HTTP through a SOCKS proxy

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@sohankshirsagar sohankshirsagar marked this pull request as ready for review March 19, 2026 00:09
@tusk-dev
Copy link

tusk-dev bot commented Mar 19, 2026

PR identified as a refactor

View output

Tip

New to Tusk Unit Tests? Learn more here.

View check history

Commit Status Output Created (UTC)
fa4ef5d PR identified as a refactor Output Mar 19, 2026 12:09AM

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 40 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="drift/instrumentation/grpc/e2e-tests/src/greeter_pb2_grpc.py">

<violation number="1" location="drift/instrumentation/grpc/e2e-tests/src/greeter_pb2_grpc.py:8">
P2: This raises the generated gRPC minimum version to 1.78.0, but the fixture requirements still allow grpcio 1.60+. Align dependency constraints (or regenerate with the intended toolchain) to avoid import-time RuntimeError on environments that resolve <1.78.0.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/e2e.yml">

<violation number="1" location=".github/workflows/e2e.yml:131">
P2: This artifact upload points into `.tusk`, but `upload-artifact@v4` ignores hidden directories by default, so these replay logs will be silently skipped unless you opt in to hidden files.</violation>

<violation number="2" location=".github/workflows/e2e.yml:232">
P2: This upload has the same hidden-directory problem: `.tusk/logs/*` is excluded by `upload-artifact@v4` unless `include-hidden-files` is enabled.</violation>

<violation number="3" location=".github/workflows/e2e.yml:326">
P2: This upload step will also skip the replay logs, because `.tusk` is hidden and `upload-artifact@v4` does not include hidden files by default.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/e2e.yml">

<violation number="1" location=".github/workflows/e2e.yml:17">
P2: The workflow is pinned to a temporary feature branch (`socket-location`) for the CLI under test, which makes CI results unstable and can break all e2e jobs if that branch changes or is removed.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@jy-tan jy-tan merged commit 7cfd148 into main Mar 20, 2026
25 checks passed
@jy-tan jy-tan deleted the sohan/require-strict-sandboxing branch March 20, 2026 17:20
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.

2 participants