Add direct Rush reporter demo path - #5997
Conversation
25891f4 to
e61332b
Compare
Sean Larkin (TheLarkInn)
left a comment
There was a problem hiding this comment.
Independent R5B review completed against #5978 and RFC phase 4.
Fixed in e61332b:
- command-specific --json remains the sole stdout owner; incompatible reporter combinations fail before launch;
- older repository engines force the legacy path and reporter teardown runs on selector failure;
- file/plaintext grouping is disk-backed without per-graph descriptor growth or unbounded heap retention; stale spools are retained/cleaned safely;
- watch errors use the semantic terminal, final artifact completeness precedes machine results, zero-width TTYs fall back to 80 columns, and AI parser failures retain actionable context;
- the demo now self-checks legacy rollback, plaintext/JSON/AI/file/quiet/failure/help/command-JSON output, one visible writer, chunk ordering, final flush, and owner-only logs.
Validation: build succeeded for @rushstack/rush-reporter, @microsoft/rush-lib, and @microsoft/rush; tests 304/773/28; rush check; rush change --verify --no-fetch; expanded demo and real TTY run passed. No unresolved review threads. Auto-merge remains disabled while #5996 and its ancestors are open.
e61332b to
e30aa36
Compare
|
Final restack correction: #5997 was force-replayed onto the exact current remote #5996 tip Final #5997 tip: Post-restack validation: reporter 304, rush-lib 773, apps/rush 28; expanded reporter demo; |
|
Combined deep review of current head
|
e30aa36 to
7159901
Compare
|
Review fixes published at Fixed: incompatible-engine controls remain explicit and are never silently stripped; Validation: reporter 314, rush-lib 786, apps/rush 70; all affected builds; direct demo matrix at |
|
Four-review gate on
Dismissible low follow-on: configuration discovery should use the effective |
|
Round-two findings fixed at
Validation: reporter 317, rush-lib 787, apps/rush 71; all affected builds; direct demo |
|
Four-review rerun on Required fix: use an explicit cycle boundary or cycle identity that handles overlapping scheduling. Do not assume re-registration occurs after cycle completion. One dismissible low follow-on remains: make the AI final record consistently per-cycle or session-cumulative after fail-then-success watch recovery. The repeated command-name concern remains dismissed because no supported failing entry point was reproduced. |
|
Round-three findings fixed at
Validation: reporter 317, rush-lib 788, apps/rush 71; affected builds and daemon dependency chain; full demo |
|
Final combined review of One dismissible low follow-on remains: the exported |
Sean Larkin (TheLarkInn)
left a comment
There was a problem hiding this comment.
R5B acceptance review against #5978: live diagnostics and lossless full-detail logs.
26c2ac0 to
26a469f
Compare
Address #5997 review 5154313870: display bounded errors immediately, summarize warnings once per cycle, and handle short and zero-progress writes with truthful artifact completeness. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Preserve the published diagnostics, UTF-8 writes, spooling, privacy, preview selection and operation-cycle fixes while reconciling native parser, watcher, and graph members. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
26a469f to
8ae2115
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Watch-cycle completion, artifact finalization, and legacy help/discovery parity have unresolved correctness issues.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 3
New issues introduced by this change (3)
| Severity | Finding |
|---|---|
apps/rush/src/MinimalRushConfiguration.ts — For legacy/feature-off invocations, discovery output is now printed only after… |
|
apps/rush/src/RushReporterHost.ts — When help forces the legacy path, only --reporter is stripped. Reporter-owned… |
|
apps/rush/src/RushReporterHost.ts — The full-detail reporter is closed before publishIfChanged() enqueues the final complete: true… |
What changed in this PR
Adds the opt-in direct Rush reporter path, transferring presentation ownership from legacy collation to frontend-selected reporters while retaining complete file logging and rollback support.
Changes:
- Adds iteration-aware operation and watch reporting.
- Implements reporter-owned terminal output, diagnostics, redaction, and log finalization.
- Adds direct demo coverage and legacy compatibility checks.
| File | Description |
|---|---|
libraries/rush-lib/src/pluginFramework/RushSession.ts |
Adds reporter state and flushing helpers. |
libraries/rush-lib/src/logic/ProjectWatcher.ts |
Makes in-place watch rendering optional. |
libraries/rush-lib/src/logic/operations/test/OperationGraphEventSink.test.ts |
Expands iteration and outcome coverage. |
libraries/rush-lib/src/logic/operations/ReporterOperationEventSink.ts |
Adapts iteration-aware operation events. |
libraries/rush-lib/src/logic/operations/OperationGraph.ts |
Assigns iteration IDs and delays registration. |
libraries/rush-lib/src/logic/operations/OperationExecutionRecord.ts |
Propagates iteration identity through streams. |
libraries/rush-lib/src/logic/operations/OperationEventSink.ts |
Extends sink callbacks with iteration IDs. |
libraries/rush-lib/src/logic/operations/IOperationExecutionResult.ts |
Exposes owning iteration identity. |
libraries/rush-lib/src/cli/test/RushCommandLineParserReporterLifecycle.test.ts |
Tests initialization failure flushing. |
libraries/rush-lib/src/cli/test/RushCommandLineParser.test.ts |
Tests sole-writer and lock errors. |
libraries/rush-lib/src/cli/scriptActions/PhasedScriptAction.ts |
Routes presentation through reporters. |
libraries/rush-lib/src/cli/RushCommandLineParser.ts |
Bridges terminal and failure output. |
libraries/rush-lib/src/cli/actions/BaseRushAction.ts |
Reports lock contention semantically. |
libraries/rush-lib/src/api/Rush.ts |
Suppresses the legacy startup banner. |
libraries/rush-lib/src/api/EnvironmentConfiguration.ts |
Adds early temp-folder resolution. |
libraries/rush-daemon/src/test/PhasedRequestEventMultiplexer.test.ts |
Updates multiplexer coverage. |
libraries/rush-daemon/src/PhasedRequestEventMultiplexer.ts |
Forwards iteration identity. |
libraries/reporter/src/utilities/writeAllSync.ts |
Adds complete synchronous writes. |
libraries/reporter/src/test/WriteAllSync.test.ts |
Tests short writes and failures. |
libraries/reporter/src/test/PlaintextReporter.test.ts |
Expands grouping and privacy coverage. |
libraries/reporter/src/test/OperationStreamEmitter.test.ts |
Tests iteration propagation. |
libraries/reporter/src/test/Manager.test.ts |
Tests confirmed flush timeouts. |
libraries/reporter/src/test/LogLevelFilter.test.ts |
Tests message log-level overrides. |
libraries/reporter/src/test/JsonAiReporter.test.ts |
Expands redaction and AI results. |
libraries/reporter/src/test/HumanReadableDiagnostic.test.ts |
Tests safe diagnostic formatting. |
libraries/reporter/src/test/DefaultInteractiveReporter.test.ts |
Expands watch and diagnostic coverage. |
libraries/reporter/src/session/ScopedReporterFactory.ts |
Emits message log-level metadata. |
libraries/reporter/src/scheduler/OperationStreamEmitter.ts |
Adds iteration IDs to operation events. |
libraries/reporter/src/scheduler/OperationOutputGrouping.ts |
Exposes output iteration identity. |
libraries/reporter/src/reporters/ReporterRedaction.ts |
Strengthens event redaction. |
libraries/reporter/src/reporters/LegacyReporter.ts |
Recognizes aborted operations. |
libraries/reporter/src/reporters/JsonReporter.ts |
Redacts machine-readable messages. |
libraries/reporter/src/reporters/HumanReadableDiagnostic.ts |
Adds privacy-aware formatting. |
libraries/reporter/src/reporters/DefaultInteractiveReporter.ts |
Adds bounded iteration-aware presentation. |
libraries/reporter/src/reporters/AiReporter.ts |
Adds watch-aware final records. |
libraries/reporter/src/producers/IScopedReporter.ts |
Adds minimum message log levels. |
libraries/reporter/src/manager/ReporterManager.ts |
Adds confirmed flush support. |
libraries/reporter/src/lifecycle/LifecycleEvents.ts |
Extends lifecycle payloads with iterations. |
libraries/reporter/src/events/IMessageEmittedPayload.ts |
Adds log-level metadata. |
libraries/reporter/src/diagnostics/IRushDiagnostic.ts |
Associates diagnostics with iterations. |
libraries/reporter/src/config/LogLevelFilter.ts |
Honors per-message minimum levels. |
common/reviews/api/rush-reporter.api.md |
Updates reporter API baselines. |
common/reviews/api/rush-lib.api.md |
Updates Rush library API baselines. |
common/changes/@rushstack/rush-reporter/reporter-watch-and-short-writes_2026-09-09.json |
Records watch and write fixes. |
common/changes/@rushstack/rush-reporter/reporter-secret-source-aliases_2026-09-09.json |
Records privacy fixes. |
common/changes/@rushstack/rush-reporter/reporter-heft-diagnostics_2026-09-09.json |
Records diagnostic rendering changes. |
common/changes/@rushstack/rush-reporter/copilot-reporter-r5b-demo-reporters_2026-08-28-07-10.json |
Records reporter presentation support. |
common/changes/@microsoft/rush/copilot-reporter-r5b-demo-reporters_2026-08-28-07-10.json |
Records Rush integration support. |
apps/rush/src/test/sandbox/reporter-demo/run.mjs |
Adds the self-checking demo matrix. |
apps/rush/src/test/sandbox/reporter-demo/README.md |
Documents direct reporter usage. |
apps/rush/src/test/RushReporterHost.test.ts |
Expands host selection and artifact tests. |
apps/rush/src/test/RushFrontend.test.ts |
Tests frontend log placement. |
apps/rush/src/test/MinimalRushConfiguration.test.ts |
Tests discovery and temp overrides. |
apps/rush/src/start.ts |
Centralizes preview-version lookup. |
apps/rush/src/RushReporterHost.ts |
Creates and finalizes frontend reporters. |
apps/rush/src/RushPreviewVersion.ts |
Adds preview-version resolution. |
apps/rush/src/RushFrontend.ts |
Connects host lifecycle to Rush. |
apps/rush/src/MinimalRushConfiguration.ts |
Adds early reporter-aware configuration. |
Suppressed comments (1)
libraries/rush-lib/src/logic/operations/OperationGraph.ts:738
- The all-silent branch now registers and finalizes its records, then returns without executing
#executeInnerAsync. ConsequentlyafterExecuteIterationAsyncnever runs, so an opted-in watch whose operations are all silent emits operation completions but nowatchCycleCompleted; reporters cannot summarize or close that cycle. Emit an equivalent watch boundary for this short-circuit, or route it through the normal after-iteration hook path.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Address #5997 comment 3981283816 without emitting legacy discovery into explicitly owned reporter output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Address #5997 comment 3981283879 with selective help ownership, preserving custom values, rollback, and following flags. Exercise the real legacy help parser. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Document and guard the deliberately post-close completeness notification raised by #5997 comment 3981283923. Preserve production ordering and prove fsync/close failures never announce a complete artifact. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Keep R5B terminal ownership and its registration/lifetime helpers. Adapt inherited unscoped-output assertions to expect native operation presentation without resurrecting the R5A deferral wrapper. Preserve native initialization and iteration regressions plus post-close artifact completeness. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Reproduce repository-opted-in custom/global and action help through the real frontend/parser. Use command definitions before interpreting reporter-shaped values, preserve mixed and unknown namespaces, and retain malformed configuration discovery guards. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Retain R5B command-JSON stdout ownership, environment sanitization, quiet handling, and artifact lifetime while replacing ordinary value-shape inference with foundation command ownership. Preserve the shared separated-value guard and optional flag list. Apply primary file levels through the existing wrapper without filtering automatic full-detail logs; retain both regression families. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Preserve the final owning help commit and reuse foundation command ownership rather than duplicate metadata loading. Carry frontend-owned standalone flags through help while retaining custom/action verbose aliases. Align frontend and native parser fixture lookup, preserving unknown/plugin conservatism and all close-before-complete contracts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Remove only the propagation-added primary FileReporter filter: R5B's automatic full-detail log remains unfiltered at every selected level. Assert selected normal/debug independently from retained debug content. Distinguish no-action help from unknown-command ownership and cover both real root-help paths without changing owning refs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Address #5997 comment 3981283816 without emitting legacy discovery into explicitly owned reporter output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Document and guard the deliberately post-close completeness notification raised by #5997 comment 3981283923. Preserve production ordering and prove fsync/close failures never announce a complete artifact. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Address #5997 comment 3981283879 with selective help ownership, preserving custom values, rollback, and following flags. Exercise the real legacy help parser. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Retain the exact reviewed R5B slice, including unfiltered canonical full-detail logs and declaration-aware help. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Preserve the existing slice and current parent histories; only capture successful fixture setup diagnostics, without changing production behavior, warning policy, or watch assertions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Preserve the existing slice and parent histories while carrying the validated test-helper correction. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
The newly landed parent tree is byte-identical to the already integrated parent. Preserve the entire reviewed slice tree and both parent histories while correcting ancestry after the protected stack-prefix squash landing. For R3C, exclude the 300 lines of duplicated old graph tests introduced by automatic merge; the final source, test, dependency and API trees are exactly unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Land the four remaining reviewed Reporter core slices (#5992, #5996, #5997, #5998) together after exact-head approval, zero unresolved discussions, and all six current CI runs with 36 complete platform workflows were verified. Preserve opt-in behavior and existing quality gates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10

Part of #5978
Stack
Parent: #5996 (
copilot/reporter-r5a-operation-adapter)This PR is based directly on the R5A operation adapter and intentionally excludes the parallel R6 #5993 bootstrap work. Keep auto-merge disabled while stack ancestors remain open.
Demo path
The direct current-version
rush buildpath now transfers visible operation presentation to the frontend-selected reporters when either an explicit non-legacy--reporteris present or the repositoryuseRushReporterexperiment is enabled.common/temp/rush-logs;StreamCollatorwrites to a no-op destination, preserving scheduling/writer completion semantics without duplicate terminal output;operationCompletedevents;RUSH_REPORTER=legacyremoves reporter controls before launching Rush and returns immediately to the existing legacy path.The file reporter spools active operation output to owner-only temporary files, then appends each operation as a grouped block in completion order. This preserves stdout/stderr chunk order without unbounded heap buffering.
Reproducible demo
The script exercises:
Observed result:
sessionCompleted.Repository opt-in remains
"useRushReporter": trueincommon/config/rush/experiments.json; removing it or settingRUSH_REPORTER=legacyprovides immediate rollback.Validation
rush test --only @rushstack/rush-reporter --only @microsoft/rush-lib --only @microsoft/rush --verboserush build --only @rushstack/rush-reporter --only @microsoft/rush-lib --only @microsoft/rush --verboserush checkrush change --verify --no-fetchcommandResult,commandCompleted, andsessionCompleted, with the actionable error in the full logCoverage includes success, cache hit, warnings, operation failure, blocked and aborted operations, silent operations, parallel grouping, stdout/stderr ordering, TTY/non-TTY behavior, quiet/verbose/debug controls, watch-cycle completion, and legacy flag-off parity.
Non-goals
install-run-rushor bootstrap handoff ownership (R6 / [rush reporter][R6A] Add bootstrap handoff and compatibility adapters #5993);