test: isolate proxy socket listener ports #40

Merged
wmc merged 1 commit from codex/isolated-proxy-test-port into main 2026-06-23 10:01:32 +00:00
Owner

Summary

  • Allow CompatibilityProxyServer instances to bind an injected listener port while keeping the default production address at 127.0.0.1:48117.
  • Move socket-level proxy tests to OS-assigned listener ports and require explicit helper ports to prevent accidental production-port use.
  • Document the socket-test pattern in README and update TODO to the next backlog item.

Verification

  • RED: testProxyServerCanUseEphemeralListenerPortForSocketTests failed before the server exposed listener-port injection.
  • DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer xcodebuild test -project CodexModelSwitcher.xcodeproj -scheme CodexModelSwitcher -configuration Debug -destination platform=macOS -derivedDataPath /tmp/CodexModelSwitcher-DerivedData-isolated-port-callback2 CODE_SIGNING_ALLOWED=NO -only-testing:CodexModelSwitcherTests/CompatibilityProxyServerTests/testListeningPortCanBeReadFromActiveStatusCallback
  • DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer xcodebuild test -project CodexModelSwitcher.xcodeproj -scheme CodexModelSwitcher -configuration Debug -destination platform=macOS -derivedDataPath /tmp/CodexModelSwitcher-DerivedData-isolated-port-proxy-reviewfix CODE_SIGNING_ALLOWED=NO -only-testing:CodexModelSwitcherTests/CompatibilityProxyServerTests
  • DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer scripts/verify.sh -> ==> verification complete
  • git diff --check
  • Subagent code review and re-review: initial retain-cycle/deadlock concerns fixed; final re-review ready to merge.
## Summary - Allow `CompatibilityProxyServer` instances to bind an injected listener port while keeping the default production address at `127.0.0.1:48117`. - Move socket-level proxy tests to OS-assigned listener ports and require explicit helper ports to prevent accidental production-port use. - Document the socket-test pattern in README and update TODO to the next backlog item. ## Verification - RED: `testProxyServerCanUseEphemeralListenerPortForSocketTests` failed before the server exposed listener-port injection. - `DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer xcodebuild test -project CodexModelSwitcher.xcodeproj -scheme CodexModelSwitcher -configuration Debug -destination platform=macOS -derivedDataPath /tmp/CodexModelSwitcher-DerivedData-isolated-port-callback2 CODE_SIGNING_ALLOWED=NO -only-testing:CodexModelSwitcherTests/CompatibilityProxyServerTests/testListeningPortCanBeReadFromActiveStatusCallback` - `DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer xcodebuild test -project CodexModelSwitcher.xcodeproj -scheme CodexModelSwitcher -configuration Debug -destination platform=macOS -derivedDataPath /tmp/CodexModelSwitcher-DerivedData-isolated-port-proxy-reviewfix CODE_SIGNING_ALLOWED=NO -only-testing:CodexModelSwitcherTests/CompatibilityProxyServerTests` - `DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer scripts/verify.sh` -> `==> verification complete` - `git diff --check` - Subagent code review and re-review: initial retain-cycle/deadlock concerns fixed; final re-review ready to merge.
wmc merged commit 7d8848d816 into main 2026-06-23 10:01:32 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
wmc/CodexModelSwitcher!40
No description provided.