Skip to content

Reporter overhaul (6/6): performance budgets and daemon-aligned major default flip - #5870

Open
Sean Larkin (TheLarkInn) wants to merge 7 commits into
reporter/5-heft-protocolfrom
reporter/6-perf-and-default-flip
Open

Reporter overhaul (6/6): performance budgets and daemon-aligned major default flip#5870
Sean Larkin (TheLarkInn) wants to merge 7 commits into
reporter/5-heft-protocolfrom
reporter/6-perf-and-default-flip

Conversation

@TheLarkInn

@TheLarkInn Sean Larkin (TheLarkInn) commented Jul 15, 2026

Copy link
Copy Markdown
Member

📚 Reporter Overhaul PR stack (merge bottom-up)

# PR Phase Base
1 #5865 Contracts & baselines (package) main
2 #5866 Bootstrap & compatibility #5865
3 #5867 Shadow structured emission #5866
4 #5868 Opt-in reporters #5867
5 #5869 Heft protocol track #5868
6 #5870 Perf budgets & default flip #5869

Each PR's diff is scoped to its phase; review independently, merge from #5865 upward.

👉 This is PR 6 of 6.

Phase 6 — Performance budgets & daemon-aligned major default flip (RFC §7.3, §8.1)

Encodes the P0 performance/capacity budgets and models the major-release default flip.

What's included

  • Performance & capacity budgetsREPORTER_PERFORMANCE_BUDGETS (≤3% wall-time regression, ≤32 MiB peak memory, bounded streaming, 10 Hz interactive refresh, 64 KiB AI output) + wall-time/memory helpers and a ReporterManager.getPendingEventCount() observability hook. Benchmark, queue-pressure, and status-coalescing tests prove bounded streaming and no loss of protected events.
  • Daemon-aligned major default flip (migration model as revertible data) — the 7 migration phases, pre-flip vs post-flip default sets (automatic selection on by default, legacy terminal APIs removed, incompatible plugins gated before apply() with a structured RUSH_PLUGIN_API_INCOMPATIBLE diagnostic), while the legacy renderer, verbosity aliases, and RUSH_REPORTER=legacy emergency fallback are retained.

Validation

  • rush build --to @rushstack/reporterrush test --only @rushstack/reporter ✅ (adds Performance and Migration suites)
  • All exports @beta. Completes the RFC (28/28 features).

Scope note

Standalone package; not yet wired into the live CLI. Independently releasable/revertible per RFC §8.1.

Encode the specification §7.3 blocking budgets (3% wall-time regression,
32 MiB peak memory, 10 Hz interactive refresh, 64 KiB AI output, 20 AI
detailed diagnostics) as shared data in a new perf module, with helpers
for benchmark harnesses and capacity tests. Add a getPendingEventCount
observability hook to ReporterManager to prove bounded streaming, and a
Performance test suite covering the budgets, bounded streaming, a
high-volume benchmark, queue-pressure protected-event preservation, and
status coalescing.

Assistant-model: GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 897dcf7e-e6e8-4a84-85ca-34b93fa29be3
Assistant-model: GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 897dcf7e-e6e8-4a84-85ca-34b93fa29be3
Encode the specification §8.1 phase 6 default flip as revertible data in a
new migration module: the seven migration phases (each independently
releasable and revertible), pre-flip and daemon-aligned major default
sets (automatic selection on by default, legacy terminal APIs removed,
incompatible plugins gated before apply, legacy renderer/aliases/sentinel
bridge retained, RUSH_REPORTER=legacy emergency fallback), and a plugin
apply gate that fails incompatible plugins with a structured
RUSH_PLUGIN_API_INCOMPATIBLE diagnostic. Completes the Rush Reporter
Overhaul (28/28).

Assistant-model: GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 897dcf7e-e6e8-4a84-85ca-34b93fa29be3
Assistant-model: GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 897dcf7e-e6e8-4a84-85ca-34b93fa29be3
The coalescing-pressure test now proves protection with operationStatusChanged
(protected by type) instead of a producer-set required flag, which the sink no
longer accepts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@TheLarkInn
Sean Larkin (TheLarkInn) force-pushed the reporter/6-perf-and-default-flip branch from 6f4808f to dfa83df Compare August 19, 2026 14:20
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds performance-budget APIs and models the reporter migration’s daemon-aligned default flip.

Changes:

  • Adds performance constants, measurement helpers, queue observability, and tests.
  • Adds migration phases, default sets, and plugin compatibility gating.
  • Updates exports, API reports, tracking, and change records.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
