From f89033572499f6f93c16b74b2b1d30c7fd455959 Mon Sep 17 00:00:00 2001 From: Lilly Luo Date: Sat, 19 Sep 2026 03:04:04 +0000 Subject: [PATCH] Experiment: exclude only Codex arg0 files from state snapshots --- tests/README.md | 2 ++ tests/integration/README.md | 5 +++-- tests/integration/test_ug_codex_managed_model_discovery.py | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/README.md b/tests/README.md index 5c671fdd..c6be4ec3 100644 --- a/tests/README.md +++ b/tests/README.md @@ -78,6 +78,8 @@ varies argument spelling or routing mode, never hides the agent/provider in the test name. Duplicate boot-only cases are incorporated into the Databricks configuration TUI journeys. Generated-file cleanup and strict app-server stdout assertions remain enforced. +Managed Codex state comparisons exclude `.codex/tmp/arg0`, the disposable executable +links recreated by Codex version checks; persistent agent files remain compared. ug no longer runs a post-configure agent probe; the deprecated `--skip-validate` flag is accepted as a no-op where older journeys still pass it. Tests retain diff --git a/tests/integration/README.md b/tests/integration/README.md index 8d4fc73e..1399095e 100644 --- a/tests/integration/README.md +++ b/tests/integration/README.md @@ -299,8 +299,9 @@ module fetches the workspace's published config once, replaces Claude's static m across all configured/fresh scenarios. The Codex module does the same with `main.default.ci_e2e_openai_mps`. The tests verify Claude's admin header, native cache and real model picker, Codex's exact app-server catalog, and both agents' rejection of personal source -overrides. In addition, -`test_ug_configure_managed_codex_catalog_fallback` injects the intentionally nonexistent +overrides. Codex state comparisons exclude `.codex/tmp/arg0`, the disposable executable links +recreated by version checks, while continuing to compare persistent agent files. +In addition, `test_ug_configure_managed_codex_catalog_fallback` injects the intentionally nonexistent `system.ai.gpt-99`, keeping it out of the real workspace while launching Codex through that workspace on the valid default model `system.ai.gpt-5-6-sol`. With smart routing enabled, it opens the real Codex `/models` picker and requires that injected custom-catalog model to be listed. The diff --git a/tests/integration/test_ug_codex_managed_model_discovery.py b/tests/integration/test_ug_codex_managed_model_discovery.py index efa50080..b9690160 100644 --- a/tests/integration/test_ug_codex_managed_model_discovery.py +++ b/tests/integration/test_ug_codex_managed_model_discovery.py @@ -47,8 +47,10 @@ def _codex_state_and_agent_files(session): for path in paths if path.is_file() # A fresh launch must retrieve and cache the control-plane input before it can reject an - # override. Exclude only that expected cache; every agent-owned state/file stays compared. + # override. Exclude that expected cache and Codex's disposable arg0 executable links, + # which even a version check recreates; persistent agent-owned files stay compared. and not is_managed_config_control_plane_cache(session.home, path) + and not path.is_relative_to(session.home / ".codex" / "tmp" / "arg0") }