Skip to content

test(compat): cover list_entity_labels() — close Wave 6 #40 follow-up#1750

Merged
earayu merged 1 commit into
mainfrom
feat/coverage-lineage-list-labels
Apr 27, 2026
Merged

test(compat): cover list_entity_labels() — close Wave 6 #40 follow-up#1750
earayu merged 1 commit into
mainfrom
feat/coverage-lineage-list-labels

Conversation

@earayu

@earayu earayu commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to PR #1748 (LineageGraphStore matrix), which intentionally deferred coverage of list_entity_labels() because that method landed concurrently in PR #1746 (Wave 6 #40 narrow replacement). With #1746 merged, this PR closes the deferred slot.

What's added

Three tests in tests/integration/compat/test_lineage_graph_compat.py, parametrized over postgresql / neo4j / nebula backends:

  • test_list_entity_labels_returns_distinct_sorted — locks the Wave 6 [Features] support english model openchat #40 contract: sorted distinct EntityRecord.entity_type values; collection-scoped per-instance store, no collection_id parameter at this layer.
  • test_list_entity_labels_empty_collection_returns_empty — pins the Protocol docstring invariant (lines 594-596): empty collection returns [] (not a fall-back to legacy graphindex).
  • test_list_entity_labels_excludes_orphan_after_gc — exercises the read path against a real backend GC interaction. The InMemory reference impl can't catch SQL/Cypher/nGQL-specific DISTINCT-after-DELETE issues; this test does.

Coverage matrix (post-merge)

All 12 methods of LineageGraphStore Protocol now have parametrized matrix coverage in test_lineage_graph_compat.py × 3 production backends (Postgres / Neo4j / Nebula).

Test plan

  • File collects 19 tests (16 existing + 3 new); all skip cleanly without backend env vars
  • CI green on graph-compat × 3 backend matrix
  • CI green on rest of compat-test suite

Context

Closes the last open item under #测试 task #25 ("DB compatibility coverage audit"). Subsequent follow-ups (Gap-D — re-enable run_graph_index_flow.sh) tracked under #indexing task #42, parked until Wave 7+ legacy graphindex package deletion ships.

🤖 Generated with Claude Code

PR #1748 (LineageGraphStore matrix) intentionally deferred coverage
of ``list_entity_labels()`` because that method landed concurrently
with PR #1746 (Wave 6 #40 narrow replacement). Now that #1746 is
merged, this PR closes the deferred slot — same pattern as the other
12 methods, parametrized over postgresql / neo4j / nebula backends.

Three tests:

- ``test_list_entity_labels_returns_distinct_sorted`` — locks the
  Wave 6 #40 contract (sorted distinct ``EntityRecord.entity_type``
  values; collection-scoped per-instance store, no ``collection_id``
  parameter at this layer).
- ``test_list_entity_labels_empty_collection_returns_empty`` — pins
  the docstring invariant (line 594-596): empty collection returns
  ``[]``, not a fall-back to legacy graphindex.
- ``test_list_entity_labels_excludes_orphan_after_gc`` — exercises
  the read path against a real backend GC interaction. The InMemory
  reference impl can't catch SQL/Cypher/nGQL-specific
  DISTINCT-after-DELETE issues; this test does.

Closes the last open item under #测试 task #25 ("coverage audit").
@earayu earayu merged commit 3e63897 into main Apr 27, 2026
15 checks passed
@earayu earayu deleted the feat/coverage-lineage-list-labels branch April 27, 2026 16:47
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