Repository navigation
analysis: cadence in one table - #174
Merged
Merged
Conversation
trick77
force-pushed
the
analysis-cadence-table
branch
2 times, most recently
from
November 19, 2026 08:31
8614e45 to
1ad5557
Compare
Deps.TeamNames and the teams handler sorted the configured teams themselves; config.Config.TeamNames already does.
Compute, Assess and build defaulted a nil previous dataset or baseline; production always passes a loaded previous period (api read, analysis assess). The default moved into the tests' noPrevious and buildAlone; behaviour unchanged.
stageHistogram and histogram share edgeAbove. ClosedPeriod, ClosedPrevious and PreviousPeriod are whole weeks ending at a Monday: weeksBefore takes that end. NewPeriod ends at now, mid-week, so it keeps periodFrom.
due and MaxAge encoded each window's schedule twice (12: every second week / 2, 26: first Monday / 5). Both read cadenceOf now; an unnamed window stays weekly, max age 1. A test holds every cadence's widest gap to its maxAge; NextRun searches at most 2*maxAge+1 weeks, so a cadence never due cannot spin.
trick77
force-pushed
the
analysis-cadence-table
branch
from
November 19, 2026 08:42
1ad5557 to
2756da5
Compare
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.
due (schedule.go) and MaxAge (service.go) encoded each window's schedule twice: 12 weeks every second week / max age 2, 26 the first Monday of the month / max age 5. One cadence per window in a table (cadences), both read it; a window the table does not name stays weekly, max age 1, as before. MaxAge's doc and the schedule header point at the table.
TestCadenceGaps walks 12 years of Zurich Mondays per cadence: widest gap between due weeks = maxAge, first due within maxAge. NextRun searches at most 2*maxAge+1 weeks and reports false past that (status then leaves next_run null), so a never-due cadence cannot spin; unreachable for the real cadences per that test.
Old vs new due and MaxAge compared over every Monday 1995-2045 in 5 zones for windows -1, 0, 1, 2, 4, 8, 12, 13, 26, 52 (755,700 calls): identical.