research/progress.txt Records phase completion.
research/feature-list.json Marks final features complete.
libraries/reporter/src/test/Performance.test.ts Tests budgets and queue pressure.
libraries/reporter/src/test/Migration.test.ts Tests migration behavior.
libraries/reporter/src/session/PluginApi.ts Adds supported-version diagnostic input.
libraries/reporter/src/perf/PerformanceBudgets.ts Defines performance budgets and helpers.
libraries/reporter/src/migration/PluginApplyGate.ts Models pre-apply compatibility gating.
libraries/reporter/src/migration/MigrationPhase.ts Defines migration phase metadata.
libraries/reporter/src/migration/DaemonAlignedMajorDefaults.ts Defines pre/post-flip defaults.
libraries/reporter/src/manager/ReporterManager.ts Exposes pending queue count.
libraries/reporter/src/index.ts Exports new APIs.
common/reviews/api/rush-reporter.api.md Updates the API report.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-02-06-20.json Adds migration change record.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-01-57-43.json Adds performance change record.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-01-49-01.json Corrects package name.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-01-40-55.json Corrects package name.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-01-36-33.json Corrects package name.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-01-30-02.json Corrects package name.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-01-24-04.json Corrects package name.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-01-18-53.json Corrects package name.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-01-12-29.json Corrects package name.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-01-05-03.json Corrects package name.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-01-00-00.json Corrects package name.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-00-50-08.json Corrects package name.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-00-45-15.json Corrects package name.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-00-41-00.json Corrects package name.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-00-35-03.json Corrects package name.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-00-30-21.json Corrects package name.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-00-24-15.json Corrects package name.
common/changes/@rushstack/rush-reporter/docs-rush-reporter-overhaul-spec_2026-07-15-00-18-26.json Corrects package name.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +130 to +134
const elapsedMs: number = Date.now() - startMs;

// Generous smoke ceiling: the harness must sustain many thousands of events
// per second so a real build's per-event overhead stays negligible.
expect(elapsedMs).toBeLessThan(10000);
Comment on lines +89 to +92
it('evaluates additional peak memory against the 32 MiB budget', () => {
expect(isWithinMemoryBudget(31 * 1024 * 1024)).toBe(true);
expect(isWithinMemoryBudget(32 * 1024 * 1024)).toBe(true);
expect(isWithinMemoryBudget(33 * 1024 * 1024)).toBe(false);
Comment on lines +108 to +112
// No microtask has run yet, so the queue holds every un-drained event. If the
// manager buffered the whole build it would hold ~5000; coalescing keeps it
// near the threshold instead, proving bounded rather than whole-build memory.
const pendingDuringBurst: number = manager.getPendingEventCount();
expect(pendingDuringBurst).toBeLessThan(200);
Comment on lines +66 to +71
export const REPORTER_PERFORMANCE_BUDGETS: IReporterPerformanceBudgets = {
maxWallTimeRegressionPercent: 3,
maxAdditionalPeakMemoryBytes: 32 * BYTES_PER_MIB,
maxInteractiveRefreshHz: 10,
maxAiOutputBytes: 64 * BYTES_PER_KIB,
maxAiDetailedDiagnostics: 20
Comment on lines +241 to +244
* This is an observability hook for verifying bounded streaming: because each
* queue drains incrementally and coalesces replaceable status events, the
* pending count stays bounded rather than growing to the whole-build event
* total. After {@link ReporterManager.flushAsync} resolves it is `0`.
const supportedApiVersion: string = options.supportedApiVersion ?? RUSH_PLUGIN_API_VERSION;

return manifests.map((manifest: IRushPluginManifest): IPluginApplyDecision => {
const compatible: boolean = isPluginApiVersionSupported(manifest.pluginApiVersion, supportedApiVersion);
"Keep every phase independently releasable and revertible"
],
"passes": false
"passes": true
"Add benchmark, queue-pressure, and status-coalescing tests"
],
"passes": false
"passes": true
id: 'contractsAndBaselines',
ordinal: 1,
title: 'Contracts and baselines',
summary: 'Publish @rushstack/reporter, freeze legacy snapshots, add protocol and compatibility goldens.',
Comment thread research/progress.txt
rush test --only @rushstack/reporter -> SUCCESS; Migration.test.js 10 passed / 0 failed; all exports @beta.

============================================================================
[2026-07-15] ALL 28/28 FEATURES COMPLETE. Rush Reporter Overhaul spec fully implemented in @rushstack/reporter (public-beta).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs triage

Development

Successfully merging this pull request may close these issues.

2 participants