Skip to content

The agent that grows with you

refactor(kanban_db): drop 76 zero-reference split-module re-exports

Teknium52c1705cc387
diff --git a/hermes_cli/kanban_db.py b/hermes_cli/kanban_db.py
index 2f6b0575cdc..0d9499390fd 100644
--- a/hermes_cli/kanban_db.py
+++ b/hermes_cli/kanban_db.py
@@ -450,6 +450,7 @@ def scoped_current_board(slug: str):
finally:
_CURRENT_BOARD_OVERRIDE.reset(token)
+
# Slug validator: lowercase alphanumerics, digits, hyphens; 1–64 chars.
# Strict enough to stop traversal (`..`) and embedded path separators, loose
# enough that kebab-case names like ``atm10-server`` or ``hermes-agent``
@@ -5553,51 +5554,23 @@ def latest_summaries(
# stays the single monkeypatch target).
# ---------------------------------------------------------------------------
from hermes_cli.kanban_db_connect import ( # noqa: E402,F401
- DEFAULT_BUSY_TIMEOUT_MS,
KanbanDbCorruptError,
- RepairResult,
- _BUSY_MAX_RETRIES,
_BUSY_RETRY_MAX_S,
_BUSY_RETRY_MIN_S,
_CORRUPT_BACKUP_RETENTION,
- _EARLY_TASK_COLUMNS,
_INITIALIZED_PATHS,
- _INIT_LOCK,
- _INIT_LOCK_POLL_SECONDS,
_INIT_LOCK_TIMEOUT_SECONDS,
_LAST_WAL_CHECKPOINT,
- _LATER_TASK_COLUMNS,
- _REBUILD_SPECS,
- _RENAMED_TASK_COLUMNS,
- _REPAIRABLE_INDEX_ERROR_PATTERNS,
_SQLITE_HEADER,
_WAL_CHECKPOINT_INTERVAL_SECONDS,
- _WAL_CHECKPOINT_LOCK,
- _attempt_index_reindex_repair,
- _backup_corrupt_db,
_check_file_length_invariant,
_cross_process_init_lock,
_dispatch_tick_lock,
- _execute_boundary_with_retry,
- _guard_existing_db_is_healthy,
- _integrity_messages_ok,
- _is_busy_error,
- _looks_like_tls_record_at,
_maybe_checkpoint_wal,
_migrate_add_optional_columns,
- _open_configured,
- _probe_integrity,
- _prune_corrupt_backups,
- _rebuild_drifted_tables,
_repairable_index_names,
- _resolve_busy_timeout_ms,
- _run_integrity_check,
- _schema_is_present,
_sqlite_connect,
- _table_has_drifted,
- _try_lock_nb,
_unlock,
- _validate_sqlite_header,
connect,
connect_closing,
init_db,
@@ -5605,83 +5578,41 @@ from hermes_cli.kanban_db_connect import ( # noqa: E402,F401
write_txn,
)
from hermes_cli.kanban_db_workspace import ( # noqa: E402,F401
- _SCRATCH_TIP_MESSAGE,
- _SCRATCH_TIP_SENTINEL_NAME,
- _cleanup_worker_tmux,
_cleanup_workspace,
_cleanup_worktree_workspace,
_ensure_git_worktree,
- _git_branch_exists,
- _git_common_dir,
- _git_current_branch,
- _git_dir,
_git_toplevel,
- _is_linked_worktree_checkout,
_is_managed_scratch_path,
_managed_scratch_path_info,
- _mark_scratch_tip_shown,
_maybe_emit_scratch_tip,
- _nearest_existing_path,
- _repo_root_for_worktree_target,
_resolve_worktree_workspace,
_scratch_tip_sentinel_path,
_scratch_tip_shown,
_scratch_workspace,
- _try_cleanup_parent_workspaces,
resolve_workspace,
set_branch_name,
set_workspace_path,
)
from hermes_cli.kanban_db_dispatch import ( # noqa: E402,F401
DEFAULT_FAILURE_LIMIT,
- DEFAULT_LOG_BACKUP_COUNT,
- DEFAULT_LOG_ROTATE_BYTES,
DEFAULT_RATE_LIMIT_COOLDOWN_SECONDS,
DEFAULT_SPAWN_FAILURE_LIMIT,
- DERIVED_MAX_IN_PROGRESS_CEILING,
- DERIVED_MAX_IN_PROGRESS_FLOOR,
DispatchResult,
- KANBAN_TERMINAL_TIMEOUT_GRACE_SECONDS,
- MEMORY_GUARD_MB_PER_WORKER,
_PROTOCOL_VIOLATION_FAILURE_LIMIT,
- _PROTOCOL_VIOLATION_SCAN_LIMIT,
- _RECENT_WORKER_EXITS_MAX,
- _RECENT_WORKER_EXIT_TTL_SECONDS,
- _RESPAWN_BLOCKER_RE,
- _RESPAWN_GUARD_PR_URL_RE,
- _RESPAWN_GUARD_PR_WINDOW,
- _RESPAWN_GUARD_SUCCESS_WINDOW,
- _STALE_HEARTBEAT_GAP_SECONDS,
- _absolute_hermes_path,
- _apply_default_assignee,
_classify_worker_exit,
_clear_failure_counter,
_default_spawn,
_defer_reclaim_for_live_worker,
- _dispatch_lane_task,
- _dispatch_once_locked,
- _error_fingerprint,
- _has_spawnable,
- _hermes_path_argv,
- _is_windows_batch_shim,
_looks_like_path,
_memory_pressure_level,
- _module_hermes_argv,
- _path_search_names,
_pid_alive,
_positive_int,
- _protocol_violation_streak,
- _recent_worker_exits,
_record_spawn_failure,
_record_task_failure,
_record_worker_exit,
_resolve_hermes_argv,
_resolve_worker_cli_toolsets,
_retag_legacy_worker_sessions,
- _retagged_workspace_roots,
- _rotate_worker_log,
- _rotated_log_path,
- _safe_which_no_cwd,
_set_worker_pid,
_system_memory_sample,
_terminate_reclaimed_worker,
@@ -5689,7 +5620,6 @@ from hermes_cli.kanban_db_dispatch import ( # noqa: E402,F401
_worker_terminal_timeout_env,
check_respawn_guard,
configured_max_in_progress,
- count_running_tasks,
count_running_tasks_other_boards,
derive_default_max_in_progress,
detect_crashed_workers,
@@ -5704,14 +5634,9 @@ from hermes_cli.kanban_db_dispatch import ( # noqa: E402,F401
resolve_max_in_progress,
review_dispatch_enabled,
run_daemon,
- worker_log_rotation_config,
)
from hermes_cli.kanban_db_notify import ( # noqa: E402,F401
_NOTIFY_DELIVERY_MODES,
- _decode_notify_delivery_metadata,
- _encode_notify_delivery_metadata,
- _notify_cursor,
- _notify_profile_filter,
add_notify_sub,
advance_notify_cursor,
claim_unseen_events_for_sub,