fix(auth): recognize codex-acp user agents in Codex SIWC bypass

- Match codex-acp and codex_acp client identifiers in IsCodexClientUserAgent so ACP Codex requests bypass use_siwc and use outer Codex OAuth credentials.
- Add regression tests with the full @agentclientprotocol/codex-acp User-Agent covering SIWC bypass selection and Codex HTTP/WebSocket execution paths.

Closes: #8011
This commit is contained in:
Luis Pater
2026-11-25 10:33:13 +08:00
parent ff9339feaa
commit d71e9dcd7d
3 changed files with 50 additions and 1 deletions

View File

@@ -1383,6 +1383,7 @@ func TestCodexExecutorCodexClientIgnoresUseSIWC(t *testing.T) {
"codex_cli_rs/0.154.0 (Mac OS 26.5.2; arm64)",
"codex-tui/0.154.0 (Mac OS 26.5.2; arm64) iTerm.app/3.6.11 (codex-tui; 0.154.0)",
"codex_exec/0.153.2 (Mac OS 26.6.2; arm64)",
"@agentclientprotocol/codex-acp/0.166.0 (Mac OS 27.2.0; arm64) unknown (@agentclientprotocol/codex-acp; 2.6.0)",
}
for _, ua := range codexUserAgents {