From 6f4da376a6cb89fa6c672399b9e88878d114ddb7 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 31 Aug 2026 07:18:28 +0000 Subject: [PATCH 1/2] fix: remove dead buyer_evidence_manifest_report/buyer_handoff_bundle_report aliases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TaskOrchestrator.buyer_evidence_manifest_report() and buyer_handoff_bundle_report() were docstring-labeled "deprecated ... alias for existing Python consumers", but no such consumer exists. Confirmed via grep: their only callers anywhere were their own dedicated test files. The real deprecated HTTP routes (server.py /api/v1/buyer_evidence_manifests/latest and /api/v1/buyer_handoff_bundles/latest) already bypass them and call commercial_evidence_manifest_report()/commercial_handoff_bundle_report() directly, since the resource-name rename in 73d04124 ("use commercial readiness resource names") repointed the routes at the new commercial_* methods while leaving these two orphaned wrapper methods behind. Remove both dead aliases. Their dedicated tests (test_buyer_evidence_manifest.py, test_buyer_handoff_bundle.py) keep their HTTP-route/OpenAPI/docs contract coverage but now exercise commercial_evidence_manifest_report() / commercial_handoff_bundle_report() directly instead of the removed aliases; the alias-payload-preservation tests are dropped since there is no longer an alias to preserve payload for. test_commercial_blocked_evidence.py's parametrized blocked-degradation coverage is repointed at the same two commercial_* methods so no coverage is lost. Full test suite: 2849 passed, 1 skipped (test_psychometric_routing.py, unrelated — needs Python 3.12 + a fast-mlsirm fetch this sandbox's egress policy blocks). interrogate docstring gate: 100%. Co-Authored-By: Claude Sonnet 5 --- CHANGELOG.md | 12 +++++++++++ contextual_orchestrator/orchestrator.py | 26 ----------------------- tests/test_buyer_evidence_manifest.py | 13 +++--------- tests/test_buyer_handoff_bundle.py | 13 +++--------- tests/test_commercial_blocked_evidence.py | 4 ++-- 5 files changed, 20 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b38e0770..ee66e78d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,18 @@ and this project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html) ## [0.2.0] - Unreleased +### Removed + +- Dropped the dead `TaskOrchestrator.buyer_evidence_manifest_report()` / + `buyer_handoff_bundle_report()` Python aliases. Their docstrings claimed + "alias for existing Python consumers", but no such consumer exists — the + deprecated `/api/v1/buyer_evidence_manifests/latest` and + `/api/v1/buyer_handoff_bundles/latest` HTTP routes already call + `commercial_evidence_manifest_report()` / `commercial_handoff_bundle_report()` + directly (since the resource-name rename in `73d04124`), and the only + remaining Python callers were the aliases' own dedicated tests. Those tests + now exercise the `commercial_*` methods they were actually meant to cover. + ### Fixed - OpenRouter discovery no longer marks the entire credential account diff --git a/contextual_orchestrator/orchestrator.py b/contextual_orchestrator/orchestrator.py index 1f99f5fac..5adeee390 100644 --- a/contextual_orchestrator/orchestrator.py +++ b/contextual_orchestrator/orchestrator.py @@ -8131,32 +8131,6 @@ def has_file(path: str) -> bool: }, } - def buyer_evidence_manifest_report( - self, - target_contract_value_krw: int = DEFAULT_COMMERCIAL_TARGET_VALUE_KRW, - locale_bundles: dict[str, dict[str, str]] | None = None, - security_profile: dict[str, Any] | None = None, - ) -> dict[str, Any]: - """Return the deprecated manifest alias for existing Python consumers.""" - return self.commercial_evidence_manifest_report( - target_contract_value_krw=target_contract_value_krw, - locale_bundles=locale_bundles, - security_profile=security_profile, - ) - - def buyer_handoff_bundle_report( - self, - target_contract_value_krw: int = DEFAULT_COMMERCIAL_TARGET_VALUE_KRW, - locale_bundles: dict[str, dict[str, str]] | None = None, - security_profile: dict[str, Any] | None = None, - ) -> dict[str, Any]: - """Return the deprecated handoff alias for existing Python consumers.""" - return self.commercial_handoff_bundle_report( - target_contract_value_krw=target_contract_value_krw, - locale_bundles=locale_bundles, - security_profile=security_profile, - ) - def saleability_decision_report( self, target_contract_value_krw: int = DEFAULT_COMMERCIAL_TARGET_VALUE_KRW, diff --git a/tests/test_buyer_evidence_manifest.py b/tests/test_buyer_evidence_manifest.py index 5fe765675..7caf3680b 100644 --- a/tests/test_buyer_evidence_manifest.py +++ b/tests/test_buyer_evidence_manifest.py @@ -62,11 +62,11 @@ def exercise_runtime(orchestrator: TaskOrchestrator) -> None: orchestrator.run_evaluation(["Replay this commercial readiness prompt."], mode="route") -def test_buyer_evidence_manifest_report_indexes_runtime_and_caveat_evidence() -> None: +def test_commercial_evidence_manifest_report_indexes_runtime_and_caveat_evidence() -> None: orchestrator = build() exercise_runtime(orchestrator) - report = orchestrator.buyer_evidence_manifest_report( + report = orchestrator.commercial_evidence_manifest_report( target_contract_value_krw=TARGET_CONTRACT_VALUE_KRW, locale_bundles=ADMIN_TRANSLATIONS, security_profile={ @@ -160,14 +160,7 @@ def test_buyer_evidence_manifest_endpoint_openapi_admin_and_docs_contract() -> N assert legacy_manifest == manifest -def test_deprecated_python_manifest_alias_preserves_payload() -> None: - orchestrator = build() - assert orchestrator.buyer_evidence_manifest_report() == ( - orchestrator.commercial_evidence_manifest_report() - ) - - if __name__ == "__main__": # pragma: no cover - test_buyer_evidence_manifest_report_indexes_runtime_and_caveat_evidence() + test_commercial_evidence_manifest_report_indexes_runtime_and_caveat_evidence() test_buyer_evidence_manifest_endpoint_openapi_admin_and_docs_contract() print("ok") diff --git a/tests/test_buyer_handoff_bundle.py b/tests/test_buyer_handoff_bundle.py index fd350dcbe..ecdb5517a 100644 --- a/tests/test_buyer_handoff_bundle.py +++ b/tests/test_buyer_handoff_bundle.py @@ -62,11 +62,11 @@ def exercise_runtime(orchestrator: TaskOrchestrator) -> None: orchestrator.run_evaluation(["Replay this buyer handoff prompt."], mode="route") -def test_buyer_handoff_bundle_report_packages_sale_evidence() -> None: +def test_commercial_handoff_bundle_report_packages_sale_evidence() -> None: orchestrator = build() exercise_runtime(orchestrator) - report = orchestrator.buyer_handoff_bundle_report( + report = orchestrator.commercial_handoff_bundle_report( target_contract_value_krw=TARGET_CONTRACT_VALUE_KRW, locale_bundles=ADMIN_TRANSLATIONS, security_profile={ @@ -168,14 +168,7 @@ def test_buyer_handoff_bundle_endpoint_openapi_admin_and_docs_contract() -> None assert legacy_bundle == bundle -def test_deprecated_python_handoff_alias_preserves_payload() -> None: - orchestrator = build() - assert orchestrator.buyer_handoff_bundle_report() == ( - orchestrator.commercial_handoff_bundle_report() - ) - - if __name__ == "__main__": # pragma: no cover - test_buyer_handoff_bundle_report_packages_sale_evidence() + test_commercial_handoff_bundle_report_packages_sale_evidence() test_buyer_handoff_bundle_endpoint_openapi_admin_and_docs_contract() print("ok") diff --git a/tests/test_commercial_blocked_evidence.py b/tests/test_commercial_blocked_evidence.py index ba63ef177..a2aa0bec9 100644 --- a/tests/test_commercial_blocked_evidence.py +++ b/tests/test_commercial_blocked_evidence.py @@ -60,8 +60,8 @@ def always_missing(self: Path) -> bool: "commercial_launch_readiness_report", "commercial_completion_scorecard_report", "commercial_buyer_acceptance_workflow_report", - "buyer_evidence_manifest_report", - "buyer_handoff_bundle_report", + "commercial_evidence_manifest_report", + "commercial_handoff_bundle_report", "saleability_decision_report", ] From 3ad9417c69bffaac769e2e2d014312eace0a4598 Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Tue, 1 Sep 2026 10:14:13 +0900 Subject: [PATCH 2/2] fix: preserve deprecated buyer report aliases --- CHANGELOG.md | 16 ++++++--------- contextual_orchestrator/orchestrator.py | 26 +++++++++++++++++++++++++ tests/test_buyer_evidence_manifest.py | 7 +++++++ tests/test_buyer_handoff_bundle.py | 7 +++++++ 4 files changed, 46 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee66e78d6..03d15dc75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,17 +10,13 @@ and this project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html) ## [0.2.0] - Unreleased -### Removed +### Deprecated -- Dropped the dead `TaskOrchestrator.buyer_evidence_manifest_report()` / - `buyer_handoff_bundle_report()` Python aliases. Their docstrings claimed - "alias for existing Python consumers", but no such consumer exists — the - deprecated `/api/v1/buyer_evidence_manifests/latest` and - `/api/v1/buyer_handoff_bundles/latest` HTTP routes already call - `commercial_evidence_manifest_report()` / `commercial_handoff_bundle_report()` - directly (since the resource-name rename in `73d04124`), and the only - remaining Python callers were the aliases' own dedicated tests. Those tests - now exercise the `commercial_*` methods they were actually meant to cover. +- Internal callers now use + `TaskOrchestrator.commercial_evidence_manifest_report()` / + `commercial_handoff_bundle_report()` directly. The deprecated `buyer_*` + Python aliases remain available for source, git, and submodule consumers; + the deprecated HTTP compatibility routes remain available as well. ### Fixed diff --git a/contextual_orchestrator/orchestrator.py b/contextual_orchestrator/orchestrator.py index 5adeee390..1f99f5fac 100644 --- a/contextual_orchestrator/orchestrator.py +++ b/contextual_orchestrator/orchestrator.py @@ -8131,6 +8131,32 @@ def has_file(path: str) -> bool: }, } + def buyer_evidence_manifest_report( + self, + target_contract_value_krw: int = DEFAULT_COMMERCIAL_TARGET_VALUE_KRW, + locale_bundles: dict[str, dict[str, str]] | None = None, + security_profile: dict[str, Any] | None = None, + ) -> dict[str, Any]: + """Return the deprecated manifest alias for existing Python consumers.""" + return self.commercial_evidence_manifest_report( + target_contract_value_krw=target_contract_value_krw, + locale_bundles=locale_bundles, + security_profile=security_profile, + ) + + def buyer_handoff_bundle_report( + self, + target_contract_value_krw: int = DEFAULT_COMMERCIAL_TARGET_VALUE_KRW, + locale_bundles: dict[str, dict[str, str]] | None = None, + security_profile: dict[str, Any] | None = None, + ) -> dict[str, Any]: + """Return the deprecated handoff alias for existing Python consumers.""" + return self.commercial_handoff_bundle_report( + target_contract_value_krw=target_contract_value_krw, + locale_bundles=locale_bundles, + security_profile=security_profile, + ) + def saleability_decision_report( self, target_contract_value_krw: int = DEFAULT_COMMERCIAL_TARGET_VALUE_KRW, diff --git a/tests/test_buyer_evidence_manifest.py b/tests/test_buyer_evidence_manifest.py index 7caf3680b..eb01219b7 100644 --- a/tests/test_buyer_evidence_manifest.py +++ b/tests/test_buyer_evidence_manifest.py @@ -160,6 +160,13 @@ def test_buyer_evidence_manifest_endpoint_openapi_admin_and_docs_contract() -> N assert legacy_manifest == manifest +def test_deprecated_python_manifest_alias_preserves_payload() -> None: + orchestrator = build() + assert orchestrator.buyer_evidence_manifest_report() == ( + orchestrator.commercial_evidence_manifest_report() + ) + + if __name__ == "__main__": # pragma: no cover test_commercial_evidence_manifest_report_indexes_runtime_and_caveat_evidence() test_buyer_evidence_manifest_endpoint_openapi_admin_and_docs_contract() diff --git a/tests/test_buyer_handoff_bundle.py b/tests/test_buyer_handoff_bundle.py index ecdb5517a..b6c2a0c83 100644 --- a/tests/test_buyer_handoff_bundle.py +++ b/tests/test_buyer_handoff_bundle.py @@ -168,6 +168,13 @@ def test_buyer_handoff_bundle_endpoint_openapi_admin_and_docs_contract() -> None assert legacy_bundle == bundle +def test_deprecated_python_handoff_alias_preserves_payload() -> None: + orchestrator = build() + assert orchestrator.buyer_handoff_bundle_report() == ( + orchestrator.commercial_handoff_bundle_report() + ) + + if __name__ == "__main__": # pragma: no cover test_commercial_handoff_bundle_report_packages_sale_evidence() test_buyer_handoff_bundle_endpoint_openapi_admin_and_docs_contract()