Emit shadow Rush lifecycle events - #5991
Conversation
|
Independent R3 review against #5976/RFC phase 3: lifecycle/result ordering, phase-aware operation scope, legacy error correlation, telemetry projection, and no-raw-output behavior are correctly isolated while |
53d6d5d to
e81d5a2
Compare
|
Combined deep review of current head
|
e81d5a2 to
8255a72
Compare
|
Rebased the single R3B commit onto #5988 head Fixed Validation: build through Low follow-on: keep the outer telemetry privacy gate until #5990 reaches shared main. Then remove it and forward all envelopes to the hardened subscriber. |
|
Four-review rerun on Required fix: make final command or session completion, or current-iteration outcomes, establish the recovered success result. Add a fail-then-success watch test. Dismissible low follow-ons: reset group |
8255a72 to
2f9ac7d
Compare
|
Round two fixed at Derived exit now follows current operation outcomes and authoritative root Validation passed: build through |
|
Final combined review of One intentional low follow-on remains: remove the outer telemetry privacy gate after #5990 reaches shared ancestry. This head is low-only. |
2f9ac7d to
dd27a9c
Compare
dd27a9c to
52f751f
Compare
2a6a582 to
6b2b758
Compare
3541683 to
745843b
Compare
745843b to
3776ee9
Compare
b556aec to
f7909be
Compare
Sean Larkin (TheLarkInn)
left a comment
There was a problem hiding this comment.
R3 lifecycle acceptance review against #5976: early failure and finalization outcomes must agree with authoritative native exit behavior.
f439cc6 to
a4c8126
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Registration ordering, parser-failure diagnostics, and correlation of non-extensible errors need correction.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (3)
| Severity | Finding |
|---|---|
libraries/rush-lib/src/pluginFramework/RushSession.ts — Correlation is invoked for arbitrary caught errors, but LegacyErrorBridge.correlate() adds a… |
|
libraries/rush-lib/src/cli/RushCommandLineParser.ts — A command-line parse/selection failure is swallowed by CommandLineParser.executeAsync() and… |
|
libraries/rush-lib/src/logic/operations/OperationGraph.ts — onOperationRegistered runs before hooks.configureIteration, but the standard… |
What changed in this PR
Adds shadow-mode Rush lifecycle, operation, diagnostic, and telemetry reporting without changing legacy terminal output.
Changes:
- Emits session/command lifecycle events and structured failure diagnostics.
- Projects phase-aware operation statuses into reporter telemetry.
- Adds tests for ordering, privacy, output parity, and reporter shutdown.
| File | Description |
|---|---|
specs/2026-07-12-rush-reporter-overhaul.md |
Documents lifecycle ordering. |
libraries/rush-lib/src/pluginFramework/RushSession.ts |
Adds shadow event observation and correlation. |
libraries/rush-lib/src/pluginFramework/RushSession.test.ts |
Tests shadow reporting and privacy. |
libraries/rush-lib/src/logic/test/Telemetry.test.ts |
Tests telemetry projection. |
libraries/rush-lib/src/logic/Telemetry.ts |
Adds reporter data to telemetry. |
libraries/rush-lib/src/logic/operations/test/OperationGraphEventSink.test.ts |
Tests operation event aggregation. |
libraries/rush-lib/src/logic/operations/ReporterOperationEventSink.ts |
Adapts graph events to reporter events. |
libraries/rush-lib/src/logic/operations/OperationGraph.ts |
Supplies execution records to sinks. |
libraries/rush-lib/src/logic/operations/OperationEventSink.ts |
Extends registration callback contract. |
libraries/rush-lib/src/cli/test/TestUtils.ts |
Supports reporter-enabled parser tests. |
libraries/rush-lib/src/cli/test/RushCommandLineParserReporterLifecycle.test.ts |
Tests lifecycle and failure ordering. |
libraries/rush-lib/src/cli/test/RushCommandLineParserReporterClose.test.ts |
Tests reporter finalization. |
libraries/rush-lib/src/cli/test/RushCommandLineParser.test.ts |
Tests end-to-end shadow events. |
libraries/rush-lib/src/cli/scriptActions/PhasedScriptAction.ts |
Attaches operation reporting. |
libraries/rush-lib/src/cli/RushCommandLineParser.ts |
Emits command/session lifecycle events. |
libraries/reporter/src/diagnostics/templates/operation.ts |
Adds command-failure text. |
libraries/reporter/src/diagnostics/RushDiagnosticCodeRegistry.ts |
Registers command-failure diagnostics. |
common/reviews/api/rush-reporter.api.md |
Updates reporter API report. |
common/reviews/api/rush-lib.api.md |
Updates Rush library API report. |
common/changes/@rushstack/rush-reporter/copilot-reporter-r3b-shadow-events_2026-08-28-04-20.json |
Records reporter patch. |
common/changes/@microsoft/rush/reporter-foundation-lifecycle_2026-09-09.json |
Records lifecycle patch. |
common/changes/@microsoft/rush/copilot-reporter-r3b-shadow-events_2026-08-28-04-20.json |
Records shadow-event patch. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Preserve published early-failure, late-telemetry and operation-callback corrections; reconcile native lifecycle fields and telemetry references, with real branded parser regression coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Keep immutable errors intact, capture original pre-execution parser failures without changing legacy rendering, and observe final configured operation silence. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
5c2a107 to
852b04d
Compare


Part of #5976
Stack parent: #5988
Summary
RUSH_OPERATION_FAILEDdiagnostics without routing raw chunksAlreadyReportedErrorfailures so catch boundaries do not emit duplicate structured diagnosticsTelemetrySubscriberprojection into existing Rush telemetry while leaving process exit behavior authoritativeRUSH_COMMAND_FAILEDdiagnostic for representative uncorrelated command failuresValidation
rush installrush build --to @microsoft/rushrush test --only @rushstack/rush-reporter --only @microsoft/rush-lib --only @microsoft/rushrush checkrush change --verifyNo-output guarantee
Legacy terminal rendering and
StreamCollatorremain the only visible stdout/stderr owners. The shadow sink emits no terminal text, operation chunks are not routed to reporters, and focused tests compare legacy graph output with and without the reporter adapter.Non-goals
StreamCollatoror emitting the R5 raw operation/output stream