T16.4: browser probes pass; cdp.py starts from an elevated shell

files_check.py 36/36 (T16.2), sample_check.py 10/10 and
critical_reopen_check.py 11/11 (T16.3), run on Matt's machine with
Edge 154. T16.2 and T16.3 done; wave 16 verification complete.

tests/cdp.py: every probe first failed 'exited rc=0 without binding
the port'. The shell was elevated; Edge and Chrome de-elevate by
relaunching through Explorer and the relaunch drops the debugging
port ('Edge is running elevated: 1' in the browser log). Adds
--do-not-de-elevate on Windows and a 15 s grace for the port after an
rc=0 exit. Both inert on a normal shell and off Windows.
This commit is contained in:
2026-10-02 14:51:48 -07:00
parent f0750212ca
commit f752ae3677
2 changed files with 48 additions and 12 deletions

View File

@@ -62,7 +62,7 @@ with an ASCII fallback and an RFC 5987 `filename*`. Reference code:
- [x] PNG, JPEG and PDF still open inline
- [x] `Plan é.pdf` downloads (was 500)
- [x] a name with CR/LF produces a valid header
- [ ] `tests/files_check.py` passes on a machine with Edge (CR-007 offline drawings)
- [x] `tests/files_check.py` passes on a machine with Edge (CR-007 offline drawings)
---
@@ -89,7 +89,7 @@ uses it.
- [x] POST without an id lands on `sop__<project_id>`
- [x] a rogue complete SOP made before the fix no longer drives the baseline
or the QA and PM/CM recipients
- [ ] `tests/sample_check.py` and `tests/critical_reopen_check.py` pass on a
- [x] `tests/sample_check.py` and `tests/critical_reopen_check.py` pass on a
machine with Edge
---
@@ -128,11 +128,24 @@ Run 2026-10-02 in the build sandbox (Linux, Python 3.10, no browser), on branch
| `server/seed_demo.py` | Seeds the demo project; its SOP lands on the canonical id |
| `pip-audit -r server/requirements.txt` | No known vulnerabilities |
**Not run (no headless browser in the sandbox).** These done-when items stay
open until someone runs them on a machine with Edge, so T16.2 and T16.3 are
**not marked done** yet:
**Browser probes, run 2026-10-02 on Matt's machine (Windows, Edge 154,
Python 3.12.10, `.venv`), one at a time:**
- T16.2: `python tests/files_check.py` (CR-007 drawings, offline cache)
- T16.3: `python tests/sample_check.py` and `python tests/critical_reopen_check.py`
| Probe | Task | Result |
|---|---|---|
| `tests/files_check.py` | T16.2 | **36/36**, including the 1440px creator, 390px Field View, and the offline drawing cache with the server gone |
| `tests/sample_check.py` | T16.3 | **10/10** |
| `tests/critical_reopen_check.py` | T16.3 | **11/11**, PM + CM + assignee mail, sink-verified |
Run them one at a time (file-map.md: chained runs exhaust the browser's ports).
T16.2 and T16.3 are done.
**Harness fix needed to get there (`tests/cdp.py`, committed with this record).**
Every probe failed first with "browser would not start ... exited rc=0
without binding the port". Cause: the PowerShell session was elevated, and
Edge and Chrome de-elevate by relaunching themselves through Explorer as a
normal user; the relaunch drops `--remote-debugging-port`. Edge's log said so
(`Edge is running elevated: 1`). No browser policy was involved (all hives
checked). Two changes, both inert on a normal shell and on Linux/macOS:
`--do-not-de-elevate` on Windows, and a 15-second grace for the port when the
launched process exits rc=0. Probe results are unchanged by it; it only lets
the browser start.