fix(heartbeat): constrain 24-hour sentinel to 24:00 only in regex (#21410)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 7b8fe75738
Co-authored-by: adhitShet <131381638+adhitShet@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
adhitShet
2026-02-20 04:52:38 +04:00
committed by GitHub
parent 399781aaca
commit 57f0ac21e9
2 changed files with 2 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ import type { AgentDefaultsConfig } from "../config/types.agent-defaults.js";
type HeartbeatConfig = AgentDefaultsConfig["heartbeat"];
const ACTIVE_HOURS_TIME_PATTERN = /^([01]\d|2[0-3]|24):([0-5]\d)$/;
const ACTIVE_HOURS_TIME_PATTERN = /^(?:([01]\d|2[0-3]):([0-5]\d)|24:00)$/;
function resolveActiveHoursTimezone(cfg: OpenClawConfig, raw?: string): string {
const trimmed = raw?.trim();