You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 02e2838
Browse filesBrowse the repository at this point in the historyBrowse files
pm(patrol): re-derive H8/H22/H23's window arithmetic against the measured merge rate (#11118)
H8's docblock justified a two-page window with "~18 merges/day", a figure the
repo had outrun more than sevenfold. The sentence claimed a reach "well past the
longest measured unexecuted-verdict latency" (~11 days at that rate); the window
it described had become 1.78 days. Nothing could notice, because the arithmetic
was prose.
Re-measured 2026-08-23T08:42:15Z, windows pinned as full ISO instants per the
card's approxidate warning:
rate 300 commits, 2026-08-21T04:00:19Z..2026-08-23T08:22:47Z = ~137.5/day
(300/300 carrying the squash marker; agrees with the card's ~132/day)
H8 2 pages = 1.78d (oldest merge 2026-08-21T14:00:28Z)
4 pages = 2.96d (oldest merge 2026-08-20T09:41:02Z) -> widened
H22 2 pages = 0.65d of update-recency (~15.6 HOURS, ~2.6 sweeps)
4 pages = 1.70d -> widened
H23 3 pages = 2.18d, ~8.7 sweeps -> unchanged
H8 is widened rather than restated because its damage model is asymmetric: the
residue it reports is the paired write nobody noticed, which correlates with
age, so the population most likely to age out is the population the row is for.
H22's surprise is the divisor — ordered by `updated`, its rows are consumed by
issue ACTIVITY, not closures, and the rate is bursty in exactly the direction
that ejects fresh residue while residue is being produced fastest. Four pages
restores what its anti-drowning argument was choosing (a couple of days) and
does not reopen the deep tail it refuses (500+ carriers spanning months). H23
kept its cap: it is the one window that DERIVED its number from a measured rate,
and the only one that survived a re-measure.
The derivation is now executable — `windowCoverageDays`, `sweepOverlap`,
`MEASURED_MERGES_PER_DAY`, `PATROL_CADENCE_HOURS` — so a cap and the sentence
justifying it cannot drift apart again. Cost: four extra requests per sweep,
four sweeps a day, against a 15,000/h quota.
Self-test 977 -> 997 cases, including the degenerate inputs that must answer
"cannot divide" rather than Infinity.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RMTpSRF5CjMmQBFfPtPCwJ
* = 2.18 days at ~137.5/day, i.e. `sweepOverlap(2.18)` ≈ 8.7 runs. This item's
5273
+
* docblock was the only one that DERIVED its cap from a measured rate instead
5274
+
* of quoting a remembered one, and it is the only one that survived contact
5275
+
* with a re-measure — the argument for keeping the derivation executable
5276
+
* (`windowCoverageDays`, `MEASURED_MERGES_PER_DAY`) rather than in prose.
5154
5277
*
5155
5278
* No `sha=` parameter: the endpoint defaults to the repository's own default
5156
5279
* branch, which keeps this reader repo-agnostic exactly like every other listing
@@ -5162,7 +5285,7 @@ async function listRecentlyClosedIssues() {
5162
5285
* commits would simply feed this row a few branch-side messages, which are a
5163
5286
* surface GitHub's parser reads too — wider, never wrong.
5164
5287
*/
5165
-
const COMMIT_WINDOW_PAGES = 3;
5288
+
export const COMMIT_WINDOW_PAGES = 3;
5166
5289
5167
5290
async function listRecentDefaultBranchCommits() {
5168
5291
const out = [];
@@ -8292,6 +8415,36 @@ function selfTest() {
8292
8415
t('vocabulary: a fresh awaiting park is still clean', h11ImportantParked(parkedCard(['bug', AWAITING_MAINTAINER_LABEL], { created: daysAgo(2) }), NOW), null);
8293
8416
t('vocabulary: an UNimportant awaiting card is not inventory', h11ImportantParked(parkedCard([AWAITING_MAINTAINER_LABEL]), NOW), null);
8294
8417
8418
+
// -- The window arithmetic (#11118) ----------------------------------------
8419
+
// The derivation is executable so that a cap and the sentence justifying it
8420
+
// cannot drift apart again: H8's docblock quoted `~18 merges/day` while the
8421
+
// repo ran at ~132, which turned a claimed ~11-day reach into ~1.8 days with
8422
+
// nothing able to notice.
8423
+
t('windows: coverage is rows / rate', windowCoverageDays(400, 100), 4);
8424
+
t('windows: H8 four pages against the measured rate', Number(windowCoverageDays(MERGED_WINDOW_PAGES * 100, MEASURED_MERGES_PER_DAY).toFixed(2)), 2.91);
8425
+
t('windows: …which is what the live reading measured (2.96d), within a rounding', windowCoverageDays(MERGED_WINDOW_PAGES * 100, MEASURED_MERGES_PER_DAY) > 2.5, true);
8426
+
t('windows: the OLD two-page cap was under two days, not the ~11 its prose claimed', Number(windowCoverageDays(200, MEASURED_MERGES_PER_DAY).toFixed(2)), 1.45);
8427
+
t('windows: …and the stale ~18/day figure is what produced the ~11-day claim', Number(windowCoverageDays(200, 18).toFixed(1)), 11.1);
8428
+
t('windows: H23 keeps three pages', COMMIT_WINDOW_PAGES, 3);
8429
+
t('windows: …and its re-measured coverage still clears two days', windowCoverageDays(COMMIT_WINDOW_PAGES * 100, MEASURED_MERGES_PER_DAY) > 2, true);
8430
+
t('windows: H22 widened to four pages', CLOSED_ISSUE_WINDOW_PAGES, 4);
8431
+
t('windows: H8 widened to four pages', MERGED_WINDOW_PAGES, 4);
8432
+
// The cadence side: a window is a detection HORIZON, and the overlap says how
8433
+
// many runs see a row before it is gone for good.
8434
+
t('windows: the patrol cadence is the workflow\'s', PATROL_CADENCE_HOURS, 6);
8435
+
t('windows: overlap is coverage over cadence', sweepOverlap(1, 6), 4);
8436
+
t('windows: H8\'s new window is seen by ~12 runs', Math.round(sweepOverlap(windowCoverageDays(400, MEASURED_MERGES_PER_DAY))), 12);
8437
+
t('windows: H22\'s OLD 0.65d reading was ~2.6 runs (the thin one)', Number(sweepOverlap(0.65).toFixed(1)), 2.6);
8438
+
t('windows: H22\'s measured new reading is ~6.8 runs', Number(sweepOverlap(1.7).toFixed(1)), 6.8);
8439
+
// Degenerate inputs answer "cannot divide" rather than Infinity or NaN — a
8440
+
// number no reading produced must never be renderable as a boundary.
8441
+
t('windows: a zero rate cannot divide', windowCoverageDays(200, 0), null);
8442
+
t('windows: a negative rate cannot divide', windowCoverageDays(200, -5), null);
8443
+
t('windows: a missing rate cannot divide', windowCoverageDays(200, undefined), null);
8444
+
t('windows: a missing row count cannot divide', windowCoverageDays(undefined, 137.5), null);
8445
+
t('windows: a zero cadence has no overlap', sweepOverlap(2, 0), null);
8446
+
t('windows: an unusable coverage has no overlap', sweepOverlap(null), null);
8447
+
8295
8448
// -- H26: a block whose target can never close, + the stale chain (#11219) --
8296
8449
// The measured cards, by name, and both directions of every leg.
0 commit comments