From 0d847e9464703994747bd5885baea2a54fb03c6f Mon Sep 17 00:00:00 2001 From: Edward Langley Date: Sun, 20 Sep 2026 22:16:04 -0700 Subject: [PATCH] Review fixes: name the cap in the dispatch assertion, unstale the skill Two findings from running /code-review on this branch. The dispatch self-test's dirty arm asserted the run failed and named `f.rs`, which is adjacent to the question -- a failure for any other reason naming that file would have satisfied it. It now requires the cap's own message as well, so the assertion names the question it means. And .claude/skills/code-review/SKILL.md still told reviewers the flag "selects rather than adds, so --check-evidence never runs the comment cap", which this branch makes false. Grepped for every copy of the claim; that was the only one outside context/. A doc that describes the script it gates is code, and leaving it is the gotcha-48 failure exactly. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01FC2jVn8Au7E9JPkw6bwXXH --- .claude/skills/code-review/SKILL.md | 14 +++++++------- scripts/check-comment-runs.py | 5 +++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.claude/skills/code-review/SKILL.md b/.claude/skills/code-review/SKILL.md index 46dbceb2..faef7aa8 100644 --- a/.claude/skills/code-review/SKILL.md +++ b/.claude/skills/code-review/SKILL.md @@ -107,13 +107,13 @@ python3 scripts/check-comment-runs.py # the two-line comment c python3 scripts/check-comment-runs.py --check-evidence # a DIFFERENT question ``` -**Run both spellings of `check-comment-runs.py`.** It is one script answering -two questions and the flag *selects* rather than adds, so `--check-evidence` -never runs the comment cap and says nothing about having skipped it. Three -separate agents hit this in one campaign: a local gate using only the flagged -form went green while CI, which runs both, went red on a three-line doc comment -(improvise-ijql). The flagged form is also the expensive one — it needs a -compiled workspace — which makes it the one people run alone. +**`--check-evidence` is additive**, so it answers the comment cap too and both +verdicts print. It did not always: the flag used to *select*, so the flagged +run skipped the cap and said nothing about having skipped it, and three +separate agents hit that in one campaign — a local gate using only the flagged +form went green while CI went red on a three-line doc comment (improvise-ijql). +Run the bare form anyway when you only want the cap: it is 0.3s and needs no +toolchain, where the flagged one needs a compiled workspace. The knowledge base is checked in CI as code: diff --git a/scripts/check-comment-runs.py b/scripts/check-comment-runs.py index f0deddbf..07b61e7a 100755 --- a/scripts/check-comment-runs.py +++ b/scripts/check-comment-runs.py @@ -999,8 +999,9 @@ def _dispatch_self_test(): run = _dispatch_case(tmp, _DISPATCH_CAPPED, extra) if run.returncode == 0: failures.append(f" DISPATCH: {name}: exited 0 over a four-line comment run") - elif "f.rs" not in run.stderr: - failures.append(f" DISPATCH: {name}: failed without naming the file") + elif not ("comment runs longer than" in run.stderr and "f.rs" in run.stderr): + failures.append(f" DISPATCH: {name}: failed, but not about the cap: " + f"{run.stderr.strip()[:200]}") with tempfile.TemporaryDirectory() as tmp: run = _dispatch_case(tmp, _DISPATCH_CLEAN, extra) if run.returncode != 0: