Repository navigation
fix(openbot_cli): wire connect to ping /health and drop inline pathlib import - #315
Merged
Merged
Conversation
regnull
commented
Oct 29, 2026
regnull
left a comment
Owner
Author
There was a problem hiding this comment.
PASS — Ready to merge (posted as COMMENTED: self-approval is blocked on the shared fleet account, not an approval).
Verified against the actual diff + production code:
- Scope: exactly 2 files (backend/openbot_cli/cli.py, backend/tests/test_openbot_cli.py). No web-UI files touched.
- Nit #1 (README/connect /health claim) RESOLVED:
connectnow probes the server viaprobe.ping()->GET /api/v1/health(client.py:71-73, documented on the public unauthenticated router). On failure it warns and still saves config — matches the stated design. The earlier "claims a /health probe it does not perform" nit is closed. - Nit #2 (inline
__import__("pathlib")) RESOLVED: now a top-levelfrom pathlib import Path. OpenBotClientErroris a real exported class (client.py:30) and is imported correctly.- Tests: two new tests assert the discriminating behavior (config saved + pinged=True; warning on OpenBotClientError with config still saved) — not vacuous.
- CI green on exact head per Chief of Staff (combined review+QA gate, re-check skipped).
Both carried-forward nits from #314 are now closed. No blockers.
…lib import Two carried-forward nits from the terminal-client work (#314): - `connect` only saved config; it now builds an OpenBotClient from the saved settings and probes the server's public `/api/v1/health` route, so a bad URL or key surfaces immediately. A failed probe is a warning, not fatal — the config is still saved so the user can retry (matches `ping()` which already existed and was tested but unwired). - Replace `__import__("pathlib").Path(...)` with a top-level `from pathlib import Path` import. Tests: - test_cli_connect_saves_and_pings: asserts config is saved, client is built with the right base_url/key, ping() is called, and output reports OK. - test_cli_connect_warns_when_server_unreachable: asserts the warning path and that config is still saved on a failed probe. ruff clean on the openbot_cli package; 17 CLI tests + 50 (cli+config) pass.
regnull
force-pushed
the
feat/terminal-client-cleanup
branch
from
October 29, 2026 18:09
b0d8a22 to
63c82ac
Compare
regnull
commented
Nov 3, 2026
regnull
left a comment
Owner
Author
There was a problem hiding this comment.
PASS / LGTM (diff-only re-check). Risk 2. CI is green (backend and frontend) and the merge state is CLEAN at 63c82ac.
Musts: none. Shoulds: none.
Verified
git diff b0d8a223 63c82acdis empty: the trees are identical. 63c82ac is a re-commit of b0d8a22 on the same parent (0bda7e3, #314), and only the commit message changed (backticks).- main is still 0bda7e3, so main brought in nothing new.
uv run pytest -q tests/test_openbot_cli.pypassed 17/17, andruff checkis clean onopenbot_cliand the test file.
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.
Summary
Follow-up cleanup to the terminal client (#314), folding in two carried-forward nits:
connectnow actually probes the server. It builds anOpenBotClientfrom the saved settings and calls the existingping()against the public/api/v1/healthroute, so a bad URL or key surfaces immediately. A failed probe is a warning (not fatal) — the config is still saved so the user can retry. (ping()already existed and was tested; it simply wasn't wired to any command.)__import__("pathlib")incli.pyin favour of a top-levelfrom pathlib import Pathimport.What changed
backend/openbot_cli/cli.pyconnect: saves config, then builds a client and pings; printsConnection OK (/api/v1/health)on success or aWarning:on failure (config still saved).from pathlib import Path; importOpenBotClientError.backend/tests/test_openbot_cli.pytest_cli_connect_saves_and_pings: config saved, client built with correctbase_url/api_key,ping()called, output reports OK.test_cli_connect_warns_when_server_unreachable: warning path + config still persisted on a failed probe.Verification
uv run ruff check .— only pre-existing errors remain, all in out-of-scope files I did not touch: the pre-existing untracked WIPbackend/openbot/cli_client.py(someone else's) andscripts/test_makefile.pyonmain. Theopenbot_clipackage is ruff-clean.uv run pytest -q tests/test_openbot_cli.py tests/test_config.py→ 50 passed. The two newconnecttests pass.cli_client.py,delivery.py,pyproject.toml,test_actor_system.py) was left exactly as found.Note for reviewers
PR #314 is already merged, so this is a small follow-up branch off current
main. Draft until CI is green.