From 4f1a3110244cf4d63f47cff1b966f7d156c759a1 Mon Sep 17 00:00:00 2001 From: ProtocolWarden <32967198+ProtocolWarden@users.noreply.github.com> Date: Wed, 19 Aug 2026 07:47:02 -0400 Subject: [PATCH] test(dependency-check): assert the version string the probe actually returns MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit My own test from the previous commit was wrong, not the code: it expected normalize_version("13.0.5+gitea-1.22.0") to yield "13.0.5". That helper strips a leading tool name ("codex-cli 0.117.0" -> "0.117.0"), not a build suffix. Keeping the suffix is the better behaviour anyway — "+gitea-1.22.0" is how an operator tells which Gitea API generation their Forgejo speaks, which is exactly what a dependency report exists to surface. Co-Authored-By: Claude Opus 5 --- .console/log.md | 13 +++++++++++++ tests/test_dependency_check.py | 8 +++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.console/log.md b/.console/log.md index cc339ad82..7862a00a3 100644 --- a/.console/log.md +++ b/.console/log.md @@ -1,3 +1,16 @@ +## 2026-08-19 — pushed a red test, caught it one command later + +Shipping the council fix for #521 I added five probe tests and pushed before +reading the result: one asserted `normalize_version("13.0.5+gitea-1.22.0")` +yields `"13.0.5"`. It does not — that helper strips a leading tool name +("codex-cli 0.117.0"), not a build suffix. My assertion was wrong, not the +code, and keeping the suffix is better anyway: "+gitea-1.22.0" tells an +operator which Gitea API generation their Forgejo speaks. + +The lesson is ordering, not the assertion: the gate output and the push were in +one script, so the push did not wait on the result. Gate first, read, then +push. + ## 2026-08-19 — council: a health probe must not be able to throw The Forgejo row I added to `dependency_check` called `response.json()` diff --git a/tests/test_dependency_check.py b/tests/test_dependency_check.py index 9d9bef0ee..49949bade 100644 --- a/tests/test_dependency_check.py +++ b/tests/test_dependency_check.py @@ -108,8 +108,14 @@ def _probe(monkeypatch, response): def test_board_status_reports_version_and_health(monkeypatch): + """The full version string survives, gitea-compat suffix and all. + + `normalize_version` strips a leading tool name ("codex-cli 0.117.0"), not a + build suffix — and the suffix is worth keeping: it is how an operator tells + which Gitea API generation their Forgejo speaks. + """ assert _probe(monkeypatch, _Resp(200, {"version": "13.0.5+gitea-1.22.0"})) == ( - "13.0.5", + "13.0.5+gitea-1.22.0", True, )