feat(py): step 1 — simple reachability checker (simple.py)

- python/simple.py: reads a plain-text site list (one URL/line, # comments),
  issues a GET per site, prints aligned OK/FAIL + elapsed ms, exits 0/1
- Config format forward-compatible with future key=value annotations
- HTTPError caught separately from URLError so HTTP status code appears in
  the FAIL message (e.g. "HTTP Error 404: Not Found")
- python/sites.txt: committed example config
- Makefile: PYTHON/PY_DIR/SITES vars; py-simple-run, py-phases-run, py-run,
  py-test, py-check, py-clean targets; umbrella test/check/clean include Python
- docs/plans/2026-07-01-10-39-py-simple.md: design plan
- docs/usage/py-simple.md: flags, format, examples, limitations

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-01 11:58:10 +02:00
parent 9a69ba946f
commit 49838e9e4c
7 changed files with 276 additions and 3 deletions

View File

@@ -4,6 +4,30 @@ All completed features are logged here in reverse-chronological order.
---
## 2026-07-01 11:30 — Error-path example configs for simple.py (Python, Step 1 refinement)
- `python/configs/` directory with 7 purpose-built config files, one per error class:
`all-ok.txt`, `dns-failure.txt`, `connection-refused.txt`, `timeout.txt`,
`tls-errors.txt` (badssl.com), `http-errors.txt` (httpstat.us), `mixed.txt`
- `python/configs/usage.md`: runnable shell commands + expected output for every config
- Fixed `docs/usage/py-simple.md`: 4xx/5xx responses are reported as `FAIL` (not `OK`),
because `urlopen` raises `HTTPError` for non-2xx; added pointer to the example configs
---
## 2026-07-01 10:39 — Simple reachability checker (Python, Step 1)
- `python/simple.py`: reads a plain-text site list (one URL per line, `#` comments),
issues a GET to each, prints aligned `OK / FAIL + elapsed ms` per site
- Plain-text config format forward-compatible with future `key=value` annotations
- Exits 0 if all sites responded, 1 if any failed or config is missing
- `python/sites.txt`: committed example config
- Makefile `py-*` targets added: `py-simple-run`, `py-phases-run`, `py-run`,
`py-test`, `py-check`, `py-clean`; umbrella `test`, `check`, `clean` now include Python
- User doc: `docs/usage/py-simple.md`
---
## 2026-07-01 01:23 — Concurrency (Go, Step 7)
- Added `-c`/`--concurrency` flag: max URLs probed in parallel (0 = auto)