test(codex): CI contract for install/uninstall + credential flow#166
Open
GuyMoses wants to merge 2 commits into
Open
test(codex): CI contract for install/uninstall + credential flow#166GuyMoses wants to merge 2 commits into
GuyMoses wants to merge 2 commits into
Conversation
Add Codex Contracts G/H/I to the install-config-contract job, mirroring
the Cursor ones (D/E/F) — the Codex install scripts previously had zero CI
coverage:
G: config-file AND env-var credentials both reach a real OTLP request
through codex-on-event.sh.
H: install-codex.sh appends the managed block + 10 [hooks.state] pre-trust
entries to config.toml, preserving a user-authored hook and setting
(asserted with a real TOML parser).
I: uninstall-codex.sh strips only the managed block, leaving user content.
install-codex.sh now skips the binary/bootstrap download when they're
already present — a real idempotency improvement that also lets Contract H
pre-stage a locally-built binary and run the merge without a release (Codex
has none until M4). Validated locally end-to-end.
SIG-171
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Instead of calling emit-codex-hooks directly, TestE2EFullFlowWithCodex now runs the real install-codex.sh against a hermetic HOME + XDG_STATE_HOME (binary + bootstrap pre-staged so the not-yet-published release download is skipped), then drives live Codex with no bypass against what the installer produced. One test now covers the whole path — installer → config.toml merge + pre-trust → live Codex → OTLP — so a break anywhere surfaces here. Removes the writeCodexHooksTrusted shim in favor of installCodex + codexPluginVersion/unameOSArch helpers. SIG-171 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #165 (M3). Adds CI + test coverage for the Codex install path, which previously had none.
What's covered
Offline contracts in the
install-config-contractjob (mirror Cursor's D/E/F, no live Codex / API):codex-on-event.sh.install-codex.shappends the managed block + 10[hooks.state]pre-trust entries toconfig.toml, preserving a pre-existing user hook + setting (realtomllibparse).uninstall-codex.shstrips only the managed block; user content survives.Live end-to-end in the
e2ejob —TestE2EFullFlowWithCodexnow runs the realinstall-codex.shagainst a hermeticHOME/XDG_STATE_HOME, then drives live Codex with no--dangerously-bypass-hook-trustagainst what the installer produced. One test spans installer →config.tomlmerge + pre-trust → live Codex → OTLP, so a break anywhere (merge, trust hash, hook contract) fails here. Verified locally: install skips the download (pre-staged binary), registers + pre-trusts, connectivity passes, then 3 spans (chat + 2 tools) land with no bypass.Installer change
install-codex.shnow skips the binary/bootstrap download when already present — a real idempotency win, and what lets both Contract H and the e2e pre-stage a locally-built binary and run the merge without a published release (Codex has none until M4, SIG-172).The contracts are deterministic and API-free (always run); the e2e adds live trust-acceptance proof (needs
OPENAI_API_KEY, which is set — the job is green). Together they cover install, uninstall, credential flow, and live trust.SIG-171