mirror of
https://github.com/openai/codex.git
synced 2026-09-07 15:40:00 +00:00
## What changed - Add the under-development `psp` feature and expose it in the config schema. - Use the feature to attach the PSP cookie to first-party ChatGPT clients. - Remove the hidden `--psp` flag and its process-scoped configuration plumbing. - Preserve configured ChatGPT cookies when creating the PSP client used for GET and POST requests. ## Testing - Update the config manager service test to verify that enabling `features.psp` retains the setting in the effective config and configures the expected ChatGPT cookie. GitOrigin-RevId: 53acb5495d2ff71e4ed25f674a0cff787aea474a
44 lines
1.2 KiB
Rust
44 lines
1.2 KiB
Rust
use super::*;
|
|
use pretty_assertions::assert_eq;
|
|
|
|
#[test]
|
|
fn top_cli_parses_resume_prompt_after_config_flag() {
|
|
const PROMPT: &str = "echo resume-with-global-flags-after-subcommand";
|
|
let cli = TopCli::parse_from([
|
|
"codex-exec",
|
|
"resume",
|
|
"--strict-config",
|
|
"--last",
|
|
"--json",
|
|
"--model",
|
|
"gpt-5.2-codex",
|
|
"--config",
|
|
"reasoning_level=xhigh",
|
|
"--dangerously-bypass-approvals-and-sandbox",
|
|
"--skip-git-repo-check",
|
|
PROMPT,
|
|
]);
|
|
let mut inner = cli.inner;
|
|
inner
|
|
.config_overrides
|
|
.prepend_root_overrides(cli.config_overrides);
|
|
|
|
let Some(codex_exec::Command::Resume(args)) = inner.command.as_ref() else {
|
|
panic!("expected resume command");
|
|
};
|
|
let effective_prompt = args.prompt.clone().or_else(|| {
|
|
if args.last {
|
|
args.session_id.clone()
|
|
} else {
|
|
None
|
|
}
|
|
});
|
|
assert_eq!(effective_prompt.as_deref(), Some(PROMPT));
|
|
assert_eq!(inner.config_overrides.raw_overrides.len(), 1);
|
|
assert_eq!(
|
|
inner.config_overrides.raw_overrides[0],
|
|
"reasoning_level=xhigh"
|
|
);
|
|
assert!(inner.strict_config);
|
|
}
|