Skip to content

test: Declare DBItest 1.8.3.6 in the DBItest contexts - #831

Closed
krlmlr wants to merge 10 commits into
claude/elegant-tesla-mja103-lazyfrom
claude/elegant-tesla-mja103-dbitest
Closed

krlmlr wants to merge 10 commits into
claude/elegant-tesla-mja103-lazyfrom
claude/elegant-tesla-mja103-dbitest

Conversation

@krlmlr

@krlmlr krlmlr commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Stacked on #807 (base branch claude/elegant-tesla-mja103-lazy), which is stacked on #802, #801, #800, #796 and #795. Requested on #795, whose contexts declared dbitest_version = "1.8.1"; #807 carried the declaration until now and reverts it in 4bb6a97, so this layer holds it alone.

DBItest gates its newest specs behind the dbitest_version tweak with a counter of its own (1.8.0.1 to 1.8.0.50, then 1.8.3.1 to 1.8.3.6), and r-dbi/DBItest#571 gated six specs for requested Arrow schemas at 1.8.3.1 to 1.8.3.6 (arrow_fetch_arrow_schema, arrow_get_query_arrow_schema, arrow_get_query_arrow_schema_zero_rows, arrow_fetch_arrow_chunk_schema, arrow_read_table_arrow_64_bit, arrow_send_query_schema_stable). This PR declares dbitest_version = "1.8.3.6" in tests/testthat/helper-DBItest.R, the highest gate RSQLite has been run against, so that a spec DBItest gates later stays off until RSQLite has been checked against it; the Arrow contexts in helper-DBItest-arrow.R now take their tweaks from that default context instead of repeating them. The specs do not run in this PR's checks: RSQLite's R-CMD-check runs on pull requests to main only and installs DBItest from CRAN, which does not have them. They run in RSQLite's nightly rcc dev job, which installs the development DBItest, and in DBItest's backends job, which clones RSQLite's default branch and runs test-DBItest.R, the default context only, both once the stack is on main; and in DBItest's and DBI's own checks once their copies of the helper, which still declare 1.8.1, are regenerated.

With the development DBItest 1.8.3.9013 installed, the default context passes 8443 expectations in 653 tests, and the contexts with arrow = TRUE and with lazy_strings = TRUE pass 8142 in 642 tests each, with no failures and the same 60 and 59 skipped tests as with the released version. DBItest 1.8.3 gates no spec above 1.8.1 and passes unchanged (8334 and 8033 expectations), so DESCRIPTION keeps DBItest (>= 1.8.0).

A clean review found one Medium and three Low issues; the Medium and the duplicated tweak list are fixed in 3ec2a1a and 30f327b, and what remains is listed under Accepted limitations.

https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE


Generated by Claude Code

DBItest gates its newest specs behind `dbitest_version`, up to 1.8.3.6 for the six specs of requested Arrow schemas, and its own CI runs RSQLite with the context of `helper-DBItest.R`.
The development version 1.8.3.9013 passes in the default context and in both contexts with `arrow = TRUE`, with the six schema specs running and the same skips as the released version.
DBItest 1.8.3 gates no spec above 1.8.1 and passes unchanged, so `DESCRIPTION` keeps `DBItest (>= 1.8.0)`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE

krlmlr commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Review of this PR at 74da1c7, by a Claude Code reviewer with clean context that read the diff against claude/elegant-tesla-mja103-lazy (4bb6a97) and the revert in 4bb6a97; read every use of dbitest_version in DBItest 1.8.3 and in r-dbi/DBItest@4fd7a6a, which is still the head of DBItest's main; read DBItest's backends workflow, revdep-dev/Makefile and helper-dev.R, and RSQLite's two check workflows; installed a build of 74da1c7 in a private library and ran test-DBItest.R, test-DBItest-arrow.R and test-DBItest-arrow-lazy.R with DBItest 1.8.3 and with 1.8.3.9013; ran the same three files from 4bb6a97 with 1.8.3.9013; ran the six schema specs with 1.8.3.9013 against CRAN RSQLite 3.53.3; and posted nothing itself. "Confirmed" means reproduced by running code.

