From 7b41868db5c5646dfc4c083346a9a6c15041c0f7 Mon Sep 17 00:00:00 2001 From: Tyler Eastman Date: Mon, 21 Sep 2026 18:10:25 -0700 Subject: [PATCH] chore: remove internal ticket IDs from published source and test docstrings AGENTS.md is explicit that this repo is public and that internal ticket references belong in commit subjects and PR metadata only -- never in CHANGELOG.md, README.md, USAGE.md, docs/, docstrings, or any other published surface. Seven references had accumulated anyway, one of them in shipped package source: src/youdotcom/sdk.py DX-776 tests/test_attribution.py DX-777 tests/test_live.py DX-777 tests/test_page_age.py DX-815 tests/test_performance.py DX-719 tests/test_researchtaskstreamevent.py DX-778 (x2) Only the identifiers are removed. Every sentence keeps the rationale it was carrying -- why the import stays lazy, why the SDK must not emit X-MCP-Attribution, why the extraction perf cases parallel the livecrawl ones, why the SSE decode path needs its own pin -- so nothing useful is lost and an outside reader no longer meets a reference they cannot resolve. Verified comments-and-docstrings-only: with docstrings stripped, the AST of all six files is byte-identical to origin/main, so there is no behavior change to test. Gates still green (401 offline tests, mypy clean over 82 files, pylint 10.00/10 on the CI errors-only gate). Note: `scripts/check_drift.py` reports drift on this base, because the published web-search spec now carries a `knowledge` param that main's SDK does not accept yet. That is pre-existing on pristine origin/main and is what the open knowledge PR resolves; it is unrelated to this change. --- src/youdotcom/sdk.py | 2 +- tests/test_attribution.py | 2 +- tests/test_live.py | 2 +- tests/test_page_age.py | 2 +- tests/test_performance.py | 2 +- tests/test_researchtaskstreamevent.py | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/youdotcom/sdk.py b/src/youdotcom/sdk.py index 585b673..eebd0d4 100644 --- a/src/youdotcom/sdk.py +++ b/src/youdotcom/sdk.py @@ -122,7 +122,7 @@ def _build_search_request( if strip_crawl_timeout and crawl_timeout is not None: # Resolved inside the branch so the common path never forces # ``models.SearchRequestBody`` to load (the lazy package root is what - # keeps ``import youdotcom`` transport-free -- see DX-776). + # keeps ``import youdotcom`` transport-free). # # astroid cannot infer attributes through the PEP 562 ``__getattr__`` # in ``models/__init__.py``, so it types ``model_fields`` as an diff --git a/tests/test_attribution.py b/tests/test_attribution.py index 3a5dc1e..869dd12 100644 --- a/tests/test_attribution.py +++ b/tests/test_attribution.py @@ -394,7 +394,7 @@ def test_caller_supplied_http_headers_override_case_insensitive(self): class TestMcpAttributionNeverSent: """The SDK must never emit ``X-MCP-Attribution``. - Per DX-777: that header is assembled on the MCP server, which is the only + That header is assembled on the MCP server, which is the only layer that can populate its ``keyless`` / ``payment`` / ``ip`` flags. The SDK sits outside Cloudflare and has no ``CF-Connecting-IP`` to read, so emitting it here would fabricate routing flags that the downstream diff --git a/tests/test_live.py b/tests/test_live.py index 1be5b40..2f8d320 100644 --- a/tests/test_live.py +++ b/tests/test_live.py @@ -1056,7 +1056,7 @@ async def test_async_answer(self, you_client): @requires_api_key class TestLiveAttribution: - """The ``X-Client-Info`` header on real requests (DX-777). + """The ``X-Client-Info`` header on real requests. The mock-transport tests in ``tests/test_attribution.py`` pin the wire format; what they cannot show is that the real API *accepts* the header. diff --git a/tests/test_page_age.py b/tests/test_page_age.py index 545046b..4516516 100644 --- a/tests/test_page_age.py +++ b/tests/test_page_age.py @@ -1,4 +1,4 @@ -"""Tolerance of non-ISO ``page_age`` values on search and news results (DX-815). +"""Tolerance of non-ISO ``page_age`` values on search and news results. The spec types ``page_age`` as ``format: date-time``, but a US-locale timestamp (``7/29/2024 10:38:56 AM``) was observed in production. Pydantic rejected it, diff --git a/tests/test_performance.py b/tests/test_performance.py index 4baa604..c1244fa 100644 --- a/tests/test_performance.py +++ b/tests/test_performance.py @@ -499,7 +499,7 @@ def call(): # ---------------------------------------------------------------- # Extraction-mode performance cases parallel the livecrawl cases. - # DX-719 added these alongside the legacy livecrawl cases (the + # These were added alongside the legacy livecrawl cases (the # legacy cases remain because `livecrawl` is supported until 4.0.0). # ---------------------------------------------------------------- diff --git a/tests/test_researchtaskstreamevent.py b/tests/test_researchtaskstreamevent.py index 45bacae..3a1fb0e 100644 --- a/tests/test_researchtaskstreamevent.py +++ b/tests/test_researchtaskstreamevent.py @@ -188,7 +188,7 @@ def test_typed_dict_annotation_matches_model(self) -> None: class TestStreamDecodePath: - """End-to-end pin through the real SSE decode path (DX-778). + """End-to-end pin through the real SSE decode path. The tests above validate the model directly. That is not the path a caller exercises: ``stream_research_task`` wraps every SSE frame in @@ -202,7 +202,7 @@ class TestStreamDecodePath: _FRAMES = [ b"id: 0\nevent: connected\ndata: " b'{"type":"connected","task_id":"abc","status":"running"}\n\n', - # Not in the Event enum -- the exact case DX-778 is about. + # Not in the Event enum -- the exact case this class is about. b"id: 1\nevent: research.searching\ndata: " b'{"type":"research.searching","task_id":"abc","status":"running"}\n\n', b"id: 2\nevent: checkpoint\ndata: "