fix(worker): exclude pre-creation checks in today uptime#29
Merged
VrianCao merged 3 commits intoVrianCao:masterfrom Feb 18, 2026
Merged
fix(worker): exclude pre-creation checks in today uptime#29VrianCao merged 3 commits intoVrianCao:masterfrom
VrianCao merged 3 commits intoVrianCao:masterfrom
Conversation
Owner
|
感谢啊!!一直想修这个,一直被耽搁了结果被我忘记了! |
Contributor
Author
|
Sorry, my code seems to have some design issues; it shouldn't be set to |
Owner
I will review it soon. |
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
Fixes inconsistent uptime semantics for newly created monitors in
public/status.The synthetic current-day uptime calculation now clamps each monitor’s range start to
max(dayStart, monitor.created_at)so pre-creation time isnot counted as unknown/unavailable.
Changes
computeTodayPartialUptimeBatchinapps/worker/src/public/status.ts:created_atto monitor input.monitorRangeStart = max(rangeStart, created_at).computePublicStatusPayloadto passcreated_at.apps/worker/test/public-status.test.ts:clamps synthetic today uptime to monitor creation time for newly created monitors.Test Plan
pnpm lintpassespnpm typecheckpassespnpm testpassesunknown.Related Issues
Closes #28