From 703d5d67a8d4aeec34535cd5d4685a826987c016 Mon Sep 17 00:00:00 2001 From: Henrik Jess Nielsen Date: Sun, 10 May 2026 17:27:44 +0200 Subject: [PATCH] fix(smoke): use azure-pipelines.yml URI to match AzDO schema glob MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The AzDO schema is only applied by yaml-language-server when the file URI matches the configured globs (azure-pipelines.yml / *.yaml). The smoke test was using 'plain-pipeline.yml' which never matched, causing test [8] to always return 0 completions. Also increased didOpen → completion sleep from 0.8s to 1.5s to give yaml-ls time to parse the 1.6MB AzDO schema JSON. --- scripts/smoke_test_completions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/smoke_test_completions.py b/scripts/smoke_test_completions.py index 6705c0d..7a97632 100644 --- a/scripts/smoke_test_completions.py +++ b/scripts/smoke_test_completions.py @@ -391,7 +391,7 @@ async def check_yaml_template_completion(ws: aiohttp.ClientWebSocketResponse) -> async def check_azdo_task_completion(ws: aiohttp.ClientWebSocketResponse) -> None: """Cursor after '- task: ' — expect AzDO task completions from schema.""" print("\n[8] AzDO task completion (- task: @azdo-schema)") - task_doc_uri = "file:///tmp/smoke_test/plain-pipeline.yml" + task_doc_uri = "file:///tmp/smoke_test/azure-pipelines.yml" task_doc = "steps:\n - task: " await ws.send_bytes(_frame({ "jsonrpc": "2.0", @@ -405,7 +405,7 @@ async def check_azdo_task_completion(ws: aiohttp.ClientWebSocketResponse) -> Non } }, })) - await asyncio.sleep(0.8) + await asyncio.sleep(1.5) # yaml-ls needs time to parse 1.6MB AzDO schema lines = task_doc.split("\n") last_line = len(lines) - 1 last_char = len(lines[-1])