fix(heartbeat): return false for zero-width active-hours window#21408
Merged
gumadeiras merged 5 commits intoopenclaw:mainfrom Feb 20, 2026
Merged
Conversation
Comment on lines
85
to
+86
| if (startMin === endMin) { | ||
| return true; | ||
| return false; |
Contributor
There was a problem hiding this comment.
test at src/infra/heartbeat-active-hours.test.ts:42-51 expects true but this now returns false
Suggested change
| if (startMin === endMin) { | |
| return true; | |
| return false; | |
| if (startMin === endMin) { | |
| return false; | |
| } |
update the test's expectation from .toBe(true) to .toBe(false)
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/infra/heartbeat-active-hours.ts
Line: 85-86
Comment:
test at `src/infra/heartbeat-active-hours.test.ts:42-51` expects `true` but this now returns `false`
```suggestion
if (startMin === endMin) {
return false;
}
```
update the test's expectation from `.toBe(true)` to `.toBe(false)`
How can I resolve this? If you propose a fix, please make it concise.
Contributor
Author
|
Fixed in latest push: Updated |
abc5ebb to
30c7d80
Compare
When startMin === endMin the active window has zero width and no time should ever fall inside it. The previous code returned true (always active) which is the opposite of the intended behaviour. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…h active-hours window Co-Authored-By: Claude Opus 4.6 <[email protected]>
30c7d80 to
f706c6b
Compare
Member
|
Merged via squash. Thanks @adhitShet! |
vignesh07
pushed a commit
to pahdo/openclaw
that referenced
this pull request
Feb 20, 2026
…claw#21408) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 993860b 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
…claw#21408) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 993860b 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
…claw#21408) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 993860b 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
…claw#21408) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 993860b 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
Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 993860b 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
Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 993860b 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
…claw#21408) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 993860b 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
…claw#21408) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 993860b Co-authored-by: adhitShet <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
6 tasks
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…claw#21408) Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 993860b Co-authored-by: adhitShet <[email protected]> Co-authored-by: gumadeiras <[email protected]> Reviewed-by: @gumadeiras
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
🤖 Generated with Claude Code
Greptile Summary
fixed the logic for zero-width active-hours window to correctly return
falsewhen start equals endTest failure: the test at
heartbeat-active-hours.test.ts:42-51still expectstruewhenstartMin === endMin, but the fix now returnsfalse. This test must be updated to expectfalseinstead.Confidence Score: 2/5
src/infra/heartbeat-active-hours.test.tsneeds update at line 50Last reviewed commit: 34f16d6