Skip to content

docs: truth batch — rewrite architecture.md from source, real sql-translation.md, README fixes; 0.2.0 scaffolding - #33

Merged
luthermonson merged 2 commits into
mainfrom
docs/truth-batch-and-0.2.0-scaffolding
Aug 16, 2026
Merged

docs: truth batch — rewrite architecture.md from source, real sql-translation.md, README fixes; 0.2.0 scaffolding#33
luthermonson merged 2 commits into
mainfrom
docs/truth-batch-and-0.2.0-scaffolding

Conversation

@luthermonson

Copy link
Copy Markdown
Contributor

Documentation-truth batch at rev cb707ab, plus 0.2.0 release scaffolding. Every claim in the rewritten docs is backed by a file in this repo.

Phantom claims removed (with evidence)

  • Baton-based Hrana sessionsbaton.rs does not exist; litewire-hrana/src/http.rs returns baton: None // Stateless for now. The doc and README now say what the frontend is: a stateless subset (/v2/pipeline with execute/close, plus /health and /version).
  • "Optional JWT validation" — zero auth code exists anywhere in litewire-hrana. Removed; the Hrana frontend is documented as unauthenticated.
  • batch/sequence request types — only execute and close are implemented (http.rs::pipeline_handler). Removed.
  • backend-libsql feature — does not exist in any Cargo.toml. The real optional backend is backend-hrana-client (litewire-backend/src/hrana_client.rs).
  • Wrong default-feature table — the doc claimed postgres/tds/everything default-on. Actual default is mysql, hrana, backend-rusqlite (crates/litewire/Cargo.toml); postgres/tds/hrana-client/turso/cli are opt-in, and the binary requires --features cli (required-features on the [[bin]]).
  • sqld-clustered ePHPm integration — ePHPm removed sqld in its v0.7.0. litewire is documented as standalone with ePHPm as one consumer; the two full mermaid deployment diagrams of ePHPm internals are gone.
  • Phantom repo treetests/mysql_compat.rs, pg_compat.rs, tds_compat.rs, wordpress.rs, laravel.rs, litewire-backend/src/rusqlite.rs, libsql.rs, hrana/src/baton.rs: none exist. Tree now matches find.
  • docs/sql-translation.md referenced but missing — now written for real from the litewire-translate/litewire-session source: the pipeline, transaction rewrites, no-ops, all metadata emulation, the shared/MySQL/PG/T-SQL rewrite tables (incl. the PR fix(translate): MySQL LIKE patterns get their implicit ESCAPE '\' on SQLite #25 LIKE-escape, feat(mysql): translate REGEXP and YEAR/MONTH/DAYOFMONTH #29 REGEXP/date-part, fix(session): emulate SQL_CALC_FOUND_ROWS / FOUND_ROWS(), stop dropping plain LIMIT #26 FOUND_ROWS work), error-code mapping, and an explicit "what does not work" section.
  • Also dropped: the image: litewire:latest CI example (no image is published), the implementation-phases plan, and the speculative etcd/RESP/Mongo sections.

README fixes

  • The as-a-library snippet claimed litewire = { version = "0.1", ... }the crate is not on crates.io. Replaced with the git-dependency form; the exact snippet was compile-verified in a scratch project against this repo (cargo check clean).
  • Quick start now says the binary needs --features cli and shows the install/build commands.
  • Hrana/libsql overclaims tempered as above. The multi-tenant section is untouched (a separate security PR owns that wording).

Release scaffolding

  • CHANGELOG.md reconstructed from the merged PR history (Fix README drift from actual crate features #1fix(session): map no-such-table to 1146 and give 1062 a MySQL-shaped message #31), grouped Unreleased/0.2.0 vs 0.1.0.
  • msrv CI job added. Verifying it surfaced that the declared rust-version = "1.85" was never true with the locked graph: turso → aristo requires rustc 1.88 (icu crates need 1.86). Corrected to 1.88 and the job pins it; noted in the changelog.
  • Workspace version bumped to 0.2.0 (incl. the internal version = "0.1.0" pin in litewire-turso's dependency on litewire-backend, which broke resolution otherwise). Proposed procedure: tag v0.2.0 on the merge commit of this PR. Publishing to crates.io remains an option (the README snippet would then switch to a version requirement) — owner's call, not done here.
  • CONTRIBUTING.md: build/test both feature sets, fmt/clippy gates, MSRV, and the wire-level-regression-test-per-bugfix convention the project already follows.

Verification

  • cargo check --workspace --all-features — clean
  • cargo test --workspace (38 suites) and cargo test --workspace --all-features — 930 passed, 0 failed
  • cargo +1.88 check --workspace --all-features --all-targets — clean (the new CI job, run locally)
  • README library snippet compiled as-is in a scratch project via the git dependency
  • CI workflow YAML parse-checked

…x README; 0.2.0 release scaffolding

Documentation-truth batch. docs/architecture.md was a pre-implementation
design doc presented as current architecture; every claim is now backed by
a file in the repo:

- removed baton-based Hrana sessions (no baton.rs exists; http.rs returns
  baton: None -- stateless), optional JWT validation (no auth code exists in
  litewire-hrana), batch/sequence request types (only execute/close are
  implemented), and the backend-libsql feature (does not exist)
- removed the sqld-clustered ePHPm integration section (ePHPm removed sqld
  in its v0.7.0; litewire is standalone -- ePHPm is described as one
  consumer, correctly)
- removed the phantom repo tree (tests/ files and module names that do not
  exist), the litewire:latest docker/CI example, the implementation-phases
  plan, and the speculative etcd/RESP/Mongo sections
- fixed the default-feature table: defaults are mysql, hrana,
  backend-rusqlite; postgres/tds/hrana-client/turso/cli are opt-in
- new docs/sql-translation.md: the real translation reference written from
  litewire-translate/litewire-session source -- rewrites, metadata
  emulation, FOUND_ROWS handling, error-code mapping, and what is rejected

README: the as-a-library snippet claimed a crates.io version that is not
published -- replaced with the git-dependency form (compile-verified in a
scratch project); the CLI quick start now says the binary needs
--features cli; Hrana subset limitations stated; libsql-SDK and
embedded-replica overclaims removed. The multi-tenant section is untouched.

Release scaffolding: CHANGELOG.md reconstructed from the merged PR history,
CONTRIBUTING.md codifying the build/test/lint gates and the wire-level
regression-test convention, an msrv CI job, and a workspace version bump to
0.2.0. rust-version corrected 1.85 -> 1.88: the declared 1.85 was never
true with the locked graph (turso -> aristo requires rustc 1.88); the new
CI job is what keeps the declaration honest.
Clippy toolchain drift: collapsible_if and manual_is_multiple_of now fire on
pre-existing nested `if let` / `if` blocks across the workspace, so
`clippy --all-targets -- -D warnings` fails on main as well as this branch.
Fixed mechanically with `cargo clippy --fix` (both feature sets) plus rustfmt;
every change is a semantics-preserving collapse -- the let-chains short-circuit
in the same order, so side-effecting guards (`select.top.take()`,
`name.0.pop()`, `pool.take()`) still run exactly when they did.

Files: litewire-translate (common.rs, lib.rs, metadata.rs, mysql.rs, tds.rs),
litewire-backend/rusqlite_backend.rs, litewire-mysql/handler.rs,
litewire-tds/handler.rs (`% 2 != 0` -> `!is_multiple_of(2)`),
litewire-turso/cdc.rs, and litewire/src/main.rs (the CLI binary, only reachable
under --all-features).
@luthermonson
luthermonson force-pushed the docs/truth-batch-and-0.2.0-scaffolding branch from f71a78c to 09e0a1a Compare August 16, 2026 17:11
@luthermonson
luthermonson merged commit 3d9427a into main Aug 16, 2026
5 checks passed
@luthermonson
luthermonson deleted the docs/truth-batch-and-0.2.0-scaffolding branch August 16, 2026 17:15
luthermonson added a commit that referenced this pull request Sep 1, 2026
…nslation.md, README fixes; 0.2.0 scaffolding (#33)

* docs: rewrite architecture.md from source, add sql-translation.md, fix README; 0.2.0 release scaffolding

Documentation-truth batch. docs/architecture.md was a pre-implementation
design doc presented as current architecture; every claim is now backed by
a file in the repo:

- removed baton-based Hrana sessions (no baton.rs exists; http.rs returns
  baton: None -- stateless), optional JWT validation (no auth code exists in
  litewire-hrana), batch/sequence request types (only execute/close are
  implemented), and the backend-libsql feature (does not exist)
- removed the sqld-clustered ePHPm integration section (ePHPm removed sqld
  in its v0.7.0; litewire is standalone -- ePHPm is described as one
  consumer, correctly)
- removed the phantom repo tree (tests/ files and module names that do not
  exist), the litewire:latest docker/CI example, the implementation-phases
  plan, and the speculative etcd/RESP/Mongo sections
- fixed the default-feature table: defaults are mysql, hrana,
  backend-rusqlite; postgres/tds/hrana-client/turso/cli are opt-in
- new docs/sql-translation.md: the real translation reference written from
  litewire-translate/litewire-session source -- rewrites, metadata
  emulation, FOUND_ROWS handling, error-code mapping, and what is rejected

README: the as-a-library snippet claimed a crates.io version that is not
published -- replaced with the git-dependency form (compile-verified in a
scratch project); the CLI quick start now says the binary needs
--features cli; Hrana subset limitations stated; libsql-SDK and
embedded-replica overclaims removed. The multi-tenant section is untouched.

Release scaffolding: CHANGELOG.md reconstructed from the merged PR history,
CONTRIBUTING.md codifying the build/test/lint gates and the wire-level
regression-test convention, an msrv CI job, and a workspace version bump to
0.2.0. rust-version corrected 1.85 -> 1.88: the declared 1.85 was never
true with the locked graph (turso -> aristo requires rustc 1.88); the new
CI job is what keeps the declaration honest.

* style: collapse nested if-lets into let-chains (clippy collapsible_if)

Clippy toolchain drift: collapsible_if and manual_is_multiple_of now fire on
pre-existing nested `if let` / `if` blocks across the workspace, so
`clippy --all-targets -- -D warnings` fails on main as well as this branch.
Fixed mechanically with `cargo clippy --fix` (both feature sets) plus rustfmt;
every change is a semantics-preserving collapse -- the let-chains short-circuit
in the same order, so side-effecting guards (`select.top.take()`,
`name.0.pop()`, `pool.take()`) still run exactly when they did.

Files: litewire-translate (common.rs, lib.rs, metadata.rs, mysql.rs, tds.rs),
litewire-backend/rusqlite_backend.rs, litewire-mysql/handler.rs,
litewire-tds/handler.rs (`% 2 != 0` -> `!is_multiple_of(2)`),
litewire-turso/cdc.rs, and litewire/src/main.rs (the CLI binary, only reachable
under --all-features).
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