diff --git a/.github/skills/oncall-weekly-telemetry-report/assets/scripts/validate-report.ps1 b/.github/skills/oncall-weekly-telemetry-report/assets/scripts/validate-report.ps1 index 148871f5..e13494b3 100644 --- a/.github/skills/oncall-weekly-telemetry-report/assets/scripts/validate-report.ps1 +++ b/.github/skills/oncall-weekly-telemetry-report/assets/scripts/validate-report.ps1 @@ -21,6 +21,9 @@ on .dim-name / .dim-row > span:first-of-type AND min-width:0 on .dim / .dim-row so long calling-app / version names truncate inside their dim card rather than bleeding out. + 9c. .dim-pct content guard — every dim-pct cell must be a short bare + percentage (no "(...)" annotations, <= 9 chars). A long pct value + starves the flex name column and collapses real labels to "1...". Exits with non-zero status if any HARD check fails (stale tokens, devs/reqs leak, U+FFFD, unbalanced div depth, missing layout-guard CSS). @@ -262,6 +265,24 @@ if ($hasAttrCard) { } } +# 9c. Dim-pct content guard (CONTENT, not CSS): the percent cell must be a short +# bare percentage (e.g. "50.7%", "100%", "+759%"). A long value such as +# "75% (+111%)" sits in the narrow, fixed pct column and starves the flex +# name column, collapsing real labels to a couple of chars ("16.1.0" -> "1..."). +# 9b only proves the CSS guard exists; this catches the authoring mistake that +# slips past it. WoW deltas belong in card prose / tags, never in dim-pct. +if ($hasAttrCard) { + $badPct = [regex]::Matches($content, '([^<]*)') | + ForEach-Object { $_.Groups[1].Value.Trim() } | + Where-Object { $_ -match '\(' -or $_.Length -gt 9 } + if ($badPct.Count -gt 0) { + $sample = (($badPct | Select-Object -Unique -First 5) -join ' | ') + Add-Fail "dim-pct cells must be a short bare percentage (e.g. '50.7%'). Found $($badPct.Count) overlong/annotated value(s) that starve the name column and truncate labels: $sample . Move WoW deltas into the card prose / tags, not the pct cell." + } else { + Pass "dim-pct cells are short bare percentages (name column protected)" + } +} + # ---- 10. Fabricated-sparkline heuristic (v8 regression — hand-rolled data-trend arrays) ---- # Past failure mode: when 60d bucketer dropped a sub-floor code, the report author # fabricated a "roughly monotonic" 8-week series inline in the WoW table HTML. diff --git a/.github/skills/oncall-weekly-telemetry-report/assets/templates/report-template.html b/.github/skills/oncall-weekly-telemetry-report/assets/templates/report-template.html index 513d12ea..20a1654e 100644 --- a/.github/skills/oncall-weekly-telemetry-report/assets/templates/report-template.html +++ b/.github/skills/oncall-weekly-telemetry-report/assets/templates/report-template.html @@ -210,12 +210,18 @@ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "SF Mono", Consolas, monospace; font-size: 11.5px; color: #0d1117; } - /* Percent column — classed (.dim-pct) OR last unclassed */ + /* Percent column — classed (.dim-pct) OR last unclassed . + MUST be a short bare percentage (e.g. "50.7%"). flex-shrink:1 + a hard + max-width cap guarantee that even if an author wrongly stuffs a long value + (e.g. "75% (+111%)") into this cell it truncates ITSELF instead of starving + the flex name column and collapsing real labels to "1...". The validator + (check 9c) additionally fails the build on overlong/annotated pct cells. */ .dim-row .dim-pct, .dim-row > span:last-of-type { - flex: 0 0 auto; + flex: 0 1 auto; font-variant-numeric: tabular-nums; color: #656d76; font-size: 11px; - min-width: 38px; text-align: right; white-space: nowrap; + min-width: 38px; max-width: 72px; overflow: hidden; text-overflow: ellipsis; + text-align: right; white-space: nowrap; } /* Single-span placeholder rows (e.g. "Not sliced — …") — allow wrap, not truncate. Long inline blocks should wrap inside the cell rather than expanding diff --git a/.github/skills/oncall-weekly-telemetry-report/assets/templates/spike-card.html b/.github/skills/oncall-weekly-telemetry-report/assets/templates/spike-card.html index 70f4a63c..efec9682 100644 --- a/.github/skills/oncall-weekly-telemetry-report/assets/templates/spike-card.html +++ b/.github/skills/oncall-weekly-telemetry-report/assets/templates/spike-card.html @@ -63,9 +63,17 @@ Not sliced — OEM not suspected. - Long names (calling apps, broker versions with annotations) MUST truncate - to an ellipsis — never wrap, never bleed out of the .dim card. The CSS - in assets/templates/report-template.html handles this for both variants. --> + Long NAMES (calling apps, broker versions) MUST truncate to an ellipsis — + never wrap, never bleed out of the .dim card. The CSS in + assets/templates/report-template.html handles this for both variants. + + dim-pct RULE (do not violate): the percent cell is a SHORT bare percentage + only — "36.6%", "100%", "+759%". NEVER put WoW deltas or annotations like + "50.7% (+646%)" or "75% (+111%)" in the pct cell. The pct column is narrow; + a long value starves the flex name column and collapses real labels to a + couple of characters ("16.1.0" -> "1..."). Put per-slice movement in the + card prose / tags / Caller hot-spots instead. The validator fails (9c) on + any dim-pct that contains "(" or exceeds 9 characters. -->
Span
{{SPAN_DIM_ROWS}}