Skip to content

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

Merged
gumadeiras merged 2 commits intoopenclaw:mainfrom
adhitShet:fix/infra-heartbeat-regex-24-hour
Feb 20, 2026
Merged

fix(heartbeat): constrain 24-hour sentinel to 24:00 only in regex#21410
gumadeiras merged 2 commits intoopenclaw:mainfrom
adhitShet:fix/infra-heartbeat-regex-24-hour

Conversation

@adhitShet
Copy link
Copy Markdown
Contributor

@adhitShet adhitShet commented Feb 19, 2026

Summary

  • Bug fix

🤖 Generated with Claude Code

Greptile Summary

Fixed regex pattern to only accept 24:00 as the end-of-day sentinel value. The previous pattern incorrectly matched 24:01 through 24:59 because the alternation allowed the 24 hour with any valid minute pattern [0-5]\d. The new pattern uses top-level alternation to treat 24:00 as a literal special case, correctly restricting 24-hour time to exactly 24:00.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The fix correctly addresses a regex bug that allowed invalid times like 24:01-24:59. The change is surgical, affects only the regex pattern, and the parsing logic at line 36-38 already validates that hour 24 requires minute 0. The fix aligns the regex validation with the parsing validation and documented behavior.
  • No files require special attention

Last reviewed commit: bcc75c5

@gumadeiras gumadeiras self-assigned this Feb 20, 2026
@gumadeiras gumadeiras force-pushed the fix/infra-heartbeat-regex-24-hour branch from bcc75c5 to 54d3189 Compare February 20, 2026 00:50
Adi-A and others added 2 commits February 19, 2026 19:50
The previous pattern /^([01]\d|2[0-3]|24):([0-5]\d)$/ matched 24:01-24:59
because the 24 alternative was not restricted to :00. Restructured the regex
so only the literal string "24:00" is accepted as the end-of-day sentinel.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@gumadeiras gumadeiras force-pushed the fix/infra-heartbeat-regex-24-hour branch from 54d3189 to 7b8fe75 Compare February 20, 2026 00:51
@gumadeiras gumadeiras merged commit 57f0ac2 into openclaw:main Feb 20, 2026
23 checks passed
@gumadeiras
Copy link
Copy Markdown
Member

Merged via squash.

Thanks @adhitShet!

vignesh07 pushed a commit to pahdo/openclaw that referenced this pull request Feb 20, 2026
…enclaw#21410)

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

Prepared head SHA: 7b8fe75
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
anisoptera pushed a commit to anisoptera/openclaw that referenced this pull request Feb 20, 2026
…enclaw#21410)

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

Prepared head SHA: 7b8fe75
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
rodrigogs pushed a commit to rodrigogs/openclaw that referenced this pull request Feb 20, 2026
…enclaw#21410)

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

Prepared head SHA: 7b8fe75
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
Hansen1018 added a commit to Hansen1018/openclaw that referenced this pull request Feb 21, 2026
…enclaw#21410)

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

Prepared head SHA: 7b8fe75
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
vincentkoc pushed a commit that referenced this pull request Feb 21, 2026
…1410)

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

Prepared head SHA: 7b8fe75
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
vincentkoc pushed a commit that referenced this pull request Feb 21, 2026
…1410)

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

Prepared head SHA: 7b8fe75
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
mmyyfirstb pushed a commit to mmyyfirstb/openclaw that referenced this pull request Feb 21, 2026
…enclaw#21410)

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

Prepared head SHA: 7b8fe75
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
obviyus pushed a commit to guirguispierre/openclaw that referenced this pull request Feb 22, 2026
…enclaw#21410)

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

Prepared head SHA: 7b8fe75
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
…enclaw#21410)

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

Prepared head SHA: 7b8fe75
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants