Skip to content

Commit 29e016e

Browse files
committed
docs: align endpoint-test docstring + module-doc reference (#105 PR 2a)
Two comment-only cleanups; no behavior change. (1) tests/test_binding_validation.py:431 — TestEndpointTypeMismatch:: test_edge_endpoint_type_does_not_match_referenced_entity_key docstring previously said two ENDPOINT_TYPE_MISMATCH entries are expected. The implementation suppresses the physical (2) check in edge-only-drift cases as of commit 2342165, so only one entry is expected now. Docstring updated to match, with a pointer to TestEndpointPhysicalCrossTableCheck for the node-drifted case where (2) genuinely adds information. (2) src/bigquery_agent_analytics/binding_validation.py:23 — module docstring referenced bigquery_agent_analytics.graph_validation .validate_extracted_graph as if it existed. That symbol lands with issue #76 and is not on this PR. Reworded to plain text: 'Different from the planned extracted-graph validator in issue #76', with an explicit warning that no graph_validation module exists yet so callers do not try to import it. 25/25 unit tests pass.
1 parent 2342165 commit 29e016e

2 files changed

Lines changed: 14 additions & 10 deletions

File tree

src/bigquery_agent_analytics/binding_validation.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
most common authoring error (binding YAML drifted out of sync with
2121
physical tables) before extraction wastes ``AI.GENERATE`` tokens.
2222
23-
Different from :func:`bigquery_agent_analytics.graph_validation.
24-
validate_extracted_graph` (issue #76): that one validates extracted
25-
graph output against the spec. This one validates the binding against
26-
the live BigQuery schemas.
23+
Different from the planned extracted-graph validator in issue #76:
24+
that one will validate extracted graph output against the spec
25+
(post-extraction, pre-materialization). This one validates the
26+
binding against the live BigQuery schemas (pre-extraction). #76 has
27+
not landed yet, so do not import any symbol from a
28+
``graph_validation`` module — it does not exist on this PR.
2729
2830
Usage::
2931

tests/test_binding_validation.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -429,12 +429,14 @@ def test_edge_endpoint_type_does_not_match_referenced_entity_key(
429429
self,
430430
):
431431
"""Edge endpoint type disagrees with the referenced node's
432-
ontology key type. Two ENDPOINT_TYPE_MISMATCH entries are
433-
expected — one from the spec-level (1) check (edge BQ type vs
434-
ontology-derived expected SDK type) and one from the physical
435-
cross-table (2) check (edge BQ type vs node table's actual key
436-
BQ type). Both are correct and complementary; users see both
437-
descriptions and can act on either."""
432+
ontology key type, but the node table itself is on-spec. One
433+
ENDPOINT_TYPE_MISMATCH entry is expected — the spec-level (1)
434+
check (edge BQ type vs ontology-derived expected SDK type).
435+
The physical cross-table (2) check is suppressed because
436+
emitting it would double-report the same expected/observed pair
437+
with different detail wording. The node-drifted case where (2)
438+
adds genuinely new information is covered by
439+
TestEndpointPhysicalCrossTableCheck."""
438440
from bigquery_agent_analytics.binding_validation import FailureCode
439441
from bigquery_agent_analytics.binding_validation import validate_binding_against_bigquery
440442

0 commit comments

Comments
 (0)