Repository navigation
State the refresh slot envelope against a measured maximum, and say a daily store-metrics point is a last snapshot - #3141
Merged
erikdarlingdata merged 1 commit intoSep 7, 2026
Conversation
…y store-metrics point is a last snapshot The envelope on HeaviestHourlyRefreshObservedCeilingSeconds read its 306 s of clearance as the operating margin. That clearance belongs to the closed population the constant is the maximum of; a census read of one closed day puts the live maximum inside the warning band, leaving 121.6 s. The constant stays at 594, which is still the maximum of the population it names. get_store_metrics' daily series is a last-snapshot-per-day selection, so a maximum question asked of it is answered with the day's final reading. The description now says so and names the per-run route.
|
Reviewed. This PR is doc-comment / MCP tool description / log-message text only — no SQL or control-flow changes ( Checked and confirmed consistent:
No issues found. |
erikdarlingdata
deleted the
fix/3119-refresh-envelope-and-last-snapshot-caveat
branch
September 7, 2026 15:20
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.
HeaviestHourlyRefreshObservedCeilingSeconds' envelope read its 306 s of clearance as the operating margin — "better than a third of the slot". That clearance is a property of the closed 16-run population the constant is the maximum of, not of current load. A census read of one closed day (2026-09-06, 22 runs, one row per run fromtimescaledb_information.job_history) puts the maximum at 778.4 s: 121.6 s of the 900 s slot, 13.5% of it, and 28.4 s past the 750 s watch line, whichClassifyRefreshSlotHeadroombandsApproachingSlot.The constant does not move, and that is a decision rather than an omission
594 is defined as the maximum of a published population and is pinned as exactly that —
VerifyandTheDerivedFiguresAreExactlyStateable_AndTheConstantIsThePopulationMaximumboth requireCeiling == population.Max(). Raising it means republishing the population, and the census read that produced 778.4 s publishes a maximum and a run count, not 22 durations; a constant set from a figure whose population is not in the comment is the value-you-have-to-trust shape #3101 removed. Two arithmetic consequences say the same thing from the other end: the constant is anintand 778.4 is not one, andCeiling * 10 % 60 == 0is required becauseCompressionPhaseMinutesquotes the ceiling in minutes to one decimal — 778 fails it.So what changed is the envelope stated against the constant, and the margin sentence is now attributed to the population it belongs to. The new paragraph states the measured envelope separately, with its own closed window.
TimescaleSupportTests' two assertions that red at a ceiling past 750 are untripped, because the ceiling did not move — and the ordering480 < 594 < 750that #3107 rests the rejected-alternative argument on is likewise untouched.What the pin holds
The measured maximum is a quoted reading, on the same footing as the inadmissible snapshot readings; every figure the prose draws against it is derived and pinned in
RefreshCeilingProvenancePinTests:RefreshPhaseSlotSecondsless the maximum;RefreshSlotWarningSeconds— which also carries the strict-past claim, since no figure the pattern can hold equals a zero or negative difference;ClassifyRefreshSlotHeadroomrather than from the two inequalities — placed ABOVE the arithmetic, becauseVerifyis fail-fast and a maximum restated low enough to change its band trips the margin equality on the way past. A verdict clause underneath that one could not go red on its own, which is the property the rejected-alternative pin's own comment already names;EveryNumericPin_ReportsAnInjectedDriftsweeps all eight captured digits one at a time, so each of the four figures is individually load-bearing.The surface half
get_store_metrics' daily series isDISTINCT ON (object_kind, object_name, date_trunc('day', metric_time)) ... ORDER BY ... metric_time DESC— the day's LAST snapshot. For2026-09-06that is 705.2 s, so the surface understates the day by 73.2 s and places it below the warning line when a run was above it. Anyone re-deriving this envelope from the obvious surface concludes nothing entered the band, and nothing on the surface said so. Added to the tool's description:TheDescription_SaysADailyPointIsALastSnapshotAndNotAMaximumasserts that sentence and the shipped SQL TOGETHER, so either half moving lands there: a read that became max-preserving would make the caveat wrong in the other direction, and the pairing is what routes a reader to the description instead of only telling them the query changed.The same wrong pointer was in two operator-facing places and both are corrected rather than left for a follow-up.
HeaviestRefreshRuntimeSql' doc calledcollect.store_metrics"the complete per-run series"; it is the same hourly grain taken by a different sweep, and the daily point served from it is the day's last. TheApproachingSlotlog line offered that series as the per-run history an operator should go read; it now namestimescaledb_information.job_historyfirst and says what the hourly series is, pinned inTheRefreshSlotLogLine_IsLeveledByBand_AndSaysNothingWithoutAReading.The open-ended claims that were left
Two more in the same file, both about this envelope, both now closed to the set they were measured over.
RefreshSlotWarningSecondssaid 750 s is 26% above "the largest run the narrowed regime has been observed to produce" and that a reading in the band is "this job doing something its own record has no instance of" — the record now has one. It states the 26% against the closed population's maximum and points at the live envelope rather than restating its figures, so they keep one home. The five-sixths paragraph said a line at 83.3% "leaves the observed peak a full sixth of the slot below it and cannot cry wolf on load this store has already carried"; it now says that of the five readings it names.#3137's
NoOpenPopulationClaim_SurvivesOutsideTheSentenceThatRejectsItstays green, and one mutation re-proves it against prose this change adds rather than against the three sites it was written for.Mutations, each in isolation
Verified on disk before running, restored after, on a committed tree.
bands 700.4 s as InsideSlot rather than ApproachingSlotstated slot margin 121.6 s against 121.1 s derivedstated slot margin 194.8 s against 121.6 s derivedstated 21.6% of the slot against 13.5% derivedstated distance past the watch line 24.8 s against 28.4 s derivedno longer CLOSED by an absolute dayPIN PARSE MISS, whose message offers update / correct / delete1 doc comment(s) ... quantify over a population of readings without closing itpattern 'daily point is that day's LAST snapshot[^.]*maximum' did not match'timescaledb_information.job_history' not in given stringcollect.store_metrics'timescaledb_information.job_history' not in given stringmetric_time ASCLocal verification
Darling.Teststargetsnet10.0-windows, so the real test sources were compiled into a throwawaynet10.0console harness behind a minimal xUnit shim, OUTSIDE the worktree:RefreshCeilingProvenancePinTests,DarlingMcpStoreMetricsToolsTests,DocCommentHygieneTests,FleetIdentifierScrubTestsandTimescaleContinuousAggregateTestswhole, plus eight[Fact]bodies copied verbatim out ofTimescaleSupportTests. 86 tests, 86 passed,0 Error(s)from the same build.EveryCrefTargetResolvesOrIsBoundedand the per-solution-project cref floors pass, so the new crefs resolve and the whole-tree sweep read the whole tree.What is not here
The census read has been taken for one day. The ceiling's own "ONE READING IS LEFT OPEN" paragraph and the sample-versus-census limitation on the days after the boundary are unchanged, because a single day's census discharges neither.
OtherHourlyRefreshObservedCeilingSeconds' 140 s is still un-re-derived for the same reason its doc already gives.CHANGELOG entry text
get_store_metricssays a daily point is a last snapshot ([The hourly refresh envelope is stated at 306 s of slot margin; a measured run leaves 121.6 s and sits inside the warning band, and the daily series structurally cannot show it #3119]) -HeaviestHourlyRefreshObservedCeilingSecondsread its 306 s of clearance as the operating margin. That clearance belongs to the closed 16-run population the constant is the maximum of; a census read of one closed day overtimescaledb_information.job_historyputs the maximum at 778.4 s, which leaves 121.6 s of the 900 s slot (13.5% of it) and sits 28.4 s past the 750 s watch line - a readingClassifyRefreshSlotHeadroombandsApproachingSlot. The constant does not move: 594 is pinned as the maximum of the population the comment publishes, and the census read publishes a maximum and a run count rather than 22 durations, so raising it would replace a re-derivable value with one a reader has to trust. What moved is the envelope stated against it, and the margin sentence is now attributed to the population it describes. Every figure drawn against the measured maximum is derived and pinned - the slot margin, the share, the distance past the line, and the band taken from the shipped classifier rather than restated, placed above the arithmetic becauseVerifyis fail-fast and a verdict clause underneath the margin equality could not go red on its own - plus a closing-scope check that requires an absolute day rather than a scope read against a clock a doc comment does not have. The durable half is the surface.get_store_metrics' daily series is aDISTINCT ON ... metric_time DESCselection, so each point is that day's LAST snapshot: for the measured day it reads 705.2 s, understating the day by 73.2 s and placing it below the warning line when a run was above it, which means anyone re-deriving the envelope from the obvious surface concludes nothing entered the band. The description now says a daily point is a last snapshot rather than a maximum or a mean, that a maximum question cannot be answered from the series, and that the per-run route istimescaledb_information.job_history- asserted together with the shipped SQL, so a read that became max-preserving lands on the same pin instead of leaving the caveat wrong in the other direction. The two operator-facing places that offered the hourly self-metrics series as a per-run history -HeaviestRefreshRuntimeSql' doc and theApproachingSlotlog line - name the per-run route instead. Two remaining open-ended claims about this envelope are closed to the sets they were measured over: the watch line's "26% above the largest run the narrowed regime has been observed to produce", whose record now has an instance in the band, and the five-sixths choice's "cannot cry wolf on load this store has already carried". Darling