Commit 6d4b487
Reporter overhaul (1/6): contracts and baselines (@rushstack/rush-reporter package) (#5865)
* Add Rush reporter overhaul RFC
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
* Add @rushstack/reporter public beta package scaffold
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
* Add rush change file for @rushstack/reporter
Assistant-model: GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 897dcf7e-e6e8-4a84-85ca-34b93fa29be3
* Add canonical reporter event envelope and core event type union
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
* Add rush change file for reporter event envelope
Assistant-model: GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 897dcf7e-e6e8-4a84-85ca-34b93fa29be3
* Add scoped producer API for reporter events
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
* Add rush change file for scoped producer API
Assistant-model: GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 897dcf7e-e6e8-4a84-85ca-34b93fa29be3
* Add structured diagnostics with code registry and field privacy
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
* Add rush change file for structured diagnostics
Assistant-model: GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 897dcf7e-e6e8-4a84-85ca-34b93fa29be3
* Add NDJSON wire protocol with handshake and size limits
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
* Add rush change file for NDJSON wire protocol
Assistant-model: GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 897dcf7e-e6e8-4a84-85ca-34b93fa29be3
* Add ReporterManager lifecycle, ordering, and fan-out
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
* Add rush change file for ReporterManager
Assistant-model: GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 897dcf7e-e6e8-4a84-85ca-34b93fa29be3
* Add protocol, compatibility, and legacy output goldens
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
* Add rush change file for reporter goldens
Assistant-model: GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 897dcf7e-e6e8-4a84-85ca-34b93fa29be3
* Add @rushstack/reporter to the repository README package list
Assistant-model: GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 897dcf7e-e6e8-4a84-85ca-34b93fa29be3
* Address reporter contract review feedback
Assistant-model: GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 90cfc9a4-cbde-48e6-a771-86ad7abf948c
* Realign @rushstack/rush-reporter contracts with design review decisions
- Rename @rushstack/reporter to @rushstack/rush-reporter
- Add messageEmitted core event type; message text privacy defaults to
local-sensitive
- Type-level diagnostic codes (template literals, as const satisfies
registry, derived RushDiagnosticCodes/RushDiagnosticTemplateKey unions)
with per-domain template modules and a non-regex runtime validator
- Forward-compatible RushDiagnosticCategory (KnownCategory | (string & {}))
- IRushDiagnosticSource becomes a kind-tagged discriminated union
- Event identity documented as (sessionId, eventId); manager derives the
envelope required flag from event type; required-reporter failure writes
its emergency diagnostic once
- Governed REPORTER_KNOWN_CAPABILITIES registry; template-literal extension
event names; two-tier (contract vs tuning) constant policy; full beta
license docblock
- Spec gains a design realignments addendum; goldens and API report
regenerated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Fix the README package badge for the @rushstack/rush-reporter rename
The repo-toolbox readme --verify check failed in CI because the npm badge URL
still pointed at the old @rushstack/reporter name.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Address reporter contract review follow-up
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ea5daa0b-7839-42f0-9d63-4ca84c7d2b5c
* Preserve NDJSON records across decode errors
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ea5daa0b-7839-42f0-9d63-4ca84c7d2b5c
* Avoid Error cause target conflicts
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ea5daa0b-7839-42f0-9d63-4ca84c7d2b5c
---------
Co-authored-by: Sean Larkin <TheLarkInn@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ba539363-ff7b-44c9-b4f6-e49ef7fc6c92
Copilot-Session: 897dcf7e-e6e8-4a84-85ca-34b93fa29be3
Copilot-Session: 90cfc9a4-cbde-48e6-a771-86ad7abf948c
Copilot-Session: ea5daa0b-7839-42f0-9d63-4ca84c7d2b5c1 parent e61404a commit 6d4b487
72 files changed
Lines changed: 7385 additions & 0 deletions
File tree
- common
- changes/@rushstack/rush-reporter
- config/subspaces/default
- reviews/api
- libraries/reporter
- config
- src
- diagnostics
- templates
- events
- manager
- producers
- protocol
- test
- __snapshots__
- research
- docs
- notes
- tickets
- specs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments