5454 sys.exit(1)
5555 PY
5656
57+ - name : Check pywebview pin is single-sourced
58+ run : |
59+ python scripts/read_desktop_pywebview_spec.py
60+ python <<'PY'
61+ import sys
62+ from pathlib import Path
63+
64+ for path in sorted(Path(".github/workflows").glob("*.yml")):
65+ text = path.read_text()
66+ if "pywebview>=" in text or "pywebview<" in text:
67+ print(f"{path} hardcodes a pywebview version; use scripts/read_desktop_pywebview_spec.py", file=sys.stderr)
68+ sys.exit(1)
69+ if "read_desktop_pywebview_spec.py" not in text and "pywebview" in text.lower():
70+ if path.name in ("release.yml", "tests.yml"):
71+ print(f"{path} installs pywebview but does not read the pin from pyproject", file=sys.stderr)
72+ sys.exit(1)
73+ PY
74+
5775 - name : Install pip-tools
5876 # Pin matches update-lock.yml so lock verification uses the same resolver.
5977 run : python -m pip install 'pip-tools==7.5.3'
@@ -118,12 +136,13 @@ jobs:
118136 run : python -m pytest tests/test_api_search.py tests/test_api_workspaces.py tests/test_api_export.py tests/test_pdf_export.py tests/test_search_helpers.py tests/test_check_benchmark_regression.py tests/test_reduce_baselines.py -v --tb=short -o addopts=
119137
120138 # ── PyInstaller desktop build (Windows only, once per workflow) ────────
121- # Closes #44. Builds the onedir bundle and smoke-tests --help so the
122- # desktop entry point is verified without launching the GUI window.
123- # pywebview matches release.yml so the Windows bundle matches what we ship.
139+ # Closes #44. Check webview/lib after build; --help returns before import webview.
124140 - name : Install pywebview for PyInstaller bundle
125141 if : matrix.os == 'windows-latest' && matrix.python-version == '3.12'
126- run : python -m pip install 'pywebview>=5.0,<7'
142+ shell : pwsh
143+ run : |
144+ $spec = python scripts/read_desktop_pywebview_spec.py
145+ python -m pip install $spec
127146
128147 - name : Install PyInstaller
129148 if : matrix.os == 'windows-latest' && matrix.python-version == '3.12'
@@ -133,9 +152,15 @@ jobs:
133152 if : matrix.os == 'windows-latest' && matrix.python-version == '3.12'
134153 run : pyinstaller cursor-browser.spec --noconfirm
135154
136- - name : Smoke-test PyInstaller exe (--help)
155+ - name : Check webview/lib in bundle
137156 if : matrix.os == 'windows-latest' && matrix.python-version == '3.12'
138- run : dist\CursorChatBrowser\CursorChatBrowser.exe --help
157+ shell : pwsh
158+ run : |
159+ $lib = 'dist\CursorChatBrowser\_internal\webview\lib'
160+ if (-not (Test-Path $lib)) {
161+ Write-Error "pywebview bundle missing: $lib"
162+ exit 1
163+ }
139164
140165 # ── Browser XSS: Playwright (sprint item #3) ─────────────────────────────
141166 browser-xss :
0 commit comments