Repository navigation
Chronos Workspace CLI - #13
Conversation
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.
|
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 Added regression tests and CI selectors for these cases, plus documentation of filename encoding. Local validation used freshly built, installed Linux wheels:
|
Add a
chronoscommand 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-previewto inspect what will be published. Ordinary workspacediffdoes not honor per-store merge scopes.