From 3e1395dd601f4411a696db099c33170d8b20b1c3 Mon Sep 17 00:00:00 2001 From: tegwick Date: Fri, 31 Jul 2026 10:18:34 +0200 Subject: [PATCH] chore: mark T01/T02 done (measured: $2.33 + $1.68, 46 responses, opus-5) Both hub events carry measured tokens for the first time in this repo; --hub-only backfills T01, which was closed in the file before the tool that closes it existed. Co-Authored-By: Claude Opus 5 --- tools/task-done.py | 15 ++++++++++++++- workplans/CB-WP-0004-mechanical-work.md | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tools/task-done.py b/tools/task-done.py index 83508ea..9c03e74 100644 --- a/tools/task-done.py +++ b/tools/task-done.py @@ -264,7 +264,10 @@ def main(): try: path, text, (lo, hi), body = locate(task_id) status = block_status(body) - if status == "done": + # --hub-only exists for tasks closed in the file before this tool + # did; without it the only way to give the hub real numbers would + # be to type them, which is the defect. + if status == "done" and "--hub-only" not in flags: raise Fail(f"{task_id} is already done in " f"{os.path.relpath(path, ROOT)} — refusing to re-close") uuid = hub_id(body) @@ -286,6 +289,16 @@ def main(): print(" dry-run file unchanged, hub not called") return 0 + if "--hub-only" in flags: + try: + code = push(uuid, detail, task_id) + print(f" hub {uuid} -> done (HTTP {code}), measured tokens") + print(" file unchanged (--hub-only)") + return 0 + except Fail as e: + print(f"ERROR — {e}", file=sys.stderr) + return 1 + new = text[:lo] + set_status(body, "done") + text[hi:] if new == text: # Positive control for the exact defect being replaced. diff --git a/workplans/CB-WP-0004-mechanical-work.md b/workplans/CB-WP-0004-mechanical-work.md index 262647c..8d0d8cf 100644 --- a/workplans/CB-WP-0004-mechanical-work.md +++ b/workplans/CB-WP-0004-mechanical-work.md @@ -85,7 +85,7 @@ its own pass's work within the hour. ```task id: CB-WP-0004-T02 -status: todo +status: done priority: high state_hub_task_id: "8a1b59c7-6318-47ba-8cbc-83bb44dd221f" ```