fix(setup): add a command to refresh the Codex ACP bridge - #259
Conversation
|
| def test_codex_latest_bridge_readiness_parses_flags_and_tag(monkeypatch): | ||
| package = "@agentclientprotocol/codex-acp" | ||
| monkeypatch.setattr(readiness, "acp_login_state", lambda base: True) | ||
| monkeypatch.setattr(readiness, "npx_packages_installed", lambda: {package}) | ||
| bridge = next(row for row in readiness.acp_bridges() if row["agent_key"] == "codex") | ||
| assert bridge["available"] is True | ||
| assert bridge["logged_in"] is True | ||
| assert ( | ||
| readiness.install_command(bridge["command"]) | ||
| == f"npm install -g {package}@latest" | ||
| ) |
There was a problem hiding this comment.
This test checks mocked readiness and install-command text, but not the Codex command returned by resolve_acp or its launch path. A later change to the launch flags could leave the test green while undoing the bridge update. Add a focused launch-command contract test.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
An outdated Codex ACP bridge can reject newer models even after the standalone Codex CLI has been updated, because the bridge bundles its own CLI. Add
make refresh-codexto explicitly update the global bridge and its bundled Codex dependency when this happens.The command installs the current published bridge, prints the installed bridge and Codex versions, and instructs the operator to start a new Codex session. It preserves npm already on PATH, otherwise loads nvm, and runs both steps in the same shell. It is listed in
make helpand the README. Session launching stays unchanged: no per-session update checks, version pins, or changes to the child environment are introduced.Validation:
make help,make -n refresh-codex, andgit diff --checkpassed.ACPClientsmoke test selectedgpt-6.1-sol, received onepwdtool call and its completion event, and received the finalREADYresponse withend_turn.