chore: wire hxprobe into root project (Makefile, CLAUDE.md, .gitignore)
Makefile: add hx-* targets (deps, run, lint, fmt, test, test-integration, check, clean) that delegate into hxprobe/ via uv; fold hx-test and hx-check into the umbrella test/check/clean targets; add HX_DIR variable and a note that hxprobe is intentionally standalone (no cross-imports from python/). CLAUDE.md: add "Implementation Summaries" convention — after each feature, save a summary under docs/summaries/ with the same timestamp+slug naming as plans. Add note about copying plan-mode scratch files into docs/plans/ before starting implementation. .gitignore: add *.egg-info/, .pytest_cache/, .ruff_cache/ for the hxprobe uv+ruff+pytest toolchain. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -8,6 +8,9 @@ __pycache__/
|
|||||||
*.pyc
|
*.pyc
|
||||||
*.pyo
|
*.pyo
|
||||||
.venv/
|
.venv/
|
||||||
|
*.egg-info/
|
||||||
|
.pytest_cache/
|
||||||
|
.ruff_cache/
|
||||||
|
|
||||||
# OS
|
# OS
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|||||||
17
CLAUDE.md
17
CLAUDE.md
@@ -10,6 +10,23 @@ a short kebab-case description.
|
|||||||
|
|
||||||
Example: `docs/plans/2026-07-01-00-08-go-latency-tool.md`
|
Example: `docs/plans/2026-07-01-00-08-go-latency-tool.md`
|
||||||
|
|
||||||
|
If a plan is drafted via plan-mode tooling that restricts writes to a separate
|
||||||
|
scratch file, copy the approved plan verbatim into `docs/plans/` as the first
|
||||||
|
implementation step, before making any code changes. The scratch file existing
|
||||||
|
elsewhere does not satisfy this convention.
|
||||||
|
|
||||||
|
## Implementation Summaries
|
||||||
|
|
||||||
|
After finishing the implementation of a feature, save a summary under
|
||||||
|
`docs/summaries/` with a filename that starts with the **current timestamp in
|
||||||
|
`yyyy-mm-dd-hh-mm` format** followed by a short kebab-case description (same
|
||||||
|
convention as plans). The summary covers what was actually built (as opposed
|
||||||
|
to the plan, which covers what was intended): files added/changed, key design
|
||||||
|
decisions, any deviations from the plan, notable findings made along the way,
|
||||||
|
and how it was verified.
|
||||||
|
|
||||||
|
Example: `docs/summaries/2026-07-02-00-29-py-hxprobe-httpx.md`
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
Every completed feature is appended to `CHANGELOG.md` at the project root with
|
Every completed feature is appended to `CHANGELOG.md` at the project root with
|
||||||
|
|||||||
59
Makefile
59
Makefile
@@ -1,9 +1,14 @@
|
|||||||
GO_DIR := go
|
GO_DIR := go
|
||||||
PY_DIR := python
|
PY_DIR := python
|
||||||
BINARY := latprobe
|
BINARY := latprobe
|
||||||
PYTHON := python3.14
|
PYTHON := python3.14
|
||||||
ARGS ?=
|
ARGS ?=
|
||||||
SITES ?= $(PY_DIR)/sites.txt
|
SITES ?= $(PY_DIR)/sites.txt
|
||||||
|
|
||||||
|
# hxprobe is a fully standalone project (own pyproject.toml, own uv-managed
|
||||||
|
# venv/lockfile) — it imports nothing from python/latprobe, and could be
|
||||||
|
# `cp -r`'d into its own repo as-is.
|
||||||
|
HX_DIR := hxprobe
|
||||||
|
|
||||||
.DEFAULT_GOAL := help
|
.DEFAULT_GOAL := help
|
||||||
|
|
||||||
@@ -24,10 +29,10 @@ all: check build ## Run checks then build
|
|||||||
build: go-build ## Build binary (delegates to go-build)
|
build: go-build ## Build binary (delegates to go-build)
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: go-test py-test ## Run all tests (Go + Python)
|
test: go-test py-test hx-test ## Run all tests (Go + Python + hxprobe)
|
||||||
|
|
||||||
.PHONY: check
|
.PHONY: check
|
||||||
check: go-check py-check ## Run fmt + vet + test gate (Go + Python)
|
check: go-check py-check hx-check ## Run fmt + vet + test gate (Go + Python + hxprobe)
|
||||||
|
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
fmt: go-fmt ## Format source code (delegates to go-fmt)
|
fmt: go-fmt ## Format source code (delegates to go-fmt)
|
||||||
@@ -36,7 +41,7 @@ fmt: go-fmt ## Format source code (delegates to go-fmt)
|
|||||||
vet: go-vet ## Run go vet (delegates to go-vet)
|
vet: go-vet ## Run go vet (delegates to go-vet)
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean: go-clean py-clean ## Remove build and coverage artifacts
|
clean: go-clean py-clean hx-clean ## Remove build and coverage artifacts
|
||||||
|
|
||||||
# ── Go targets ────────────────────────────────────────────────────────────────
|
# ── Go targets ────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
@@ -126,3 +131,39 @@ py-check: py-test ## py: run Python test gate (hermetic only)
|
|||||||
py-clean: ## py: remove Python bytecode and __pycache__ dirs
|
py-clean: ## py: remove Python bytecode and __pycache__ dirs
|
||||||
@find $(PY_DIR) -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null; \
|
@find $(PY_DIR) -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null; \
|
||||||
find $(PY_DIR) -name '*.pyc' -delete 2>/dev/null; true
|
find $(PY_DIR) -name '*.pyc' -delete 2>/dev/null; true
|
||||||
|
|
||||||
|
# ── hxprobe (standalone httpx-based probe; own pyproject.toml/uv.lock, no
|
||||||
|
# imports from python/latprobe — see hxprobe/pyproject.toml) ─────────────────
|
||||||
|
|
||||||
|
.PHONY: hx-deps
|
||||||
|
hx-deps: ## hx: sync hxprobe's uv-managed environment from its lockfile; idempotent
|
||||||
|
cd $(HX_DIR) && uv sync
|
||||||
|
|
||||||
|
.PHONY: hx-run
|
||||||
|
hx-run: hx-deps ## hx: run hxprobe (pass flags via ARGS="…")
|
||||||
|
cd $(HX_DIR) && uv run python -m hxprobe $(ARGS)
|
||||||
|
|
||||||
|
.PHONY: hx-lint
|
||||||
|
hx-lint: hx-deps ## hx: lint hxprobe with ruff
|
||||||
|
cd $(HX_DIR) && uv run ruff check .
|
||||||
|
|
||||||
|
.PHONY: hx-fmt
|
||||||
|
hx-fmt: hx-deps ## hx: format hxprobe with ruff
|
||||||
|
cd $(HX_DIR) && uv run ruff format .
|
||||||
|
|
||||||
|
.PHONY: hx-test
|
||||||
|
hx-test: hx-deps ## hx: run hxprobe unit tests (hermetic)
|
||||||
|
cd $(HX_DIR) && uv run pytest tests -m "not integration" -v $(ARGS)
|
||||||
|
|
||||||
|
.PHONY: hx-test-integration
|
||||||
|
hx-test-integration: hx-deps ## hx: run hxprobe integration tests against live internet services (HTTP/2, redirects)
|
||||||
|
cd $(HX_DIR) && uv run pytest tests -m integration -v $(ARGS)
|
||||||
|
|
||||||
|
.PHONY: hx-check
|
||||||
|
hx-check: hx-lint hx-test ## hx: run hxprobe test gate (lint + hermetic tests)
|
||||||
|
|
||||||
|
.PHONY: hx-clean
|
||||||
|
hx-clean: ## hx: remove hxprobe bytecode, caches, and egg-info
|
||||||
|
@find $(HX_DIR) -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null; \
|
||||||
|
find $(HX_DIR) -name '*.pyc' -delete 2>/dev/null; \
|
||||||
|
rm -rf $(HX_DIR)/*.egg-info $(HX_DIR)/.pytest_cache $(HX_DIR)/.ruff_cache; true
|
||||||
|
|||||||
Reference in New Issue
Block a user