Skip to content

ci: run the SQLite suites against DoltLite - #317

Draft
roxblnfk wants to merge 4 commits into
2.xfrom
ci/doltlite
Draft

roxblnfk wants to merge 4 commits into
2.xfrom
ci/doltlite

Conversation

@roxblnfk

@roxblnfk roxblnfk commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

🔍 What was changed

  • New doltlite workflow: fetches libdoltlite.so with dload and runs the SQLite suites in the official php image with the library preloaded (LD_PRELOAD), so pdo_sqlite runs on DoltLite instead of libsqlite3; a first step checks dolt_version(). The preload has no effect on setup-php builds.
  • dload.xml describes DoltLite, which dload does not know.
  • Adds internal/dload to dev dependencies (same commit as in the Dolt and Doltgres PRs).
  • Fix: the SQLite driver reads enum values from any formatting of the table SQL. It used to expect Cycle's own layout (one column per line, IN ( with a space), so enums lost their values on tables created by other tools and on DoltLite, which stores a canonical CREATE text (sqlite_master is a projection of the prolly catalog, not a stored table dolthub/doltlite#1852); values containing a comma were split.

Review notes

Checklist

  • Part of Try dolt #313
  • How was this tested:
    • New EnumIntrospectionTest for SQLite: fails on the old parser, passes with the fix
    • Locally with DoltLite 0.51.17 on Windows (DLL in place of libsqlite3.dll) and on stock SQLite: all 742 SQLite tests pass; Unit suite passes
    • CI run on this PR

@psalm-shepherd

Copy link
Copy Markdown

Psalm found errors in other files

src/Driver/Postgres/Injection/CompileJsonContainsKey.php:25:14 - filter_var is part of the ext-filter extension, which composer.json doesn't require: add it to require, or to suggest if the code works without it
src/Driver/Postgres/Injection/PostgresJsonExpression.php:68:16 - filter_var is part of the ext-filter extension, which composer.json doesn't require: add it to require, or to suggest if the code works without it
src/Driver/Postgres/Injection/PostgresJsonExpression.php:89:29 - filter_var is part of the ext-filter extension, which composer.json doesn't require: add it to require, or to suggest if the code works without it
src/Schema/AbstractColumn.php:786:53 - Argument 1 of DateTimeImmutable::setTimestamp expects int, but possibly different type int|numeric-string provided
src/Driver/Postgres/Schema/PostgresTable.php:0:0 - Baseline for issue "LessSpecificImplementedReturnType" has 1 extra entry.
src/Schema/AbstractColumn.php:0:0 - Baseline for issue "InvalidArgument" has 1 extra entry.

@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 98.57%. Comparing base (9b1699d) to head (aedc405).

Files with missing lines Patch % Lines
src/Driver/SQLite/Schema/SQLiteColumn.php 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              2.x     #317      +/-   ##
==========================================
+ Coverage   94.56%   98.57%   +4.01%     
==========================================
  Files         143      143              
  Lines        5260     5046     -214     
==========================================
  Hits         4974     4974              
+ Misses        286       72     -214     
Flag Coverage Δ
mysql 55.23% <0.00%> (+2.69%) ⬆️
postgres 61.96% <0.00%> (+2.53%) ⬆️
sqlite 53.23% <93.33%> (+2.77%) ⬆️
sqlserver 55.34% <0.00%> (+1.72%) ⬆️
unit 56.86% <0.00%> (+0.79%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@roxblnfk roxblnfk mentioned this pull request Nov 25, 2026
5 of 21 tasks
@roxblnfk roxblnfk linked an issue Dec 1, 2026 that may be closed by this pull request
5 of 21 tasks
@psalm-shepherd

Copy link
Copy Markdown

Psalm also found errors in other files

src/Driver/Postgres/Injection/CompileJsonContainsKey.php:25:14 - filter_var is part of the ext-filter extension, which composer.json doesn't require: add it to require, or to suggest if the code works without it
src/Driver/Postgres/Injection/PostgresJsonExpression.php:68:16 - filter_var is part of the ext-filter extension, which composer.json doesn't require: add it to require, or to suggest if the code works without it
src/Driver/Postgres/Injection/PostgresJsonExpression.php:89:29 - filter_var is part of the ext-filter extension, which composer.json doesn't require: add it to require, or to suggest if the code works without it
src/Schema/AbstractColumn.php:786:53 - Argument 1 of DateTimeImmutable::setTimestamp expects int, but possibly different type int|numeric-string provided
src/Driver/Postgres/Schema/PostgresTable.php:0:0 - Baseline for issue "LessSpecificImplementedReturnType" has 1 extra entry.
src/Driver/SQLServer/SQLServerCompiler.php:0:0 - Baseline for issue "MixedReturnStatement" has 1 extra entry.
src/Driver/SQLite/Schema/SQLiteColumn.php:0:0 - Baseline for issue "MixedArgument" has 1 extra entry.
src/Driver/SQLite/Schema/SQLiteColumn.php:0:0 - Baseline for issue "MixedAssignment" has 2 extra entries.
src/Driver/SQLite/Schema/SQLiteTable.php:0:0 - Baseline for issue "MixedArgument" has 1 extra entry.
src/Schema/AbstractColumn.php:0:0 - Baseline for issue "InvalidArgument" has 1 extra entry.

CI jobs fetch database server binaries (Dolt, Doltgres, DoltLite) from GitHub releases with it.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
DoltLite is a SQLite fork with the sqlite3_* API, so pdo_sqlite runs on it once the library is preloaded. The preload has no effect on setup-php builds, so the suites run in the official php image. dload.xml describes DoltLite, since dload does not know it.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…atted

The values of an enum's CHECK constraint come from sqlite_master.sql, and the parser expected the exact text Cycle writes: one column per line and `IN (` with a space. Tables created by other tools, and SQLite builds that store a canonical CREATE text (DoltLite), lost their enum values, and values containing a comma were split. The constraint is now searched in the whole definition with any spacing, and the values are read as SQL string literals.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@psalm-shepherd

Copy link
Copy Markdown

Psalm found errors in other files

src/Driver/Postgres/Injection/CompileJsonContainsKey.php:25:14 - filter_var is part of the ext-filter extension, which composer.json doesn't require: add it to require, or to suggest if the code works without it
src/Driver/Postgres/Injection/PostgresJsonExpression.php:68:16 - filter_var is part of the ext-filter extension, which composer.json doesn't require: add it to require, or to suggest if the code works without it
src/Driver/Postgres/Injection/PostgresJsonExpression.php:89:29 - filter_var is part of the ext-filter extension, which composer.json doesn't require: add it to require, or to suggest if the code works without it
src/Schema/AbstractColumn.php:786:53 - Argument 1 of DateTimeImmutable::setTimestamp expects int, but possibly different type int|numeric-string provided
src/Driver/Postgres/Schema/PostgresTable.php:0:0 - Baseline for issue "LessSpecificImplementedReturnType" has 1 extra entry.
src/Driver/SQLServer/SQLServerCompiler.php:0:0 - Baseline for issue "MixedReturnStatement" has 1 extra entry.
src/Schema/AbstractColumn.php:0:0 - Baseline for issue "InvalidArgument" has 1 extra entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Try dolt

2 participants