Skip to content

asar-fallback-detection

Pure verdict on whether a booted owned Obsidian instance is actually running the pinned app (asar) version, or silently fell back to the installer’s own bundled asar. Kept separate from the integration-only transport-desktop-cdp (which reads the live version over CDP and is excluded from unit tests) so the tier logic stays unit-testable — mirroring the installer-compatibility / electron-compatibility / renderer-boot-detection split.

When an asar is swapped onto an installer shell below its real boot floor, the renderer does not always dead-boot (the black screen renderer-boot-detection catches). Some app versions instead silently revert to the installer’s own bundled asar and render a perfectly healthy UI of the wrong (older) version. The dead-boot detector reads that healthy UI as a false-positive “runnable” — exactly how Obsidian 1.13.0 on installer 1.1.9 was first mis-measured (it reports apiVersion 1.1.9, not 1.13.0).

The discriminator is the running app version, read live post-boot (ipcRenderer.sendSync('version') / obsidianModule.apiVersion, which both track the asar actually running). This verdict compares it to the pinned version: equal ⇒ 'match', different ⇒ 'fallback' (the pin was not honored), and 'unknown' when either version is unavailable (no asar was swapped, or the live version could not be read) — in which case nothing is thrown or warned.

InterfaceDescription
AsarFallbackThe silent-asar-fallback verdict for a booted owned instance, carried as data on the transport / connection result so consumers can assert on it.
ResolveAsarFallbackParamsParameters for resolveAsarFallback.
FunctionDescription
resolveAsarFallbackComputes the silent-asar-fallback verdict for a booted owned instance. Only 'fallback' warrants action (a throw / warning); 'match' and 'unknown' are silent. Comparison is a pure x.y.z version compare — no I/O.
TypeDescription
AsarFallbackTierThe silent-asar-fallback tier for a booted owned instance. - 'match' — the running app version equals the pinned version; the pin was honored. - 'fallback' — the running app version differs from the pinned version; the installer silently ran a different (its own bundled) asar instead of the pin. - 'unknown' — cannot be determined (no asar was swapped, so there is no pin to verify, or the live running version could not be read).