Skip to content

[P1] Document-manager associations: run Postgres acceptance leg in CI #1682

Description

@stranske

Why (verified evidence)

Post-merge verification (D4-verify-merged-2026-09-16T02) of #1678 (merge 25e497f834e10333b7f7f830bbe8c57c3ea7b974) against #1669 found junction-table logic and SQLite tests landed, but Postgres acceptance is opt-in only.

  • Migration alembic/versions/022_document_managers.py, embeddings.py association inserts, and SQLite tests are present in squash diff.
  • tests/test_document_managers_migration.py Postgres leg uses pytest.skip unless DOCUMENT_TEST_POSTGRES_URL is set — issue Preserve manager associations when document content is deduplicated #1669 acceptance requires disposable Postgres verification in CI, not skip-by-default.

Scope

Wire the existing Postgres service in .github/workflows/ci.yml to run document-manager association tests without manual env setup.

Tasks

  • In .github/workflows/ci.yml, extend the postgres-integration job to export DOCUMENT_TEST_POSTGRES_URL from the existing MGRDB_PG_TEST_URL service and run pytest tests/test_document_managers_migration.py -k document_association -v.
  • In tests/test_embeddings.py::test_shared_document_preserves_each_manager, ensure the shared-document regression still passes on SQLite and is included in the Gate pytest selection alongside tests/test_document_managers_migration.py.

Acceptance Criteria

  • Named test: pytest tests/test_document_managers_migration.py -k document_association passes on Gate with Postgres available (no skip of postgres leg).
  • Deliberate-break → revert: disable document_managers insert in embeddings.py → shared-document test FAILS on Postgres → restore → passes.

Non-Goals

Surfaced by D4-verify-merged-2026-09-16T02; verified against squash diff Manager-Database-1678.diff and issue #1669. Related: #1669, merged PR #1678.

Activity

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

    agents:formattedIssue has been formatted to AGENT_ISSUE_TEMPLATE

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions