Repository navigation
perf(ci): make micro-suite incompleteness loud + recalibrate alloc band - #704
Merged
Alexandre Zollinger Chohfi (azchohfi) merged 3 commits intoJun 26, 2026
Merged
Conversation
The reconciler micro section silently vanished from the perf-compare comment whenever the leg produced no comparison (the #693 regression: a per-round timeout dropped M5-M13 and went unnoticed for the PR's entire life). The omit reason was only Write-Log'd to the build log; the comment just lacked the table, so a timeout/missing-exe/thrown leg read as a clean absence. Surface incompleteness in the COMMENT instead: - Run-PerfBenchmark.ps1 captures a $microOmitReason at each omit site (interleave kept < 2 paired rounds, micro exe not built, leg threw) and threads it into Format-PerfComment. - Format-PerfMicroSection renders a visible GitHub [!WARNING] callout ("Micro-suite omitted this run -- <reason>") when there are no rows but the leg was attempted, and an "Incomplete -- N/13 benches" warning above the table when fewer than the canonical spec-047 M1-M13 count paired (a short table is otherwise indistinguishable from a clean full run). Stays silent only when the leg was not requested (null rows AND no reason). - New $script:MicroExpectedBenchCount = 13 sources the completeness check from the AllBenches.cs M1-M13 canonical count. Invoke-MicroInterleaved's return contract is unchanged (still $null on too-few rounds), so the existing interleave scenarios A-E are untouched; the omit reason is derived at the orchestrator level. Tests: PerfLib.Tests +15 (omit callout, N/13 note, silent-when-not-requested, end-to-end threading through Format-PerfComment), RunPerfBenchmark.Tests +2 (omit reason captured + threaded). 272 + 72 assertions green CI-style. Co-authored-by: Copilot <[email protected]>
PR5a cut MicroIterations 10000 -> 1000 to fit the per-side CI budget, but the micro-suite ALLOC min-effect band (MicroAllocMinEffectPct) was left at 1.0 -- the value that was effectively validated at 10000 iters. The residual per-op process-to-process alloc offset on non-deterministic benches (M5 dispatcher) scales as offset/iterations, so at the lower count the 1.0% band is too tight and risks a latent false-flag on live main (measurement-only -- it mislabels a verdict, never blocks a merge). - Raise MicroIterations 1000 -> 2000: the coordinator's (a)/(d) target; halves the per-op offset vs the merged 1000 and keeps wide headroom under the 180s per-round timeout (a round needs tens of seconds; a hang is still bounded). - Widen MicroAllocMinEffectPct 1.0 -> 3.0 as a deliberately conservative interim hedge (<= the ns band) so it does not false-flag at 2000 iters, while still catching real structural alloc changes (several percent to many-x). The PRECISE band, like the ns band, can only be set from a real-CI identical- binary interleaved A/B at the live iteration count (it runs from the default branch, so it is a POST-MERGE calibration); that pass is expected to tighten the band back toward the true offset. The band rationale comment was also refreshed to reflect PR5b's rep-interleaving (the old "not rep-interleaved" note was stale) and the ns "wider than alloc" note (both bands are now provisionally equal pending calibration). Tests: RunPerfBenchmark.Tests asserts the new 2000 default; PerfLib.Tests band- integration is unchanged (its 0.3% rise reads noise under either band). 272 + 72 assertions green CI-style. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the /perf CI harness micro-suite reporting so that missing/incomplete micro results are visible in the sticky comment (instead of silently disappearing), and adjusts micro-suite capacity/threshold constants to better match the newer iteration budget.
Changes:
- Add a visibility contract for the micro-suite section (explicit warning when omitted; warning when incomplete vs expected bench count).
- Thread a captured micro omit-reason from the orchestrator into
Format-PerfComment/Format-PerfMicroSection. - Recalibrate micro defaults/bands (
MicroIterationsdefault to 2000; alloc min-effect band to 3.0%) and extend tests accordingly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/stress_perf/ci/PerfLib.ps1 | Adds micro omit/incomplete rendering contract, introduces expected bench count constant, updates min-effect band, and threads -MicroOmitReason into comment rendering. |
| tests/stress_perf/ci/Run-PerfBenchmark.ps1 | Captures micro omit reasons at failure points, passes them into Format-PerfComment, and bumps -MicroIterations default to 2000. |
| tests/stress_perf/ci/PerfLib.Tests.ps1 | Adds/updates tests for the new micro section visibility contract and end-to-end omit-reason threading. |
| tests/stress_perf/ci/RunPerfBenchmark.Tests.ps1 | Updates default assertions (2000 iterations) and locks the new omit-reason wiring into the assembled comment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The PR5c loud-incompleteness check undercounted the micro suite as 13 benches. BenchCatalog.All actually emits 16 for `--variant Reactor` (spec-047 M1-M13 + OAlloc / OUpdate / C207), and Read-MicroBenchResults has no bench-id allowlist, so all 16 are compared. With ExpectedCount=13 a real 13-of-16 run reads "complete" -- and extra rows could mask a missing M-bench (>=13 rows, no warning) -- the exact silent-omit this PR exists to kill. Caught independently by the internal pr-review fan-out, the gpt-5.4 cross-check, and the GitHub Copilot reviewer. - PerfLib.ps1: $script:MicroExpectedBenchCount 13 -> 16, with a doc comment naming the 3 supplementary benches and the source of truth. Setting the denominator to the true full emitted count eliminates the masking: the max distinct paired count is 16, so any dropped bench drops below 16 and fires the warning. - Drift guard (PerfLib.Tests): parse BenchCatalog.All from AllBenches.cs and assert it equals the constant, so the mirror cannot silently drift again. Source is read, never built -- runs on any host. - Default-resolution test: Format-PerfMicroSection with no -ExpectedCount must resolve to the canonical 16 (the production Format-PerfComment call shape that the wrong default would have mis-labeled). - Close the last silent-omit path (review F2): when the interleave succeeds but yields zero comparable rows, set an omit reason so the section renders the loud callout instead of vanishing. Per-site omit-reason assertions added for all four failure modes. - Sanitize the omit reason (review F3 / Copilot): collapse whitespace + CR/LF and cap length before interpolating into the single-line GitHub blockquote, so a stack-trace-laden message can't corrupt the comment. - Lock the widened 3.0% alloc band (review F4): near-threshold tests prove a ~2% delta now reads noise (would have flagged at the old 1.0%) while a ~4% delta still flags; fix the stale "~1%" band comment. - Revert the wrong "13-bench" comments to 16; update the stale README MicroIterations default 1000 -> 2000. PerfLib.Tests 283 green, RunPerfBenchmark.Tests 76 green. Footprint: 5 files, all tests/stress_perf/ci/**, 0 src/Reactor. Co-authored-by: Copilot <[email protected]>
Alexandre Zollinger Chohfi (azchohfi)
marked this pull request as ready for review
June 26, 2026 16:56
Alexandre Zollinger Chohfi (azchohfi)
requested a review
from Chris Anderson (codemonkeychris)
as a code owner
June 26, 2026 16:56
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.
What & why
Two coupled follow-ups to the micro-suite leg, both surfaced by the #692 acceptance run (where the 13-bench micro section was silently absent from the /perf comment for #693's entire life because a timeout dropped it with no visible trace). Class-B harness-only PR — 0
src/Reactorchanges, everything undertests/stress_perf/ci/**.(c) Make incompleteness LOUD in the /perf comment
The root failure was silence:
Invoke-MicroInterleavedreturns$nullon too-few-rounds →Format-PerfMicroSectionreturned@()→ the section just vanished, indistinguishable from "not run". Now:Format-PerfMicroSectionhas an explicit 3-way visibility contract:> [!WARNING]"Incomplete — N/13 benches" callout when a side dropped benches (a short table otherwise looks like a clean full run);> [!WARNING]"Micro-suite omitted this run — <reason>" callout (the leg was attempted and failed);Format-PerfComment -MicroOmitReason. TheInvoke-MicroInterleavedreturn contract is unchanged (still$nullon failure — its scenario tests A–E are untouched); the reason is inferred one level up.$script:MicroExpectedBenchCount = 13(canonical spec-047 M1–M13; source of truth isAllBenches.cs) drives the N/13 check.(d) Recalibrate the micro ALLOC band for the reduced iteration count
PR5a (#700) cut
MicroIterations10000→1000 to fit budget, but leftMicroAllocMinEffectPct = 1.0— the value effectively validated at 10000 iters. The residual per-op process-to-process alloc offset on non-deterministic benches (M5 dispatcher) scales asoffset/iterations, so 1.0% is now too tight → latent false-flag risk (measurement-only; mislabels a verdict, never blocks a merge).MicroIterations1000 → 2000 (the coordinator's stated (a)/(d) target; halves the per-op offset vs the merged 1000; ~+2–4 min micro leg, well within the 75-min job timeout; per-round 180s cap bounds any hang).MicroAllocMinEffectPct1.0 → 3.0 — a deliberately conservative interim hedge (≤ the ns band), chosen to avoid a false-flag at 2000 iters while still catching real structural alloc changes (several percent to many-x). Provisional, exactly like the ns band: the precise value can only be set from a real-CI identical-binary interleaved A/B at the live iteration count, which builds from the default branch → a post-merge calibration expected to tighten it back toward the true offset.16-bench→13-benchtypo.Footprint
4 files, all
tests/stress_perf/ci/**, 0src/Reactor:PerfLib.ps1— render contract + band constantsRun-PerfBenchmark.ps1— omit-reason capture + iter defaultPerfLib.Tests.ps1/RunPerfBenchmark.Tests.ps1— coverageTests
PerfLib.Tests272 (+15) andRunPerfBenchmark.Tests72 (+2) green CI-style. New coverage: omit-callout render, N/13 incompleteness note, silent-when-not-requested, end-to-end-MicroOmitReasonthreading, and the updated 2000-iter default assertion. The band-integration test is unchanged (its ~0.3% synthetic rise reads "noise" under either band).Two decisions flagged for coordinator verify
🤖 Class-B coordinator-merge: gate-clean DRAFT → both reviews → HOLD for coordinator verify + press. Do not self-merge.
Co-authored-by: Copilot [email protected]