What holds.

  • The .9013 suffix is safe. DBItest compares the tweak in three places, and all three use as.package_version(): skip_if_not_dbitest(), dbi_generics() (the list for the compliance reexport spec) and one check in spec-result-fetch.R. A .9013 component therefore compares as a number. tweaks() does not validate the value. Confirmed: as.package_version("1.8.3.9013") < "1.8.3.6" is FALSE, and the same code is in 1.8.3.
  • Only the six specs are affected. In 1.8.3.9013, the only specs gated above 1.8.1 are the six named in the description, at 1.8.3.1 to 1.8.3.6. The highest gate in DBItest 1.8.3 is 1.8.0.50, so the declaration changes nothing with the released version. Confirmed by deparsing every spec of both versions.
  • The numbers in the description are right. With 1.8.3.9013 the Arrow and lazy contexts each pass 8142 expectations in 642 tests with 59 skips, and with 1.8.3 each passes 8033 in 636 tests (confirmed). The default context passes 8445 expectations in 653 tests with 59 skips here, and 8336 in 647 tests with 1.8.3: two expectations and one skip away from the description, because the compliance reexport spec runs (2 expectations) when RSQLite is installed and skips under load_all(), so both sets are right for their setup. Across the two DBItest versions the skip lists are identical in all three contexts, and the only new tests are the six schema specs, which add 109 expectations in each context. The base branch with 1.8.3.9013 skips exactly those six in each context, 65 skips each.
  • DESCRIPTION needs no change. Declaring a version above the installed DBItest is harmless, so DBItest (>= 1.8.0) remains correct.
  • The base branch no longer refers to the old declaration. Both helpers declare 1.8.1 at 4bb6a97, no other file mentions 1.8.3.6 or the six specs, and the description of feat: Convert data frames column by column, with lazy_strings as an option #807 already points here.

High

None.

Medium

1. "1.8.3.9013" opts in to every spec DBItest adds before its next release, not only the six that were checked. This affects helper-DBItest.R#L10 and helper-DBItest-arrow.R#L13. The comparison is confirmed; the consequences below are by reading.

DBItest's gates are a counter of their own, separate from its development version numbers. The specs added after 1.8.0 are gated at 1.8.0.1 to 1.8.0.50. r-dbi/DBItest#571 added the six at 1.8.3.1 to 1.8.3.6 while the package was at 1.8.3.9011 (for example spec-arrow-send-query-arrow.R#L123). The next spec will most likely be gated at 1.8.3.7, and as.package_version("1.8.3.9013") < "1.8.3.7" is FALSE. That spec would then run against RSQLite as soon as it lands in DBItest's main, in RSQLite's nightly rcc dev job for DBItest and in DBItest's backends job, which clones RSQLite's default branch.

The tweak exists to hold back specs a backend has not yet been run against, and 18269a8 in #807 had declared exactly 1.8.3.6. The description calls the value "the development version of DBItest at r-dbi/DBItest@4fd7a6a", which reads like a pin to that commit; it is not one.

Suggested fix: declare "1.8.3.6", the highest gate RSQLite has been run against. All the numbers above stay the same. If opting in early is intended, because RSQLite is DBItest's reference backend, keep 1.8.3.9013 and say so in the commit message and the description.

Low

2. The specs run in fewer places than "so that the specs run here and in DBItest's CI" suggests. By reading, except where marked confirmed. RSQLite's R-CMD-check runs on pull requests to main only, so this stacked PR has no check run, and that workflow installs DBItest from CRAN, which does not have the six specs. The development DBItest runs only in rcc dev: nightly on main, and on cran-* branches and v* tags. DBItest's backends job runs only test-DBItest.R, so only the default context, and sees this change only once the stack is on RSQLite's main. DBItest's own R CMD check and DBI's use committed copies of this helper, which helper-dev.R regenerates only outside CI; both copies still declare 1.8.1 (DBItest, DBI). Confirmed: with 1.8.3.9013, the six specs pass against CRAN RSQLite 3.53.3 with 109 expectations, so regenerating those copies is safe. Suggested fix: reword the description accordingly.

