From a96acee19b013647380e757521d715ec058d1344 Mon Sep 17 00:00:00 2001 From: Young Joon Lee Date: Mon, 9 Nov 2026 21:47:06 +0900 Subject: [PATCH] test(cli): isolate JSON goldens from agent profile roots --- internal/cli/json_golden_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/cli/json_golden_test.go b/internal/cli/json_golden_test.go index 3ad4e00d..b34d0ca4 100644 --- a/internal/cli/json_golden_test.go +++ b/internal/cli/json_golden_test.go @@ -302,6 +302,13 @@ func TestJSONGoldens(t *testing.T) { if err != nil { t.Fatal(err) } + if strings.HasPrefix(tc.surface, "ai policy ") { + // Keep policy inspection inside the fixture's native profiles. + // The fixture already sets HOME and XDG_CONFIG_HOME. + for _, key := range []string{"CLAUDE_CONFIG_DIR", "CODEX_HOME", "KIMI_CODE_HOME", "OPENCODE_CONFIG_DIR"} { + t.Setenv(key, "") + } + } home, root := tc.fixture(t) // Fixture directory arguments keep runtime policy inspection out of // the developer's project settings without changing the process cwd.