Repository navigation
insights: the page shows the day of the scan, not a day in January 1970 - #43
Merged
Merged
Conversation
The scan saved time.monotonic() (seconds since the laptop started, on macOS) as its date. The date now comes from clock.now(); the timer is used only for timing. Kit-Commit: e454006906d317aad1b337f0866088ed8cc1f85d Kit-Only: plugins/insights
Merged
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.
Before and after:
time.monotonic()as its date (meta.to,meta.made). On macOS that is the number of seconds since the laptop started, so the page header read a day in early January 1970 ("read 2 Jan"), the Review's "Period" line ended on that day, and four problem checks that takemade - 30 daysas the start of their window (comprehension debt, doom loop, prompt bloat, starts from zero) had no start: they looked at all time. Since 0.6.6.clock.now(), the one place the scan reads the calendar clock. The timer is used only for timing.time.monotonic()value is turned into a date or stored under a date key. It fails on the old code at the line this changes.Test:
cd plugins/insights/scripts/v15/engine/variants/views && uv run --no-project python -m unittest test_view_built test_view_mylevel test_counts(OK)A full scan on a real laptop: the header reads today's date.
One change. I did not edit a version, a
CHANGELOG.md,marketplace.jsonorkit.json.Nothing personal: no names, no paths from my machine, no output of my own scan, no secrets.
No version change: nothing reaches members until a release.