Skip to content

test(cli): isolate JSON goldens from agent profile roots - #408

Merged
entelecheia merged 1 commit into
mainfrom
test/403-hermetic-json-goldens
Nov 9, 2026
Merged

entelecheia merged 1 commit into
mainfrom
test/403-hermetic-json-goldens

Conversation

@entelecheia

Copy link
Copy Markdown
Member

Fixes #403

Keep ai policy JSON golden cases inside their fixture profiles by clearing inherited CLAUDE_CONFIG_DIR, CODEX_HOME, KIMI_CODE_HOME and OPENCODE_CONFIG_DIR before fixture setup. The existing fixture still sets HOME and XDG_CONFIG_HOME; the cases remain serial, and t.Setenv restores each variable after its subtest.

This changes only internal/cli/json_golden_test.go. Product behavior and golden files are unchanged.

Validation at a96acee19b013647380e757521d715ec058d1344:

  • dot admit -- env CLAUDE_CONFIG_DIR=/tmp/elsewhere GOMAXPROCS=2 go test -p 2 -count=1 -run TestJSONGoldens ./internal/cli/: passed.
  • dot admit -- env -u CLAUDE_CONFIG_DIR GOMAXPROCS=2 go test -p 2 -count=1 -run TestJSONGoldens ./internal/cli/: passed.
  • git diff origin/main...HEAD --name-only: only internal/cli/json_golden_test.go; no golden changes.
  • Diff whitespace check passed. Full suite and lint were not run for this focused test-harness change.

Copilot AI balanced review requested due to automatic review settings November 9, 2026 12:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T12:53:29.780106Z a96acee PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@entelecheia
entelecheia merged commit cfdec35 into main Nov 9, 2026
14 checks passed
@entelecheia
entelecheia deleted the test/403-hermetic-json-goldens branch November 9, 2026 13:06
entelecheia added a commit that referenced this pull request Nov 9, 2026
Covers #399, #400, #401, #402, #404, #405, #407 and #409. #406 (spec
docs) and #408 (test isolation) are left out per the release-note rules.

Claude-Session: https://claude.ai/code/session_01Vb48Vt5iGMfc7MJWPTCWCL
entelecheia added a commit that referenced this pull request Nov 9, 2026
* chore(release): add v2.81.0 release notes

Covers #399, #400, #401, #402, #404, #405, #407 and #409. #406 (spec
docs) and #408 (test isolation) are left out per the release-note rules.

Claude-Session: https://claude.ai/code/session_01Vb48Vt5iGMfc7MJWPTCWCL

* chore(release): v2.81.0 notes, apply review findings

Name the resume reload fix (#411), the peer pair upgrade, the exact anchor
scope, the dot sync target change and the dot admit wait.

Claude-Session: https://claude.ai/code/session_01Vb48Vt5iGMfc7MJWPTCWCL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: JSON goldens read the host's CLAUDE_CONFIG_DIR and fail inside agent sessions

2 participants