Reporter overhaul (1/6): contracts and baselines (@rushstack/reporter package)#5865
Open
TheLarkInn wants to merge 16 commits into
Open
Reporter overhaul (1/6): contracts and baselines (@rushstack/reporter package)#5865TheLarkInn wants to merge 16 commits into
TheLarkInn wants to merge 16 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
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
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