Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

test(dsh): make the unwritable-workspace premise explicit in the non-blocking hook test

Tactile-Tacod7ceea9c2c32
diff --git a/cli/beacon-hooks/cmd/dsh_hooks_test.go b/cli/beacon-hooks/cmd/dsh_hooks_test.go
index 462ed4a8..1e8c43d2 100644
--- a/cli/beacon-hooks/cmd/dsh_hooks_test.go
+++ b/cli/beacon-hooks/cmd/dsh_hooks_test.go
@@ -720,6 +720,14 @@ func TestDshUnwritableRuntimeLogStaysNonBlockingAndSaysWhy(t *testing.T) {
logPath := filepath.Join(blocker, "runtime.jsonl")
t.Setenv("BEACON_ENDPOINT_LOG", logPath)
+ // The workspace is made unwritable the same way, for the same reason. With a
+ // writable session cwd a dsh hook no longer loses the event: it stages it in a
+ // workspace spool (#605) and prints nothing, so there would be no NOT-recorded
+ // line to read. The envelope's synthetic cwd (/repo) is creatable on some
+ // platforms -- Windows CI proved it -- so un-writability is stated explicitly
+ // rather than inherited from whichever OS runs this.
+ tc.input["cwd"] = filepath.Join(blocker, "workspace")
+
var out map[string]interface{}
stderr := captureHookStderr(t, func() {
out = runHookWithInput(t, tc.run, tc.input)