Skip to content

chore: refresh dependencies and pre-commit hooks (v0.64.0) - #168

Merged
flyersworder merged 5 commits into
mainfrom
chore/deps-refresh-0.64.0
Nov 19, 2026
Merged

flyersworder merged 5 commits into
mainfrom
chore/deps-refresh-0.64.0

Conversation

@flyersworder

@flyersworder flyersworder commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • uv lock --upgrade: 51 packages, including the major versions duckdb 2.0.0, anthropic 2.11.0, logfire-api 6.0.0 and websockets 17.4, plus sqlglot 30.33.0, pydantic-ai-slim 2.71.0, langchain-core 1.8.3 and claude-agent-sdk 0.2.185. No declared floor moves.
  • prek auto-update: ruff 0.17.6, ty 0.0.107.
  • Experiments: mermaid-joinpath-eval upgraded (37 tests pass). dabstep-contract-eval takes only the self version, and its frozen contract directories are untouched.
  • Version 0.64.0 and a CHANGELOG entry.

Fixes the upgrade needed

  • Test thread exhaustion under DuckDB 2.0. A 2.0 connection holds about 49 native threads, up from 9 in 1.5.6. Adapter fixtures were never closed and sat in reference cycles until GC. With 1.5.6 the suite already peaked near macOS's 4,096-thread cap; with 2.0 it hit the cap, and 9–12 tests (depending on order) failed with RuntimeError: can't start new thread. An autouse fixture in tests/conftest.py now closes every duckdb.connect a test makes. The suite ends at 1 thread.
  • Revenue example golden output: inspect_query rows 0 -> 1. DuckDB 2.0's root-node cardinality estimate is never below 1 (the query actually returns 3 rows). The parser is unchanged.
  • Example golden files scrub elapsed_seconds / seconds_remaining (CI step and scripts/regen_examples.sh). These wall-clock values round to 0.0 locally (10–32 ms measured under both DuckDB versions) but crossed 0.05 s on the first CI run of this PR. retries_remaining and the token and cost budgets are still diffed exactly.

Test plan

  • prek run --all-files
  • uv run pytest (3,257 passed)
  • Lowest-floor suite, Python 3.12 and 3.13 (3,257 passed each)
  • Every step of the examples CI job, run locally
  • uvx uv-secure uv.lock: clean
  • uv lock --check

🤖 Generated with Claude Code

flyersworder and others added 5 commits November 19, 2026 20:25
uv lock --upgrade (51 packages, including duckdb 2.0.0, anthropic 2.11.0,
sqlglot 30.33.0) and prek auto-update (ruff 0.17.6, ty 0.0.107). No
declared floor moves; the lowest-floor suite passes on 3.12 and 3.13.

DuckDB 2.0 holds ~50 native threads per open connection. Test fixtures
never closed their adapters, so the suite hit macOS's 4096-thread cap and
failed with "can't start new thread"; an autouse fixture now closes every
connection a test opens.

DuckDB 2.0 no longer estimates a plan root below 1 row, so the revenue
example's inspect_query line changes from rows: 0 to rows: 1.

mermaid-joinpath-eval is upgraded separately (37 tests pass);
dabstep-contract-eval takes only the self version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
elapsed_seconds and seconds_remaining round to 0.0 locally but crossed
0.05s on a CI runner, failing the byte-for-byte diff. Scrub them in both
the CI step and scripts/regen_examples.sh; retries_remaining and the
token and cost budgets stay diffed exactly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the code review of #168:

- DuckDBAdapter gains close() (takes _lock, idempotent) and context-manager
  support. Under DuckDB 2.0 an open connection holds ~50 native threads;
  the CHANGELOG previously told users to reach into adapter.connection.
- The examples scrub moves to scripts/scrub_example_output.py, used by CI
  and regen_examples.sh alike. seconds_remaining is rounded to whole
  seconds instead of masked, so the configured max_duration_seconds is
  still diffed; negative values are handled; regen uses mktemp.
- The two module-scoped DuckDB fixtures close their own connections (the
  autouse fixture starts after them); conftest docstring says so.
- CHANGELOG no longer names hook versions (CLAUDE.md rule).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the second code review of #168:

- The revenue example prints one session report as a Python dict, which
  the double-quote-only scrub missed, so the examples job could still
  flake on timing. Keys now match in either quote style.
- seconds_remaining is written as <budget>-T, the budget recovered as
  elapsed + remaining from the same report, instead of rounded to whole
  seconds, which failed once a session passed ~0.5s. Verified with a
  fake clock at up to 3.3s elapsed.
- close() docs: from async code, await asyncio.to_thread(adapter.close).
- CHANGELOG no longer credits #167's ty-ignore edits to this release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… limits

From the third code review of #168:

- The "Sample database created at" scrub also removes a last line with
  no trailing newline, as the sed rule it replaced did.
- The scrubber docstring states that the budget is recovered to the
  whole second, the precision the two 0.1s-rounded values allow.
- conftest: a connection meant to outlive the test is closed too.

Declined: a closed adapter's explain() reporting schema_valid=False. The
agent sees "Connection already closed", and use after close is a host bug.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@flyersworder
flyersworder merged commit 6f34f07 into main Nov 19, 2026
9 checks passed
@flyersworder
flyersworder deleted the chore/deps-refresh-0.64.0 branch November 19, 2026 19:51
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