Skip to content

The dataset delete tests wait for the catalog's delete too and count it under FINAL - #369

Merged
zlareb1 merged 1 commit into
mainfrom
fix/dataset-delete-test-waits
Nov 7, 2026
Merged

zlareb1 merged 1 commit into
mainfrom
fix/dataset-delete-test-waits

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 7, 2026

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

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

knowledge.delete and knowledge.bulk_delete reach datasets.forget_published, which issues two lightweight deletes, one on loom.dataset_rows and one on loom.datasets, neither awaited (lightweight_deletes_sync = 0). Two tests in tests/integration/test_knowledge_ingest_live.py polled only loom.dataset_rows and then read the catalog once, so a catalog mutation still queued behind the rows one failed the test although the code was right. The metadata-edit test beside them already waits for both.

  • test_a_csv_table_is_a_typed_dataset_a_writer_approves_and_a_delete_removes and test_a_bulk_delete_removes_each_sources_datasets_at_its_own_version now poll both tables until both deletes have run (for the bulk delete: b.csv's catalog gone and a.csv's down to the running ingest's one row).
  • _catalog_rows counts loom.datasets FINAL (a ReplacingMergeTree), so a second version of one catalog key is not counted twice.

Scope and risk

One integration test file. No server code.

Compatibility, rollout and rollback

  • None.

Tests

  • tests/integration/test_knowledge_ingest_live.py against a server from this branch, its own ClickHouse and the reference extractor: 12 passed, none skipped.

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.

  • 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, and this description names any operator steps and wire changes.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers.
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

🤖 Generated with Claude Code

…it under FINAL

knowledge.delete and knowledge.bulk_delete delete loom.dataset_rows and
loom.datasets in two lightweight deletes, neither awaited. Two tests
polled only the rows table and then read the catalog once, so a catalog
mutation still queued made them fail although the code was right. They
now poll both tables until both deletes have run, as the metadata-edit
test beside them does, and _catalog_rows counts loom.datasets FINAL, so a
second version of one catalog key is not counted twice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 merged commit 8ec82ef into main Nov 7, 2026
34 checks passed
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