Skip to content

DEV-2231: 2.0 line opener — remove everything tagged for removal in 2.0, version 2.0.0.dev0 - #569

Open
ZmeiGorynych wants to merge 4 commits into
mainfrom
egor/dev-2231-20-line-opener-remove-everything-tagged-for
Open

ZmeiGorynych wants to merge 4 commits into
mainfrom
egor/dev-2231-20-line-opener-remove-everything-tagged-for

Conversation

@ZmeiGorynych

Copy link
Copy Markdown
Member

This is the first PR on the 2.0 line. It sets the package version to 2.0.0.dev0 and removes everything that was deprecated with removal="2.0". The two must land together: the removal tripwire (tests/test_law_removal_tripwire.py) compares major versions only, so once the version is 2.x it fails for every remaining 2.0-tagged site.

What is removed

Removed Use instead
ingest_datasource(ds), ingest_datasource_report(ds), ingest_datasource_idempotent(...) without client= pass client=engine.client_for(ds), or use engine.ingest / ingest_sync / ingest_idempotent
validate_datasource(...) without client=, or with sql_clients= validate_datasource(..., client=...)
DbtToSlayerConverter / OsiToSlayerConverter with sa_engine (where convert() read the database itself) await converter.collect_metadata(client=...), then convert(); every parameter after data_source is keyword-only
0.9.x StorageBackend subclasses that override save_datasource or return a plain list from _list_memories_rows implement _save_datasource_impl; return (memories, failed_rows)
the --models-dir CLI flag and the SLAYER_MODELS_DIR variable (the variable is now silently ignored) --storage / SLAYER_STORAGE
the MCP inspect_model tool inspect with entity_type="model"
MemoryNotFoundError.identifier memory_id
get_column_types_sync, the get_column_types methods, the 1.6.0 client adapter and the dialects' category tables get_result_column_types
running EXPLAIN through execute for a client that has no explain; SqlDialect.build_explain_sql() a client implements explain(statements); explain_statements()
psycopg2 / asyncpg in [postgres] and aiomysql in [mysql] install them directly; each extra now ships only its default driver

Before and after:

# 1.x: still worked, with a FutureWarning
models = ingest_datasource(ds)

# 2.0
models = ingest_datasource(ds, client=engine.client_for(ds))   # or: engine.ingest_sync(ds)
# MCP, 1.x (deprecated tool)
inspect_model(model_name="orders", num_rows=5)
# 2.0
inspect(reference="orders", entity_type="model", compact=False, num_rows=5)

Code that only existed to support these forms is gone as well, for example the per-call fallback engines, marked_coroutine_function, run_over_caller_engine, WarningLocation, and render_model_inspection's compact path. ingest_datasource_idempotent and validate_datasource are now plain async def functions.

What is not removed

  • Stored-data upgrade paths stay: versioned migrations, the __ alias rewrite, layout upgrades and type refinement.
  • SlayerSQLClient(sa_engine=) stays. An engine the caller supplies keeps running its blocking work on the caller's thread during synchronous calls. The plan originally removed that too. A probe showed that running it inline breaks in-memory and check_same_thread SQLite engines, so the plan now keeps it, with restored bridge tests, an in-memory regression test and a spec requirement.
  • The tripwire keeps its mechanism. It now pins only the moved module paths (removal="3.0"), ready for the forms 2.0 deprecates next.

Docs and tests

  • Getting-started, configuration (sql-clients, datasources, storage) and the MCP reference no longer mention the removed forms. The full model view is now documented under inspect, and the two affected notebooks were re-executed.
  • Tests whose subject was a removed form are deleted. Tests that used one only incidentally now use the current form, with the same assertions.
  • tests/test_removed_2_0_forms.py checks that the removed forms are gone or refused, that the factory's client is used unadapted, and that the version is 2.0.0.dev0.

The migration notes for the 2.0 guide are a comment on DEV-2220. The full spec is in openspec/changes/dev-2231-20-line-opener-remove-everything-tagged-for/.

Closes DEV-2231

…main

Plan: deltas follow DEV-2182's database/ capabilities; the DEV-2234 explain
adapter and build_explain_sql join the removals; the tripwire keeps the
moved-path 3.0 markers; render_model_inspection's compact path is dead code.

Tests: new removed-form, client-requirement, 0.9.x-backend, extras and
tripwire tests (failing until the removals); tests of removed forms deleted;
incidental users ported to the client-taking forms, inspect and typed probes.
…dev0

