[PR #1900] [MERGED] test(native): skip the inaccessible-directory diagnostic as root #4891

Closed
opened 2026-10-31 00:56:29 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: pr/skip-permission-test-as-root


📝 Commits (1)

  • b6e94a4 test(native): skip the inaccessible-directory diagnostic as root

📊 Changes

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

View changed files

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

📄 Description

Summary

tests/boundary/providers/native/artifactProvider.directoryErrors.test.ts › "preserves the inaccessible member path and errno through provider projection" uses chmod 000 to make a bundle member unreadable, then expects inventory_artifact to report the member's path and EACCES. Root ignores the mode, so the read succeeds and the test fails whenever the suite runs as uid 0, which is common in containers and some CI images.

Change and scope

This mirrors 262efe6c (#1584), which did the same for the DMG EACCES diagnostic. The condition is the same:

-  it.skipIf(process.platform === "win32")(
+  it.skipIf(process.platform === "win32" || process.getuid?.() === 0)(

No production code changes.

Contract and boundary impact

  • None. Test selection only.

Evidence and regression coverage

  • Base reproduction: as uid 0 on Linux, npx vitest run tests/boundary/providers/native/artifactProvider.directoryErrors.test.ts fails with × preserves the inaccessible member path and errno through provider projection.
  • After the change: the test is skipped as root (1 skipped). It still runs as non-root on POSIX.

Validation performed

  • The command above, before (1 failed) and after (1 skipped), run as uid 0.
  • npx tsc --noEmit: clean. npx oxlint: 0 errors. npm run verify:module-boundaries: passed. npm run format: no changes.

Compatibility, safety, and release

  • None.

Limits / not verified

  • The non-root run of this test was not repeated on this host, which only has root. It is unchanged for non-root users.

🔄 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/1900 **Author:** [@larinyo](https://github.com/larinyo) **Created:** 10/11/2026 **Status:** ✅ Merged **Merged:** 10/11/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `pr/skip-permission-test-as-root` --- ### 📝 Commits (1) - [`b6e94a4`](https://github.com/morluto/rea/commit/b6e94a434cad8b49412c3c3b9a018b4ab10d928f) test(native): skip the inaccessible-directory diagnostic as root ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/boundary/providers/native/artifactProvider.directoryErrors.test.ts` (+1 -1) </details> ### 📄 Description ## Summary `tests/boundary/providers/native/artifactProvider.directoryErrors.test.ts` › "preserves the inaccessible member path and errno through provider projection" uses `chmod 000` to make a bundle member unreadable, then expects `inventory_artifact` to report the member's path and EACCES. Root ignores the mode, so the read succeeds and the test fails whenever the suite runs as uid 0, which is common in containers and some CI images. ## Change and scope This mirrors 262efe6c (#1584), which did the same for the DMG EACCES diagnostic. The condition is the same: ```diff - it.skipIf(process.platform === "win32")( + it.skipIf(process.platform === "win32" || process.getuid?.() === 0)( ``` No production code changes. ## Contract and boundary impact - None. Test selection only. ## Evidence and regression coverage - Base reproduction: as uid 0 on Linux, `npx vitest run tests/boundary/providers/native/artifactProvider.directoryErrors.test.ts` fails with `× preserves the inaccessible member path and errno through provider projection`. - After the change: the test is skipped as root (1 skipped). It still runs as non-root on POSIX. ## Validation performed - The command above, before (1 failed) and after (1 skipped), run as uid 0. - `npx tsc --noEmit`: clean. `npx oxlint`: 0 errors. `npm run verify:module-boundaries`: passed. `npm run format`: no changes. ## Compatibility, safety, and release - None. ## Limits / not verified - The non-root run of this test was not repeated on this host, which only has root. It is unchanged for non-root users. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:56:29 +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#4891
No description provided.