[rush reporter][R6A] Add bootstrap handoff and compatibility adapters - #5993
Conversation
|
Independent Fixed in
Verified the minimal zero-dependency prelude, 1 MiB bounded buffering, 64 KiB UTF-8-safe external-output chunks, required-overflow failure, truncation marker, exclusive nonce/path handoff with owner-only permissions, ordered npm capture, replay/delete/retention cleanup, direct invocation, no-opt-in legacy behavior, and no R5 operation-rendering, Heft, or Rush 6 default-flip scope. The old-engine stderr bridge remains intentional to preserve machine-reporter stdout purity; default/no-opt-in output bypasses it and remains unchanged. Validation completed: focused Stack remains intentionally linear with child auto-merge disabled. Required retarget order after each predecessor merges: #5985 -> retarget #5986 to |
|
Combined deep review of current head
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d6318e80-5da9-4858-a147-817e8692f10e
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d6318e80-5da9-4858-a147-817e8692f10e
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d6318e80-5da9-4858-a147-817e8692f10e
2b8d8e5 to
c1e13cd
Compare
|
Fixed all five bootstrap review findings in c1e13cd.
Validation: deterministic bootstrap generation; reporter build and 299 tests; rush-lib build and 774 tests; Rush frontend build and 62 tests; |
|
Four-review rerun on
Auto-merge remains disabled. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d6318e80-5da9-4858-a147-817e8692f10e
|
Round-two findings fixed in 04072bd.
Validation: deterministic generation; reporter build and 299 tests; rush-lib build and 779 tests; Rush frontend build and 62 tests; rush check; stacked change verification. PR is CLEAN/MERGEABLE and auto-merge remains disabled. Ready for review. |
|
Final four-review gate on Required fix: route legacy warnings to stderr in quiet and non-quiet configurations, with coverage. Auto-merge remains disabled. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d6318e80-5da9-4858-a147-817e8692f10e
|
Final narrow finding fixed in be34125. Legacy capture finalization is currently unreachable because legacy bootstrap exposes no external-output handler and install-run creates a capture only when that handler exists. For future safety, both quiet and non-quiet legacy loggers now route warnings to stderr. Coverage simulates a partial capture in both modes and proves one warning, unchanged outcome, no stdout, no handoff, and cleanup. Validation: deterministic generation; reporter build and 299 tests; rush-lib build and 781 tests; Rush frontend build and 62 tests; rush check; stacked change verification. PR is CLEAN/MERGEABLE and auto-merge remains disabled. Ready for review. |
|
Final combined review of |
Part of #5979.
Stack
Base:
copilot/reporter-r2b-frontend-host-controls. This PR intentionally contains only the R6A delta relative to #5989 and does not enable auto-merge while the stack ancestors remain open.Design choice
Use a minimal prelude in the existing generated
install-run-rushpath rather than add a reporter-specific script variant. This keeps every existing bootstrap entry point and update mechanism intact, uses the frozen zero-dependency encoder/protocol major from #5986, and gates all changed visible behavior behind an explicit reporter request or the repository experiment.The prelude parses only early reporter/log-level controls plus the comment-aware
useRushReporterexperiment. It incrementally builds a 1 MiB bounded NDJSON buffer, chunks external output at 64 KiB, preserves required records, evicts only replaceable activity status, appends the RFC truncation marker, and fails if required output cannot be retained. npm stdout/stderr are captured as ordered framed records with a hard capture ceiling and persistent UTF-8 decoding.The handoff is written under the OS temp directory with owner-only permissions where supported, an exclusive filename, and a nonce duplicated in private path/nonce environment variables. The frontend creates the authoritative host before version selection, replays then deletes the file, clears the private environment, and sweeps abandoned files using the existing retention policy.
Compatibility behavior
rush-lib; explicit protocol-major incompatibility fails with an update/use-legacy diagnostic.externalOutputevents without contaminating machine-reporter stdout.LegacyFallbackSink/legacy rendering behavior.rushinvocation has no handoff and converges on the same authoritative frontend host used by bootstrap invocation.Validation
node libraries/reporter/scripts/generateBootstrapProtocol.js --checknode common/scripts/install-run-rush.js test --only @rushstack/rush-reporter --only @microsoft/rush-lib --only @microsoft/rushinstall-runnpm-capture smoke test usingcowsay@1.6.0(ordered stdout/stderr frames, no overflow)node common/scripts/install-run-rush.js checknode common/scripts/install-run-rush.js change --verify --no-fetchgit diff --checkFocused coverage includes direct/bootstrap startup, replay/deletion, invalid path/nonce, missing/unreadable handoffs, permissions, abandoned cleanup, truncation and required overflow, ordered external output, UTF-8 boundaries, unsupported explicit requests, implicit fallback, and old/new frontend-engine combinations.
Rollback
Revert this single commit. The optional hooks in
install-rundisappear with the prelude, and the default no-opt-in bootstrap/legacy path remains the unchanged fallback throughout the rollout.Non-goals
StreamCollator