Add Rush reporter frontend controls - #5989
Conversation
|
Stack integration review found and fixed three actionable issues in 42b0fae: frontend-only value flags no longer leak to repository-pinned engines; legacy verbosity combinations remain compatible, including under RUSH_REPORTER=legacy; and the repository useRushReporter opt-in is consumed before version selection with deterministic TTY/CI/non-TTY behavior while agent auto-selection stays disabled. Ordering gate: after #5985 merges and both PRs move to main, #5987 must merge before #5989 because #5987 owns the schema/API for the experiment that #5989 consumes. |
42b0fae to
c54a29b
Compare
|
Linearized stack update: rebased the two R2B-only commits onto fresh origin/copilot/reporter-r2a-experiment-config and force-pushed with lease. New head is c54a29b; base is now copilot/reporter-r2a-experiment-config. The GitHub diff exactly matches the local R2A-to-R2B file list, with no R2A schema/API files included. Combined targeted tests, rush check, and changefile verification pass. Auto-merge remains disabled while #5985 and #5987 are open. |
c54a29b to
732e704
Compare
|
Combined deep review of current head
|
|
Fixed both deep-review findings in 709357f. Reporter control scans and stripping now stop at the first standalone |
|
Four-review rerun on
Useful low follow-ons: close errors should not replace the command result, and current |
|
Round two fixed in 5f8ef5e. Reporter options are no longer ts-command-line globals, so existing build, rebuild, check, and repository custom parameters retain their action-owned behavior. Explicit non-legacy reporter requests reserve reporter value controls; implicit opt-in preserves custom output and log-level parameters. Incompatible engines now reject explicit reporters before initialization and otherwise stay on disabled legacy behavior. Lifecycle handlers are installed only when enabled, signals use one two-second wall-clock deadline, and close errors set failure state without replacing command errors. Tests passed: reporter 295, rush-lib 757, apps/rush 38, regenerated snapshots, rush check, and stacked-base change verification. |
|
Four-review rerun on
Auto-merge remains disabled. Descendant remediation stays paused. |
|
Final focused ownership fix is in c732e19. Unsupported custom |
|
Four-review gate on Required fix: make the probe tolerant of missing values and raise One dismissible low follow-on remains: repository opt-in currently rejects contradictory legacy verbosity aliases that the legacy path accepts. |
d5af039 to
6490831
Compare
544110e to
1cef79b
Compare
1cef79b to
1f4a982
Compare
1f4a982 to
61a3e54
Compare
|
Deep review found three high actionable issues on current head
|
61a3e54 to
52c50f8
Compare
5bba19c to
95379c1
Compare
Sean Larkin (TheLarkInn)
left a comment
There was a problem hiding this comment.
R2 acceptance review against #5975 and the documented emergency fallback/output-ownership contracts.
28e30b0 to
ebbb477
Compare
|
Stack6007 refresh completion: the eight core layers and three dependent side branches are published with their reviewed scopes, public API deltas and side-branch histories preserved. All11 current heads passed all66 complete platform workflows, including package-manager and repeated-cache stages; the trunk conflict at this PR is cleared and GitHub now reports it mergeable. Current R2B head is ebbb477, CI34425756818. The isolated unchanged benchmark failure passed one evidence-backed failed-job retry; no source assertion or performance threshold was altered. Original23 review findings remain resolved. Independent approvals and dependency-ordered landing are still required; no PR was merged or package released. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Repository opt-in controls, global verbose handling, rollback stripping, and file log-level behavior have unresolved correctness issues.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 4
New issues introduced by this change (4)
| Severity | Finding |
|---|---|
apps/rush/src/RushFrontend.ts — Only value controls are removed here, but --verbose is also interpreted as a reporter log-level… |
|
apps/rush/src/RushReporterHost.ts — When rollback bypasses strict parsing, a value-less control can consume the following legacy flag.… |
|
apps/rush/src/RushReporterHost.ts — Repository opt-in does not actually support the new value controls unless --reporter is also… |
|
apps/rush/src/RushReporterHost.ts — The primary file reporter is wrapped at the selection's default normal level, which drops… |
What changed in this PR
Adds frontend-owned reporter selection, lifecycle management, controls, and legacy compatibility before Rush engine selection.
Changes:
- Introduces reporter host selection, output routing, and deterministic cleanup.
- Passes reporter sink/close hooks into
rush-lib. - Adds experiment loading, pass-through handling, documentation, and tests.
| File | Description |
|---|---|
specs/2026-07-12-rush-reporter-overhaul.md |
Documents stream targets and legacy override. |
libraries/rush-lib/src/cli/test/RushCommandLineParserReporterClose.test.ts |
Tests parser cleanup and controls. |
libraries/rush-lib/src/cli/test/RushCommandLineParser.test.ts |
Tests custom parameter preservation. |
libraries/rush-lib/src/cli/test/basicAndRunRebuildActionRepo/custom-reporter-flag.js |
Captures custom flag arguments. |
libraries/rush-lib/src/cli/test/basicAndRunRebuildActionRepo/common/config/rush/command-line.json |
Defines custom reporter flag fixture. |
libraries/rush-lib/src/cli/test/basicAndRunBuildActionRepo/custom-output.js |
Captures custom output arguments. |
libraries/rush-lib/src/cli/test/basicAndRunBuildActionRepo/common/config/rush/command-line.json |
Defines overlapping custom controls. |
libraries/rush-lib/src/cli/RushCommandLineParser.ts |
Integrates reporter finalization. |
libraries/rush-lib/src/api/Rush.ts |
Forwards the frontend close hook. |
libraries/reporter/src/test/ExitStatus.test.ts |
Tests pass-through JSON handling. |
libraries/reporter/src/exit/CommandJson.ts |
Stops control scanning at --. |
common/changes/@rushstack/rush-reporter/reporter-r2b-json-controls_2026-09-07.json |
Records reporter package change. |
common/changes/@microsoft/rush/reporter-foundation-controls_2026-09-09.json |
Records control compatibility change. |
common/changes/@microsoft/rush/copilot-reporter-r2b-frontend-host-controls_2026-08-28-03-00.json |
Records frontend integration change. |
apps/rush/src/test/sandbox/repo/common/config/rush/experiments.json |
Enables reporter fixture experiment. |
apps/rush/src/test/RushReporterHost.test.ts |
Tests reporter selection and outputs. |
apps/rush/src/test/RushFrontend.test.ts |
Tests frontend lifecycle and handoff. |
apps/rush/src/test/MinimalRushConfiguration.test.ts |
Tests experiment loading. |
apps/rush/src/start.ts |
Launches through the new frontend. |
apps/rush/src/start-dev.ts |
Uses the frontend in development. |
apps/rush/src/RushVersionSelector.ts |
Carries frontend launch options. |
apps/rush/src/RushReporterHost.ts |
Implements controls and reporter host. |
apps/rush/src/RushFrontend.ts |
Coordinates selection, handoff, and cleanup. |
apps/rush/src/RushCommandSelector.ts |
Uses the frontend launch contract. |
apps/rush/src/MinimalRushConfiguration.ts |
Reads repository reporter opt-in. |
apps/rush/src/IRushFrontendLaunchOptions.ts |
Defines the cross-version contract. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Preserve the exact published R2B slice and review corrections while reconciling native private members and replacing unbranded parser test objects with real execution paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Share separated-value recognition with stripping so valueless controls cannot consume legacy flags, and use debug only as the unrequested primary file log-level default. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
Consume --verbose only for known actions that do not define it and parse repository opt-in value controls only when they are not command-owned. Preserve native aliases, declared custom values, unresolved plugin namespaces, and pass-through arguments. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4747f826-8c83-495d-80df-3d1168662e10
68cab2b to
55e4328
Compare

