[PR #1584] [MERGED] test(native): skip the DMG EACCES diagnostic as root #2989

Closed
opened 2026-10-17 21:12:36 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1584
Author: @rekcilyssup
Created: 10/10/2026
Status: ✅ Merged
Merged: 10/11/2026
Merged by: @morluto

Base: main ← Head: fix/dmg-eacces-skip-as-root


📝 Commits (1)

  • e0efc82 test(native): skip the DMG EACCES diagnostic as root

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 tests/boundary/providers/native/nativeDmgArtifactReader.test.ts (+1 -1)

📄 Description

Summary

nativeDmgArtifactReader.test.ts makes a DMG unreadable with mode 0 and expects hdiutil verify to fail with Permission denied. Root ignores file permissions, so in a container that runs tests as root (e.g. default Docker), the unreadable path stays readable, the diagnostics diverge, and the test fails. This skips it as root, with the same guard the other permission-dependent boundary tests already use.

No issue is linked: it is a one-line test guard.

Problem and expected behavior

Trigger: run npx vitest run tests/boundary/providers/native/nativeDmgArtifactReader.test.ts as uid 0. Expected: skipped, as for tests/boundary/filesystem/binaryTarget.test.ts and the sibling artifactProvider.directoryErrors.test.ts (see PR #1394). Nothing else changes; non-root runs still execute the test.

Change and scope

it.skipIf(process.platform !== darwin) becomes it.skipIf(process.platform !== darwin || process.getuid?.() === 0) on the real-hdiutil target-access case only. Test-only change, no source or contract impact.

Validation performed

  • npx vitest run tests/boundary/providers/native/nativeDmgArtifactReader.test.ts on macOS (non-root): 23 passed
  • npx oxfmt --check on the touched file: pass
  • npm run check:fast: pass (typecheck + lint)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1584 **Author:** [@rekcilyssup](https://github.com/rekcilyssup) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/11/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/dmg-eacces-skip-as-root` --- ### 📝 Commits (1) - [`e0efc82`](https://github.com/morluto/rea/commit/e0efc820a0fd841731e56063801a6a69a2815e80) test(native): skip the DMG EACCES diagnostic as root ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/boundary/providers/native/nativeDmgArtifactReader.test.ts` (+1 -1) </details> ### 📄 Description ## Summary `nativeDmgArtifactReader.test.ts` makes a DMG unreadable with mode 0 and expects hdiutil verify to fail with Permission denied. Root ignores file permissions, so in a container that runs tests as root (e.g. default Docker), the unreadable path stays readable, the diagnostics diverge, and the test fails. This skips it as root, with the same guard the other permission-dependent boundary tests already use. No issue is linked: it is a one-line test guard. ## Problem and expected behavior Trigger: run `npx vitest run tests/boundary/providers/native/nativeDmgArtifactReader.test.ts` as uid 0. Expected: skipped, as for `tests/boundary/filesystem/binaryTarget.test.ts` and the sibling `artifactProvider.directoryErrors.test.ts` (see PR #1394). Nothing else changes; non-root runs still execute the test. ## Change and scope `it.skipIf(process.platform !== darwin)` becomes `it.skipIf(process.platform !== darwin || process.getuid?.() === 0)` on the real-hdiutil target-access case only. Test-only change, no source or contract impact. ## Validation performed - `npx vitest run tests/boundary/providers/native/nativeDmgArtifactReader.test.ts` on macOS (non-root): 23 passed - `npx oxfmt --check` on the touched file: pass - `npm run check:fast`: pass (typecheck + lint) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:12:36 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2989
No description provided.