Skip to content

bug: vector admission tests use an outdated migration runner mock #2324

Closed

Description

@hireview001

Describe the bug

Three repository regression tests fail because the managed fixture's mocked connection runner does not accept the allow_missing_database keyword now passed by MySQL-compatible migration inspection. They fail before reaching their intended vector-admission assertions.

This is a test-fixture regression. This reproduction does not demonstrate a production migration or vector-storage failure.

Steps to reproduce

Check out commit 0c1dfc289b28e9f529555fb57bf771ce51103913 and install its locked test dependencies with uv sync --frozen --all-extras --group dev. Then run:

uv run --frozen python -m pytest -q \
  'tests/builtin/persistence/test_mysql_vector_admission.py::test_vector_configuration_drift_is_distinct_from_changed_migration_resources[profile]' \
  'tests/builtin/persistence/test_mysql_vector_admission.py::test_vector_configuration_drift_is_distinct_from_changed_migration_resources[resource]' \
  tests/builtin/persistence/test_mysql_vector_admission.py::test_vector_recovery_allows_declaration_table_before_domain_seed

These tests use their own fixtures; no external database or model provider is required.

Expected behavior

The fixture supports the connection-runner contract, allowing the three tests to exercise their intended configuration-drift and recovery assertions.

Actual behavior

Each test independently records the same error:

TypeError: managed.<locals>.run() got an unexpected keyword argument 'allow_missing_database'

The fixture defines run(operation, *, writable=False), while src/powercontext/builtin/persistence/migrations/mysql.py calls connections.run(inspect, allow_missing_database=True).

A clean independent checkout, without the regression platform's selection plugin, reproduced all three failures in retained JUnit evidence. Open and closed issues and PRs were searched. Related integration PRs #2317, #2318 and #2322 describe these as unchanged baseline failures rather than fixing this fixture. The relevant mock signature and migration call also remain present in master 176b3f9234f280aab9839d01dfa25ce20c029de1; the executed reproduction above is pinned to the earlier tested commit.

Environment

  • PowerContext commit: 0c1dfc289b28e9f529555fb57bf771ce51103913
  • Python: 3.12.13
  • OS: Linux
  • Dependencies: the tested commit's frozen project environment

Are you willing to submit a PR to fix this bug?

No PR is included.

Regression-proof: ca399b0f-bf82-41c3-ae54-98dd9f377e98/4b30973a12eab1dbcb69/mysql-vector-admission-fixture

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions