Skip to content

Keep the vacuum fixture's plaintext on any SQLite build, and lift anyio - #269

Merged
Gerrrt merged 1 commit into
mainfrom
keep-the-vacuum-premise-on-any-sqlite
Nov 23, 2026
Merged

Gerrrt merged 1 commit into
mainfrom
keep-the-vacuum-premise-on-any-sqlite

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 23, 2026

Copy link
Copy Markdown
Owner

What was broken

CI has failed every PR since 2026-11-04. That's all six open Dependabot PRs, including #261, which only bumps a GitHub Action. test_the_fixture_really_does_leave_the_plaintext_behind found no hunter2 in the database file. test_running_the_suite_does_not_modify_stonksmith_state failed alongside it because it runs the suite in a subprocess.

#268 also has a second failure. Its pytest 9.2.0 deprecates _pytest.python.CallSpec2. anyio 4.14.2's pytest plugin imports that name, and filterwarnings = ["error"] makes the warning fatal when the plugin loads.

Why it was invisible

Nothing in this repository changed. ubuntu-latest moved from 24.04 to 26.04, which ships /usr/bin/python3.14, and uv picked that over a managed interpreter. That Python uses Debian's libsqlite3, which is built with SQLITE_SECURE_DELETE, so the UPDATE that nulls the password zeroes the old cell. The last green run on main (2026-10-29) was on 24.04 with a managed 3.14.10. Only Dependabot PRs have run CI since, so this looked like six bad bumps rather than one changed runner. Local runs use managed Pythons and still pass.

The fix

  • tests/test_vacuum_command.py: the fixture sets PRAGMA secure_delete = OFF on its own connection, so it produces the database the command exists for whatever SQLite build runs it.
  • uv.lock: anyio 4.14.2 → 4.16.0, which imports CallSpec when pytest has it, and typing-extensions 4.15.0 → 4.16.0, which that anyio requires.

Why not the obvious alternative

Pinning runs-on: ubuntu-24.04, or setting UV_PYTHON_PREFERENCE=only-managed, would turn CI green by keeping it off the SQLite build that a Debian or Ubuntu operator actually runs. The test shouldn't depend on the SQLite build, and field databases never had that guarantee either. Ignoring the deprecation in filterwarnings would only defer the break to pytest 10, when the alias is removed.

What test makes the claim real

tests/test_vacuum_command.py:

  • With the pragma set to ON, the premise test fails with the same assertion CI printed. With OFF, all 7 pass.
  • Under uv run --with pytest==9.2.0, the file passes with anyio 4.16.0 and fails at plugin load with 4.14.2.

The full suite on Windows has the same 21 failures before and after this change. They are Windows-only file-permission tests, and CI runs on Linux.

Once this merges, the open Dependabot PRs need @dependabot rebase to pick it up.

🤖 Generated with Claude Code

What was broken: CI has failed every pull request since 2026-11-04.
test_the_fixture_really_does_leave_the_plaintext_behind found no
"hunter2" in the file, and test_running_the_suite_does_not_modify_
stonksmith_state failed with it, because it runs the suite in a
subprocess. Separately, the minor-and-patch group's pytest 9.2.0 could
not start: anyio 4.14.2's plugin imports _pytest.python.CallSpec2, which
9.2 deprecates, and filterwarnings = ["error"] makes that fatal at
plugin load.

Why it was invisible: nothing here changed. ubuntu-latest moved from
24.04 to 26.04, which ships /usr/bin/python3.14, and uv took that over
a managed interpreter. Its libsqlite3 is Debian's, built with
SQLITE_SECURE_DELETE, so the UPDATE that nulls the password zeroes the
old cell, and the fixture's premise stopped holding. Only Dependabot
PRs have run CI since, so it read as six bad bumps rather than one
changed runner. A managed interpreter (every local run) passes.

The fix: the fixture sets PRAGMA secure_delete = OFF on its own
connection, so it builds the database the command is for whatever
SQLite runs it. uv.lock moves anyio to 4.16.0, which reads CallSpec
when pytest has it, and typing-extensions to 4.16.0, which that anyio
requires.

Why not the obvious alternative: pinning runs-on to ubuntu-24.04, or
UV_PYTHON_PREFERENCE=only-managed, would make CI green by keeping it
off the SQLite build a Debian or Ubuntu operator actually has. The test
should not depend on the build; the field databases never got that
guarantee either. Ignoring the deprecation in filterwarnings would
leave the CallSpec2 import to break outright in pytest 10.

What test makes the claim real: test_vacuum_command.py. With the
pragma set to ON instead, the premise test fails with the same
assertion CI printed; with OFF, all seven pass. Under
`uv run --with pytest==9.2.0`, the file passes with anyio 4.16.0 and
fails at plugin load with 4.14.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 23, 2026 05:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are identified for the vacuum fixture and dependency updates.

No open issues 🎉

What changed in this PR

This PR addresses CI failures by making StonkSmith’s vacuum test fixture independent of SQLite’s secure-delete default and updating dependencies for pytest compatibility.

Changes:

  • Explicitly disables secure deletion on the fixture connection so it retains plaintext for the vacuum tests.
  • Upgrades anyio to 4.16.0 and typing-extensions to 4.16.0 to address the pytest plugin deprecation failure.
File Description
uv.lock Updates anyio and typing-extensions, including anyio’s conditional dependency.
tests/​test_vacuum_command.py Disables secure deletion in the fixture and documents why it is necessary.

Review effort: Balanced

@Gerrrt
Gerrrt merged commit 7615667 into main Nov 23, 2026
6 checks passed
@Gerrrt
Gerrrt deleted the keep-the-vacuum-premise-on-any-sqlite branch November 23, 2026 16:09
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