From 7a8de9e72fcd515598f92e45d30f298d84524129 Mon Sep 17 00:00:00 2001 From: Ace Data Cloud Dev Date: Wed, 9 Sep 2026 04:49:13 +0800 Subject: [PATCH] docs: route Open WebUI into integrations Co-Authored-By: Claude Opus 5 (1M context) --- scripts/data/coding-docs-map.json | 6 +++++ scripts/sync_from_platformbackend.py | 2 +- tests/test_sync_from_platformbackend.py | 31 +++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/scripts/data/coding-docs-map.json b/scripts/data/coding-docs-map.json index 448e9295..12306250 100644 --- a/scripts/data/coding-docs-map.json +++ b/scripts/data/coding-docs-map.json @@ -150,6 +150,12 @@ "output_path": "guides/coding/qwen_code_cli.mdx", "service_alias": "coding", "source_doc_key": "development_qwen_code_cli" + }, + { + "canonical_alias": "development_open_webui", + "output_path": "guides/integrations/open-webui.mdx", + "service_alias": "integrations", + "source_doc_key": "development_open_webui" } ] } diff --git a/scripts/sync_from_platformbackend.py b/scripts/sync_from_platformbackend.py index 65c87f7e..46212d61 100644 --- a/scripts/sync_from_platformbackend.py +++ b/scripts/sync_from_platformbackend.py @@ -62,7 +62,7 @@ "riffusion", "udio", } -DOC_ONLY_SERVICES = {"coding"} +DOC_ONLY_SERVICES = {"coding", "integrations"} SKIP_DOC_KEYS = { "acedataext", diff --git a/tests/test_sync_from_platformbackend.py b/tests/test_sync_from_platformbackend.py index 6d1677b9..b80e19a5 100644 --- a/tests/test_sync_from_platformbackend.py +++ b/tests/test_sync_from_platformbackend.py @@ -55,6 +55,37 @@ def test_exact_records_override_heuristic_service_and_output(self) -> None: self.assertEqual(mapping["tool_route"], "coding") self.assertEqual(exact["tool_route"]["output_path"], "guides/coding/custom_name.mdx") + def test_integrations_exact_record_writes_discoverable_path(self) -> None: + with tempfile.TemporaryDirectory() as temporary_directory: + root = Path(temporary_directory) + backend = root / "backend" + output = root / "output" + docs = backend / "docs" + docs.mkdir(parents=True) + (docs / "development_open_webui.md").write_text("# Open WebUI\n\nBody", encoding="utf-8") + records = [ + { + "canonical_alias": "development_open_webui", + "source_doc_key": "development_open_webui", + "service_alias": "integrations", + "output_path": "guides/integrations/open-webui.mdx", + } + ] + bundle_path = root / "exact.json" + bundle_path.write_text(json.dumps({"schema_version": 1, "records": records}), encoding="utf-8") + + exact = sync.load_exact_doc_records(backend, [], bundle_path) + sync.sync_guides( + backend, + output, + {"integrations": {"alias": "integrations", "display_name": "Integrations"}}, + {"open_webui": "integrations"}, + ["zh-Hans"], + exact_records=exact, + ) + + self.assertTrue((output / "zh-Hans/guides/integrations/open-webui.mdx").is_file()) + def test_sync_guides_writes_exact_output_path(self) -> None: with tempfile.TemporaryDirectory() as temporary_directory: root = Path(temporary_directory)