From 1be926dbcd0ef0cf5440a43e0f3a9cf77deda191 Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Tue, 22 Sep 2026 12:36:55 +0530 Subject: [PATCH] refactor(kanban): drop redundant int() in gc_events cutoff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hermes_cli/kanban_db.py:4288 — older_than_seconds is already normalised with int(...) on the line above the negative check, so the second int() in the cutoff expression is a no-op. Sibling gc_worker_logs already subtracts the bare value (float cutoff for st_mtime), so nothing to change there. No behaviour change. Gate finding: spec-D fold item 4. --- hermes_cli/kanban_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hermes_cli/kanban_db.py b/hermes_cli/kanban_db.py index e646fd812e..09e250b307 100644 --- a/hermes_cli/kanban_db.py +++ b/hermes_cli/kanban_db.py @@ -4285,7 +4285,7 @@ def gc_events(conn: sqlite3.Connection, *, older_than_seconds: int = 30 * 24 * 3 older_than_seconds = int(older_than_seconds) if older_than_seconds < 0: raise ValueError(_NEGATIVE_RETENTION_MSG.format(older_than_seconds)) - cutoff = int(time.time()) - int(older_than_seconds) + cutoff = int(time.time()) - older_than_seconds with write_txn(conn): cur = conn.execute( "DELETE FROM task_events WHERE created_at < ? AND kind != 'decomposed' AND task_id IN "