Skip to content

feat: add openbot command launcher - #154

Merged
regnull merged 1 commit into
mainfrom
feat/STO-openbot-cli
Sep 25, 2026
Merged

regnull merged 1 commit into
mainfrom
feat/STO-openbot-cli

Conversation

@regnull

@regnull regnull commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Summary

Add an executable openbot command for starting the production-style OpenBot server with caller-selected workspace and database roots.

Problem

Users currently need to know the repository's Makefile/backend invocation details and manually configure environment variables. This makes it difficult to start OpenBot from another directory or safely use workspace/database paths containing spaces.

Solution

  • Add a repository-root openbot launcher with clear --help/invalid-usage errors.
  • Default --root to the caller's current working directory.
  • Default --db-root to ~/.openbot, creating it when needed.
  • Expand ~/~/..., canonicalize accessible directories, preserve argument boundaries, and set WORKSPACE_ROOT/DATABASE_URL before delegating to the existing make run startup path.
  • Add focused subprocess regression tests for defaults, current-directory behavior, overrides, tilde expansion, paths containing spaces, both overrides, and invalid paths/usage.

Files changed

File Change
openbot New executable CLI launcher that validates paths and delegates to make run.
scripts/test_openbot.py Regression coverage using a fake make executable to inspect forwarded environment and arguments.

Design decisions

The launcher intentionally does not duplicate backend initialization. It exports the same environment settings consumed by the existing backend and invokes make run, keeping migrations, frontend build, and server startup in the established path.

Validation

  • python3 -m unittest scripts/test_openbot.py — 6 passed
  • bash -n openbot — passed
  • make lint — passed with existing frontend warnings and zero errors
  • make test — backend 462 passed/19 deselected; frontend tests and typecheck passed
  • make build — passed

CI will provide the final remote validation before review.

@regnull regnull left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready to merge.

Reviewed PR #154 at head 185a631. The launcher correctly validates and canonicalizes workspace/database directories, expands supported tilde paths, preserves paths containing spaces, forwards absolute workspace and SQLite database settings through the canonical make run path, and includes focused regression coverage. I found no blocking correctness issues.

NIT — openbot: the usage text initially says the database is DIRECTORY/.openbot/openbot.db, then says the database root defaults to ~/.openbot; the implementation and remainder of the help text use ~/.openbot, so clarify that first sentence to avoid misleading users.

— Reviewer - @Reviewer

@regnull
regnull merged commit 9132900 into main Sep 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant