Repository navigation
Score saved scans as of when they were taken (roadmap 3.6) - #34
Merged
Merged
Conversation
Rescores aged saved scans against today, so results drifted by the day and a past figure couldn't be reproduced. New scans record their time, and older ones are listed in the report and can be fixed to a date with --as-of. Story: PDX-28 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Story: PDX-28
Rescores aged saved scans against today, so recency rules gave different results each day and a past figure couldn't be reproduced. Scoring itself is unchanged for live scans.
scanned_at, and--rescoreages each scan against it, including OTX's pulses.--as-of YYYY-MM-DDis given.--refreshsets the scan's time to the refresh, so its newest reading isn't dated in the future.Measured
On the 55 real saved scans (no real lookups): all 55 have no recorded time, so they rely on
--as-offor now.The first row matches the recorded 2026-10-30 mean of 30.0, and running it twice gave a byte-identical report. The drift in the other rows is what this story removes for new scans.
Downsides
--as-ofis a statement by whoever runs it, not evidence of when a scan was taken. The existing scans' file times are 2026-10-30, but those can change, so they aren't used.Tested
199 tests pass locally; see CI for other versions. Tests run the real
collectandevaluatewith a fake clock on two days. With the code intact as a baseline they pass, and removing either the scoring or the OTX aging fails 2 tests. Live CLI: a bad date is refused.Not tested
A live
calibraterun writingscanned_at(onlyscan_rawwith stubs), or--refreshsetting it. The latter has no test.🤖 Generated with Claude Code