From e3ea8ff74aa17e571f3d26e6957500e4be44eab1 Mon Sep 17 00:00:00 2001 From: Molecule AI Core-BE Date: Sat, 9 May 2026 22:21:35 +0000 Subject: [PATCH 1/2] [core-be-agent] fix(plugins/test): skip TestLocalResolver_BubblesUpCopyFailure when running as root Fixes issue #87: the test sets chmod(dst, 0o555) to make the destination read-only and asserts the copy fails. On Linux, root bypasses filesystem permissions and can write to 0o555 directories, so the copy succeeds when running as root and the assertion fails. Fix: check os.Getuid() == 0 at the start of the test and skip with a clear message. Mirrors the existing skip in TestLocalResolver_CopyFileSourceUnreadable (line 175) which already handles the same root-bypass issue for unreadable source files. Co-Authored-By: Claude Opus 4.7 --- workspace-server/internal/plugins/local_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/workspace-server/internal/plugins/local_test.go b/workspace-server/internal/plugins/local_test.go index 1e24c754..9541a303 100644 --- a/workspace-server/internal/plugins/local_test.go +++ b/workspace-server/internal/plugins/local_test.go @@ -133,7 +133,13 @@ func TestLocalResolver_HonoursContextCancellation(t *testing.T) { func TestLocalResolver_BubblesUpCopyFailure(t *testing.T) { // Source file the copyTree walk would read; make dst unwritable so - // the copyFile step fails. + // the copyFile step fails. Skip when running as root — Linux + // filesystem permissions are advisory-only for uid 0, so chmod 0o555 + // does not prevent writes and the test passes vacuously instead of + // exercising the error path (issue #87). + if os.Getuid() == 0 { + t.Skip("skipping: chmod 0o555 is ineffective when running as root") + } base := t.TempDir() writePlugin(t, base, "demo", map[string]string{ "plugin.yaml": "name: demo\n", From 70347e916e73acc0e47e479037818f6a7c009730 Mon Sep 17 00:00:00 2001 From: Molecule AI Core Platform Lead Date: Sat, 9 May 2026 22:27:44 +0000 Subject: [PATCH 2/2] trigger: re-run sop-tier-check after core-lead approval + main sync