Removes the 1.5.0 no-client ingestion/drift forms, the converters'
sa_engine, the 0.9.x storage adapters, --models-dir and SLAYER_MODELS_DIR,
the inspect_model MCP tool, MemoryNotFoundError.identifier, the 1.5.0/1.6.0
category probes and tables, the pre-explain client adapter and
build_explain_sql, and the bundled non-default drivers from the extras.

Plan: a caller-owned engine keeps serving synchronous calls on the
caller's thread (decisions 4/13); the caller-thread bridge tests are
restored over run_sync, plus an in-memory regression test.
@linear

linear Bot commented Nov 9, 2026

Copy link
Copy Markdown

DEV-2231

@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 152 files, which is 2 over the limit of 150.

To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to Team to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a2a9906 and 9af8f77.

Files ignored due to path filters: 1

  • poetry.lock is excluded by !**/*.lock
Files selected for processing: 152

  • docs/api_gaps.md
  • docs/configuration/datasources.md
  • docs/configuration/sql-clients.md
  • docs/configuration/storage.md
  • docs/examples/03_auto_ingest/auto_ingest.md
  • docs/examples/08_mcp_introspect/mcp_introspect_nb.ipynb
  • docs/examples/13_osi_import/osi_import_agent_nb.ipynb
  • docs/getting-started/python.md
  • docs/reference/mcp.md
  • openspec/changes/dev-2231-20-line-opener-remove-everything-tagged-for/.openspec.yaml
  • openspec/changes/dev-2231-20-line-opener-remove-everything-tagged-for/design.md
  • openspec/changes/dev-2231-20-line-opener-remove-everything-tagged-for/proposal.md
  • openspec/changes/dev-2231-20-line-opener-remove-everything-tagged-for/specs/compatibility/legacy-call-forms/spec.md
  • openspec/changes/dev-2231-20-line-opener-remove-everything-tagged-for/specs/compatibility/removal-tripwire/spec.md
  • openspec/changes/dev-2231-20-line-opener-remove-everything-tagged-for/specs/database/client-contract/spec.md
  • openspec/changes/dev-2231-20-line-opener-remove-everything-tagged-for/specs/database/execution/spec.md
  • openspec/changes/dev-2231-20-line-opener-remove-everything-tagged-for/specs/models/column-granularity/spec.md
  • openspec/changes/dev-2231-20-line-opener-remove-everything-tagged-for/specs/models/list-columns/spec.md
  • openspec/changes/dev-2231-20-line-opener-remove-everything-tagged-for/specs/models/sample-profiling/spec.md
  • openspec/changes/dev-2231-20-line-opener-remove-everything-tagged-for/specs/queries/time-spine/spec.md
  • openspec/changes/dev-2231-20-line-opener-remove-everything-tagged-for/specs/storage/custom-backends/spec.md
  • openspec/changes/dev-2231-20-line-opener-remove-everything-tagged-for/tasks.md
  • pyproject.toml
  • slayer/async_utils.py
  • slayer/cli.py
  • slayer/core/deprecation.py
  • slayer/core/errors.py
  • slayer/database/client.py
  • slayer/dbt/converter.py
  • slayer/engine/query_engine.py
  • slayer/inspect/__init__.py
  • slayer/inspect/model_render.py
  • slayer/inspect/service.py
  • slayer/live_schema/ingestion.py
  • slayer/live_schema/schema_drift.py
  • slayer/mcp/server.py
  • slayer/osi/converter.py
  • slayer/sql/dialects/base.py
  • slayer/sql/dialects/duckdb.py
  • slayer/sql/dialects/mysql.py
  • slayer/sql/dialects/postgres.py
  • slayer/sql/dialects/snowflake.py
  • slayer/sql/dialects/sqlite.py
  • slayer/sql/dialects/tsql.py
  • slayer/storage/base.py
  • slayer/storage/legacy_backends.py
  • slayer/usage_reporting/payload.py
  • tests/_compat_helpers.py
  • tests/_dev2171_fixtures.py
  • tests/_dev2172_fixtures.py
  • tests/_osi_export_helpers.py
  • tests/_sql_mode_retype_fixtures.py
  • tests/conftest.py
  • tests/dialects/test_bigquery.py
  • tests/dialects/test_explain_statements.py
  • tests/dialects/test_tsql.py
  • tests/flight/capture_dbt_jdbc.py
  • tests/integration/_demo_build.py
  • tests/integration/test_demo_cli.py
  • tests/integration/test_dev1933_postgres_verbatim.py
  • tests/integration/test_dev2120_postgres.py
  • tests/integration/test_dev2137_postgres.py
  • tests/integration/test_dev2172_postgres.py
  • tests/integration/test_integration_bigquery.py
  • tests/integration/test_integration_clickhouse.py
  • tests/integration/test_integration_mysql.py
  • tests/integration/test_integration_rls.py
  • tests/integration/test_integration_snowflake.py
  • tests/integration/test_integration_trino.py
  • tests/integration/test_mcp_inspect.py
  • tests/integration/test_postgres_statement_timeout.py
  • tests/test_async_utils_bridge.py
  • tests/test_cli.py
  • tests/test_cli_engine_bridge_postgres.py
  • tests/test_cli_import_osi.py
  • tests/test_cli_validate_models_cardinality.py
  • tests/test_clickhouse_statement_timeout.py
  • tests/test_compat_deprecated_surfaces.py
  • tests/test_compat_legacy_call_forms.py
  • tests/test_connection_policy.py
  • tests/test_cube_cli.py
  • tests/test_cube_js_e2e_duckdb.py
  • tests/test_dbt_converter.py
  • tests/test_dbt_relation_quoting.py
  • tests/test_demo_cli.py
  • tests/test_dev1745_warning_contract.py
  • tests/test_dev1836_validation_pressure.py
  • tests/test_dev1853_inspect.py
  • tests/test_dev1929_column_granularity.py
  • tests/test_dev1966_query_backed_cycles.py
  • tests/test_dev1967_identifier_columns.py
  • tests/test_dev2015_surfaces.py
  • tests/test_dev2073_surfaces.py
  • tests/test_dev2120_json.py
  • tests/test_dev2137_list_columns.py
  • tests/test_dev2171_cube_import.py
  • tests/test_dev2171_dbt_import.py
  • tests/test_dev2189_rls_parity.py
  • tests/test_dialect_driver_facts.py
  • tests/test_docs_dev_1560.py
  • tests/test_document_isolation.py
  • tests/test_drift_list_retype.py
  • tests/test_entry_points_namespacing.py
  • tests/test_importer_identifier_fold.py
  • tests/test_importer_source_names.py
  • tests/test_ingest_cli_ux.py
  • tests/test_ingest_internal_tables.py
  • tests/test_ingested_table_names.py
  • tests/test_inspect_model_compact.py
  • tests/test_inspect_saved_queries.py
  • tests/test_inspect_surfaces.py
  • tests/test_join_cardinality_surfacing.py
  • tests/test_law_database_door.py
  • tests/test_law_no_emitted_reparse.py
  • tests/test_law_one_request_per_statement.py
  • tests/test_law_removal_tripwire.py
  • tests/test_legacy_category_parity.py
  • tests/test_legacy_client_type_probe.py
  • tests/test_list_retype_dependents.py
  • tests/test_list_set_equality.py
  • tests/test_mcp_always_load.py
  • tests/test_mcp_server.py
  • tests/test_memories_cli.py
  • tests/test_memories_inspect.py
  • tests/test_missing_driver.py
  • tests/test_mode_a_optional_blocks_engine.py
  • tests/test_mode_a_variable_substitution.py
  • tests/test_mode_b_variables_exec.py
  • tests/test_one_driver_per_client.py
  • tests/test_osi_converter.py
  • tests/test_postgres_named_drivers.py
  • tests/test_projection_trim.py
  • tests/test_query_backed_models.py
  • tests/test_query_backed_typed_expansion.py
  • tests/test_recommend_root_model_surfaces.py
  • tests/test_removed_2_0_forms.py
  • tests/test_result_column_types.py
  • tests/test_retype_finding.py
  • tests/test_save_memory_description_plumbing.py
  • tests/test_search_compact_plumbing.py
  • tests/test_search_writeback.py
  • tests/test_sql_client_event_loops.py
  • tests/test_sql_client_explain_forwarding.py
  • tests/test_startup_ingest.py
  • tests/test_statement_timeout_client.py
  • tests/test_statement_timeout_postgres_session.py
  • tests/test_storage_backend_compat.py
  • tests/test_storage_type_refinement.py
  • tests/test_table_names.py
  • tests/test_type_probe.py
  • tests/test_usage_reporting_counting.py
  • tests/test_usage_reporting_payload.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

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