3. The tweak list is declared twice (pre-existing, from #796 and #807). By reading, not tried. helper-DBItest-arrow.R#L12-L23 repeats every tweak of helper-DBItest.R, which is why this PR edits two lines, and the next bump will have to as well. Optional fix: let arrow_dbitest_context() pass tweaks = DBItest::get_default_context()$tweaks; the default context exists by the time the arrow test files call that function, and the copies in DBItest and DBI copy only helper-DBItest.R.

4. #795's accepted limitations still list the old declaration. By reading. The comment still carries the item "dbitest_version stays at 1.8.1 … the maintainer's call". Suggested fix: mark that item addressed in #831.


Generated by Claude Code

krlmlr commented Nov 10, 2026 •

Copy link
Copy Markdown
Member Author

Accepted limitations

The clean review of 74da1c70 found one Medium and three Low issues. The Medium (declaring "1.8.3.9013" opts in to every spec DBItest gates at 1.8.3.7 and later, before RSQLite has run them) is fixed in 3ec2a1a, which declares "1.8.3.6", and the duplicated tweak list in 30f327b; #795's limitations list marks the old declaration as addressed here. This remains:

  • .github/workflows/R-CMD-check-dev.yaml#L3-L11: the six Arrow schema specs need the development DBItest, so they run in RSQLite's nightly rcc dev job for DBItest and in DBItest's backends job (default context only) once the stack is on main, but not in this stacked pull request's CI, which installs DBItest from CRAN; DBItest's and DBI's own checks keep their committed copies of the helper, which declare 1.8.1 until they are regenerated, and the six specs pass against CRAN RSQLite 3.53.3, so regenerating them is safe. Relevance: low; reviewer's confidence: high (by reading, the CRAN RSQLite part confirmed).

Generated by Claude Code

…esla-mja103-dbitest

Brings in `dbColumnInfo()` answered from the Arrow columns, `POSIXlt` written like `POSIXct`,
the CI hook for the large Arrow test, and the comparison helper that can ask `dbColumnInfo()` before each fetch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
DBItest gates its specs with a counter of its own, 1.8.0.1 to 1.8.0.50 and then 1.8.3.1 to 1.8.3.6, not with its development version numbers.
Declaring 1.8.3.9013 would opt in to every spec that DBItest gates at 1.8.3.7 or later before RSQLite has been run against it.
1.8.3.6 enables the same six specs of requested Arrow schemas that RSQLite passes with DBItest 1.8.3.9013, and nothing beyond them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
`arrow_dbitest_context()` repeated every tweak of `helper-DBItest.R`, so that each change of the DBItest version had to edit both helpers.
All 21 tweaks of the two contexts were identical, and the Arrow contexts now take them from `DBItest::get_default_context()`, which `helper-DBItest.R` sets before any test file runs.
`helper-DBItest.R` still declares its tweaks itself, since DBItest and DBI copy it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
@krlmlr krlmlr changed the title test: Declare DBItest 1.8.3.9013 in the DBItest contexts test: Declare DBItest 1.8.3.6 in the DBItest contexts Nov 10, 2026
…esla-mja103-dbitest

Brings in the busy mark reset through `R_ExecWithCleanup()`, the checks of Arrow parameters,
the 64-bit row counter, the UTF-16 text in binary columns,
and `dbColumnInfo()` for the types requested with `schema` and `ptype`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…esla-mja103-dbitest

Brings in the bytes of a blob in a `utf8` column kept as they are, also in a UTF-16 database.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…esla-mja103-dbitest

Brings in the state of the Arrow test hooks kept in each result,
with the helpers `set_bytes_limits()` and `fetch_with_bytes_limits()` in `helper-arrow.R`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…esla-mja103-dbitest

Brings in Arrow streams read safely on worker threads, with the "Threads" section of `?"sqlite-arrow"`,
the coercion warning reported as the stream's error off R's main thread,
the scanner tests, and the longjmp tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
…esla-mja103-dbitest

Brings in the atomic busy mark that records the thread holding a result, the atomic row count and completion,
the parked results closed from the main-thread entry points, NaN tested without R,
and the tests that read streams on a thread of their own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE
@krlmlr
krlmlr added this pull request to stack #797 November 10, 2026 20:40
…esla-mja103-dbitest

Brings in the Arrow test fixtures moved into `helper-arrow.R`,
with the wrappers of the tests of `schema` renamed to `validated_dbGetQueryArrow()`, `validated_dbReadTableArrow()` and `validated_dbFetchArrowChunk()`,
and `is_lazy()` renamed to `is_lazy_strings()`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hr1rd3gjmufoKCWVDBPCgE

krlmlr commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

Marked as a draft, as decided: this pull request is the reference for the reworked Arrow stack, which carries its changes in smaller, separately reviewed pull requests (see the plan). So far: #855, #856, #857, #859 to #867 (GitHub stack 851 on #830 and #850), and #852, #853, #854 and #858 from main. It will be closed once its replacements are merged.


Generated by Claude Code

@krlmlr
krlmlr marked this pull request as draft November 13, 2026 11:04

krlmlr commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

Closing: #854 declared DBItest 1.8.3.6 on main and is merged, which is what this layer did for the old Arrow stack. As decided on #829 (question), each pull request of the old stack is closed once its replacement is merged.


Generated by Claude Code

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