Reporter overhaul (3/6): shadow structured emission#5867
Open
TheLarkInn wants to merge 8 commits into
Open
Conversation
This was referenced Jul 15, 2026
Expose the producer-facing reporting surface for @rushstack/reporter (#5858). - Add createScopedReporter and RushSessionReporting so RushSession can create scoped reporters and loggers bound to a command, operation, project, and phase - Add IScopedLogger, a presentation-free logger with no terminal handle - Pass the sink to actions through IReporterExecutionContext while exposing only emit methods, so plugins cannot inspect modes, destinations, or thresholds - Add the Rush plugin API version, manifest field, a support check, and a structured migration diagnostic for incompatible plugins - Cover scoped emission, the privacy floor, the emit-only surface, logging, the session facade, and plugin compatibility 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 first-party lifecycle emission for @rushstack/reporter (#5858). - Add typed lifecycle payloads and a LifecycleEmitter that actions, the scheduler, and plugins use to publish session, command, and operation events plus structured diagnostics - Mark every lifecycle, result, and diagnostic event required, and keep the emitter output-neutral so legacy rendering stays the sole visible output - Add deriveExitCodeFromEvents and summarizeShadowResult to validate exit-code and result parity against the frozen baselines - Cover emission, scope merging, output neutrality, and parity 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 telemetry subscriber for @rushstack/reporter (#5858). - Add TelemetrySubscriber, which consumes canonical events before reporter filtering and produces an allowlisted aggregate at command completion - Keep only allowlisted values: command and result, timing, operation status counts, diagnostic codes and categories, reporter mode, and protocol and producer versions - Exclude messages, paths, raw output, command arguments, remediation parameters, stacks, and local-sensitive and secret values by construction - Add createTelemetryReporter to wire the subscriber into the manager - Preserve the legacy beforeLog hook through createBeforeLogAdapter - Add allowlist schema and leakage 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
Preserve command success and exit-code semantics for @rushstack/reporter (#5858). - Add resolveExitStatus and resolveExitStatusFromEvents, which return 0 for success including warning-only success, 1 for failure and logical cancellation, and the conventional signal-derived status for OS signals - Take only failure, cancellation, and signal state as inputs, so the reporter mode and diagnostic categories can never select the exit code - Add separateJsonControls so the command-specific --json flag stays distinct from the json reporter and keeps its own schema - Cover success, failure, cancellation, signal precedence, category independence, and JSON-control separation 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
6a36aae to
2c80ebe
Compare
73b545b to
9a7365d
Compare
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 3 of 6.
Phase 3 — Shadow structured emission (RFC §8.1)
First-party lifecycle and diagnostic events are emitted without changing visible output, and telemetry/exit-code parity is validated.
What's included
RushSessionevent sink + scoped producers exposed to actions and plugins (plugins cannot inspect modes/destinations/thresholds).beforeLogadapter.Validation
rush build --to @rushstack/reporter✅rush test --only @rushstack/reporter✅ (adds Session, Lifecycle, Telemetry, ExitStatus suites)@beta.Scope note
Standalone package; not yet wired into the live CLI. Independently releasable/revertible per RFC §8.1.