Skip to content

Fix env guard for Windows state paths - #250

Open
trevor050 wants to merge 1 commit into
raysonmeng:masterfrom
trevor050:fix/windows-env-guard-paths
Open

trevor050 wants to merge 1 commit into
raysonmeng:masterfrom
trevor050:fix/windows-env-guard-paths

Conversation

@trevor050

@trevor050 trevor050 commented Sep 23, 2026 •

Copy link
Copy Markdown

Summary

  • Normalize state and base directory paths with the appropriate POSIX or Windows path rules before validating them.
  • Preserve valid generated AgentBridge environment variables when native Windows paths use backslashes, including mixed separators and path casing.
  • Add regression tests for the default fix guard behavior and Windows path comparisons.

Related to #231. On native Windows, valid AGENTBRIDGE_STATE_DIR values were rejected because the guard only recognized /pairs/<id> and ${baseDir}/ separators. In fix mode that erased the registered pair identity, causing Claude Code to treat the live pair as manual mode.

Validation

  • bun test src/unit-test/env-guard.test.ts — passed (8 tests).
  • bun run typecheck — passed.
  • bun run check — blocked by an unrelated Windows integration failure in broker-graceful-shutdown.test.ts (expected SIGTERM exit code 0, received null).
  • bun run test:unit — unrelated existing Windows failures in installer shell stubs and missing Unix tail executable.

Copilot AI lite review requested due to automatic review settings September 23, 2026 05:22

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 reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the PR! Before we can merge it, please sign our lightweight Contributor License Agreement — it keeps the project able to offer a future commercial edition alongside the open-source one. Reply here with:


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

This branch has not been deployed

No deployments
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.

2 participants