Repository navigation
fix(relay): name why node-pty could not load, instead of guessing four causes at once - #17891
Conversation
The relay could only say "terminals are unavailable" and then list three remedies for four different faults, none of which the user could verify (#17830). Two things were destroying the evidence: - `loadPtyUncached` caught the load error into bare `catch {}` blocks (pty-handler.ts:539, :551) and returned null. The only cause anyone had was discarded on the spot. - node-pty's own loader walks three directories and rethrows only the LAST failure, so even an uncaught error arrives as `Cannot find module '../prebuilds/...'` — the GLIBC/ABI/arch sentence is already gone. The relay now keeps the load error, recovers the real dlopen message with an out-of-process load of the file node-pty would have opened, reads what node-gyp configured the binding for (`build/config.gypi`), captures the host's Node ABI, arch and glibc, and probes the toolchain only when nothing was compiled. Each fault gets its own message naming values the user can check: toolchain_missing, dependency_missing, abi_mismatch, arch_mismatch, libc_floor, shared_library_missing, load_crashed, and load_failed which quotes the loader verbatim. A probe that did not answer stays `unverifiable` and prescribes nothing. The classification is now also structured data on the error, so a client can repair the host instead of printing a paragraph: an additive, schema-validated `data` field on an existing JSON-RPC error, with `repairable` true only for a proved fault that recompiling on the host actually fixes. Reuses orcad's loader-message parsers and out-of-process probe rather than adding a second copy; `classifyLoaderMessage` moves to a shared module and gains architecture and missing-shared-library cases, which the orcad boot precondition picks up too.
📝 WalkthroughWalkthroughThe change adds native loader parsers and node-pty loader classification. It separates probe outcome reading from probe diagnosis. The relay now surveys bindings, build records, loader results, and Linux toolchains to produce structured terminal-unavailability causes. The PTY handler includes diagnosis-driven messages and RPC error data. The dispatcher validates and forwards terminal causes. Tests cover loader parsing, probe classification, evidence collection, remediation messages, schema validation, and PTY error propagation. Merge Risk: 🟡 Moderate · up to This PR replaces generic PTY failures with structured remote diagnostics, but some failures can still be misclassified or given the wrong remediation, while repeated failures can multiply diagnostic process work and expose host details to relay clients. These concrete correctness, runtime, and disclosure risks should be fixed or explicitly accepted before merge. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation The PR addresses issue Full details: Out of Scope Changes checkExplanation The changes remain within scope. The added diagnosis logic, structured RPC error data, repairability metadata, and tests directly support the node-pty terminal-availability objective. Client-side repair routing and relay-side rebuilding are explicitly excluded. Full details: Description checkExplanation The description provides detailed context, rationale, implementation scope, linked issue reference, testing results, and regression risks. However, it omits the required Visual Proof section and does not state N/A for this behavior change. Several template sections and checklist confirmations are also missing. Resolution Add the required template sections, especially Visual Proof with before/after evidence or exactly
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
src/relay/pty-handler.ts (1)
579-589: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winMemoize the diagnosis so one broken host does not fork a probe per spawn attempt.
nodePtyUnavailableErrorruns the full survey on every rejected spawn.collectNodePtyUnavailableDiagnosisstarts a child Node process with a 10 s timeout, and on Linux a second shell probe with a 5 s timeout.
spawnAfterAdmissionruns inside thebeginPtyCreationadmission window. Each failing spawn therefore holdspendingSpawnCountfor up to 10 s and delays its own rejection by the same amount. A client that restores several panes on connect produces one probe process per pane, up toMAX_RELAY_PTY_SESSIONS.Cache the diagnosis promise and clear it when
invalidatePtyModuleAfterBindingFailureruns, so a retry burst reuses one probe.♻️ Proposed refactor
+ /** Reused across a retry burst: the probe costs a child process and up to 10s. */ + private nodePtyDiagnosisPromise: Promise<NodePtyUnavailableDiagnosis> | null = null + private async nodePtyUnavailableError(spawnError?: unknown): Promise<Error> { const nodePtyDir = this.relayNodePtyDir() - const diagnosis = await collectNodePtyUnavailableDiagnosis({ - nodePtyDir: existsSync(nodePtyDir) ? nodePtyDir : null, - error: spawnError ?? this.lastPtyLoadError - }) + this.nodePtyDiagnosisPromise ??= collectNodePtyUnavailableDiagnosis({ + nodePtyDir: existsSync(nodePtyDir) ? nodePtyDir : null, + error: spawnError ?? this.lastPtyLoadError + }) + const diagnosis = await this.nodePtyDiagnosisPromise return Object.assign(new Error(formatNodePtyUnavailableMessage(diagnosis)), { code: TERMINAL_UNAVAILABLE_RPC_ERROR_CODE, data: toTerminalUnavailableCause(diagnosis) }) }private invalidatePtyModuleAfterBindingFailure(): void { this.ptyModule = null this.reloadPtyModuleFromDisk = true + // The host changed, so the cached verdict is no longer evidence. + this.nodePtyDiagnosisPromise = null
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 497e22bf-d7a6-4924-a8f0-767662023d80
📒 Files selected for processing (14)
src/main/orcad/native-host-abi.test.tssrc/main/orcad/native-host-abi.tssrc/main/orcad/node-pty-loader-diagnosis.tssrc/main/orcad/node-pty-precondition.tssrc/relay/dispatcher-rpc-routing.tssrc/relay/dispatcher-structured-error.test.tssrc/relay/node-pty-binding-survey.test.tssrc/relay/node-pty-binding-survey.tssrc/relay/node-pty-unavailable-diagnosis.test.tssrc/relay/node-pty-unavailable-diagnosis.tssrc/relay/pty-handler-spawn-admission.test.tssrc/relay/pty-handler.tssrc/shared/runtime-capability-degradation.tssrc/shared/terminal-unavailable-cause.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review.
| if (machO) { | ||
| return { built: machO[1], host: machO[2] } | ||
| } | ||
| if (/invalid ELF header|wrong ELF class|Exec format error|ELFCLASS(?:32|64)/.test(loaderError)) { |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Do not classify generic ELF-format failures as architecture mismatches.
invalid ELF header and Exec format error do not prove a CPU architecture mismatch. A corrupt or non-ELF pty.node follows this branch and produces the arch_mismatch message and architecture rebuild advice. Restrict this result to errors that identify an incompatible architecture or ELF class. Let the generic loader-failure path handle the other messages.
Proposed fix
- if (/invalid ELF header|wrong ELF class|Exec format error|ELFCLASS(?:32|64)/.test(loaderError)) {
+ if (/wrong ELF class|ELFCLASS(?:32|64)/.test(loaderError)) {
return { built: null, host: null }
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if (/invalid ELF header|wrong ELF class|Exec format error|ELFCLASS(?:32|64)/.test(loaderError)) { | |
| if (/wrong ELF class|ELFCLASS(?:32|64)/.test(loaderError)) { |
| expect(diagnosis.status).toBe('blocked') | ||
| expect(diagnosis.rawError).toBeTruthy() | ||
| expect(isFlattenedNodePtyLoaderMessage(diagnosis.rawError!)).toBe(false) | ||
| expect(diagnosis.rawError).not.toBe(FLATTENED) | ||
| expect(diagnosis.rawError).toMatch(/pty\.node/) |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Two assertions require probe outcomes that the code treats as optional.
collectNodePtyUnavailableDiagnosis does not guarantee either value:
- Lines 84-88: if the child process crashes while it opens the bogus
pty.node,readNodePtyProbeOutcomereturnssignalled.diagnoseNodePtyUnavailablethen sets noloaderError, sorawErrorfalls back to therequireError, which isFLATTENED. Line 86 fails in that case. The sibling test at line 106 already acceptsload_crashed, so this outcome is expected on some platforms. - Line 130: on Linux,
probeRelayBuildToolchainreturnsnullwhen/bin/shcannot run or the probe times out. The assertion then fails for an environment reason, not a code defect.
Assert the recovered loader error only when a loader error was recovered, and treat a null toolchain on Linux as a probe that did not answer.
💚 Proposed fix
expect(diagnosis.status).toBe('blocked')
- expect(diagnosis.rawError).toBeTruthy()
- expect(isFlattenedNodePtyLoaderMessage(diagnosis.rawError!)).toBe(false)
- expect(diagnosis.rawError).not.toBe(FLATTENED)
- expect(diagnosis.rawError).toMatch(/pty\.node/)
+ expect(diagnosis.rawError).toBeTruthy()
+ if (diagnosis.reason !== 'load_crashed') {
+ expect(isFlattenedNodePtyLoaderMessage(diagnosis.rawError!)).toBe(false)
+ expect(diagnosis.rawError).not.toBe(FLATTENED)
+ expect(diagnosis.rawError).toMatch(/pty\.node/)
+ }- expect(diagnosis.toolchain === null).toBe(process.platform !== 'linux')
+ // Non-Linux hosts ship a node-pty prebuild, so the toolchain is never probed there.
+ if (process.platform !== 'linux') {
+ expect(diagnosis.toolchain).toBeNull()
+ }Also applies to: 130-130
| return { | ||
| ...base, | ||
| status: 'blocked', | ||
| reason: classified?.reason ?? 'load_failed', | ||
| detail: classified?.detail ?? 'the binding is present but the loader refused it' | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
# Description: Inspect the probe script and its reported-error reader.
set -euo pipefail
fd -t f 'node-pty-precondition.ts' -x cat -n {}
fd -t f 'node-pty-loader-diagnosis.ts' -x cat -n {}Repository: stablyai/orca
Length of output: 21375
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- review conventions and learnings ---'
find /tmp/coderabbit-repo-knowledge/stablyai/orca-89dc44e4 -maxdepth 2 -type f -name '*.md' -print 2>/dev/null | sort | while read -r f; do
printf '\n--- %s ---\n' "$f"
head -80 "$f"
done
printf '%s\n' '--- directly bound diagnosis definitions ---'
cat -n src/relay/node-pty-unavailable-diagnosis.ts | sed -n '1,220p'
printf '%s\n' '--- loader diagnosis callers and remedy contract ---'
rg -n -C 8 'collectNodePtyUnavailableDiagnosis|remedyFor|bindingPath|LOADER_NAMED_FAULTS|classifyNodePtyLoaderMessage' src sharedRepository: stablyai/orca
Length of output: 192
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- repository conventions and learnings ---'
find /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4 -maxdepth 2 -type f -name '*.md' -print 2>/dev/null | sort | while read -r f; do
printf '\n--- %s ---\n' "$f"
head -80 "$f"
done
printf '%s\n' '--- diagnosis implementation ---'
cat -n src/relay/node-pty-unavailable-diagnosis.ts | sed -n '1,220p'
printf '%s\n' '--- directly bound callers and remedy contract ---'
rg -n -C 8 'collectNodePtyUnavailableDiagnosis|remedyFor|bindingPath|LOADER_NAMED_FAULTS|classifyNodePtyLoaderMessage' src sharedRepository: stablyai/orca
Length of output: 50369
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- diagnosis control flow ---'
cat -n src/relay/node-pty-unavailable-diagnosis.ts | sed -n '75,190p'
printf '%s\n' '--- remedy and collector definitions ---'
rg -n -C 12 'function remedyFor|const remedyFor|remedyFor\(|collectNodePtyUnavailableDiagnosis|LOADER_NAMED_FAULTS' src/relay src/mainRepository: stablyai/orca
Length of output: 27468
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '%s\n' '--- collector flow ---'
cat -n src/relay/node-pty-binding-survey.ts | sed -n '191,285p'
printf '%s\n' '--- remedies and cause mapping ---'
cat -n src/relay/node-pty-unavailable-diagnosis.ts | sed -n '280,380p'Repository: stablyai/orca
Length of output: 6003
Map dependency_missing to load_failed when a binding is present.
classifyNodePtyLoaderMessage maps MODULE_NOT_FOUND and Cannot find module to dependency_missing. The binding-present branch preserves that reason, so remedyFor incorrectly reports no compiled binary and available build tools. The collector sets toolchain to null when bindingPath exists.
| toolchain_missing: | ||
| 'Terminals are unavailable on this host: node-pty has no prebuilt binary for Linux and this host is missing the C/C++ build tools needed to compile one. Install them, then reconnect.', |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Localize the new terminal-unavailability messages.
Replace these new user-facing literals with intent-named localization IDs and named placeholders. This lets translated clients show actionable diagnostics.
Based on learnings: new user-facing TypeScript strings must use intent-named localization IDs with named interpolation placeholders.
Also applies to: 53-54
Source: Learnings
There was a problem hiding this comment.
ℹ️ No critical issues — one minor suggestion inline on a message that overstates its evidence.
Reviewed changes
- Out-of-process loader recovery —
node-pty-binding-survey.tssurveys the binding on disk and runs a child-processdlopenprobe to recover the loader message node-pty's own loader discards, so the relay names the real fault instead of a flattenedCannot find module. - Evidence-ordered diagnosis —
node-pty-unavailable-diagnosis.tsclassifies loader text,config.gypibuild record, probe signals, and the toolchain probe into nine reasons with one remedy each, keepingunverifiablea first-class, non-prescriptive outcome. - Structured wire cause —
terminal-unavailable-cause.tspublishes a zod-validated optionaldatafield through the dispatcher's error allowlist, withrepairablere-derived client-side viamayRepairFromCause; client repair routing is deliberately deferred to a follow-up. - Error preservation at the seam —
PtyHandlerretainslastPtyLoadErrorand routes both load- and spawn-time failures through the new diagnosis, replacing the old hedged paragraph. - New parsers and reason vocabulary —
parseIncompatibleArchitectureandparseMissingSharedLibraryjoinnative-host-abi.ts, with matchingRuntimeTerminalUnavailableReasonmembers and shared messages.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
| case 'dependency_missing': | ||
| return ( | ||
| `node-pty has no compiled binary on this host (${searchedPhrase(survey)}). ` + | ||
| `The C/C++ build tools needed to compile it are present, so reconnect to reinstall ` + |
There was a problem hiding this comment.
This branch is also reached when toolchain is null — non-Linux hosts (where probeRelayBuildToolchain returns null without probing) and Linux hosts whose toolchain probe timed out or threw. In both cases the message asserts "the C/C++ build tools needed to compile it are present" without any evidence, which is the overclaim the unverifiable discipline this PR introduces is meant to rule out. Gate that clause on a completed probe (toolchain !== null && toolchain.toolchainMissing === false) and fall back to the neutral "reconnect to reinstall the relay's native modules" otherwise — the actionable remedy stays the same.
…tablyai#17891) The relay could only say "terminals are unavailable" and then list three remedies for four different faults, none of which the user could verify (stablyai#17830). Two things were destroying the evidence: - `loadPtyUncached` caught the load error into bare `catch {}` blocks (pty-handler.ts:539, :551) and returned null. The only cause anyone had was discarded on the spot. - node-pty's own loader walks three directories and rethrows only the LAST failure, so even an uncaught error arrives as `Cannot find module '../prebuilds/...'` — the GLIBC/ABI/arch sentence is already gone. The relay now keeps the load error, recovers the real dlopen message with an out-of-process load of the file node-pty would have opened, reads what node-gyp configured the binding for (`build/config.gypi`), captures the host's Node ABI, arch and glibc, and probes the toolchain only when nothing was compiled. Each fault gets its own message naming values the user can check: toolchain_missing, dependency_missing, abi_mismatch, arch_mismatch, libc_floor, shared_library_missing, load_crashed, and load_failed which quotes the loader verbatim. A probe that did not answer stays `unverifiable` and prescribes nothing. The classification is now also structured data on the error, so a client can repair the host instead of printing a paragraph: an additive, schema-validated `data` field on an existing JSON-RPC error, with `repairable` true only for a proved fault that recompiling on the host actually fixes. Reuses orcad's loader-message parsers and out-of-process probe rather than adding a second copy; `classifyLoaderMessage` moves to a shared module and gains architecture and missing-shared-library cases, which the orcad boot precondition picks up too. Mirror-Of: b552bcb
…tablyai#17891) The relay could only say "terminals are unavailable" and then list three remedies for four different faults, none of which the user could verify (stablyai#17830). Two things were destroying the evidence: - `loadPtyUncached` caught the load error into bare `catch {}` blocks (pty-handler.ts:539, :551) and returned null. The only cause anyone had was discarded on the spot. - node-pty's own loader walks three directories and rethrows only the LAST failure, so even an uncaught error arrives as `Cannot find module '../prebuilds/...'` — the GLIBC/ABI/arch sentence is already gone. The relay now keeps the load error, recovers the real dlopen message with an out-of-process load of the file node-pty would have opened, reads what node-gyp configured the binding for (`build/config.gypi`), captures the host's Node ABI, arch and glibc, and probes the toolchain only when nothing was compiled. Each fault gets its own message naming values the user can check: toolchain_missing, dependency_missing, abi_mismatch, arch_mismatch, libc_floor, shared_library_missing, load_crashed, and load_failed which quotes the loader verbatim. A probe that did not answer stays `unverifiable` and prescribes nothing. The classification is now also structured data on the error, so a client can repair the host instead of printing a paragraph: an additive, schema-validated `data` field on an existing JSON-RPC error, with `repairable` true only for a proved fault that recompiling on the host actually fixes. Reuses orcad's loader-message parsers and out-of-process probe rather than adding a second copy; `classifyLoaderMessage` moves to a shared module and gains architecture and missing-shared-library cases, which the orcad boot precondition picks up too.

The real error was being destroyed three times over
formatNodePtyUnavailableMessagehedges four causes in one paragraph, and the comment atpty-handler.ts:106concedes why: "The relay only sees an unloadable binding, never why." That turned out to be three separate losses:loadPtyUncachedhad two barecatch {}blocks. Both theimport('node-pty')error and therequire(moduleEntry)error were dropped on the floor; the function returnednulland the caller threw the static paragraph. This is the primary loss.if (isMissingNodePtyNativeBinding(error)) { throw new Error(formatNodePtyUnavailableMessage(...)) }.loadNativeModulewalksbuild/Release,build/Debug,prebuilds/<platform>-<arch>and rethrows only the last error. So the GLIBC/ABI/arch sentence frombuild/Releaseis already gone before the relay sees anything — what arrives isCannot find module '../prebuilds/linux-x64//pty.node'. Acting on that text sends the user to install a module that is already installed.Recovering the real message needs a separate dlopen of the file the loader would have opened. That is done out of process, so a binding that aborts inside the loader cannot take the relay down. Verified end-to-end against a deliberately corrupt
pty.node: the raw message came back asdlopen(…/build/Release/pty.node, 0x0001): tried: '…' (slice is not valid mach-o file)— exactly the text node-pty had replaced withCannot find module.Nine classifications, each with required evidence
toolchain_missing/bin/shprobe reports make / C++ / python3 missing (Linux only)dependency_missingabi_mismatchNODE_MODULE_VERSION x … yin the recovered message, orconfig.gypi'snode_module_version≠process.versions.modulesarch_mismatchincompatible architecture,invalid ELF header,wrong ELF class,Exec format error, orconfig.gypi'starget_arch≠process.archlibc_floorGLIBC_x.y' not found/GLIBCXX_/CXXABI_; names both the required version and the host's actual glibc fromprocess.reportshared_library_missinglibfoo.so.N: cannot open shared object file; kept separate fromlibc_floorbecause one is an install and the other a rebuildload_crashedload_failedunverifiablessh-execution-boundary.mdA loader message that named the fault outranks the build record;
load_failedanddependency_missingdo not, soconfig.gypiis still consulted when node-pty flattened the error away.Sample output:
The recovery finding
repairInstalledNativeDepsalready auto-recovers an ABI mismatch — but only on the client, at connect time, and there is no path from the relay's spawn-time failure to it.nativeDepsProbeJsdoesrequire("node-pty")+loadNativeModule, so a mismatched binding fails that probe andinstallNativeDeps(..., resetDeps: ['node-pty'])recompiles it.So reconnecting genuinely does fix the ABI class today — the old message just buried that instruction among three others so the user could not tell which one would work.
Landed: the structured cause on the wire.
src/shared/terminal-unavailable-cause.ts, a zod-validated optionaldatafield on the existing JSON-RPC error, through the same allowlist gateskill_install_failurealready uses. Rule 1 additive; an old client ignores it and renders today's message.reasonis deliberatelystring, not an enum, so a newer relay naming a fault this client never heard of does not cause the whole cause — includingrepairable— to be dropped. Tested round-tripping through the dispatcher, including that a malformed cause is dropped entirely rather than half-read.repairableis true only forabi_mismatch,arch_mismatch,libc_floor,load_crashed,dependency_missing, and only when the toolchain is not known-missing — the relay's node-pty is compiled on the remote, so a binding that no longer matches the machine is fixed by recompiling there. (That is whylibc_flooris recoverable here even though the packaging floor is binding elsewhere: that doc constrains binaries built on our runners, not ones compiled on the host.)toolchain_missingandshared_library_missingare false — the rebuild needs the very thing that is absent.mayRepairFromCausere-derives all of this client-side rather than trusting a peer's flag (#14830).Deliberately not landed: the client-side repair routing. The seam is
ssh-agent-session-create-operation.ts:67→ssh-pty-provider.ts, butrepairInstalledNativeDepsneeds anSshConnection, remote dir, node path and the repair lock — all owned byssh-relay-deploy.ts/ssh-relay-session.ts— plus a reconnect. Two reasons to stop: it touches session lifecycle, and #17817 is not merged into this branch, whereprobeRequiredNativeDepsis still two-state with thecatch { available: false, missing: ALL }that #17817 fixes. Building repair routing on that function now would collide. Handoff: readerror.dataat that seam, gate onmayRepairFromCause, route intorepairInstalledNativeDeps, reconnect once.No relay-side rebuild. Considered and rejected: the client's repair path takes
tryAcquireRelayRepairLockbefore touchingnode_modules, and a relay rebuilding without that lock could collide with a concurrent reconnect's repair. Allnode_modulesmutation stays on the locked client side. No retry loop, no per-spawn rebuild, nothing that runs while PTYs are live.Does this fix #17830's reporter?
Not fully determinable from the issue, and I would rather say so than claim it. The report has no remote OS, no remote Node version, no relay log — only the message text and the Windows client's details.
What is true: they now get one named cause instead of four hedged ones, plus the remote's platform, arch, glibc and Node ABI on the message — which makes the issue actionable even in the worst case. The likely causes for "Linux remote, failed at first link" are
toolchain_missing(compile skipped) orabi_mismatch; the first now yields an exactapt-getline, the second states both ABI numbers and "reconnect to rebuild", which the existing deploy-time repair does perform.So: a message naming the exact cause and a step that works. Full hands-off recovery needs the client-side routing above.
Verification
Before, against pre-change code:
Two pre-existing flakes surfaced in full-suite runs and were confirmed to fail on a clean tree too:
automation-change-publication.test.ts(28.7s against a 30s timeout) andremote-runtime-shared-control-connection.test.ts(~3 runs in 4, with and without this change).Refs #17830
ELI5
When the remote could not load its terminal library, Orca showed one paragraph guessing at four possible causes. It could not do better because the real error was being thrown away three separate times — including by the library itself, which reports only the last of the three places it looked.
User-facing regression risk