Skip to content

Commit 1ffc222

Browse files
committed
wip(pm): disclose H8's time-capped window and its truncation on the summary line
1 parent a6bdfe0 commit 1ffc222

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

scripts/pm/check-half-states.mjs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7186,6 +7186,19 @@ export function summaryLine(counts, findingCount) {
71867186
`issue(s) in the unscoped pass (H13–H15, H18), ${counts.prs} open PR(s) ` +
71877187
`(merge state read on ${probed} of ${candidates} H16 candidate(s)) ` +
71887188
`and ${counts.merged} recently-merged PR(s) in ${counts.repo} — ${findingCount} half-state(s) found. ` +
7189+
// H8's window disclosure (#13499). The TRUNCATED half is the load-bearing
7190+
// one: a ceiling-bound window is a page cap again, and a page cap that
7191+
// reads as a completed time window is the exact inversion this repair
7192+
// removed. Gathering the flag and never printing it would be a measurement
7193+
// nobody can act on, so it is stated on every run, both ways.
7194+
`H8's merged window is a TIME cap of ${MERGED_WINDOW_DAYS} day(s), read in ${counts.mergedPages ?? 0} page(s)` +
7195+
`${
7196+
counts.mergedWindowTruncated
7197+
? ` — ⛔ TRUNCATED at the ${MERGED_WINDOW_PAGE_CEILING}-page quota ceiling BEFORE reaching that horizon, so ` +
7198+
'this pass is a page cap and a delivery older than what those pages reached is invisible; ' +
7199+
'the merge rate has outgrown the ceiling and it needs raising'
7200+
: ' (horizon reached: a delivery inside the window was seen, not merely the first N rows)'
7201+
}. ` +
71897202
`H22 read ${counts.closed ?? 0} recently-closed issue(s) for \`pm:*\` state residue (bounded window; ` +
71907203
`older closed carriers are outside it by design` +
71917204
`${counts.closedFloor ? `, and only cards closed on/after ${counts.closedFloor} are judged — ` +
@@ -13006,6 +13019,19 @@ function selfTest() {
1300613019
t('rate premise: the pin carries its own measurement date', /^\d{4}-\d{2}-\d{2}$/.test(MEASURED_MERGES_PER_DAY_AT), true);
1300713020
t('rate premise: both window counters ride the enumerated contract', SWEEP_COUNT_KEYS.includes('mergedPages') && SWEEP_COUNT_KEYS.includes('mergedWindowTruncated'), true);
1300813021

13022+
// The window's DISCLOSURE. A gathered flag that is never printed is a
13023+
// measurement nobody can act on, so both directions are pinned on the one
13024+
// line every run ends with.
13025+
const h8win = (extra) => summaryLine({ repo: 'o/r', issues: 1, unscoped: 1, prs: 1, merged: 900, ...extra }, 0);
13026+
t('H8 summary: the window is stated as a TIME cap', h8win({ mergedPages: 9, mergedWindowTruncated: false }).includes(`TIME cap of ${MERGED_WINDOW_DAYS} day(s)`), true);
13027+
t('H8 summary: …with the pages it actually cost', h8win({ mergedPages: 9, mergedWindowTruncated: false }).includes('read in 9 page(s)'), true);
13028+
t('H8 summary: a completed window says the horizon was reached', h8win({ mergedPages: 9, mergedWindowTruncated: false }).includes('horizon reached'), true);
13029+
// ⛔ The inversion this repair removed: a ceiling-bound pass is a page cap
13030+
// again and must never read as a completed time window (#4690).
13031+
t('H8 summary: a ceiling-bound window says TRUNCATED', h8win({ mergedPages: MERGED_WINDOW_PAGE_CEILING, mergedWindowTruncated: true }).includes('TRUNCATED'), true);
13032+
t('H8 summary: …and does NOT claim the horizon was reached', h8win({ mergedPages: MERGED_WINDOW_PAGE_CEILING, mergedWindowTruncated: true }).includes('horizon reached'), false);
13033+
t('H8 summary: …and says a delivery past it is invisible', h8win({ mergedPages: MERGED_WINDOW_PAGE_CEILING, mergedWindowTruncated: true }).includes('is invisible'), true);
13034+
1300913035
// -- The EGRESS prerequisite: proxy relaunch (#13526 leg 1) ----------------
1301013036
//
1301113037
// Measured: an agent container's `GITHUB_TOKEN` is a 14-char proxy

0 commit comments

Comments
 (0)