Guidance for Claude, Codex and other coding agents working in the Vortex repository.
- When asked to investigate a CI failure, especially via
/ci-failure-analysis, use the.agents/skills/ci-failure-analysisskill. It is the source of truth for fetching logs, classifying failures, and attributing causation.
Vortex is a Rust monorepo for columnar array processing, compression encodings, and file IO.
The workspace also contains Java bindings in lang/java/, Python bindings in vortex-python/,
documentation in docs/, and benchmark tooling in vortex-bench/ and benchmarks/.
vortex-bufferdefines zero-copy alignedBuffer<T>andBufferMut<T>, guaranteed to be aligned toTor to a requested runtime alignment.vortex-array/src/dtypecontains theDTypelogical type system used throughout Vortex.vortex-arraycontains the coreArraytrait and the base encodings, including most Apache Arrow-style encodings.encodings/*contains more specialized compressed encodings.vortex-exprcontains expression trees, their optimizer, and the analyses and rewrites built on them.vortex-functionscontains the scalar functions thatvortex-arrayitself is not built on.vortex-fileimplements file IO. It usesLayoutReaderfromvortex-layout.vortex-ioholds the core async and blocking IO traits, plus the genericobject_storeadapters that implement them.vortex-cloudholds the cloud object store integration: the URL-to-ObjectStoreregistry and the OpenDAL-backed services (cos://,oss://). Every binding resolves URLs through it.vortex-scan,vortex-session,vortex-datafusion, andvortex-duckdbcontain scan and execution integrations.- FlatBuffers (
.fbs) and Protocol Buffers (.proto) schemas live in the crate that owns the types they describe (vortex-array,vortex-layout,vortex-file,vortex-ipc), and their Rust bindings are checked in under<crate>/src/flatbuffers/generated/and<crate>/src/proto/generated/, so building needs noflatcorprotoc. Never edit the generated files by hand. After changing a.fbsschema, runcargo run -p xtask -- generate-flatbuffers, which requires theflatcrelease pinned inxtask/src/generate_flatbuffers.rsonPATH(orFLATCset). After changing a.protoschema, runcargo run -p xtask -- generate-proto, which needs no external tooling. Commit the regenerated files. vortex-pythoncontains Python bindings. RST-flavored project docs live indocs/.
Before changing files in a subtree, read the closest nested AGENTS.md. In particular:
.github/AGENTS.mdcovers workflows and other GitHub configuration.
Linting, formatting, testing, builds, benchmarks, and other verification commands are optional. Users decide which checks to run and when. Do not run them automatically or make task completion depend on them. The commands below, and verification commands in scoped guidance or contributor workflows, are reference instructions for when the user requests a check.
When verification is requested, use the narrowest check that covers the relevant changes. CI
already runs workspace-wide checks. Markdown, RST, Sphinx configuration, agent configuration,
comments outside Rust code, symlinks, and other metadata with no Rust/API behavior impact do not
need Rust checks. Targeted doc/config commands or path inspection with ls, find, and
git status are available for those changes.
For requested Rust linting and formatting, scope these commands to the affected crate:
cargo clippy -p <crate-name> --all-targets --all-features -- -D warnings
cargo +nightly-<pinned> fmt -p <crate-name>To match CI when running these commands:
- Include
-D warningsso clippy fails on the warnings that CI rejects. - Use the nightly pinned as
NIGHTLY_TOOLCHAINin.github/workflows/ci.yml. A floating+nightlycan format differently from the toolchain CI checks against, so the reformatted tree still failsfmt --check.
There is no separate build step: cargo clippy --all-targets compiles the crate.
When the user wants Rust tests, scope them to the affected crate. Doctests cover Rust doc comments and crate documentation:
cargo nextest run -p <crate-name>
cargo test --doc -p <crate-name>If needed for a requested test run, install cargo-nextest with cargo install --locked cargo-nextest.
When running fuzz targets locally, pass -s none (for example, cargo fuzz -s none ...).
The following applies to Python bindings and their PyO3 implementation under vortex-python/,
and to CUDA bindings under vortex-python-cuda/. These commands use the repository root as their
working directory.
Follow the Python binding development workflow for environment setup, Maturin rebuilds, targeted testing, Cargo features, and the full Python check. Keep the contributor guide as the source of truth for shared commands; its verification workflows are available when the user chooses to run them.
Python linting, formatting, and type-checking commands:
uvx ruff format --check <changed-python-files>
uvx ruff check <changed-python-files>
uvx ty check vortex-python vortex-python-cuda vortex-ffi/cmake/tests scripts/testsUse uvx for both Ruff and ty, matching CI. CI pins ty as TY_VERSION in
.github/workflows/ci.yml, .github/workflows/cuda.yaml and .github/workflows/release-checks.yml.
To match CI, run uvx ty@<TY_VERSION> check ..., and update all three workflows when you change
the version. The
command above covers both binding packages and the CMake and script tests. For a narrower check, pass the affected directory, such as
uvx ty check vortex-python or uvx ty check vortex-ffi/cmake/tests. Checking the whole binding
package covers callers affected by stub or annotation changes.
ty reads Python sources and stubs and needs third-party dependencies for type information.
uv sync --all-packages --no-install-workspace prepares those dependencies without building the
Rust extensions. Runtime tests still need the installed extensions.
Use targeted # ty: ignore[rule-name] comments for intentional violations, such as invalid-input
tests or third-party stub limitations, and explain non-obvious suppressions. Pyright suppression
comments do not suppress ty diagnostics. Keep shared ty configuration in the root pyproject.toml.
Functions that only return None, including tests, may omit the -> None annotation. ty does not
require return annotations, and Ruff's suppress-none-returning setting permits omitting them for
these functions. Bare return and falling through are also allowed when the
return type permits None; Ruff's RET502 and RET503 rules are explicitly disabled.
When the user wants Python tests, run the targeted suite with:
uv run --all-packages pytest <changed-python-tests>For Python docstrings, docs/api/python/, or Sphinx configuration changes, follow
docs/AGENTS.md; the contributor guide documents clean Sphinx builds and doctests. All verification
remains the user's choice. The Rust commands above cover PyO3 files when scoped to the affected
binding crate (-p vortex-python or -p vortex-python-cuda).
git diff --check is available for checking patch whitespace.
For requested formatting of .cpp, .hpp, .cu, .cuh, and .h files under lang/cpp,
vortex-cuda, vortex-duckdb, and vortex-ffi, use the repository's .clang-format configuration:
clang-format --style=file -i <changed-files>Pass only the files you changed; CI excludes vendored or generated CUDA and Arrow headers from its
repository-wide check. clang-format is idempotent, so a --dry-run --Werror pass over the files
you just formatted cannot fail and is not worth running.
When the user wants CMake integration tests, CI runs the Python unittest suite with:
python3 -m unittest discover -s vortex-ffi/cmake/tests -vThese tests need CMake, Ninja, the C/C++ and Rust toolchains, and the lockfile-selected Cargo
dependencies cached by cargo fetch --locked.
These CI checks are the ones most often missed when adding files rather than editing them:
-
Every source file needs SPDX headers, in the comment syntax of its language:
SPDX-License-Identifier: Apache-2.0 SPDX-FileCopyrightText: Copyright the Vortex contributorsREUSE.tomlrecords the exceptions, including the CC-BY-4.0 licensing ofdocs/**. -
Spelling is checked by
typosagainst_typos.toml. -
CI asserts
git status --porcelainis empty after a build. Regenerate generated files with the repository's tooling rather than editing them by hand, and commit the result.
- For
.github/changes, follow.github/AGENTS.md, which covers both the yamllint invocation and the nightly toolchain pin. - If cargo fails with exactly
sccache: error: Operation not permitted, rerun that command withRUSTC_WRAPPER=so rustc runs directly. Only do this for that exact error.
- Follow
STYLE.mdfor Rust formatting, documentation, type signatures, error handling, imports, safety, dispatch macros, and performance conventions (including the hidden-cost accessor table for per-element loops, backed by the benchmarks it names). - Keep diffs small and focused (target under 500 lines when practical). Prefer modifying or extending an existing implementation over adding a parallel one.
- When adding or changing a serialized format (an
ArrayPlugin, layout, or other wire ID), followdocs/specs/versioning/wire-contracts.md.
- Test observable properties and behavior rather than internal implementation details. Prefer
property tests with
hegeltestplus focused corner cases, and.slttests over Rust unit tests when testing DuckDB or DataFusion SQL behavior. - Keep test additions bounded: if a change adds more than 20 test cases or a parameterized test monomorphizes to more than 20 cases, justify it or reduce it.
- Prefer test functions that return
VortexResult<()>and use?instead ofunwrap. - Prefer test module names
tests, nottest. - Use
assert_arrays_eq!for array comparisons instead of element-by-element assertions. Put the result under test on the left: the macro already executes it recursively. Do not explicitly canonicalize solely for this assertion; retain execution needed for physical representation, resource, or error assertions. - Preserve conformance suite entry points and input cases when auditing tests. For batch kernel coverage, execute lazy results before comparing logical values, nulls, lengths, and expected dtypes. Scalar probing alone may bypass the batch kernel.
- Derive expected errors from the input contract or a reference result; do not silently skip failed operations. Invalid-input fixtures should reach the specific guard they claim to test.
- If a bug fix is requested, add or identify a regression test when practical. Leave execution to the user; when tests are run, a test that passes before and after the fix does not prove it.
- If clippy lints in tests prohibit patterns that are acceptable only in test code, consider allowing the lint at the test module level.
- If an existing
foo.rsmodule needs many tests, promote it to a directory module:foo/mod.rsplusfoo/tests.rs, included fromfoo/mod.rsbehind the appropriate test configuration.
- Parquet written by data generators (
vortex-bench,benchmarks/,vortex-sqllogictest) must use zstd level 3, never Snappy. Set it explicitly: parquet-rs defaults to uncompressed and itsZstdLevel::default()is level 1, while DuckDBCOPY/EXPORT DATABASEandtpchgen-clidefault to Snappy.- parquet-rs:
Compression::ZSTD(ZstdLevel::try_new(3)?) - DuckDB:
(FORMAT parquet, COMPRESSION zstd, COMPRESSION_LEVEL 3) - tpchgen-cli:
parquet --compression='ZSTD(3)'
- parquet-rs:
- Benchmarks that deliberately compare Parquet codecs, such as the GPU compress benchmark's
--codecand the Snappy Parquet whose sizecompress-benchand TPC-DS at SF1 record, are exempt. - Every parquet-rs writer of benchmark data uses
parquet_writer_properties()invortex-bench/src/utils/parquet.rs: zstd level 3, 64 KiB dictionaries, a page index, and parquet-rs's default pages of at most 1 MiB and about 20,000 rows. Only the row-group size differs. SQL data has row groups of 122,880 rows (LOCAL_ROW_GROUP_ROWS, DuckDB's default) on local disk and 1,048,576 rows (S3_ROW_GROUP_ROWS, parquet-rs's default) on S3: the CI matrix passes--opt row-group-rows=1048576todata-genfor S3 entries. Random access uses the S3 size on local disk too, because its S3 job reads the files that its local job prepares. When a setting changes, raiseLAYOUT_VERSIONso that local data is generated again. The suites that DuckDB'sCOPYwrites get DuckDB's 122,880-row groups by default.
Check new and modified lines against this list before finishing:
- Adding imports inside functions when module-level imports would work.
- Updating expected test output to match buggy behavior without independently verifying the intended semantics.
- Silently reducing the scope of an approved plan when implementation is harder than expected.
When summarizing work in chat, write valid Markdown that can be copied into GitHub. Include the checks you ran and call out any checks you could not run. A chat summary is not a PR description: see Pull Requests.
PRs are squash-merged: the title and description become the commit message, so write them as one. These rules override any default PR format from your harness.
- Title: imperative mood, at most 72 characters, no trailing period, and no
feat:,fix(x):,fix[x]:orci:prefix: thechangelog/*label categorizes the PR. Describe the effect rather than the mechanism:- Performance:
Speed up sparse takes from chunked Dict arrays, notTake few rows of encoded Dict values when appending to a builder. - Fix: the corrected behaviour,
Import fixed-size lists whose null rows hold null items, notFix FSL import bug. - Refactor or chore, where nothing observable changes: the change itself,
Move ALP kernel logic out of dispatch macros.
- Performance:
- Description: explain why the change is needed and why this approach was chosen, usually in
1–3 sentences of plain prose. Reviewers can read the diff to see what changed. Summarize what
changed only when the diff is large enough that reviewers need guidance on where to focus.
Do not use boilerplate headings (
## Summary,## Changes,## Test plan), and do not copy the template's comments into it. - Leave out the checks you ran, lists of new types or functions, per-file walkthroughs, and test inventories. Mention tests in one line only when they are new or unusual.
- If you tested the change manually, beyond automated tests and CI, say what you did in one line, such as running a query against a real dataset or checking output in DuckDB.
- Give a benchmark's headline result in one line. Post a full table as a PR comment.
- Call out breaking or behaviour changes explicitly. Add the
changelog/breaklabel only for breaking changes. - Before opening the PR, search the repository for related issues. When linking one, follow the PR template. For complex changes and changes that need context from other work, ask the user to create a tracking issue if one is missing. Do not create an issue just to link it.
- Link relevant design documents. If the change needs supporting documentation that does not
exist, tell the user to create it. Put rationale that should outlive the review in doc comments
or
docs/, and link it from the description. - Link related PRs in one line each, such as
Stacked on #N. Include dependencies or deferred work when they affect correctness or merge readiness. - Include the one-line AI disclosure that
CONTRIBUTING.mdrequires in the PR description. A harness attribution footer satisfies this if it explicitly discloses AI use. The disclosure does not count towards the length. - Apply exactly one
changelog/*label (listed in.github/workflows/labels.yml).
When a change comes with a benchmark that shows its effect, land the benchmark first, so that CodSpeed measures the change against a baseline:
- Open a PR into
developthat adds only the benchmark: the benchmark file, its[[bench]]entry, and its entry inscripts/codspeed_bench_counts.json, which holds the number of benchmarks it runs undercfg(codspeed). It must build and run ondevelopwithout the change. - Open the change as a second PR based on the benchmark branch, with
Stacked on #N. CodSpeed compares it against the benchmark branch. - Merge the benchmark PR first. Merge the change only once its base is
developagain; GitHub retargets it when the merged benchmark branch is deleted. Merging it while its base is still the benchmark branch folds it into the benchmark PR.
A benchmark added in the same PR as the change has no baseline, so CodSpeed reports it only as new.
When creating a branch on the user's behalf, prefix its name with the user's established branch
prefix, not the agent's name (for example, do not use codex/ or claude/). Infer the user's
prefix from their existing branches when possible. Otherwise, use available identity context such
as whoami, Git configuration, or other information the user has provided. If the evidence is
ambiguous, ask the user instead of inventing a prefix.
Vortex uses the Developer Certificate of Origin (DCO), and the DCO check rejects pull requests with any commit that lacks a valid sign-off.
Use the name and email of the user as the commit author. Get them from the Git configuration
(git config user.name and git config user.email) or from the identity that the user gives.
All commits must be signed off by the same user in this form:
Signed-off-by: <AUTHOR_NAME> <AUTHOR_EMAIL>
Use git commit --signoff to add this line.
- The sign-off must name the human who is submitting the change and certifying the DCO: the
user you are working for. An agent cannot certify the DCO, so never sign off as Claude, Codex,
or any other agent or bot, and never use an agent address such as
noreply@anthropic.com. - Pseudonyms and fake email addresses are not allowed. If no real identity is available, ask the user instead of inventing one.
- The DCO check requires the sign-off to match the commit author. If the Git configuration names
an agent (as some sandboxes do), set the author to the user, for example with
git commit -s --author="<AUTHOR_NAME> <AUTHOR_EMAIL>", rather than signing off as the agent. - Check that every commit on the branch is signed off before pushing;
git rebase --signoff <base>adds missing sign-offs to commits on a branch you created. - Agent attribution belongs in a
Co-Authored-By:trailer, never inSigned-off-by:.