Skip to content

Cell checks share topology and catalog helpers - #906

Draft
zlareb1 wants to merge 1 commit into
feat/cell-updatefrom
feat/cell-shared-census-infrastructure
Draft

zlareb1 wants to merge 1 commit into
feat/cell-updatefrom
feat/cell-shared-census-infrastructure

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 18, 2026

Copy link
Copy Markdown
Member

Related: #776

Changelog category (leave one):

  • 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):

Cell checks share the same topology, catalog and synchronization helpers across command and server code.

Why

Complete cell reads depend on topology validation, the caller's effective privileges, replica identity and synchronization. These implementations live in CLI modules, which server code cannot import. Shared owners let both layers use the same checks without copying them.

Scope and risk

The complete topology module moves to server/core/cell_ch.py. Catalog, grant, default-role, row-policy and replica checks move to server/insights/store/cell_catalog.py; synchronization and budget helpers move to server/core/cell_sync.py. All callers and test patch points use those owners, and the old topology module is deleted.

SQL, query settings and tags, defaults, refusal conditions, exception identity, row interpretation and ordinary update behavior remain unchanged. A missed caller import or patch point is the main risk. Bounded participant and observation joins remain unimplemented; this extraction adds no later-cell activation or readiness result.

Compatibility, rollout and rollback

  • Wire and defaults: unchanged; no operations, arguments, settings, tables or stored encodings are added.
  • Operator steps: none.
  • Rollback: reverting restores the former internal owners and callers; there is no stored data transition.
  • The English architecture page names the shared topology owner. Existing translated code references await the normal translation workflow; translated files are unchanged.

Tests

  • Static comparison preserves all 37 moved definitions and all 576 assertions. Other affected functions differ only in owner references and imports. The module graph has no cycles through the shared owners and satisfies the existing package contracts.
  • Sixteen directly related selectors pass as 34 parameterized pure cases in 1.283 seconds. They cover complete replica union, incomplete topology and synchronization refusal, effective and default-role privileges, caller identity, row policies, extra replicas, streaming failures and original budget behavior. Source and dependency hashes match before and after execution; the owned supervisor terminates and is reaped.
  • Scoped lint, format and diff checks pass. The first check attempt lacks its complete source-preverification snapshot and is preserved as invalid, despite its passing test output; only the corrected attempt above counts.
  • No behavior change requires a manufactured failing baseline. Native database, mixed-version and full suites remain required in GitHub CI before merge. This draft is stacked on the configuration and placement foundation.

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

  • AI-generated: Codex. Independent review covers the complete extraction, import bindings, SQL and assertion preservation; final pushed-head review remains required.

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

Checklist

  • Small related local checks and scoped static checks pass; broad suites belong to CI.
  • Required final-head GitHub CI and fresh whole-source review pass.
  • Documentation names the current shared owner; generated translations are unchanged.
  • No migration or stored data change is introduced.
  • Commits are signed off.

Move complete topology, catalog and synchronization implementations below CLI owners so server readers can reuse the same checks. Preserve SQL, refusal behavior and assertion contracts.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>

This branch has not been deployed

No deployments
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