Skip to content

analysis: cadence in one table - #174

Merged
trick77 merged 4 commits into
masterfrom
analysis-cadence-table
Nov 19, 2026
Merged

trick77 merged 4 commits into
masterfrom
analysis-cadence-table

Conversation

@trick77

@trick77 trick77 commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

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.

@trick77
trick77 force-pushed the analysis-cadence-table branch 2 times, most recently from 8614e45 to 1ad5557 Compare November 19, 2026 08:31
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
trick77 force-pushed the analysis-cadence-table branch from 1ad5557 to 2756da5 Compare November 19, 2026 08:42
@trick77
trick77 merged commit 2756da5 into master Nov 19, 2026
1 check passed
@trick77
trick77 deleted the analysis-cadence-table branch November 19, 2026 08:44
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