Reporter overhaul (2/6): bootstrap and cross-version compatibility adapters#5866
Open
TheLarkInn wants to merge 6 commits into
Open
Reporter overhaul (2/6): bootstrap and cross-version compatibility adapters#5866TheLarkInn wants to merge 6 commits into
TheLarkInn wants to merge 6 commits into
Conversation
This was referenced Jul 15, 2026
Add the self-contained bootstrap machinery for @rushstack/reporter (#5858). install-run-rush must stay zero-dependency and embed a frozen copy of this encoder rather than import the package at runtime, so the source of truth lives here. - Add a frozen protocol-major constant, buffer and chunk limits, and the private handoff environment variable name - Add BootstrapEventBuffer, a bounded 1 MiB encoder that preserves required and diagnostic events on overflow, splits raw external output into 64 KiB chunks, and appends a bufferTruncated extension event describing any loss - Add handoff helpers that write, read, and delete the temporary NDJSON file - Add parseEarlyReporterControls for the prelude - Cover parsing, encoding, overflow, failure, chunking, and handoff 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 frontend reporter host for @rushstack/reporter (#5858). - Add ReporterHost, which owns the authoritative ReporterManager the frontend creates before version selection - Replay the bootstrap handoff file into the manager and delete it, skipping direct invocations and tolerating a missing or corrupt file - Expose a typed IReporterEventSink to the selected rush-lib so the engine can emit events but cannot own reporter selection - Clean abandoned handoff files older than the retention window - Share the handoff file-name pattern between the writer and the cleaner - Cover replay, direct invocation, missing-file tolerance, the sink, and cleanup 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
Bridge frontend and engine version mismatches for @rushstack/reporter (#5858). - Add resolveReporterCompatibility, which classifies structured, new-frontend-old-engine, old-frontend-new-engine, and legacy pairings and keeps legacy rendering as the sole visible output - Add createEngineSink and LegacyFallbackSink so a new engine paired with an old frontend emits safely and renders legacy output - Add OldEngineOutputAdapter, which bridges an old engine's raw stdout and stderr into structured externalOutput events without changing the visible legacy output - Cover both mismatch directions 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
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 2 of 6.
Phase 2 — Bootstrap and compatibility adapters (RFC §8.1)
Adds startup-time event capture and cross-version fallback, while legacy rendering remains the sole visible output (no user-facing change).
What's included
rush-libloads, with byte caps and a truncation marker, and hands them off for replay.ReporterHost— constructs the manager and replays the bootstrap handoff in order.Validation
rush build --to @rushstack/reporter✅rush test --only @rushstack/reporter✅ (adds Bootstrap, ReporterHost, Compatibility suites)@beta.Scope note
Standalone package; not yet wired into the live CLI. Independently releasable/revertible per RFC §8.1.