Skip to content

fix(e2e): assert directory ownership in addition to mode - #2065

Merged
ericksoa merged 7 commits into
mainfrom
fix/e2e-directory-ownership-assertions
Apr 21, 2026
Merged

ericksoa merged 7 commits into
mainfrom
fix/e2e-directory-ownership-assertions

Conversation

@ericksoa

@ericksoa ericksoa commented Apr 18, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add sandbox:sandbox ownership check for the config directory in both test/e2e/test-skip-permissions-policy.sh and test/e2e/test-shields-config.sh
  • The existing mode-only assertion (700) would pass even with wrong ownership — this adds the missing ownership assertion using exact awk field comparison, matching the pattern already used for file ownership checks

Test plan

  • E2E: test-skip-permissions-policy.sh passes with directory ownership check
  • E2E: test-shields-config.sh passes with directory ownership check

Add sandbox:sandbox ownership check for the config directory in both
skip-permissions and shields-config E2E tests. The mode-only assertion
would pass even with wrong ownership.

Signed-off-by: Aaron Erickson <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 18, 2026 •

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Both e2e test scripts add ownership assertions for the sandbox configuration directory in Phase 3. The changes extend existing mode validation by extracting and verifying the group field matches sandbox:sandbox, with corresponding pass/fail messaging.

Changes

Cohort / File(s) Summary
E2E Test Ownership Verification
test/e2e/test-shields-config.sh, test/e2e/test-skip-permissions-policy.sh
Added ownership assertion in Phase 3 verifying sandbox config directory's group/user field equals sandbox:sandbox, extending existing 0700 mode validation with pass/fail output.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Ownership checks hopping along,
Sandbox permissions growing strong,
Phase 3 now verifies the deed,
sandbox:sandbox is all we need! 🔐

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding directory ownership assertions to E2E tests in addition to existing mode checks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/e2e-directory-ownership-assertions

Comment @coderabbitai help to get the list of available commands and usage tips.

@ericksoa ericksoa self-assigned this Apr 18, 2026
@ericksoa
ericksoa merged commit 91ef99c into main Apr 21, 2026
11 checks passed
@wscurran wscurran added area: e2e End-to-end tests, nightly failures, or validation infrastructure feature PR adds or expands user-visible functionality and removed enhancement: testing labels Jun 3, 2026
@cv
cv deleted the fix/e2e-directory-ownership-assertions branch June 28, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: e2e End-to-end tests, nightly failures, or validation infrastructure feature PR adds or expands user-visible functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants