Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/smoke-codex.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/workflow/domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var CopilotDefaultDomains = []string{

// CodexDefaultDomains are the minimal default domains required for Codex CLI operation
var CodexDefaultDomains = []string{
"172.30.0.1", // AWF gateway IP - Codex resolves host.docker.internal to this IP for Rust DNS compatibility
"api.openai.com",
"host.docker.internal",
"openai.com",
Expand Down
17 changes: 9 additions & 8 deletions pkg/workflow/domains_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ func TestCopilotDefaultDomains(t *testing.T) {
func TestCodexDefaultDomains(t *testing.T) {
// Verify that expected Codex domains are present
expectedDomains := []string{
"172.30.0.1", // AWF gateway IP - Codex resolves host.docker.internal to this IP
"api.openai.com",
"host.docker.internal",
"openai.com",
Expand Down Expand Up @@ -286,8 +287,8 @@ func TestGetCodexAllowedDomains(t *testing.T) {
t.Run("nil network permissions returns only defaults", func(t *testing.T) {
result := GetCodexAllowedDomains(nil)
// Should contain default Codex domains, sorted
if result != "api.openai.com,host.docker.internal,openai.com" {
t.Errorf("Expected 'api.openai.com,host.docker.internal,openai.com', got %q", result)
if result != "172.30.0.1,api.openai.com,host.docker.internal,openai.com" {
t.Errorf("Expected '172.30.0.1,api.openai.com,host.docker.internal,openai.com', got %q", result)
}
})

Expand All @@ -297,8 +298,8 @@ func TestGetCodexAllowedDomains(t *testing.T) {
}
result := GetCodexAllowedDomains(network)
// Should contain both default Codex domains and user-specified domain
if result != "api.openai.com,example.com,host.docker.internal,openai.com" {
t.Errorf("Expected 'api.openai.com,example.com,host.docker.internal,openai.com', got %q", result)
if result != "172.30.0.1,api.openai.com,example.com,host.docker.internal,openai.com" {
t.Errorf("Expected '172.30.0.1,api.openai.com,example.com,host.docker.internal,openai.com', got %q", result)
}
})

Expand All @@ -308,8 +309,8 @@ func TestGetCodexAllowedDomains(t *testing.T) {
}
result := GetCodexAllowedDomains(network)
// api.openai.com should not appear twice
if result != "api.openai.com,example.com,host.docker.internal,openai.com" {
t.Errorf("Expected 'api.openai.com,example.com,host.docker.internal,openai.com', got %q", result)
if result != "172.30.0.1,api.openai.com,example.com,host.docker.internal,openai.com" {
t.Errorf("Expected '172.30.0.1,api.openai.com,example.com,host.docker.internal,openai.com', got %q", result)
}
})

Expand All @@ -319,8 +320,8 @@ func TestGetCodexAllowedDomains(t *testing.T) {
}
result := GetCodexAllowedDomains(network)
// Empty allowed list should still return Codex defaults
if result != "api.openai.com,host.docker.internal,openai.com" {
t.Errorf("Expected 'api.openai.com,host.docker.internal,openai.com', got %q", result)
if result != "172.30.0.1,api.openai.com,host.docker.internal,openai.com" {
t.Errorf("Expected '172.30.0.1,api.openai.com,host.docker.internal,openai.com', got %q", result)
}
})
}
Expand Down
Loading