Plans (docs/plans/): - 2026-07-01-23-47-py-hxprobe-httpx.md — initial httpx probe design - 2026-07-02-09-32 through 14-05 — standalone project, toolchain, usage doc + Makefile, file input (-f), simplification pass, run-summary footer Summaries (docs/summaries/): one per completed feature, recording what was actually built, deviations from the plan, and verification steps Explanations (docs/explanations/): two deep-dives written during review — hxprobe concurrency model and worst-exit-code + render-loop analysis Usage (docs/usage/hxprobe.md): overview with pointer to hxprobe/USAGE.md for the full runnable reference Walkthrough (docs/py-latprobe-walkthrough.md): narrative tour of the latprobe Python package for interview / code-review context CHANGELOG.md: entries for all hxprobe features (toolchain, usage doc, file input, simplification, run-summary footer) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3.8 KiB
3.8 KiB
Summary: hxprobe toolchain modernization (uv, ruff, pytest)
Plan: docs/plans/2026-07-02-09-57-hxprobe-toolchain-modernization.md
What was built
Modernized hxprobe's Python toolchain per the user's confirmed choices
(uv, ruff, pytest; mypy skipped). No behavior change to the probe/CLI
itself — this is purely tooling.
hxprobe/pyproject.toml: added[dependency-groups] dev = ["pytest>=8.0", "ruff>=0.8"](PEP 735),[tool.pytest.ini_options](testpaths, a registeredintegrationmarker),[tool.ruff](target-version = "py311",line-length = 100)hxprobe/.python-version: new, pins3.14hxprobe/uv.lock: new, 18 packages resolved and pinned (httpx,httpcore,h2,certifi,pytest,ruff, and their transitive deps)hxprobe/tests/test_integration.py: addedpytestmark = pytest.mark.integration, replacing thetest_[!i]*.pyfilename-glob convention with a real pytest marker- Ran
ruff check --fix(one fix: removed unusedimport sysincli.py, inherited from the originallatprobe/cli.py) andruff format .(6 files reformatted — collapsed the hand-aligned=/dict-key columns to single-space; no semantic changes) hxprobe/README.md: new, standalone quick-startMakefile:hx-deps/hx-run/hx-test/hx-test-integrationnow shell out touv sync/uv runinstead of manual venv+pip; addedhx-lint/hx-fmt;hx-checknow bundles lint + hermetic tests (mirrorsgo-check's fmt+vet+test pattern)docs/usage/hxprobe.md: Setup and Makefile-targets sections updated.gitignore: added.pytest_cache/,.ruff_cache/
Key design decisions
[dependency-groups](PEP 735) over[tool.uv.dev-dependencies]— the standardized, current uv-recommended way to declare dev-only deps, keeps them out of the installable package'sdependencieslist.- Runner swap only, no test rewrite.
unittest.TestCaseclasses,unittest.skipUnlessdecorators, andif __name__ == "__main__": unittest.main()guards are untouched — pytest is a superset runner for unittest-style tests. Only the marker-based selection mechanism changed. hx-checknow includes lint, not just tests — matches howgo-check: go-fmt go-vet go-testalready bundles static checks with tests in this repo, rather than treating lint as a separate, easy-to-skip step.- Verified the
ruff formatdiff was purely cosmetic before accepting it: reviewed the actual diff (whitespace/alignment only, no reordering or logic changes), then confirmed withast.parseon every file post-format and a full pytest run afterward (37 tests: 28 hermetic + 9 integration, all passing) — did not run the suite pre-format, so this confirms the post-format state is correct rather than a strict before/after diff.
Deviations from the plan
None. Implemented exactly as planned; the import sys removal and the
~6-file reformatting were both explicitly anticipated in the plan text
("Lint fixes" section) rather than being surprises.
Verification
cd hxprobe && uv sync— creates.venv, installs fromuv.lock(httpx[http2],pytest,ruff+ transitive deps)make hx-run ARGS="-v http://github.com"— unchanged output (HTTP/2, 1 redirect, IP/TLS/cert)make hx-lint—ruff check .clean (All checks passed!)make hx-test—pytest tests -m "not integration": 28 passed, 9 deselected (matches the pre-toolchain-change hermetic test count exactly)make hx-test-integration—pytest tests -m integration: 9 passed, 28 deselectedgrep -rn "latprobe" hxprobe/— zero matches (toolchain change didn't reintroduce coupling)git diff --stat python/— empty (hxprobe-only change,latprobeuntouched)