Skip to content

Chronos Workspace CLI - #13

Merged
zxjcarrot merged 12 commits into
mitdbg:mainfrom
sethrojas21:cli
Nov 7, 2026
Merged

zxjcarrot merged 12 commits into
mitdbg:mainfrom
sethrojas21:cli

Conversation

@sethrojas21

Copy link
Copy Markdown
Collaborator

Add a chronos command that loads a workspace from TOML and exposes the existing Python API in the terminal. It supports SQL queries and writes, Qdrant operations, OverlayFS and native ChronosFS, and workspace branching, checkpoints, diffs, and merges.

The CLI guide includes a SQLite quickstart and configuration examples. For atomic merges across separate data databases, use merge atomic-preview to inspect what will be published. Ordinary workspace diff does not honor per-store merge scopes.

sethrojas21 and others added 12 commits October 27, 2026 22:26
Wrap public branching, SQL, checkpoint, diff, and merge APIs with Typer commands. Support shared database configuration, SQL text/file/stdin input, JSON results, table setup, and connection cleanup.

Add usage documentation and 45 passing CLI tests, including isolated SQLite workflows, conflict handling, and installed entry points. PostgreSQL integration and the full repository suite remain unverified.
Separate real database workflows from command-level tests. Reuse one temporary PostgreSQL database per test session, verify SQL inputs and rollback, and run the installed CLI tests in CI. Document the disposable Docker setup.

Validation: 49 CLI tests passed against SQLite and PostgreSQL 16. The GitHub Actions matrix has been configured but has not run for this commit.
Expose --metadata-url and CHRONOS_METADATA_URL through the existing connect_split API, retaining relational command behavior. Validate required DuckDB metadata, redact both connection URLs, and use the macOS loader path for packaged native libraries.

Extend integration coverage to DuckDB with SQLite and PostgreSQL metadata, add analytical queries, configure an optional DuckDB CI build, and document setup. Local validation: 67 passed and one expected disabled-driver test skipped. GitHub CI has not yet validated this commit.
Add local and server Qdrant configuration, dense-vector commands, branch lifecycle, checkpoints, diffs, and merges through the public Chronos APIs. Preserve API results as JSON, manage resource cleanup, and keep the dependency optional.

Add command and integration tests, pinned server CI coverage, and concise usage documentation. Local validation: 56 Qdrant CLI tests passed; relational/build regressions had 67 passes and one expected skip. The unchanged library suite separately had a deep-branch interval exhaustion failure and a ChronosFS test requiring an unavailable Linux build. GitHub CI has not run for this commit.
Keep root assembly in main.py, co-locate relational and Qdrant helpers with their command implementations, and isolate shared terminal behavior. Consolidate five CLI test files into command and integration suites, removing only the duplicated setup workflow.

Validation: 119 tests passed and one expected build-feature test skipped. All 39 help screens are unchanged; moved function bodies and signatures were compared with the feature baseline. Update CI selections and existing documentation references without changing public CLI behavior.
Add TOML-configured workspace commands, named SQL and Qdrant operations, and explicit coordinated and atomic merge routes. Preserve persistent data while owning connections and cleaning up failed invocations.

Cover CLI inputs, forwarding, persistence, backend workflows, stale previews, conflicts, and injected merge failures. Add a checked PostgreSQL/Qdrant demo with a SQLite alternative. Validation: 202 targeted tests passed with one expected build-feature skip; both demos passed.
Resolve decoded filenames before encoding absolute database URLs. Decode URL paths exactly once in native SQLite and DuckDB connections, ChronosFS mounts and maintenance, and S3 metadata connections, while preserving raw filesystem paths.

Reject DuckDB question-mark paths before opening files because its WAL path handling cannot preserve them. Add workspace-isolation, encoded-filename, native-driver, existing-connection, and FUSE regression coverage, and run the relevant checks in CI.
@zxjcarrot

Copy link
Copy Markdown
Collaborator

Fixed the local database URL/path issue in 965bef8.

Resolved filenames are now encoded before becoming database URLs, and native SQLite/DuckDB readers decode them exactly once. This prevents directories such as workspace#one and workspace#two from silently sharing a database. The fix also covers ChronosFS mounts/checkpointing, existing SQLite connections supplied by applications, and the optional S3 component's metadata connections. Raw filesystem paths and literal percent signs remain supported. DuckDB paths containing ? are rejected before opening files because the bundled DuckDB 1.5.4 constructs an incorrect WAL path for them.

Added regression tests and CI selectors for these cases, plus documentation of filename encoding.

Local validation used freshly built, installed Linux wheels:

  • Complete CLI suite plus daemon regression: 184 passed, with PostgreSQL 16, SQLite, DuckDB, local/server Qdrant 1.20.0, OverlayFS, and actual ChronosFS FUSE mounts.
  • Final wheel with DuckDB, filesystem, and S3 support enabled: 85 focused checks passed, including existing-connection handling, native metadata paths, and the original four reproducers.
  • Broader existing regression suite: 233 passed, 2 skipped, and the same pre-existing test_qdrant_store_nested_branches_preserve_visibility interval-exhaustion failure already reproduced on the base commit.
  • Wheel/sdist builds, uv lock --check, and git diff --check passed.

@zxjcarrot
zxjcarrot merged commit fd127be into mitdbg:main Nov 7, 2026
6 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.

2 participants