Skip to content

bug: Code publication tests omit the required SeekDB database argument #2325

Closed

Description

@hireview001

Describe the bug

Three Code publication regression tests instantiate SeekDBGraphStore without its required keyword-only database argument. Test construction raises TypeError before the publication/reclamation behavior can be checked.

This report concerns repository tests and CI coverage. It does not establish a production Code publication or data-loss defect.

Steps to reproduce

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

uv run --frozen python -m pytest -q \
  tests/builtin/test_code_publication.py::test_a_commit_can_be_recalled_before_its_tables_exist \
  tests/builtin/test_code_publication.py::test_a_recorded_identifier_is_validated_before_any_table_is_touched \
  tests/builtin/test_code_publication.py::test_the_node_and_edge_deletes_are_scoped_to_the_binding

No external database or model provider is needed for these fixture-based tests.

Expected behavior

The tests construct a store with the intended database identity and reach their publication, identifier-validation and binding-scoped deletion assertions.

Actual behavior

All three fail with:

TypeError: SeekDBGraphStore.__init__() missing 1 required keyword-only argument: 'database'

src/powercontext/builtin/code/seekdb.py requires database in the constructor, while the affected tests still use the earlier signature. The constructor distinguishes legacy test database identities from other selected database identities, so the fixture should choose its intended database explicitly.

A clean independent checkout, without the regression platform's selection plugin, reproduced all three failures in retained JUnit evidence. Searches covered open and closed issues and PRs. PR #2244 and integration PRs #2317, #2318 and #2322 acknowledge these baseline failures but do not fix the affected constructor calls. The required constructor argument and these test calls 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/code-publication-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