Skip to content

Check compat across all versions and frozen core editions - #12008

Merged
lwwmanning merged 38 commits into
developfrom
wm/agy-compat-check-all
Nov 29, 2026
Merged

lwwmanning merged 38 commits into
developfrom
wm/agy-compat-check-all

Conversation

@lwwmanning

@lwwmanning lwwmanning commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Extends compatibility validation to cover both directions defined in docs/specs/versioning.md, running the full suite (--mode all + check-editions) both every 6 hours (0 */6 * * * UTC, up from weekly Monday 6am UTC) and as a release-blocking check in release-checks.yml (called by release-tag.yml before tagging, up from mode: last without check-editions):

  • Backward compatibility (current reader, old files): Scheduled and release runs check all published versions (--mode all) instead of last, and collect every fixture error/panic instead of stopping at the first failure. The all-versions sweep stays alongside edition checks because older published files preserve historical physical encodings that HEAD no longer writes under the same fixture names (such as pre-Tracking Issue: Fix Canonical Decimal #10701 non-canonical decimal widths from compat-gen skips old fixture versions in CI and stops at the first failure #10754). compat-validation.yml passes --profile ci on every trigger.
  • Forward compatibility (old reader, current files): vortex-compat generate --edition <EDITION> enables a frozen core edition on the write session (skipping up front only encoding-specific fixtures whose required encodings are not supported by that edition via any serializer write_id, and collecting per-fixture write errors without aborting), vortex-compat dump-expected writes expected Arrow IPC tables directly from in-memory fixture arrays on HEAD, and compat.py check-editions verifies every frozen core edition with its oldest vortex-data release. Known reader defects and expected edition skips are tracked in vortex-test/compat-gen/accepted-edition-failures.json (40 grandfathered entries with per-column expected_causes, plus expected_skips) with shrink-only enforcement: any generation failure, unexpected skip, or unlisted reader failure/cause fails the check, and any listed failure or skip that is now resolved also fails until removed.
  • core2025.06.0 minimum library version: Raised min_library_version from 0.40.0 to 0.42.0 in v2025_06.rs, vortex/editions/core/core2025.06.0.toml, and docs/specs/versioning/editions.md (since 0.40.0 and 0.41.x do not register vortex.pco or vortex.zstd in vortex-file's DEFAULT_REGISTRY), with a single narrow exception in xtask/src/check_editions.rs allowing only that exact correction.

Ran compat.py --profile ci check-editions across all 7 frozen core editions: 247 passed, 40 accepted, 0 unexpected, 0 stale (full mode=all + check-editions workflow run completed in ~7m). See vortex-test/compat-gen/DESIGN.md and vortex-test/compat-gen/README.md for details.

Assisted by Antigravity (Gemini 4 Neon) and Devin.


Devin Review

Fixes #10754 by running scheduled compat-validation checks with --mode all and --profile ci, caching the vortex-compat build per (cwd, profile) and aggregating errors across versions in compat.py, recording all fixture build/decode/comparison/projection/row-range failures without panicking in check.rs, and aligning README/DESIGN docs with --git-ref behavior.

Signed-off-by: Will Manning <will@willmanning.io>
@lwwmanning lwwmanning added the changelog/fix A bug fix label Nov 25, 2026

@lwwmanning lwwmanning left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Posted by Claude Opus 5.5 on Will's behalf.

The mode fallback and the per-fixture failure collection look correct, and a failed fixture still fails the run. Four notes are inline. CI has not run yet because the PR is a draft.

Comment thread .github/workflows/compat-validation.yml Resolved
Comment thread vortex-test/compat-gen/src/check.rs Resolved
Comment thread vortex-test/compat-gen/src/check.rs Resolved
Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
@devin-ai-integration
devin-ai-integration Bot marked this pull request as ready for review November 25, 2026 17:24
devin-ai-integration[bot]

This comment was marked as resolved.

@vortex-roborev-bot

vortex-roborev-bot Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

roborev: Combined Review (797a3bf)

Verdict: No issues found.


Reviewers: claude-code | Synthesis: claude-code, 0s | Total: 1m50s, cost partial ~$1.02

vortex-roborev-bot[bot]

This comment was marked as resolved.

@codspeed

codspeed Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

Warning

vortex-data has exceeded the Hobby plan limit of 5 active contributors. Upgrade your plan or apply to the open source program by December 8, 2026 to keep using CodSpeed.

2 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ 3 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 2164 untouched benchmarks
⏩ 164 skipped benchmarks1


Comparing wm/agy-compat-check-all (797a3bf) with develop (9b1d41b)

Open in CodSpeed

Footnotes

  1. 164 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>

@lwwmanning lwwmanning left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Posted by Claude Opus 5.5 on Will's behalf.

6fe25ac31 resolves my four earlier notes. The checker now uses assert_arrays_eq! inside run_catching_panic, so it still records a mismatch per fixture. The projected and row-range scans are gone, and the scheduled check still runs every version and collects every failure. test_compat.py now runs in the script test step. The dispatch in mode all on this commit checked 29 versions in under six minutes, so the timeout is not a concern.

One doc fix remains. DESIGN.md line 239 says workflow_call defaults to all, but the workflow marks that input as required, and release-checks passes last. Please say that only the weekly schedule uses all.

Two smaller items are optional. In compat.py, _read_manifest calls .get() before validation, so a manifest of [] or null raises AttributeError. That error escapes the handler for each version and stops the remaining versions. A type check after json.loads that raises ValueError would fix it. Also, assert_arrays_eq! lists every mismatched index, so a regression across a whole TPC-H fixture produces a very long failure line for each version.

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

Updated DESIGN.md in 373bcfa so only the weekly schedule is described as defaulting to all (with workflow_call requiring mode from callers and workflow_dispatch defaulting to last). Also guarded _read_manifest against non-object JSON roots in 8b84f6c.

@lwwmanning lwwmanning left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Posted by Claude Opus 5.5 on Will's behalf.

8b84f6c48 fixes the manifest case from my last review. A manifest of [] now skips the legacy upgrade and fails schema validation with a ValueError. The loop records that failure and moves on to the next version, and the new 0.58.0 test case covers it. The DESIGN.md note about workflow_call still applies.

@lwwmanning lwwmanning left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Posted by Claude Opus 5.5 on Will's behalf.

Reviewed 373bcfa. This commit resolves the last note from my review. DESIGN.md now says that workflow_call callers pass a required mode and that manual dispatch defaults to last, which matches the inputs in compat-validation.yml. No new findings.

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>

@lwwmanning lwwmanning left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Posted by Claude Opus 5.5 on Will's behalf.

Reviewed c62e912, which merges develop. The only conflict was in the pytest file list in ci.yml. develop dropped scripts/tests/test_triage.py in favour of the test_triage_*.py glob, and this branch added vortex-test/compat-gen/tests/test_compat.py. The resolution keeps the glob and the compat test, which is right. The rest of the PR's diff is unchanged. No findings.

@lwwmanning lwwmanning left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Posted by Claude Opus 5.5 on Will's behalf.

A fresh review of c62e912 found no bugs. The check now keeps going after a failed fixture, and the tests reach the paths they claim. The dispatch run with mode: all finished well inside the timeout. Two points need a line each before this merges.

  1. The description says that scheduled runs use the ci profile. In fact compat-validation.yml passes --profile ci on every trigger, and that includes the Compat check job in release-checks.yml (mode: last). That job used to build vortex-compat with the release profile, which is the default in compat.py. Release checks now run an unoptimized build with debug assertions on. That is probably what we want, but please say so in the description.

  2. check_fixtures in check.rs changes VortexSession::empty() to VortexSession::default(), but generate.rs still uses empty(). So the published file and the expected file come from different sessions. The comparison is by logical value, so this is unlikely to cause a false failure. Please give the reason for the switch in a code comment, or use the same session on both sides.

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

Addressed both points:

  1. Updated the PR description to note that compat-validation.yml passes --profile ci on every trigger, including release-checks.yml (mode: last), which previously used release.
  2. Switched check_fixtures back to VortexSession::empty() in deac68d so it matches generate.rs (and develop).

@lwwmanning lwwmanning left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Posted by Claude Opus 5.5 on Will's behalf.

A fresh review of deac68d found no bugs. Scheduled runs now check every version, and each failed fixture or version is recorded without stopping the run. The PR is larger than the fix for #10754 needs, though. It adds about 280 production lines and 400 test lines, and the fix needs about 60 production lines. Please remove these parts and the tests that exist only for them:

  1. The _BUILT_BINS cache and _profile_dir_name in compat.py, with the parametrized test_profile_dir_name_and_build_path. A second cargo build of an unchanged binary is cheap, and the test and bench entries are never used.
  2. The --profile option repeated on each subcommand with argparse.SUPPRESS, with test_cli_accepts_profile_before_or_after_subcommand. The workflow passes --profile before the subcommand, so the top-level option is enough.
  3. The extra checks in _run_rust_check for bad JSON, non-dict output, and a non-zero exit with an empty failed list, with test_run_rust_check_handles_malformed_or_nonzero_output. The binary always prints a JSON object, and check() exits non-zero only when failed is not empty.
  4. handles_mode_mismatches_across_all_files in check.rs. It tests mode logic that this PR does not change.

The Debug, PartialEq, Eq derives on Mode, CheckResult and FailedFixture also look unused. Keep the isinstance(manifest, dict) guard that the earlier review asked for, and the --profile ci change that the description now states.

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

Trimmed all four items and the unused Debug, PartialEq, Eq derives in aa9ae14 (keeping the isinstance(manifest, dict) guard and --profile ci), and removed the binary-caching mention from the PR description.

devin-ai-integration[bot]

This comment was marked as resolved.

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
@lwwmanning
lwwmanning enabled auto-merge (squash) November 25, 2026 20:11
@lwwmanning lwwmanning changed the title Run scheduled compat checks on all versions and collect all failures ci: Run scheduled compat checks on all versions and collect all failures Nov 25, 2026
@lwwmanning lwwmanning changed the title ci: Run scheduled compat checks on all versions and collect all failures ci: Run weekly compat checks on all versions and collect all failures Nov 25, 2026
@lwwmanning lwwmanning changed the title ci: Run weekly compat checks on all versions and collect all failures fix(ci): run weekly compat checks on all versions and collect all failures Nov 25, 2026
vortex-roborev-bot[bot]

This comment was marked as resolved.

…ceptions

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>

@lwwmanning lwwmanning left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Posted by Claude Opus 5.5 on Will's behalf.

I reviewed the commits from 7321b02 to 40e6c7f. They resolve the two points I still had on edition_reader.py:

  1. Each accepted entry now lists expected_causes, and _evaluate_edition_results reports a cause that no entry expects as an unexpected failure, and an expected cause that no longer appears as stale. An accepted fixture can no longer start failing for a new reason unnoticed.
  2. _run_isolated now catches BaseException in the child, always leaves through os._exit, and kills a child that runs past its timeout.

Building the expected Arrow IPC with build_expected() instead of reading back a file from HEAD's writer is also a good change: the oracle no longer depends on the writer under test. The file names still match, because fixture.name() is the manifest entry name for both adapters. The stale-file cleanup in write_fixtures now ignores manifest names that are not a plain .vortex file name, and the new test covers a ../ entry. No new findings.

@lwwmanning lwwmanning left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Posted by Claude Opus 5.5 on Will's behalf.

A fresh read of the whole PR at 40e6c7f, on top of the review above. The two test directions fit the spec's compatibility invariants: old files read by the current reader test invariant 3, and current files at edition E read by E's recorded minimum test invariant 6. These points remain:

  1. "Forward" and "backward" are swapped relative to the spec. DESIGN.md calls old writers to current reader the "Forward direction", but docs/specs/versioning.md and invariant 3 in design.md call that backward compatibility. I would name them "backward (current reader, old files)" and "forward (old reader, current files)".
  2. The new paragraph in design.md calls every core2025.* entry a wire-format incompatibility. Most are: FSST's 3 buffers, RunEnd with Utf8 values, the Bitpacked patch child, the narrow DecimalByteParts part, Pco format 4, Zstd's null handling and the Struct validity child. Others are bugs in the old reader's Arrow export: timezone-aware timestamps, i256 decimals, and sparse Utf8. Saying which is which would keep the spec accurate.
  3. Expected causes are matched per fixture, not per column. _probe_column_causes collects read errors into one set without the column name, so a TPC-H column that newly fails with "Expected 2 buffers, got 3" is accepted under the FSST cause that the fixture already lists. Prefixing each read error with its column, as the type and value mismatches already do, would close this.
  4. One failed fixture write stops the whole edition check. write_fixtures returns at the first fixture.write(...)? error, and _run_rust_generate runs with check=True, so the other editions get no report. The old-files check already records each failure and continues.
  5. The edition skip list is not checked. generate records the fixtures it skips because an edition lacks their encoding, but check-editions never compares that list with anything. If a fixture starts to need a new encoding, it drops out of the older editions without any signal.

On size, the PR adds about 2,860 lines. Two cuts would keep the same coverage: the reader_overrides support in compat.py handles a section that is now empty, and the allowlist takes 391 lines of JSON for 40 entries, which one line per entry would shrink. Also worth considering: TPC-H and ClickBench account for 18 of the 40 accepted entries, and their causes repeat those of the single-encoding fixtures. Leaving them out of check-editions would also cut most of the column probing time.

…terminology

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

Addressed in 580a6db0e:

  1. Renamed directions in vortex-test/compat-gen/DESIGN.md to Backward compatibility (current reader, old files) and Forward compatibility (old reader, current files) to match docs/specs/versioning.md.
  2. Split docs/specs/versioning/design.md's known-exception summary into writer-side wire-format incompatibilities (core2025.*) vs old-reader Arrow-export/canonicalization bugs (0.36.0, 0.42.0, 0.85.0).
  3. Prefixed per-column read errors with column <col>: ... in edition_reader.py and matched column <col>: <substring> against that exact column in compat.py so a newly failing column cannot match another column's accepted cause.
  4. Changed write_fixtures / generate in generate.rs to catch per-fixture write errors/panics into fixtures.json's failed array, and updated cmd_check_editions to run generate with check=False so remaining editions still report results.
  5. Added expected_skips to accepted-edition-failures.json and enforced it in _evaluate_edition_results (unexpected skips fail; resolved skips fail as stale).
  6. Removed dead reader_overrides support and compacted accepted-edition-failures.json to one line per entry (391 -> 51 lines). Kept TPC-H and ClickBench in check-editions because they are the only fixtures triggering the BitPacked patch incompatibility on core2025.05.0/core2025.06.0 and exercise real-world BtrBlocks compression on core2026.08.*.

@lwwmanning lwwmanning left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Posted by Claude Opus 5.5 on Will's behalf.

I reviewed 580a6db. The per-column cause matching in _cause_matches is what I asked for, and the test for a new failure on another column with the same message covers it. One problem and one nit:

  1. The 0.42.0 tpch_lineitem.compact.vortex entry pins a tokio task number. Its first expected cause is ArrowInvalid: External error: task 13 panicked with message .... The task number depends on scheduling, and _strip_error_wrapper removes only the ArrowInvalid: External error: prefix, so a run where another task panics first reports a different number and the check fails. Matching from panicked with message onward, or dropping the full-table cause since the per-column causes already cover every column, would make it stable.
  2. Nit: the two 0.85.0 map.vortex entries now expect only type mismatch in column sorted_attrs:, which accepts any type mismatch on that column. Adding the keys_sorted part of the message would keep the entry as narrow as its reason.

…nore Trafic typo

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

Fixed in f86a844b6:

  1. Updated _verify_file in edition_reader.py to treat a full-table cause as explained when any per-column core error is a substring of it (e.g. the tokio task N panicked wrapper around the Pco error), and removed the task-number cause from tpch_lineitem.compact.vortex.
  2. Narrowed the two 0.85.0 map.vortex expected_causes entries to the full keys_sorted field mismatch string.
  3. Added "Trafic" (ClickBench's TraficSourceID column) to [default].extend-ignore-identifiers-re in _typos.toml so Spell Check with Typos passes.

devin-ai-integration[bot]

This comment was marked as resolved.

…eneration-failure invariant

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
vortex-roborev-bot[bot]

This comment was marked as resolved.

…tions

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
devin-ai-integration[bot]

This comment was marked as resolved.

…IPC is missing

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>

@lwwmanning lwwmanning left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Posted by Claude Opus 5.5 on Will's behalf.

I reviewed 6c58662. The atomic write of the expected IPC looks right, but the new guard in _evaluate_edition_results never matches a real reader result.

compat.py checks for causes that start with missing expected Arrow IPC:. The cause that edition_reader.py reports when the expected file is absent is expected Arrow IPC missing: {exp_path.name}. No code emits the string that the guard checks for. The new test passes because the stub returns the guard's string, not the reader's.

In a real run, an accepted fixture whose expected IPC is missing therefore still falls through to the cause matching. The run reports it as an unexpected failure and also reports every one of its expected_causes as stale. This is the result the commit means to prevent. Please match the reader's string, or better, share one constant between edition_reader.py and compat.py. Please also make the test stub use that string.

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

Good catch — fixed in e529a6e84: defined MISSING_EXPECTED_IPC_PREFIX = "expected Arrow IPC missing: " in both edition_reader.py and compat.py (since compat.py runs outside the vortex/pyarrow venv), asserted equality between the two constants in test_compat.py, and updated the test stub to use edition_reader.MISSING_EXPECTED_IPC_PREFIX.

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
devin-ai-integration[bot]

This comment was marked as resolved.

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>

@robert3005 robert3005 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

let's try this. I think this is reasonable. We can always go and fix up old versions if necessary

@lwwmanning
lwwmanning merged commit 2db55f0 into develop Nov 29, 2026
94 of 96 checks passed
@lwwmanning
lwwmanning deleted the wm/agy-compat-check-all branch November 29, 2026 09:24

This branch was successfully deployed

1 active deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compat-gen skips old fixture versions in CI and stops at the first failure

2 participants