[2026-07-14] Feature 1/28 COMPLETE: Scaffold @rushstack/rush-reporter public beta package Files: - libraries/reporter/package.json (name @rushstack/rush-reporter v0.1.0, no rush-lib dep) - libraries/reporter/tsconfig.json, config/{api-extractor,jest,rig}.json, eslint.config.js - libraries/reporter/.npmignore, LICENSE, README.md - libraries/reporter/src/index.ts (REPORTER_PACKAGE_NAME, @beta) - rush.json (registered @rushstack/rush-reporter after problem-matcher) - common/reviews/api/reporter.api.md (generated, shows // @beta) - common/config/subspaces/default/pnpm-lock.yaml (rush update) Verify: - rush update: success (~20s) - rush build --to @rushstack/rush-reporter: success - rush build --only @rushstack/rush-reporter: clean SUCCESS, no warnings - api report confirms @beta release tag on exports - no rush-lib reference in package.json Next: Feature 2/28 - Define canonical event envelope and closed core event type union [2026-07-14] Feature 2/28 COMPLETE: Canonical event envelope and closed core event type union Files: - libraries/reporter/src/events/ReporterProtocolVersion.ts (IReporterProtocolVersion) - libraries/reporter/src/events/ReporterPrivacyClassification.ts (public|local-sensitive|secret) - libraries/reporter/src/events/ReporterJsonValue.ts (ReporterJsonNull, ReporterJsonValue) - libraries/reporter/src/events/ReporterEventType.ts (union + REPORTER_EVENT_TYPES, 15 members) - libraries/reporter/src/events/IReporterEventEnvelope.ts (source, scope, envelope; all readonly) - libraries/reporter/src/index.ts (re-exports) - libraries/reporter/src/test/IReporterEventEnvelope.test.ts (+ __snapshots__ golden) - common/reviews/api/reporter.api.md (regenerated, all @beta) Verify: - rush test --only @rushstack/rush-reporter: clean SUCCESS (build + jest) - golden envelope snapshot + JSON round-trip + closed-set + sourceSequence + Error-not-serialized tests pass - api report confirms all exports @beta, envelope fields readonly Next: Feature 3/28 - Producer API (IReporterEventSink, IScopedReporter) [2026-07-14] Feature 3/28 COMPLETE: Producer API (scoped emit without reporter/destination access) Files: - libraries/reporter/src/producers/IReporterEventSink.ts (IReporterEmitEventInput, IReporterEventSink.emit) - libraries/reporter/src/producers/IScopedReporter.ts (ReporterMessageSeverity, IScopedMessageOptions, IScopedReporter) - libraries/reporter/src/producers/ReporterExtensionEventName.ts (type + isReporterExtensionEventName validator) - libraries/reporter/src/diagnostics/IRushDiagnostic.ts (MINIMAL stub: code/severity/summaryKey; expanded in Feature 4) - libraries/reporter/src/index.ts (re-exports) - libraries/reporter/src/test/ProducerApi.test.ts - common/reviews/api/reporter.api.md (regenerated, all @beta) Notes: - emitDiagnostic requires IRushDiagnostic; introduced a MINIMAL stub now. Feature 4 must EXPAND it (add RushDiagnosticCategory, remediation, source, classified parameters, field privacy, code registry, templates, tests) - not recreate. Verify: - rush test --only @rushstack/rush-reporter: clean SUCCESS (build + jest), no warnings - sink Omit contract, scoped emit ids, emit-only surface, extension-name validation tests pass Next: Feature 4/28 - Structured diagnostics (registry, categories, remediation, field privacy) [2026-07-14] Feature 4/28 COMPLETE: Structured diagnostics (registry, categories, remediation, field privacy) Files (new): - diagnostics/RushDiagnosticCategory.ts (7 categories) - diagnostics/IRushRemediationAction.ts (RushRemediationSafety + action) - diagnostics/IRushDiagnosticSource.ts - diagnostics/IClassifiedDiagnosticValue.ts (value + privacy) - diagnostics/DiagnosticPrivacy.ts (getPrivacyClassificationRank, computeEnvelopePrivacyFloor = min sensitivity) - diagnostics/RushDiagnosticCodeRegistry.ts (defs, RUSH_DIAGNOSTIC_CODES map, templates, isValidRushDiagnosticCode, RUSH_INTERNAL_ERROR_CODE) - diagnostics/RushError.ts (wraps DTO, exposes diagnosticId) - diagnostics/createRushDiagnostic.ts (factory, randomUUID id) - test/Diagnostics.test.ts Files (modified): - diagnostics/IRushDiagnostic.ts (EXPANDED from Feature 3 stub: diagnosticId, category, detailKey, parameters, remediation, source, causeDiagnosticIds, retryable, relatedArtifactIds) - test/ProducerApi.test.ts (updated IRushDiagnostic literal for new required fields) - index.ts (re-exports), common/reviews/api/reporter.api.md Notes: - Privacy floor = MIN sensitivity across fields (spec: "minimum classification floor for every field"); field-level classification remains authoritative for redaction. Verify: - rush test --only @rushstack/rush-reporter: clean SUCCESS (build + jest) - registry validation (code pattern/uniqueness/category/templates/internal-code), privacy floor, factory, RushError tests pass - all 35 exports @beta Next: Feature 5/28 - NDJSON wire protocol (handshake, versioning, size limits) [2026-07-14] Feature 5/28 COMPLETE: NDJSON wire protocol (handshake, versioning, size limits) Files (new): - protocol/ReporterProtocol.ts (REPORTER_PROTOCOL_VERSION {1,0}, REPORTER_PROTOCOL_LIMITS 1MiB/1MiB/64KiB, isReporterProtocolCompatible = major-equality) - protocol/Ndjson.ts (encodeNdjsonRecord, NdjsonDecoder streaming, NdjsonRecordTooLargeError, INdjsonOptions) - protocol/ReporterHandshake.ts (IReporterHello, IReporterHelloAck, negotiateReporterHello -> {accepted, ack, diagnostic}) - test/Protocol.test.ts Files (modified): - diagnostics/RushDiagnosticCodeRegistry.ts (APPENDED code RUSH_PROTOCOL_UPDATE_REQUIRED + templates; registry is append-only) - index.ts, common/reviews/api/reporter.api.md Notes: - Capabilities optional (accepted = intersection; unknown ignored). Only unknown requiredFeatures or unsupported major reject + emit RUSH_PROTOCOL_UPDATE_REQUIRED. Minor additive. - Byte limits enforced via Buffer.byteLength (utf8), incl. oversized partial-line guard in decoder. Verify: - rush test --only @rushstack/rush-reporter: clean SUCCESS (build + jest) - encode/decode round-trip, chunk-split reassembly, blank-line skip, record/partial size limits, negotiation (compat major, minor additive, unknown required, unsupported major, supported required) tests pass - all exports @beta Next: Feature 6/28 - ReporterManager lifecycle, ordering, and fan-out [2026-07-14] Feature 6/28 COMPLETE: ReporterManager lifecycle, ordering, and fan-out Files (new): - manager/IReporter.ts (IReporter {name, initializeAsync, report, flushAsync, closeAsync}, IReporterContext) - manager/ReporterManager.ts (implements IReporterEventSink; emit assigns eventId/sequence/timestamp; ingestForeignEnvelope sets sourceSequence; per-reporter ordered async drain queue; addReporter destination exclusivity + required flag; initializeAsync fatal on failure; flushAsync 10s / signalFlushAsync 2s / closeAsync; coalescing under pressure; emergency stderr writer) - manager/ReporterMultiplexer.ts (shared-destination fan-out) - test/Manager.test.ts Files (modified): index.ts, common/reviews/api/reporter.api.md Notes: - Coalescible = type 'activityChanged' && !required; only coalesces when queue length >= coalesceThreshold (default 64). Protected types never coalesced/dropped. - Optional reporter runtime failure -> disabled + 1 emergency stderr line; required failure -> captured, flush/close reject (fatal). Init failure always fatal. - report() is sync; drain loop yields via await Promise.resolve() between events so flush is the sync point. Verify: - rush test --only @rushstack/rush-reporter: clean SUCCESS (build + jest) - ordering/sequence/eventId/timestamp, foreign rehome, destination exclusivity, multiplexer, add-after-init guard, init-fatal, optional-disable, required-fatal-flush, coalescing (protected preserved), flush/close, flush-timeout tests pass - all exports @beta Next: Feature 7/28 - Freeze legacy output snapshots + protocol/compatibility goldens [2026-07-14] Feature 7/28 COMPLETE: Freeze legacy output snapshots + protocol/compatibility goldens (test-only) Files (new): - test/Goldens.test.ts + test/__snapshots__/Goldens.test.ts.snap (8 snapshots) Files (modified): research/* Notes: - No new production API -> api.md unchanged. Legacy output samples INLINED as string constants (jest runs against lib/, so .txt fixtures would not be copied). Durations normalized (X.XX seconds). - Protocol goldens: envelope schema, full diagnostic schema (fixed diagnosticId), hello/helloAck, NDJSON round-trip. - Compatibility goldens: negotiation matrix (same major/minor, additive minor, unknown optional cap ignored, unknown required rejected+RUSH_PROTOCOL_UPDATE_REQUIRED, unsupported major rejected) normalized to drop random diagnosticId; minor-additive unknown-field retention on decode; protocol-version baseline. - Legacy goldens: success + failure output frozen. - Change file type=none (test-only, no version bump). Verify: - rush test --only @rushstack/rush-reporter: clean SUCCESS (build + jest), 8 snapshots Next: Feature 8/28 - Two-stage bootstrap in install-run-rush (handoff file) [2026-07-14] Feature 8/28 PARTIAL: Two-stage bootstrap handoff (buffer + encoder + handoff + early controls) Files (new): - bootstrap/BootstrapProtocol.ts (BOOTSTRAP_PROTOCOL_MAJOR=1 frozen, BUFFER_MAX 1MiB, EXTERNAL_CHUNK 64KiB, RUSH_REPORTER_BOOTSTRAP_HANDOFF_ENV_VAR='_RUSH_REPORTER_BOOTSTRAP_HANDOFF', bufferTruncated ext name) - bootstrap/BootstrapEventBuffer.ts (self-contained mini-sink; emit assigns ids/seq/ts; addExternalOutput 64KiB chunking; overflow preserves required+diagnostic, evicts non-preserve, fails if required can't fit; serialize appends bufferTruncated extension event) - bootstrap/BootstrapHandoff.ts (write/read/delete NDJSON handoff via node fs/os) - bootstrap/EarlyReporterControls.ts (parseEarlyReporterControls: --reporter/--log-level/-q/--verbose/--debug + RUSH_REPORTER/RUSH_LOG_LEVEL/RUSH_QUIET_MODE; CLI over env) - test/Bootstrap.test.ts Files (modified): index.ts, common/reviews/api/reporter.api.md SCOPING DECISION (important): - Authored the bootstrap machinery IN @rushstack/reporter as the source of truth (per spec 5.1: install-run-rush embeds a FROZEN copy generated from this package and does NOT import it at runtime). - Did NOT modify the live libraries/rush-lib/src/scripts/install-run-rush.ts / common/scripts/install-run-rush.js bundle: it is zero-dependency, webpack-bundled critical tooling used for every build/test here; wiring live would risk breaking the repo's own tooling. Actual embedding into install-run-rush is a rollout/build-integration step. - BOOTSTRAP_PROTOCOL_MAJOR duplicated (frozen) with a test asserting == REPORTER_PROTOCOL_VERSION.major. Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - early-controls parsing, encode/serialize round-trip, 64KiB external chunking, overflow preserve+truncate, required-cannot-preserve fail, handoff write/read/delete tests pass; all exports @beta Next: Feature 9/28 - Frontend ReporterManager host + replay the bootstrap handoff [2026-07-14] Feature 9/28 PARTIAL: Frontend ReporterManager host + bootstrap handoff replay Files (new): - frontend/ReporterHost.ts (ReporterHost: owns a ReporterManager; getSink()->IReporterEventSink (narrowed, no selection ownership); replayBootstrapHandoffAsync (read+ingestForeignEnvelope+delete; direct when env var absent; tolerates missing/corrupt file); cleanAbandonedHandoffFilesAsync (14d retention default); DEFAULT_HANDOFF_RETENTION_MS) - test/ReporterHost.test.ts Files (modified): - bootstrap/BootstrapHandoff.ts (added BOOTSTRAP_HANDOFF_FILE_PREFIX/SUFFIX + isBootstrapHandoffFileName; writer now uses them) - index.ts, common/reviews/api/reporter.api.md SCOPING (same as F8): host authored in @rushstack/reporter as source of truth. Did NOT wire into live apps/rush start.ts (critical frontend tooling); actual creation "before version selection" is a rollout integration step. Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - replay+delete+rehome(sourceSequence), direct skip, missing-file tolerance, typed sink emit, abandoned-file cleanup (stale deleted, new/non-matching kept) tests pass; all exports @beta Next: Feature 10/28 - Cross-version compatibility adapters (new/old frontend/engine) while keeping legacy rendering visible [2026-07-14] Feature 10/28 PARTIAL: Cross-version compatibility adapters (both directions) Files (new): - compat/ReporterCompatibility.ts (resolveReporterCompatibility -> mode structured|new-frontend-old-engine|old-frontend-new-engine|legacy; flags provideSinkToEngine/engineRendersLegacy/legacyRenderingVisible=true always) - compat/LegacyFallbackSink.ts (LegacyFallbackSink discards emits; createEngineSink(providedSink?) -> {sink, mode structured|legacy-fallback}) - compat/OldEngineOutputAdapter.ts (capture(stream,text) bridges old-engine raw output into externalOutput events, 64KiB chunked, privacy local-sensitive) - test/Compatibility.test.ts Files (modified): index.ts, common/reviews/api/reporter.api.md Notes: - New frontend + old engine: OldEngineOutputAdapter bridges legacy stdout/stderr into structured events without altering visible legacy output. - Old frontend + new engine: createEngineSink falls back to LegacyFallbackSink so a new engine emits safely then renders legacy. - legacyRenderingVisible always true (phase 2: legacy sole visible output). Same source-of-truth scoping (not wired into live apps/rush or rush-lib). Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - resolver (5 combos incl newer-major), engine sink (structured + fallback), adapter bridge + chunk-split tests pass; all exports @beta Next: Feature 11/28 - Expose RushSession event sink and scoped producers to actions and plugins [2026-07-14] Feature 11/28 COMPLETE: RushSession event sink + scoped producers for actions/plugins Files (new): - session/ScopedReporterFactory.ts (createScopedReporter -> IScopedReporter; emitMessage->activityChanged {kind:'message',severity,text}, required for warning/error; emitDiagnostic->diagnosticEmitted with computeEnvelopePrivacyFloor; emitExtension validates namespaced name, wraps {name,payload}) - session/ScopedLogger.ts (IScopedLogger writeLine/writeDebugLine/writeWarningLine/writeErrorLine; NO .terminal handle) - session/RushSessionReporting.ts (facade: createScopedReporter/createScopedLogger; getSink(); createExecutionContext()->IReporterExecutionContext {sink, reporter}) - session/PluginApi.ts (IRushPluginManifest.rushVersionRange, isRushVersionSupported semver validation, createPluginApiIncompatibleDiagnostic migration diagnostic) - test/Session.test.ts Files (modified): diagnostics/RushDiagnosticCodeRegistry.ts (APPENDED RUSH_PLUGIN_API_INCOMPATIBLE code+templates), index.ts, api.md Notes: - Human messages map to activityChanged (closed union has no 'message' type; golden freezes the 15). required-by-severity so warnings/errors aren't coalesced. - Step 3 (no modes/destinations/thresholds) satisfied structurally: scoped reporter/logger + sink are emit-only. Test asserts Object.keys == 3 emit methods. - Same source-of-truth scoping (RushSession itself lives in rush-lib; not wired live). Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - scoped message/diagnostic/extension, privacy floor, emit-only surface, logger severities, session facade end-to-end via ReporterManager, plugin API compat + migration diagnostic tests pass; all exports @beta Next: Feature 12/28 - Emit shadow structured lifecycle + diagnostic events without changing output [2026-07-14] Feature 12/28 COMPLETE: Shadow structured lifecycle + diagnostic emission Files (new): - lifecycle/LifecycleEvents.ts (OperationStatus + payload interfaces: session/command started+completed, operation registered+statusChanged, commandResult, watchCycleCompleted) - lifecycle/LifecycleEmitter.ts (emit* methods, all required=true; merges base scope + per-event scope override; emitDiagnostic uses privacy floor; writes nothing to stdout/stderr) - lifecycle/ShadowParity.ts (deriveExitCodeFromEvents: commandResult succeeded->0 else exitCode/1, sessionCompleted fallback; summarizeShadowResult: operationCounts + result) - test/Lifecycle.test.ts Files (modified): index.ts, api.md Notes: - Step 3 "keep legacy output unchanged": emitter is output-neutral (only sink.emit). Test spies process.stdout/stderr.write and asserts not called. - Step 4 parity: exit-code parity helper + result summary. Full telemetry allowlist deferred to Feature 13; authoritative exit-code semantics to Feature 14 (this is shadow parity derivation). - Same source-of-truth scoping (actions/scheduler/plugins live in rush-lib; not wired live). Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - lifecycle emit + scope merge, diagnostic privacy floor, shadow output-neutrality, exit-code parity (4 cases), result summary, manager integration tests pass; all exports @beta Next: Feature 13/28 - Telemetry projection subscriber (allowlist + beforeLog adapter) [2026-07-14] Feature 13/28 COMPLETE: Telemetry projection subscriber (allowlist + beforeLog adapter) Files (new): - telemetry/TelemetryAggregate.ts (ITelemetryAggregate allowlist: commandName/result/exitCode/durationMs/operationStatusCounts/diagnosticCodes/diagnosticCategoryCounts/reporterMode/protocolVersion/producerVersions; TELEMETRY_AGGREGATE_KEYS) - telemetry/TelemetrySubscriber.ts (ingest extracts only allowlisted values - diagnostics keep code+category only, ignores argv/messages/external/artifacts; buildAggregate; setReporterMode; createTelemetryReporter adapter = IReporter with no destination, feeds before reporter filtering) - telemetry/BeforeLogAdapter.ts (LegacyBeforeLogHook + createBeforeLogAdapter runs hooks with plain copy of aggregate) - test/Telemetry.test.ts Files (modified): index.ts, api.md Notes: - "Before reporter filtering": manager fans full events to all reporters (each filters internally), so telemetry-as-reporter sees unfiltered events. - Leakage test emits secret param/path/argv/message/remediation-command/raw-output; asserts JSON.stringify(aggregate) contains none; keys subset of allowlist. - Same source-of-truth scoping (Rush telemetry lives in rush-lib; not wired live). Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - aggregate build, allowlist schema, leakage (5 forbidden strings absent), beforeLog adapter (plain copy) tests pass; all exports @beta Next: Feature 14/28 - Preserve command success + exit-code semantics independent of reporters [2026-07-14] Feature 14/28 COMPLETE: Authoritative command success + exit-code semantics Files (new): - exit/ExitStatus.ts (EXIT_CODE_SUCCESS=0/FAILURE=1; RushCommandOutcome succeeded|failed|cancelled|signal; getSignalExitCode=128+os.constants.signals[sig]; resolveExitStatus(hasFailures/cancelled/signal); resolveExitStatusFromEvents - failure = failed commandResult OR error diagnostic OR failed operation; category & reporter never inputs; precedence signal>cancelled>failure) - exit/CommandJson.ts (separateJsonControls -> {commandJson (--json), reporterJson (--reporter=json/--reporter json)} independent) - test/ExitStatus.test.ts Files (modified): index.ts, api.md Notes: - Warning-only success -> 0 (warnings not failures). Signal-derived status conventional (SIGINT->130, SIGTERM->143). - Category-independence proven: error diagnostics of any category ->1; warnings of any category ->0. - Command-specific --json preserved and NOT an alias for --reporter=json. - Distinct from Feature 12 shadow deriveExitCodeFromEvents (this is authoritative full outcome incl cancel/signal). Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - resolveExitStatus (success/warning-only/failure/cancel/signal precedence), signal codes, from-events (warning/error/op-failure/failed-result/category-independence/cancel/signal), separateJsonControls (5 cases) tests pass; all exports @beta Next: Feature 15/28 - Reporter selection + configuration controls with precedence [2026-07-14] Feature 15/28 COMPLETE: Reporter selection + configuration controls with precedence Files (new): - config/ReporterNames.ts (ReporterName default|ai|json|plaintext|file|legacy; ReporterLogLevel quiet|normal|verbose|debug; SUPPORTED_* + isSupported* guards) - config/AgentDetection.ts (COPILOT_CLI_ENV_VAR, KNOWN_CI_ENV_VARS, isAgentVariableActive [inactive if undefined/''/0/false/no/off case-insens], detectAgent(env,configuredVars), isCiDetected) - config/OutputControl.ts (IReporterOutputTarget, parseOutputControl '://?k=v') - config/ReporterSelection.ts (resolveReporterSelection: primary precedence CLI --reporter > RUSH_REPORTER > agent > CI > TTY > non-TTY plaintext; log level independent CLI/aliases/RUSH_LOG_LEVEL default normal; contradiction throws; additional=['file'] unless primary file; commandJson preserved; unsupported reporter/level throws) - test/ReporterSelection.test.ts Files (modified): index.ts, api.md Notes: - Full resolver (Feature 8 was early subset). Orthogonal axes: reporter (format) vs log level (severity) per pnpm memory. - Matrix: agent->ai+file, CI->plaintext+file, TTY->default+file, non-TTY->plaintext+file. - --json (command) never aliases --reporter=json. Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - primary precedence (explicit/env/agent/CI/TTY/non-TTY), additional file, unsupported-reporter throw, log-level aliases + contradiction + unsupported, command-json preserved, --output parse, agent-active semantics tests pass; all exports @beta Next: Feature 16/28 - Independent per-reporter log levels [2026-07-14] Feature 16/28 COMPLETE: Independent per-reporter log levels Files (new): - config/LogLevelFilter.ts (LOG_LEVEL_RANK quiet0/normal1/verbose2/debug3; getEventMinimumLogLevel classifies events; shouldRenderAtLogLevel; filterEventsForLogLevel; FILE_REPORTER_DEFAULT_LOG_LEVEL='debug') - test/LogLevelFilter.test.ts Files (modified): index.ts, api.md Classification (min level per §5.7): commandResult=quiet; diagnostic error=quiet, warning required=quiet else normal; lifecycle/operation/artifact=normal; activityChanged debug-message=debug else normal; externalOutput/externalProcess*=verbose; extension required=normal else debug. Notes: - Diagnostic severity separate from log level: severity sets min-level, reporter's configured level gates rendering. Test flips warning visibility by level, not severity. - Monotonic: shown at level L -> shown at all higher levels. Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - rank, classification, per-level rendering (quiet/normal/verbose/debug), monotonicity, severity-separation, filter, file-default tests pass; all exports @beta Next: Feature 17/28 - Automatic reporter selection matrix by environment [2026-07-14] Feature 17/28 COMPLETE: Automatic reporter selection matrix by environment Files (new): - config/AutomaticReporterMatrix.ts (PlaintextVariant detailed|concise; IReporterPlanEntry; IAutomaticReporterPlan; isMachineReporter(json|ai); planAutomaticReporters(selection)->plan; describeReporterPlan for detailed log) - test/AutomaticReporterMatrix.test.ts Files (modified): index.ts, api.md Matrix: agent->ai+file (machine stdout, human progress stderr); CI->plaintext[detailed]+file; TTY->default+file; non-TTY->plaintext[concise]+file. Emergency always stderr. Notes: - Composes Feature 15 resolveReporterSelection; plaintext variant from reason (CI detected->detailed else concise). - Machine reporters (ai/json) own stdout exclusively -> stdoutOwner 'machine', humanProgressDestination 'stderr'. Applies to explicit --reporter=json too. - describeReporterPlan records selection reason + reporters for the detailed (file/debug) log. Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - agent/CI/TTY/non-TTY matrix, json machine stdout, emergency stderr, isMachineReporter, describeReporterPlan tests pass; all exports @beta Next: Feature 18/28 - Default interactive reporter (three-row live region) [2026-07-14] Feature 18/28 COMPLETE: Default interactive reporter (three-row live region) Files (new): - reporters/InteractiveRendering.ts (SPINNER_FRAMES, MIN_REFRESH_INTERVAL_MS=100; resolveColorEnabled NO_COLOR>FORCE_COLOR>isTTY; createColorizer; truncateToWidth; renderActiveProjectsRow +N more; renderLiveRegion 3 rows [color applied AFTER truncation]; shouldRefresh) - reporters/DefaultInteractiveReporter.ts (IReporter; injected IInteractiveTerminal + nowMs; state from events; throttled paint <=10Hz; cursor hide/show ANSI; success<=3 lines; failure bounded diag block <=10 + Log path; watchCycleCompleted summary; non-TTY skips live region but writes final) - test/DefaultInteractiveReporter.test.ts Files (modified): index.ts, api.md Notes: - Color applied after truncateToWidth so ANSI never affects width/split mid-code. - Resize-aware: reads terminal.columns each paint. - Testable via FakeTerminal capturing writes + injected clock. Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - color resolution, colorizer, truncate, +N more, 3-row render, throttle; reporter hide/paint/throttle, success line + cursor restore, failure diag+log, watch summary, non-TTY tests pass; all exports @beta Next: Feature 19/28 - Plaintext and non-TTY reporter [2026-07-14] Feature 19/28 COMPLETE: Plaintext and non-TTY reporter Files (new): - reporters/PlaintextReporter.ts (IReporter; append-only via injected write; no cursor codes; color off default; variant concise|detailed; emits Starting line, terminal status lines, [severity] code diagnostics, final result; emitHeartbeatIfDue 30s; detailed groups externalOutput under ==[ project (phase) ]== StreamCollator-like) - test/PlaintextReporter.test.ts + __snapshots__/PlaintextReporter.test.ts.snap (concise + detailed) Files (modified): index.ts, api.md Notes: - No-ANSI assertion (append-only, no cursor, color off). Heartbeat interval-based via injected clock (report resets lastOutput). - Detailed buffers external output per operationId, flushes under header on terminal status. Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - no-ANSI, concise snapshot, detailed grouping snapshot, heartbeat timing tests pass; all exports @beta Next: Feature 20/28 - JSON and AI reporters [2026-07-14] Feature 20/28 COMPLETE: JSON and AI reporters Files (new): - reporters/JsonReporter.ts (IReporter; encodeNdjsonRecord per event to exclusive stdout; oversized -> rush.reporter.recordTooLarge marker so stream stays valid NDJSON) - reporters/AiReporter.ts (IReporter; ai.status on commandStarted; ai.final on commandResult/close; IAiFinalRecord result/exitCode/scope{commandName,failedProjects}/errorCodes/diagnosticCategoryCounts/diagnostics(remediation)/counts/log{path,format,complete}; caps 64KiB + 20 diagnostics; warnings by count when failures else warning-only details; excludes raw external output/stacks; byte-cap trims diagnostics->errorCodes->failedProjects) - test/JsonAiReporter.test.ts Files (modified): index.ts, api.md Notes: - Fixed byte-cap: trim errorCodes/failedProjects too (base record with many long codes exceeded tiny maxBytes otherwise). Real cap 64KiB. - Log path in AI final.log.path (local) but telemetry aggregate cross-check asserts path NOT present. - stdout purity: every emitted line parses as JSON. Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - JSON stream + oversized marker; AI status+final, log/scope/codes/remediation, 20-cap, 64KiB byte-cap trim, warnings-by-count vs warning-only, raw-excluded, stdout purity, telemetry path cross-check tests pass; all exports @beta Next: Feature 21/28 - Full-detail file reporter (retention + fallback) [2026-07-14] Feature 21/28 COMPLETE: Full-detail file reporter (retention + fallback) Files (new): - reporters/FileReporter.ts (IReporter; RUSH_LOGS_DIR_NAME 'rush-logs', LATEST_LOG_NAME 'latest.log'; buffers lines, writes NDJSON at debug to /rush-logs/--.log; owner-only 0o600; redacts secret fields ->[secret], keeps local-sensitive; latest.log symlink/copy for success+failure; retention delete >14d + cap 20; OS-temp fallback; both-fail nonfatal emergencyWarn + getArtifact().available=false) - test/FileReporter.test.ts (real temp dirs) Files (modified): index.ts, api.md Notes: - report() buffers; _writeAsync (flush/close) resolves target lazily: try repoDir then osTempDir; appendFile new lines. - Timestamp filename: toISOString().replace(/[:.]/g,'-'). rush purge removes the rush-logs dir (path convention). - Test mode check uses %0o1000 (no-bitwise lint), guarded on non-win32. Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - write+perms+latest, latest-on-failure, secret redaction, retention (old delete + cap 20), OS-temp fallback, both-fail nonfatal tests pass; all exports @beta Next: Feature 22/28 - Legacy reporter (selectable + emergency fallback) [2026-07-14] Feature 22/28 COMPLETE: Legacy reporter (selectable + emergency fallback) Files (new): - reporters/LegacyReporter.ts (IReporter name 'legacy'; reproduces Starting line, "Executing a maximum of N...", 79-wide ==[ project (phase) ]==...[ n of total ]== headers, grouped externalOutput, SUCCESS/FAILURE summary with per-project + total durations; RUSH_REPORTER_ENV_VAR; isLegacyEmergencyFallbackRequested case-insensitive) - test/LegacyReporter.test.ts + __snapshots__/LegacyReporter.test.ts.snap (success + failure) Files (modified): index.ts, api.md Notes: - Legacy snapshots reproduce Feature 7 frozen legacy format EXACTLY (same 79-wide header padding, SUCCESS/FAILURE blocks, ==> ERROR line). Durations normalized X.XX. - Emergency fallback: feature 15 resolveReporterSelection selects 'legacy' via RUSH_REPORTER=legacy (validated); isLegacyEmergencyFallbackRequested helper. Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - success/failure snapshots, frozen-marker validation, emergency-fallback detection + selection tests pass; all exports @beta Next: Feature 23/28 - Replace StreamCollator in primary path with raw semantic events [2026-07-14] Feature 23/28 COMPLETE: Replace StreamCollator with raw semantic events Files (new): - scheduler/OperationStreamEmitter.ts (registerOperation, changeStatus, writeOutput [uncollated 64KiB chunked externalOutput, local-sensitive], completeCommand; emits raw events in call order = NOT collated) - scheduler/OperationOutputGrouping.ts (iterateExternalOutput -> ordered IExternalOutputChunk[] for matchers; regroupOperationOutput -> Map per-op parity) - test/OperationStreamEmitter.test.ts Files (modified): index.ts, api.md Notes: - Uncollated: interleaved writeOutput emits in call order. Parity proven: detailed PlaintextReporter regroups interleaved stream (A1,A2 before B1); regroupOperationOutput reconstructs per-op. - Concise DefaultInteractiveReporter never echoes raw project output (derives activity without buffering). - Same uncollated stream feeds problem matchers via iterateExternalOutput (Feature 24 owns matchers). - StreamCollator replacement = OperationStreamEmitter (source of truth). Actual rush-lib @rushstack/stream-collator removal from primary path is a rollout step (not modifying rush-lib live); package removal deferred per spec. Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - emitter events/scope, chunking, uncollated order, regroup parity, detailed-plaintext regroup, concise no-buffer tests pass; all exports @beta Next: Feature 24/28 - External output preservation + problem matchers [2026-07-14] Feature 24/28 COMPLETE: External output preservation + problem matchers Files (new): - matchers/AnsiNormalization.ts (normalizeAnsi strips CSI codes) - matchers/ProblemMatcher.ts (IProblemMatcher {name,tool,severity,pattern,enabledByDefault,matchesVersion?,extract}, IProblemMatch) - matchers/ProblemMatcherRegistry.ts (register, getMatchers(tool,{version,includeDisabled}) - tool+version scope + default-enablement gate) - matchers/ProblemMatcherRunner.ts (runProblemMatchers: reassembles lines per op across chunks, ANSI-normalized copy, linked RUSH_EXTERNAL_TOOL_PROBLEM diagnostics w/ source+relatedArtifactIds, dedup cap, unmatched preserved; raw events NEVER modified) - test/ProblemMatchers.test.ts Files (modified): diagnostics/RushDiagnosticCodeRegistry.ts (APPENDED RUSH_EXTERNAL_TOOL_PROBLEM code+template), index.ts, api.md Notes: - Consumes Feature 23 uncollated externalOutput stream (iterateExternalOutput). Split-chunk reassembly per operationId. Evidence preserved (events unchanged, asserted via JSON equal). - Duplicate cap (maxDuplicates default 3). Default-enablement gate via enabledByDefault + corpus test. - Old Heft routed via version-scoped matcher (registry.getMatchers('heft',{version:'0.9.0'})). Reporter self-contained (no @rushstack/problem-matcher dep). Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - normalizeAnsi, registry scope/gate, recover+link+evidence-preserve, split-chunk+ANSI, dedup cap, corpus tests pass; all exports @beta Next: Feature 25/28 - Prohibit new AlreadyReportedError + bridge legacy sentinels [2026-07-14] Feature 25/28 COMPLETE: Prohibit new AlreadyReportedError + bridge legacy sentinels Files (new): - compat/LegacyErrorBridge.ts (ALREADY_REPORTED_ERROR_NAME; AlreadyReportedError class @deprecated=prohibition; isAlreadyReportedSentinel; LegacyErrorBridge {recordEmittedDiagnostic, ingest(diagnosticEmitted->id), correlate/getCorrelatedDiagnosticId via symbol, shouldSuppressRendering}; LEGACY_ERROR_BRIDGE_REMOVAL_CRITERIA 3 items) - test/LegacyErrorBridge.test.ts Files (modified): index.ts, api.md Notes: - Prohibition encoded as @deprecated on AlreadyReportedError (api.md shows "// @beta @deprecated"); replacement = structured diagnostic + RushError. - shouldSuppressRendering: sentinel->true; RushError whose diagnosticId already emitted->true; correlated error with emitted id->true; else false (catch boundaries render only unrepresented failures). - Removal plan constant documents criteria (zero first-party usages, plugin migration guidance published, ecosystem notice/time). Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - sentinel detection, removal criteria, suppress sentinel/RushError-emitted/correlated, record direct+ingest tests pass; all exports @beta Next: Feature 26/28 - Heft integration via negotiated child descriptors + raw-stream fallback [2026-07-14] Feature 26/28 COMPLETE: Heft integration via negotiated child descriptors + raw-stream fallback Files (new): - heft/HeftDescriptor.ts (RUSH_REPORTER_CHILD_FD_ENV_VAR='_RUSH_REPORTER_CHILD_FD'; allocateChildDescriptor -> {fdNumber 3, env var, stdio [inherit,inherit,inherit,pipe]}; readChildDescriptorFd) - heft/HeftChildEmitter.ts (child side; mode structured if fd+writeDescriptor else raw-fallback; sendHello/emitEvent NDJSON to descriptor stamping childSessionId; writeRaw stdout/stderr fallback) - heft/HeftDescriptorHost.ts (parent side; processChildRecords/Ndjson: negotiate hello (feature 5), correlate each child event with parentSessionId+parentOperationId, forwardEnvelope; reject->RUSH_PROTOCOL_UPDATE_REQUIRED diagnostic) - test/HeftIntegration.test.ts Files (modified): index.ts, api.md Notes: - New path: child structured NDJSON over inherited fd -> host negotiate+correlate -> manager.ingestForeignEnvelope (sourceSequence preserved). stdout/stderr stay normal streams. - Old path: no fd -> raw-fallback writeRaw -> Rush captures as externalOutput -> runProblemMatchers (feature 24) recovers diagnostics. - Streams injected (writeDescriptor/writeStdout) for testability instead of real spawned FDs. Verify: - rush test --only @rushstack/reporter: clean SUCCESS (build + jest) - descriptor alloc/read, structured emit, raw fallback, host correlate+forward, protocol reject, old-heft raw+matcher tests pass; all exports @beta Next: Feature 27/28 - Reporter performance and capacity budgets [2026-07-15] Feature 27/28 COMPLETE: Meet reporter performance and capacity budgets (category: performance, spec §7.3) Files: - libraries/reporter/src/perf/PerformanceBudgets.ts (NEW): IReporterPerformanceBudgets interface + REPORTER_PERFORMANCE_BUDGETS constant encoding the §7.3 blocking budgets (3% wall-time regression, 32 MiB peak memory, 10 Hz interactive refresh, 64 KiB AI output, 20 AI detailed diagnostics). Helpers computeWallTimeRegressionPercent / isWithinWallTimeBudget / isWithinMemoryBudget for benchmark harnesses and capacity tests to share a single source of truth. - libraries/reporter/src/manager/ReporterManager.ts (EDIT): added public getPendingEventCount() observability hook and synchronous backpressure at coalesceThreshold for protected events; pending queues remain bounded without dropping outcomes. - libraries/reporter/src/index.ts (EDIT): barrel exports for the perf module (all @beta). - libraries/reporter/src/test/Performance.test.ts (NEW, 9 tests): budget-constant and helper assertions; measured baseline/candidate wall-time comparison through isWithinWallTimeBudget; measured baseline/reporter peak RSS comparison; bounded replaceable-status and protected-event bursts; queue-pressure coverage asserting EVERY protected outcome category is delivered exactly once while replaceable activityChanged noise coalesces. - common/reviews/api/rush-reporter.api.md (regenerated): new @beta perf exports + getPendingEventCount(). Design notes: - REPORTER_PERFORMANCE_BUDGETS is consumed directly by the AI and interactive reporter defaults, preventing drift. - The representative benchmark performs identical build-like hashing work in baseline and reporter candidates, then applies the 3% gate to median measurements. Peak RSS is sampled around the same workload and checked against the 32 MiB delta. - Coalescible = non-required 'activityChanged' only; every other type (and required activityChanged) is protected and never dropped. Protected bursts synchronously drain the oldest queued event at the threshold to apply bounded backpressure. Verify: rush build --to @rushstack/rush-reporter -> SUCCESS; rush test --only @rushstack/rush-reporter -> SUCCESS. Next: Feature 28/28 - Flip defaults in Rush daemon-aligned major (category: migration, spec §8.1 phase 6). [2026-07-15] Feature 28/28 PACKAGE MODEL COMPLETE; RUSH ROLLOUT PENDING (category: migration, spec §8.1 phase 6 / §5.3 / §8.2) Files: - libraries/reporter/src/migration/MigrationPhase.ts (NEW): ReporterMigrationPhaseId union (7 phases) + IReporterMigrationPhase + REPORTER_MIGRATION_PHASES ordered list (each independentlyReleasable & revertible = true, per §8.1 "Every phase must be independently releasable and revertible") + getReporterMigrationPhase(id). - libraries/reporter/src/migration/DaemonAlignedMajorDefaults.ts (NEW): IReporterMajorDefaults + PRE_FLIP_REPORTER_DEFAULTS and DAEMON_ALIGNED_MAJOR_REPORTER_DEFAULTS (the flip = data, so it is revertible by swapping default sets): * automaticSelectionEnabledByDefault true (post) / false (pre) -> step 1 * removedTerminalApis = REMOVED_TERMINAL_APIS ['ILogger.terminal','RushSession.terminalProvider'] (post) / [] (pre) -> step 2 * gateIncompatiblePluginsBeforeApply true (post) / false (pre) -> step 3 * legacyRendererRetained / verbosityAliasesRetained / sentinelBridgeRetained ALL true in BOTH (removed only in phase 7) -> step 4 * emergencyFallbackEnvVar 'RUSH_REPORTER' = 'legacy' (§8.2, >=1 major) Helpers: isTerminalApiRemoved, isEmergencyLegacyFallback (fallback wins), isAutomaticSelectionEnabled(defaults, context). - libraries/reporter/src/migration/PluginApplyGate.ts (NEW): evaluatePluginApplyGate(manifests, {gateEnabled=true,supportedApiVersion}) composing F11 primitives (isPluginApiVersionSupported + createPluginApiIncompatibleDiagnostic) to FAIL incompatible plugins BEFORE apply() with a structured RUSH_PLUGIN_API_INCOMPATIBLE diagnostic; gateEnabled=false models pre-flip (permit) for revertibility. getBlockedPlugins(decisions) -> step 3. - libraries/reporter/src/index.ts (EDIT): barrel exports for the migration module (all @beta). - libraries/reporter/src/test/Migration.test.ts (NEW, 10 tests): phase order/ordinals; every-phase releasable+revertible; phase lookup + throw; default-flip automatic-selection (post default on / pre opt-in only); emergency legacy fallback overrides the flip; terminal-API removal post-but-not-pre; legacy renderer/aliases/sentinel retained across the flip; plugin gate fails incompatible plugins with RUSH_PLUGIN_API_INCOMPATIBLE before apply(); gate-disabled permits (revertible); explicit supported version. - common/reviews/api/rush-reporter.api.md (regenerated): new @beta migration exports. Design notes: - Per the project-wide scoping decision, ILogger.terminal / RushSession.terminalProvider live in rush-lib; actually removing them is a rollout step. This feature encodes the flip's semantics as data + helpers inside @rushstack/rush-reporter so rush-lib can consume a single source of truth. CLI wiring, terminal API removal, and live plugin-gate integration remain pending. Verify: rush build --to @rushstack/rush-reporter -> SUCCESS; rush test --only @rushstack/rush-reporter -> SUCCESS. ============================================================================ [2026-07-15] ALL 28/28 PACKAGE MODELS AUTHORED IN @rushstack/rush-reporter; DAEMON-ALIGNED RUSH ROLLOUT REMAINS PENDING. ============================================================================