Skip to content

insights: the page shows the day of the scan, not a day in January 1970 - #43

Merged
teocns merged 1 commit into
mainfrom
insights-scan-date
Nov 13, 2026
Merged

teocns merged 1 commit into
mainfrom
insights-scan-date

Conversation

@teocns

@teocns teocns commented Nov 13, 2026

Copy link
Copy Markdown
Member

Before and after:

  • Before, the scan saved 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 take made - 30 days as 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.
  • After, the date comes from clock.now(), the one place the scan reads the calendar clock. The timer is used only for timing.
  • A test in the sources this repository is published from now reads every shipped Python file and fails when a 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.json or kit.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.

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
@teocns teocns mentioned this pull request Nov 13, 2026
@teocns
teocns merged commit 30e759e into main Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant