From 0949941cb62bbfd9b77a9d7edb73f47b3f774599 Mon Sep 17 00:00:00 2001 From: T-Crypt Date: Mon, 5 Oct 2026 13:44:40 -0600 Subject: [PATCH 1/2] ci: run the verification block on push and PR Linux job: py_compile, unittest discover, both Node smoke scripts. Windows job runs the collector suite, which is where the Win32 ctypes backend executes; on Linux those two test_hostinfo.py tests are platform gates and never run. --- .github/workflows/verify.yml | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/verify.yml diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml new file mode 100644 index 0000000..819c5e0 --- /dev/null +++ b/.github/workflows/verify.yml @@ -0,0 +1,37 @@ +name: verify + +on: + push: + branches: [main] + pull_request: + +jobs: + linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - uses: actions/setup-node@v4 + with: + node-version: "20" + - name: collector parses + run: python3 -m py_compile collector/*.py + - name: collector suite + run: python3 -m unittest discover -s collector -p "test_*.py" + - name: ui primitives and ripple state machine + run: node smoke/ui-primitives.mjs + - name: app shell and view model + run: node smoke/shell.mjs + + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: collector suite (Win32 ctypes backend runs here) + shell: bash + run: python3 -m unittest discover -s collector -p "test_*.py" From 2535cbbfa8d23a48276b9d1cf8e15531940b1691 Mon Sep 17 00:00:00 2001 From: T-Crypt Date: Mon, 5 Oct 2026 13:55:25 -0600 Subject: [PATCH 2/2] fix: Windows host backend, two ctypes bugs the CI job exposed wintypes.LARGE_INTEGER has no .quad; the ctypes accessor is .value. EnumProcesses is exported by psapi, not kernel32, so the lookup raised AttributeError on the runner and processes() never ran. Both Windows tests now execute on the CI windows job. --- collector/hostinfo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/collector/hostinfo.py b/collector/hostinfo.py index 26321e4..2f9ffa3 100755 --- a/collector/hostinfo.py +++ b/collector/hostinfo.py @@ -180,7 +180,7 @@ def _win_cpu_times(): if _kernel32.GetSystemTimes(ctypes.byref(idle), ctypes.byref(kernel), ctypes.byref(user)): - total = (user.quad + kernel.quad, idle.quad) + total = (user.value + kernel.value, idle.value) return total, _win_cpu_cores() def _win_cpu_cores(): @@ -233,8 +233,8 @@ def _win_processes(): found = [] pids_buf = ctypes.create_string_buffer(65536) # 16384 PIDs needed = wintypes.DWORD(0) - if not _kernel32.EnumProcesses(pids_buf, ctypes.sizeof(pids_buf), - ctypes.byref(needed)): + if not _psapi.EnumProcesses(pids_buf, ctypes.sizeof(pids_buf), + ctypes.byref(needed)): return found n = needed.value // 4 pids = struct.unpack_from("%dI" % n, pids_buf.raw)