Skip to content

fix(test): isolate Amp installs from ambient XDG config - #744

Merged
ScriptedAlchemy merged 1 commit into
mainfrom
fix/amp-test-xdg-isolation
Sep 7, 2026
Merged

fix(test): isolate Amp installs from ambient XDG config#744
ScriptedAlchemy merged 1 commit into
mainfrom
fix/amp-test-xdg-isolation

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • pass an explicit empty environment to user-scope Amp install/uninstall test fixtures
  • keep temporary home directories authoritative when the runner exports XDG_CONFIG_HOME
  • leave production environment resolution and the explicit XDG-root coverage unchanged

Root cause

installBundle and uninstallBundle intentionally default options.environment to process.env. The Amp tests supplied a temporary home but omitted environment, so CI's ambient XDG_CONFIG_HOME=/home/runner/.config redirected user-scope plugin operations outside each fixture. That changed destinations and bypassed the foreign-directory and symlink fixtures.

Verification

RED on untouched e3e78e2d8df2b2e089f2768f5e39f6e3090e40fa with an explicit external XDG root:

XDG_CONFIG_HOME=/tmp/agent-bundle-ambient-xdg.EPAoJl pnpm test:unit -- packages/agent-bundle/tests/amp-install.test.ts

Result: 4 failed, 4,475 passed, 6 skipped. All failures were in packages/agent-bundle/tests/amp-install.test.ts, with destinations redirected under the ambient XDG root.

GREEN focused reproduction:

pnpm build
XDG_CONFIG_HOME=/tmp/agent-bundle-ambient-xdg.bTL1ND pnpm exec rstest packages/agent-bundle/tests/amp-install.test.ts --config rstest.unit.config.ts

Result: 7 passed, 0 failed.

Required local gate:

pnpm build && pnpm typecheck && pnpm lint && pnpm test:unit

Result: PASS. Lint passed across 1,493 files; unit tests: 4,479 passed, 0 failed, 6 skipped.

Changeset

No changeset: tests-only isolation fix; no publishable package behavior changed.

Deslop

Deslop: GPT-5.6 Sol, 0 edits. One test file changed with no production behavior, new abstraction, dependency, or unrelated cleanup.

Self-review

Reviewer: Claude Fable 5.1 xhigh

Finding: none.

Disposition: no changes required; the review confirmed the fixture-only environment isolation, preserved explicit-XDG coverage, current origin/main ancestry, and no documentation or changeset requirement.

@changeset-bot

changeset-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: dba50d5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-07T16:42:56.519960Z dba50d5 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.

@pkg-pr-new

pkg-pr-new Bot commented Sep 7, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle@744
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/create-agent-bundle@744
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/rsc-markdown-stream@744
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/runtime@744

commit: dba50d5

@ScriptedAlchemy
ScriptedAlchemy merged commit 14c9822 into main Sep 7, 2026
15 checks passed
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.

1 participant