Repository navigation
fix(adoption): report Codex profile drift without replacing values - #756
seathatflowsinourveins wants to merge 2 commits into
Conversation
…726 gate-read P2s, #713's macOS-only fixes (#752) ### Scope An upgraded Codex home kept the previous managed `service_tier = "fast"` despite the selected normal default. F9 now migrates that one declared value through the native config writer, verifies readback and records completion so later `/fast` choices survive. Round 3 also completes adoption for preserved tiers such as `flex`, and handles marker-only completion without a config write, process check or backup. - Base: `ecfa112764c664d35377dd66b8cfcb67e5a94d60`; lane: `lane:foundation`. - Native migration introduced by `3c779ea2f97d9cc1b437c0385c53fff5887a8f13`; Round 3 repairs: `8c1cfd39dc7058464667d235e30019aa187883d3`. Validated head: `d2f6d8c3de42226cf37fea5b145bfae73f867482`. - Existing differing scalars remain conflicts. Native replacement is limited to literal previous `fast`; actual marker readback must match `plan.expected`. Missing-writer dry-run refuses consistently with apply, and native local rejection diagnostics retain their text. - Retained original residual repairs: regenerated authorization table; find-skills' on/Codex listing; round-4 research-harness owner note; alert-text egress note; macOS comparator fixture and Bash 3.2-portable Harbor guard. - Owned paths: client-config tool/test/map/template, WSL operator recipe, linked decisions, install-plan residual files, sanitized migration receipt and evidence registry. Registry is the final commit. Disposition-catalog correction is a dated follow-up in the migration decision. - #756 separately reports profile drift; whichever of #752 and #756 lands second rebases onto the first. PR readiness and landing remain with the command center. ## SOTA sources - Handbook CI repair follows the maintained repository generator at `native-agent-stack@d2f6d8c:scripts/build_new_wsl_handbook.py:189-190,693,1196-1199,1209-1242`, its existing freshness oracle `tests/test_new_wsl_handbook.py:1440-1457`, and the exact native CI command `.github/workflows/validate.yml:235-240`. - openai/codex@`a956835d020762cb2b570053af06f643a11c0ecc` (rust-v0.160.0): [service-tier persistence:105-122](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/tui/src/config_update.rs#L105-L122), [native batch request:154-170](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/tui/src/config_update.rs#L154-L170), [toggle:47-57](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/tui/src/chatwidget/service_tiers.rs#L47-L57), [persistence event:99-117](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/tui/src/chatwidget/service_tiers.rs#L99-L117), [event dispatch:2391-2396](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/tui/src/app/event_dispatch.rs#L2391-L2396) and [Fast aliases:547-551](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/protocol/src/config_types.rs#L547-L551). These support completion for preserved tiers while retaining later native choices. - Same pin: [config-manager write response:426-438](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/app-server/src/config_manager_service.rs#L426-L438), [canonical fingerprint:54-65](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/config/src/fingerprint.rs#L54-L65), [tier resolution:35-42](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/tui/src/service_tier_resolution.rs#L35-L42) and [model catalog:512](https://github.com/openai/codex/blob/a956835d020762cb2b570053af06f643a11c0ecc/codex-rs/models-manager/models.json#L512). Native versions are configuration hashes; rollback hashes the same validated disk snapshot. - Reused native wrapper, native-agent-stack@`32e6b0bde15d82cfbcccb117af3a728c5e9eeb5d`: [AppServer:514-560](https://github.com/seathatflowsinourveins/native-agent-stack/blob/32e6b0bde15d82cfbcccb117af3a728c5e9eeb5d/tools/adoption/apply_codex_lane.py#L514-L560), [guarded transaction:1257-1273](https://github.com/seathatflowsinourveins/native-agent-stack/blob/32e6b0bde15d82cfbcccb117af3a728c5e9eeb5d/tools/adoption/apply_codex_lane.py#L1257-L1273). No new scalar editor or RPC wrapper. - Marker-only contract at native-agent-stack@`3bbcc780dfc34829219dff169b283f29a10845c1`: [Decision 11:210](https://github.com/seathatflowsinourveins/native-agent-stack/blob/3bbcc780dfc34829219dff169b283f29a10845c1/docs/decisions/2026-10-02-new-wsl-client-configuration.md#L210), [running-process control:3599-3602](https://github.com/seathatflowsinourveins/native-agent-stack/blob/3bbcc780dfc34829219dff169b283f29a10845c1/tests/test_new_wsl_client_config.py#L3599-L3602), [failed-pgrep control:3662-3668](https://github.com/seathatflowsinourveins/native-agent-stack/blob/3bbcc780dfc34829219dff169b283f29a10845c1/tests/test_new_wsl_client_config.py#L3662-L3668). - Original residual sources: native-agent-stack@`2d849ba1fe1b879144cfa470f0514d3ac3b8e487`, `tools/adoption/new_wsl_client_config.py:1421-1446`, `adoption/skills/manifest.json:542-564`, `evidence/artifacts/final-architecture-round2-20261004/integration-resolutions.json:1614-1674` and `adoption/bootstrap-macos.sh`; prometheus/alertmanager@v0.34.1, [Telegram configuration](https://github.com/prometheus/alertmanager/blob/v0.34.1/docs/configuration.md#telegram_config); historical hosted-macOS [run 37320629278](https://github.com/seathatflowsinourveins/native-agent-stack/actions/runs/37320629278), artifact `full-suite-macos.log:12587-12637`. ### Evidence-class table | Claim | Evidence class | Command / receipt | | --- | --- | --- | | Tier semantics and supported native writer | source_review | Pinned upstream and repository sources above | | Upgrade, preserved flex followed by fast, version/readback rejection and rollback | synthetic | AppServer fixture checks RPC edits/versions; no real native writer or provider session | | Marker-only works with a running process or failing pgrep, without backup/native calls; dry-run and actual readback controls | local_integration with synthetic homes/clients | Full module: 205 tests, exit 0; owned sleep process in one control | | Wiring, registered hashes and scope | local_integration | `--check` and `validate.py`, exit 0; integrity only | | Original hosted-macOS failure diagnosis | historical hosted CI | Run 37320629278; new macOS acceptance is not claimed | ### Local commands run The three requested checks were rerun on the committed head above. Heavy checks use `nice 19`, `PYTHONDONTWRITEBYTECODE=1` and an owned external-cache `TMPDIR`; private paths are omitted here. Generator outputs and whitespace checks are from the final commit preparation. ```text rtk proxy nice -n 19 python3 -m unittest tests.test_new_wsl_client_config -q exit 0: Ran 205 tests in 78.337s; OK rtk proxy nice -n 19 python3 -B tools/adoption/new_wsl_client_config.py --check exit 0: check passed; two existing mcp-inspector manifest/install-plan warnings rtk proxy nice -n 19 python3 scripts/component_matrix.py --write exit 0: 32 rows, 0 flip-rule violations rtk proxy nice -n 19 python3 scripts/new_host_grand_list.py --write exit 0: 32 layers, 66 winners rtk proxy nice -n 19 python3 scripts/validate.py exit 0: 69 components, 10274 hashed files, 4 profiles, 212 receipts; passed rtk git diff --check exit 0 ``` The receipt retains earlier failures/results and Round 3's five failing controls followed by 16 passing focused checks and the full module. The original pre-migration 426-test run remains historical; it is not represented as rerun after these repairs. CI status is separate from local acceptance. ### Validate repair (2026-10-06) The required validate job at `d2f6d8c3de42226cf37fea5b145bfae73f867482` failed its existing handbook freshness assertion. #752 added migration prose to the hashed distro guide without regenerating the two handbook artifacts. The recorded `4e505c4e...` digest matches main/base `ecfa112...`; the PR's input is `f6401392...`. This is #752 input drift, and OSV is a separate job. Regenerated through the unchanged repository builder and refreshed the handbook receipt's two output hashes, preserving its regeneration history. The generated MD and JSON diffs contain **only that provenance digest**. No generator, test, client template, migration logic or host configuration changed in this repair. Source chain: `native-agent-stack@d2f6d8c:scripts/build_new_wsl_handbook.py:189-190,693,1196-1199,1209-1242`; `tests/test_new_wsl_handbook.py:1440-1457`; `.github/workflows/validate.yml:235-240`. [Original failed CI job](https://github.com/seathatflowsinourveins/native-agent-stack/actions/runs/37401702955/job/112071390644). Repair receipt: `evidence/artifacts/codex-service-tier-migration-20261005/ci-validate-repair-20261006.json`. | Repair observation | Evidence class | Returned result | | --- | --- | --- | | Original hosted CI failure | independent CI observation | 11,365 tests / 1 freshness failure / 1,026 skips | | Exact workflow command on frozen local head | local integration, native environment differs | exit 1; 10,361 tests / 19 failures / 18 errors / 905 skips; targeted freshness failure reproduced | | Native generator before/after repair | structural validation, discriminating control | --check exit 1 before; --write and --check exit 0 after | | Existing handbook test module | local integration | 76 tests, 32.202s, exit 0 | | Attribution and minimal output delta | source review | independent reader confirms only one of 38 input hashes changed; no generator edit | The full local suite result is retained without calling it green: it lacks `exchange_calendars`, and has additional native shell/fixture/containment/export/installed-client notification findings not present in CI's failure summary. Those are separate owner follow-ups; this repair disables no gate and installs nothing on the shared host. Local Python is 3.13.16; CI's declared interpreter is 3.12.3. The workflow's run block was executed unchanged at nice 19, with private external-cache RUNNER_TEMP/TMPDIR: ```sh set -o pipefail mkdir -p "$RUNNER_TEMP/suite" timeout --signal=ABRT --kill-after=60s 55m \ python3 -m unittest -v --durations 50 2>&1 | tee "$RUNNER_TEMP/suite/unittest-verbose.log" # exit 1; frozen baseline above rtk proxy nice -n 19 python3 scripts/build_new_wsl_handbook.py --write rtk proxy nice -n 19 python3 scripts/build_new_wsl_handbook.py --check # each exit 0 TMPDIR=<owned-cache> PYTHONDONTWRITEBYTECODE=1 rtk proxy nice -n 19 python3 -m unittest -v tests.test_new_wsl_handbook # exit 0; 76 tests, 32.202s ``` Final repair validation: `TMPDIR=<owned-cache> PYTHONDONTWRITEBYTECODE=1 rtk proxy nice -n 19 python3 scripts/validate.py` exit 0 (69 components, 10,275 hashed files, 4 profiles, 212 receipts); `rtk git diff --check` exit 0. Component-matrix and grand-list regeneration both exit 0, unchanged, with zero status flips. Generated handbook/receipt and registry changes are in the last repair commit. New-head CI is observed after push; local green is not a predeclared GitHub acceptance result. ### Decision record [Codex service-tier migration](docs/decisions/2026-10-05-codex-service-tier-migration.md), including Round 3 marker policy and dated disposition follow-up; [normal-default amendment](docs/decisions/2026-10-04-new-wsl-changelog-parity.md#amendment-2026-10-05-normal-by-default-fast-on-demand). A later user policy choice or supported upstream migration facility would reopen the decision. ### Host evidence No new host receipt, native-writer execution, provider acceptance or platform-status promotion. The next approved F9 apply after landing **rewrites an upgraded home's unmarked previous `fast` value through a native app-server write**, with backup and readback before marker completion. Marker-only adoption leaves config bytes intact. The configuration owner performs host application; this lane made no host configuration change. Recovery limits remain documented: separate config/marker writes, failed fresh adoption before a later `/fast` choice, canonical-version formatting limits and additional migration-rule recovery policy. The synthetic AppServer fixture does not establish native writer acceptance. ### Checklist - [x] No GitHub Actions changes; workflow pin and permission requirements unaffected. - [x] No secrets printed, logged or committed; no new required secret. - [x] No new paid hosting, subscription or billing surface. - [x] Peer-owned files and worktrees preserved. - [x] Native supported writer reused; one `lane:foundation` label; registry last; no merge or readiness toggle.
|
Folded into #770 by the PR triage of 2026-10-07 (the command center's ruling, item review-ns2604-coop-20261007T023012Z, section 3). Closed with a record, not merged. The co-op verified the fold at #770's head e4e1e60: 2/5 of this PR's files are byte-identical there, and the shared files (the registry, the client-config tool and its test, the decision records) are merged with this PR's added lines present except where the merge re-hashed or re-counted them; #770's description names this fold, its composition record (docs/decisions/2026-10-07-codex-profile-environment-content-fold.md) and the donor-byte ledger under evidence/artifacts/codex-profile-env-fold-20261007/. This branch |
Scope
F9 could preserve a differing Codex profile and still report
codex-files currentand verification success.--check --host NAMEnow compares installed profile keys to the selected render, and default apply verification reports mismatching keys and fails. Existing profile bytes and operator values remain intact.424b8a778222ae8857aade42c49ae6f7a13b3138.lane:foundation; draft pending the command center's Claude cross-family read.tools/adoption/new_wsl_client_config.py, its test module, one dated decision, one sanitized artifact receipt, andmanifests/evidence.jsonin the final commit.--checkretains repository-only validation. Extra operator fields are outside the comparison;--with-authorization-settingsexplicitly selects authorization keys for comparison. No profile replacement or host apply is added.SOTA sources
a956835d020762cb2b570053af06f643a11c0ecc, rust-v0.160.0, config loader:286-333, native merge:96-149, and config/read parameters:389-407. An expected-render comparator was not found in installed 0.160.0 top-level/doctor/debug help or its release notes; F9 already owns the render this check needs.Evidence-class table
python3 -m unittest tests.test_new_wsl_client_config -q: 193 tests, exit 0codex --version,codex --help: exit 0; no provider sessionpython3 scripts/validate.py: passed; no provider/GPU acceptanceNo real host profile was reread or changed. This establishes file comparison against a render, without claiming effective running-session configuration, MCP availability or upstream native-test acceptance.
Local commands run
Tests and validation used
PYTHONDONTWRITEBYTECODE=1and an owned external-cacheTMPDIR; private host paths are omitted here.Failed reproduction, old expectation corrections and scratch/interface setup errors are retained in the sanitized receipt. Registry updates use the documented
host_receipts.register_fileAPI; the registry is committed last.Decision record
2026-10-05-codex-profile-drift-check.md records native alternatives, preservation and comparison scope, and the upstream comparator or changed owner policy that would reopen the decision.
Host evidence
No
evidence/hosts/change or platform-status promotion. Independent static review is recorded; command-center Claude readiness review remains pending.Checklist
lane:foundationlabel; registry committed last; no merge or host apply.