Skip to content

tests/analyzer/shapes.txt holds the datasets' erasure and count statements - #296

Merged
zlareb1 merged 1 commit into
mainfrom
tests/analyzer-shapes-current
Nov 6, 2026
Merged

zlareb1 merged 1 commit into
mainfrom
tests/analyzer-shapes-current

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

...

Why

tests/analyzer/test_corpus.py::test_shapes_file_matches_builders fails on main: "statement shapes changed: 19 new, 1 gone". In the integration job the analyzer corpus runs after the main pass. That pass was already failing on main when the datasets landed (#266), so the corpus step was skipped and their shapes went unseen. It showed up when #290 made the corpus run whatever the gates before it did (run 42237393836, the isolation gates part).

18 of the new shapes are the datasets' erasure statements over loom.datasets and loom.dataset_rows: the census's predicate counts, and the ingestion steps' (delete_ingestions_by_namespace, delete_ingestions_by_user) counts and ALTER TABLE … DELETE by namespace, namespace list and user (#266 added both tables to _INGESTION_TABLES in server/erasure/store/steps_memory.py). The 19th replaces the gone shape: schemas/schema.sql, which the corpus reads as one statement, gained the two dataset tables, so its shape b9a1ccde64c2 became 7d94999c51b8.

The same run's test_every_shape_passes_the_analyzer passed: the 18 dataset statements went through EXPLAIN QUERY TREE on the migrated service, the deletes as their predicate over the same table. The schema shape is DDL, which the corpus lists as unchecked. This PR only records the shapes.

Scope and risk

One generated file. No code changes.

Compatibility, rollout and rollback

  • Wire: none.
  • Operator steps: none.
  • Rollback: revert; the corpus check fails again.

Tests

python -m tests.analyzer.corpus --write   # wrote 2073 shapes

The diff is the 19 additions and 1 removal that run 42237393836's failure lists, hash for hash.

pytest tests/analyzer/test_corpus.py -k shapes_file   # 2 passed: the file matches the builders and is in written form

These two need no ClickHouse. This PR's own integration job runs the corpus only after the main pass, which fails on main today, so it will likely skip the corpus again; #290 changes that order.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): Claude Code. The author read each new shape against the datasets' erasure statements.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • make format-check, make lint, make typecheck and make test-unit pass; the integration suite passes if server behaviour changed.
  • Generated files are regenerated in this PR, not by hand.
  • A new migration is additive and numbered after the latest on main; no merged migration is edited.
  • A behaviour change to any file a plugin ships bumps both plugin manifests' version.
  • The frontend builds and its tests pass, if frontend/ changed.
  • Docs under docs/ describe the system as it now is.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers.
  • Commits are signed off (git commit -s).

🤖 Generated with Claude Code

…ments

The analyzer corpus runs after the main integration pass, which has failed on main since the datasets landed, so the shapes file was never checked against them. Regenerated with python -m tests.analyzer.corpus --write.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 merged commit 193ad0c into main Nov 6, 2026
18 of 20 checks passed
@zlareb1
zlareb1 deleted the tests/analyzer-shapes-current branch November 6, 2026 15:42
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