Reporter overhaul (1/6): contracts and baselines (@rushstack/reporter package)#5865
Open
TheLarkInn wants to merge 17 commits into
Open
Reporter overhaul (1/6): contracts and baselines (@rushstack/reporter package)#5865TheLarkInn wants to merge 17 commits into
TheLarkInn wants to merge 17 commits into
Conversation
Document the reviewed reporter architecture, structured event protocol, compatibility model, rollout plan, and supporting codebase research for issue #5858. Assistant-model: GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ba539363-ff7b-44c9-b4f6-e49ef7fc6c92
Introduce the @rushstack/reporter package skeleton that will hold the canonical event protocol, reporter manager, and built-in reporters described in the Rush reporter overhaul RFC (#5858). - Scaffold libraries/reporter with rig-based Heft build config - Mark exported contracts as public beta via API Extractor (@beta) - Declare no dependency on rush-lib - Register the package in rush.json and update the pnpm lockfile - Track reporter-overhaul feature-list progress 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
Define the presentation-free event contract for @rushstack/reporter as described in the Rush reporter overhaul RFC (#5858). - Add IReporterProtocolVersion, ReporterPrivacyClassification, and the immutable IReporterEventEnvelope with source and scope - Add the closed ReporterEventType union and REPORTER_EVENT_TYPES list - Add ReporterJsonValue to type JSON-serializable payloads - Document sequence as authoritative ordering and timestamp as informational, and preserve child producer order via sourceSequence - Add a golden envelope schema test covering snapshot, JSON round-trip, the closed union, and Error payload handling 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
Introduce the presentation-free producer contract for @rushstack/reporter (#5858). - Add IReporterEventSink.emit, which accepts an envelope input that omits the sink-assigned eventId, sequence, and timestamp - Add IScopedReporter with emitMessage, emitDiagnostic, and emitExtension, none of which expose reporter instances, destinations, or thresholds - Add namespaced extension event names with an isReporterExtensionEventName validator so producer events cannot collide with the closed core set - Add a minimal IRushDiagnostic contract, expanded by the structured diagnostics feature - Cover the sink omit contract, scoped emit ids, emit-only surface, and extension name validation with tests 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
Complete the structured diagnostics contract for @rushstack/reporter (#5858). - Expand IRushDiagnostic with category, remediation, source, classified parameters, cause chaining, and related artifacts - Add RushDiagnosticCategory, IRushRemediationAction, IRushDiagnosticSource, and IClassifiedDiagnosticValue - Add a central, never-reused RUSH_<DOMAIN>_<NAME> code registry with English templates keyed by resource key and a stable internal-error code - Add computeEnvelopePrivacyFloor and getPrivacyClassificationRank so the envelope classification is the least-sensitive floor while field-level classification stays authoritative - Add createRushDiagnostic and RushError so emission returns a diagnostic id that propagated failures reference - Add registry, privacy, factory, and RushError tests 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
Add the cross-process wire protocol for @rushstack/reporter (#5858). - Add REPORTER_PROTOCOL_VERSION, REPORTER_PROTOCOL_LIMITS (1 MiB bootstrap and record, 64 KiB external chunk), and isReporterProtocolCompatible - Add an NDJSON encoder and a streaming decoder that enforce the record limit - Add hello/helloAck negotiation that accepts the capability intersection, tolerates additive minor versions, and rejects only unknown required features or unsupported majors - Emit an update-global-Rush diagnostic (RUSH_PROTOCOL_UPDATE_REQUIRED) on rejection - Cover encode/decode framing, size limits, and negotiation with tests 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
Add the reporter fan-out engine for @rushstack/reporter (#5858). - Add the IReporter interface and IReporterContext - Add ReporterManager, the authoritative in-process sink: it assigns one monotonic session sequence, eventId, and timestamp, rehomes foreign child envelopes while preserving sourceSequence, and delivers events to each reporter through an independent ordered queue - Enforce exclusive destination ownership and add ReporterMultiplexer for explicit sharing - Flush on normal, error, and signal completion with 10s and 2s timeouts - Coalesce replaceable status events under pressure while never dropping lifecycle, diagnostic, result, artifact, or external-output events - Disable optional reporters on runtime failure with an emergency diagnostic and make required-reporter and initialization failures fatal - Cover ordering, destinations, failure handling, coalescing, and flush/close 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
Freeze baselines for @rushstack/reporter (#5858). - Add golden schema tests that freeze the serialized event envelope, diagnostic, and hello/helloAck wire forms and assert NDJSON round-trips - Add compatibility goldens for negotiation across supported majors and minors, including additive-minor tolerance and forward-compatible field retention - Freeze representative legacy success and failure output as the parity baseline for the future legacy reporter - Wire all goldens into the existing jest test runner 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
TheLarkInn
requested review from
apostolisms,
bmiddha,
dmichon-msft,
iclanton,
jxanthony and
octogonz
as code owners
July 15, 2026 03:13
This was referenced Jul 15, 2026
Assistant-model: GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 897dcf7e-e6e8-4a84-85ca-34b93fa29be3
There was a problem hiding this comment.
Pull request overview
This PR introduces a new standalone @rushstack/reporter package that defines the foundational contracts (event envelope, diagnostics, NDJSON protocol, and manager fan-out/ordering) for the Reporter Overhaul stack, and registers it in the Rush monorepo.
Changes:
- Added the new
@rushstack/reporterlibrary package (public beta) with event/diagnostic contracts, NDJSON protocol handshake/limits, and aReporterManager+ multiplexer. - Added Jest test coverage and snapshot-based “golden” baselines for protocol shapes, compatibility negotiation, and legacy output samples.
- Registered the package in
rush.json, added API Extractor report output, lockfile updates, and supporting research docs/notes.
Show a summary per file
| File | Description |
|---|---|
| rush.json | Registers @rushstack/reporter project |
| README.md | Adds reporter package to repo list |
| research/tickets/2026-07-12-5858-rush-reporter-overhaul.md | Issue research writeup (new) |
| research/progress.txt | Feature progress tracking (new) |
| research/notes/2026-07-12-rush-reporter-design-review.md | Design review notes (new) |
| research/feature-list.json | Feature checklist/specification (new) |
| research/docs/2026-07-12-rush-reporting-patterns.md | Existing patterns analysis (new) |
| research/docs/2026-07-12-rush-output-pipeline.md | Current output pipeline analysis (new) |
| research/docs/2026-07-12-rush-operation-reporting.md | Current operation reporting analysis (new) |
| libraries/reporter/package.json | New package manifest and exports |
| libraries/reporter/tsconfig.json | TypeScript build settings |
| libraries/reporter/eslint.config.js | ESLint flat config (rig-based) |
| libraries/reporter/config/rig.json | Rig configuration |
| libraries/reporter/config/jest.config.json | Jest config (rig-based) |
| libraries/reporter/config/api-extractor.json | API Extractor config (rig-based) |
| libraries/reporter/.npmignore | Publish include/exclude rules |
| libraries/reporter/LICENSE | Package license file |
| libraries/reporter/README.md | Package README (new) |
| libraries/reporter/src/index.ts | Public exports surface |
| libraries/reporter/src/events/ReporterProtocolVersion.ts | Protocol version contract |
| libraries/reporter/src/events/ReporterPrivacyClassification.ts | Privacy classification type |
| libraries/reporter/src/events/ReporterJsonValue.ts | JSON payload typing helpers |
| libraries/reporter/src/events/ReporterEventType.ts | Closed event type union + list |
| libraries/reporter/src/events/IReporterEventEnvelope.ts | Canonical event envelope contract |
| libraries/reporter/src/producers/IReporterEventSink.ts | Producer sink contract |
| libraries/reporter/src/producers/IScopedReporter.ts | Scoped producer API contract |
| libraries/reporter/src/producers/ReporterExtensionEventName.ts | Extension event naming + validator |
| libraries/reporter/src/diagnostics/RushDiagnosticCategory.ts | Diagnostic category union |
| libraries/reporter/src/diagnostics/IRushRemediationAction.ts | Remediation action contract |
| libraries/reporter/src/diagnostics/IRushDiagnosticSource.ts | Diagnostic source-location contract |
| libraries/reporter/src/diagnostics/IClassifiedDiagnosticValue.ts | Per-field privacy/value pairing |
| libraries/reporter/src/diagnostics/DiagnosticPrivacy.ts | Privacy rank + “floor” helper |
| libraries/reporter/src/diagnostics/RushDiagnosticCodeRegistry.ts | Central diagnostic code registry + templates |
| libraries/reporter/src/diagnostics/IRushDiagnostic.ts | Diagnostic DTO contract |
| libraries/reporter/src/diagnostics/createRushDiagnostic.ts | Diagnostic factory helper |
| libraries/reporter/src/diagnostics/RushError.ts | Error wrapper for diagnostics |
| libraries/reporter/src/protocol/ReporterProtocol.ts | Protocol version + byte limits |
| libraries/reporter/src/protocol/Ndjson.ts | NDJSON encoder/decoder + size enforcement |
| libraries/reporter/src/protocol/ReporterHandshake.ts | hello/helloAck negotiation |
| libraries/reporter/src/manager/IReporter.ts | Reporter subscriber contract |
| libraries/reporter/src/manager/ReporterMultiplexer.ts | Shared-destination multiplexing reporter |
| libraries/reporter/src/manager/ReporterManager.ts | Sequencing, fan-out, queues, coalescing, flush/close |
| libraries/reporter/src/test/IReporterEventEnvelope.test.ts | Envelope and event-type tests |
| libraries/reporter/src/test/ProducerApi.test.ts | Producer API tests |
| libraries/reporter/src/test/Diagnostics.test.ts | Diagnostics/registry/privacy tests |
| libraries/reporter/src/test/Protocol.test.ts | Protocol/NDJSON/handshake tests |
| libraries/reporter/src/test/Manager.test.ts | Manager ordering/failure/coalescing tests |
| libraries/reporter/src/test/Goldens.test.ts | Snapshot goldens for protocol + legacy output |
| libraries/reporter/src/test/snapshots/IReporterEventEnvelope.test.ts.snap | Snapshot: envelope shape |
| libraries/reporter/src/test/snapshots/Goldens.test.ts.snap | Snapshots: goldens/baselines |
| common/reviews/api/reporter.api.md | Generated API Extractor report |
| common/config/subspaces/default/pnpm-lock.yaml | Workspace lockfile update |
| common/changes/@rushstack/reporter/docs-rush-reporter-overhaul-spec_2026-07-14-22-55-36.json | Change file (new) |
| common/changes/@rushstack/reporter/docs-rush-reporter-overhaul-spec_2026-07-14-23-09-57.json | Change file (new) |
| common/changes/@rushstack/reporter/docs-rush-reporter-overhaul-spec_2026-07-14-23-16-33.json | Change file (new) |
| common/changes/@rushstack/reporter/docs-rush-reporter-overhaul-spec_2026-07-14-23-26-09.json | Change file (new) |
| common/changes/@rushstack/reporter/docs-rush-reporter-overhaul-spec_2026-07-14-23-32-18.json | Change file (new) |
| common/changes/@rushstack/reporter/docs-rush-reporter-overhaul-spec_2026-07-14-23-41-00.json | Change file (new) |
| common/changes/@rushstack/reporter/docs-rush-reporter-overhaul-spec_2026-07-14-23-51-22.json | Change file (new) |
Review details
Files not reviewed (1)
- common/config/subspaces/default/pnpm-lock.yaml: Generated file
- Files reviewed: 59/60 changed files
- Comments generated: 7
- Review effort level: Low
Assistant-model: GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 90cfc9a4-cbde-48e6-a771-86ad7abf948c
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.
📚 Reporter Overhaul PR stack (merge bottom-up)
mainEach PR's diff is scoped to its phase; review independently, merge from #5865 upward.
👉 This is PR 1 of 6.
Phase 1 — Contracts and baselines (RFC §8.1)
Introduces the new
@rushstack/reporterpublic-beta package and the core contracts every later phase builds on. This is the foundational PR of a 6-part stack that implements the Rush Reporter Overhaul RFC.What's included
@rushstack/reporter(v0.1.0): rig-based Heft build, API Extractor@beta, no dependency onrush-lib. Registered inrush.json.ReporterEventTypeunion.RUSH_<DOMAIN>_<NAME>code registry + per-field privacy classification.hello/helloAckcapability handshake, version negotiation, and record/chunk/buffer size limits.ReporterManager— single monotonic session sequence, one ordered async queue per reporter, exclusive destination ownership, fan-out, and status coalescing under pressure.Validation
rush build --to @rushstack/reporter✅rush test --only @rushstack/reporter✅@beta; API report incommon/reviews/api/reporter.api.md.Scope note
The package is standalone — it compiles as part of the workspace but is not yet imported by
rush-lib/apps. Wiring it into the live CLI is a later rollout step. Every phase is independently releasable and revertible per RFC §8.1.✅ Remaining work to enable the new reporting system (rollout tracking)
This stack delivers the standalone
@rushstack/reporterpackage (contracts, reporters, protocol, budgets, and the migration model as data). It is intentionally not yet wired into the liverushCLI —rush buildstill renders through the legacyStreamCollator. The following rollout steps (RFC §8) remain to actually enable it. Each maps to a component location in RFC §4.3.Wire the package into the toolchain
@rushstack/reporteras a dependency ofrush-libandapps/rush(RFC §5.1)install-run-rushbuild (RFC §5.1)Bootstrap prelude —
install-run-rush(Phase 2)rush-libloads (RFC §5.5)Frontend host —
apps/rush(Phase 2)ReporterManagerbefore version selection; replay then delete the bootstrap handoff (RFC §4.3)Engine integration —
rush-lib(Phases 3–4)RushSessionevent sink + scoped producers to actions and plugins (RFC §5.3)StreamCollatorinOperationExecutionManagerwith raw semantic operation events, gated on the new reporter path (RFC §5.13)ts-command-line:--reporter,--output,--log-level, and the--quiet/--verbose/--debugaliases (RFC §5.6–5.7)agentEnvironmentVariables+ reporter config fromrush.json(RFC §5.8)deriveExitCodeFromEvents(RFC §5.18)Heft integration (Phase 5)
Compatibility & deprecations (Phase 6 — daemon-aligned major)
ILogger.terminalandRushSession.terminalProvider(RFC §5.3)apply()with the structured migration diagnostic (RFC §5.3)AlreadyReportedErrorsentinels and prohibit new usage (RFC §5.15)RUSH_REPORTER=legacyemergency fallback for ≥1 major (RFC §8.2)Rollout controls & gates (RFC §8.2)
experiments.json) for pre-major opt-inDocs & later cleanup (Phase 7)
RUSH_REPORTER, and--reporter/--outputAlreadyReportedErrorbridge once ecosystem criteria are met