ci: GitHub Actions (Ubuntu, uv, ruff, pytest) + repo lint cleanup - #2
Merged
Conversation
Mechanical, no logic changes. Runs `ruff format` and `ruff check --fix` over the whole tree, plus a few manual line wraps for over-length string literals, so the repo is lint-clean and CI can gate on ruff. `scripts/gen_datafusion_catalogue.py` is E501-exempted (it emits long markdown verbatim). This commit is listed in .git-blame-ignore-revs so `git blame` skips it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Runs on Ubuntu for push-to-master and PRs: installs a Rust toolchain (the package is a pyo3/maturin extension), uv sync --locked to build it and install locked deps, then ruff check, ruff format --check, and pytest. Rust and uv build caches keep it fast. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
GitHub is force-running Node 20 actions on Node 24 and warning about it. Both bumped to their Node 24 majors; no behaviour change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
v6 still targets node20, so the deprecation warning survived the earlier bump. v7 is the newest MOVING major tag and runs on node24; v8 publishes only exact tags (no v8 major tag), which would pin us to a patch that goes stale. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add .pre-commit-config.yaml (ruff-check + ruff-format) and make CI run `pre-commit run --all-files` instead of invoking ruff directly, so the local hooks and the CI gate are the same thing rather than two copies that drift. The ruff rev is pinned to the version locked in uv.lock; bump both together. pre-commit added to the dev group so CI uses the locked version too. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 24, 2026
claude-agent-ahrzb Bot
pushed a commit
that referenced
this pull request
Jul 26, 2026
… (M-lower stretch 6) A query whose driving relation is a static table is evaluated ONCE at build time by DuckDB itself; infer() returns the fixed rows (re-validated through the output model per call) and nothing dynamic remains — no IR, no probes, no filters. The fallback self-validates: it fires on Unsupported/Parse errors and a dynamic query always references the row table, which DuckDB does not know, so evaluation fails and the original clean error surfaces unchanged. Bind errors stay hard. Bonus breadth: aggregation, ORDER BY, and DuckDB-dialect-beyond-sqlparser all work on the static-only path because DuckDB is the evaluator. Corpus: 53 match / 625 clean-unsupported / 0 FAIL. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
claude-agent-ahrzb Bot
pushed a commit
that referenced
this pull request
Jul 26, 2026
… (M-lower stretch 6) A query whose driving relation is a static table is evaluated ONCE at build time by DuckDB itself; infer() returns the fixed rows (re-validated through the output model per call) and nothing dynamic remains — no IR, no probes, no filters. The fallback self-validates: it fires on Unsupported/Parse errors and a dynamic query always references the row table, which DuckDB does not know, so evaluation fails and the original clean error surfaces unchanged. Bind errors stay hard. Bonus breadth: aggregation, ORDER BY, and DuckDB-dialect-beyond-sqlparser all work on the static-only path because DuckDB is the evaluator. Corpus: 53 match / 625 clean-unsupported / 0 FAIL. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
claude-agent-ahrzb Bot
pushed a commit
that referenced
this pull request
Jul 26, 2026
…ferential green, wired behind DuckDBInferFn (TASK-44 stretches 1-3) One JIT'd function per program, called per row: extern "C" fn(*mut Cx) -> i64 (0 emit / 1 skip / 2 helper trap / 3+k term trap). Coverage-first: float arith, int compares, logic, select, itof, fabs, and consts map inline to CLIF; everything nontrivial — checked int arith, all string ops, loads/stores, statics, probes — calls extern helpers that delegate to the interpreter's own semantic functions (casemap, substr_window, duck_fcmp, DuckF64, the arena), so the backends cannot drift where they share code. Strings travel as (offset, length) i64 pairs; trap_flag at Cx offset 0 is checked after every fallible helper call. CraneliftFn owns a compiled InterpFn for input/state checks, prepared statics, and the always-available fallback. The 500-seed random-IR differential (fuzz_cranelift_agrees_with_ interpreter) demands byte-identical outputs and traps — it caught two real bugs before landing: load.opt and sload.opt must NORMALIZE payloads to type defaults under a false flag, exactly as the interpreter documents. DuckDBInferFn now compiles cranelift-first with interpreter fallback (AC #2) and exposes .backend; the whole pytest suite — 32 duck_check differentials and the 678-case corpus replay at 0 FAILs — now exercises the JIT. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
claude-agent-ahrzb Bot
pushed a commit
that referenced
this pull request
Jul 26, 2026
…ferential green, wired behind DuckDBInferFn (TASK-44 stretches 1-3) One JIT'd function per program, called per row: extern "C" fn(*mut Cx) -> i64 (0 emit / 1 skip / 2 helper trap / 3+k term trap). Coverage-first: float arith, int compares, logic, select, itof, fabs, and consts map inline to CLIF; everything nontrivial — checked int arith, all string ops, loads/stores, statics, probes — calls extern helpers that delegate to the interpreter's own semantic functions (casemap, substr_window, duck_fcmp, DuckF64, the arena), so the backends cannot drift where they share code. Strings travel as (offset, length) i64 pairs; trap_flag at Cx offset 0 is checked after every fallible helper call. CraneliftFn owns a compiled InterpFn for input/state checks, prepared statics, and the always-available fallback. The 500-seed random-IR differential (fuzz_cranelift_agrees_with_ interpreter) demands byte-identical outputs and traps — it caught two real bugs before landing: load.opt and sload.opt must NORMALIZE payloads to type defaults under a false flag, exactly as the interpreter documents. DuckDBInferFn now compiles cranelift-first with interpreter fallback (AC #2) and exposes .backend; the whole pytest suite — 32 duck_check differentials and the 678-case corpus replay at 0 FAILs — now exercises the JIT. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
claude-agent-ahrzb Bot
pushed a commit
that referenced
this pull request
Jul 26, 2026
…eline (TASK-45 stretch 3) Measurement killed an assumption: pydantic v2's model_construct is pure-Python and SLOWER than model_validate (1432ns vs 882ns per row, pydantic 2.13). The marshaller now builds output rows the way the design doc meant — object.__new__ + direct slot writes (__dict__, __pydantic_fields_set__, extra, private), 491ns measured — and the bench gained a 'generic' engine (SPECIALIZER_GENERIC_BOUNDARY) as the AC #2 baseline. Results: marshaller beats the generic boundary 1.9-2.5x on the no-op f; the specializer beats the shipping native engine 3.7-4.2x end-to-end at n=1024 and 1.5-2.8x at n=1; the JIT-vs- interp compute gap is finally visible through Python. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
claude-agent-ahrzb Bot
pushed a commit
that referenced
this pull request
Jul 26, 2026
…eline (TASK-45 stretch 3) Measurement killed an assumption: pydantic v2's model_construct is pure-Python and SLOWER than model_validate (1432ns vs 882ns per row, pydantic 2.13). The marshaller now builds output rows the way the design doc meant — object.__new__ + direct slot writes (__dict__, __pydantic_fields_set__, extra, private), 491ns measured — and the bench gained a 'generic' engine (SPECIALIZER_GENERIC_BOUNDARY) as the AC #2 baseline. Results: marshaller beats the generic boundary 1.9-2.5x on the no-op f; the specializer beats the shipping native engine 3.7-4.2x end-to-end at n=1024 and 1.5-2.8x at n=1; the JIT-vs- interp compute gap is finally visible through Python. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sets up CI, and gets the repo lint-clean first so the lint gate is green from day one.
Three commits
style: apply ruff format + autofix across the repo— mechanical, no logic changes.ruff format+ruff check --fixover the whole tree (44 lint errors + 19 unformatted files → 0), plus a few manual line wraps for over-length string literals.scripts/gen_datafusion_catalogue.pyis E501-exempted (it emits long markdown verbatim). Listed in.git-blame-ignore-revs.chore: add .git-blame-ignore-revs— sogit blameskips the reformat. GitHub applies it automatically; locally:git config blame.ignoreRevsFile .git-blame-ignore-revs.ci: add GitHub Actions workflow— the CI itself.CI (
.github/workflows/ci.yml)Ubuntu, on push-to-master and PRs. Because the package is a pyo3/maturin extension, it installs a Rust toolchain, then
uv sync --locked(builds the extension + installs locked deps, provisioning Python 3.14), thenruff check·ruff format --check·pytest— all hard gates. Rust + uv build caches keep it fast.Decisions
Caveat
I can't run GitHub Actions locally, so the first run on GitHub is the real verification. Most-likely first-run snags: Python 3.14 wheel availability for a dep on Linux, or an action-version bump. Locally on this branch:
ruff checkclean,ruff format --checkclean, 488 passed / 16 skipped.🤖 Generated with Claude Code