Summary
ReporterHost/ReporterManagerinapps/rushbefore Rush version selection and pass selectedrush-libonly anIReporterEventSink--reporter,--output,--log-level,--quiet,--verbose, and--debugcontrols while preserving command-specific--json--reporteror the repositoryuseRushReporterexperiment enables reporters, agent auto-selection remains disabled, andRUSH_REPORTER=legacystrips reporter-only controls before legacy-engine handoff-vmeanings forrush list,rush change, and phased build commandsStack
copilot/reporter-r2a-experiment-config)copilot/reporter-r1b-bootstrap-generation)copilot/reporter-r1a-package-wiring)This is the R2B child of #5987. Keep auto-merge disabled while any ancestor is open. Merge and retarget #5985, #5986, and #5987 in order; only after #5987 merges should this PR be retargeted to
mainand considered for auto-merge.Validation
rush build --to @microsoft/rush --verboserush test --only @microsoft/rush --only @microsoft/rush-lib --only @rushstack/rush-reporter --verbosenode libraries/reporter/scripts/generateBootstrapProtocol.js --checkrush checkrush change --verify --no-fetchgh pr diff 5989contains only the 18-file R2B frontend/control sliceLegacy safety
--reporter,--output, and--log-levelcontrols are removed before every Rush engine handoff, including repository-pinned older enginesRUSH_REPORTER=legacyremains the emergency override even when non-legacy or contradictory reporter controls are present--quiet --debugremain valid when the reporter path is disabledrush-pnpm --reporterandrushxarguments remain outside Rush reporter parsingRepository opt-in
useRushReporteris read before version selectionNon-goals
StreamCollatorreplacement (R5)Part of #5975