mirror of
https://github.com/sotashimozono/obsidian-remote-ssh.git
synced 2026-07-22 06:52:07 +00:00
Two real defects an independent review found in Phase B: BLOCKER — plugin-binary clobber/oscillation. The push diff-gate was string-equality and the pull was "local authoritative", so a machine on an OLDER plugin version would overwrite the remote's newer copy (and the two sides ping-ponged forever). Now VERSION-ORDERED by manifest `version`: pull only when the remote is strictly newer (or absent locally), push only when local is strictly newer (or remote lacks it). Converges, never downgrades. + parseManifestVersion/versionGt helpers. MAJOR — pre-spawn pull unhandled rejection. When the budget fired first, `finally` disconnected the client and the in-flight read then threw "not connected", settling the pull promise a second time after the race had lost → unhandledrejection in the renderer. The pull now runs as a standalone promise with a mop-up `.catch` (real-error diagnostics still flow through the withTimeout race into the existing catch). Also: withTimeout typed its timer id as `number` (Obsidian renderer DOM) — `window.setTimeout`'s @types/node overload was leaking `Timeout` and failing `tsc`. And a clear warning that the round-trip is a UTF-8 TEXT channel (no binary assets). Tests rewritten to the version-ordered contract: upgrade, anti-downgrade (both directions), no-manifest skips, convergence-no-ping-pong, per-plugin error isolation. Integration test 3 → real-SSH downgrade guard. tsc + eslint clean; unit suite 1166 pass. Clean per review: B3 standalone SftpClient does not patch the source vault, no double-connect leak, B1/B2 ordering correct, backward compat OK. Refs #429 #342 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| errorHook.ts | ||
| errorMessage.ts | ||
| fingerprint.ts | ||
| logger.ts | ||
| ObservabilityInstaller.ts | ||
| pathUtils.ts | ||
| PerfTracer.ts | ||
| redact.ts | ||
| retry.ts | ||
| Telemetry.ts | ||
| TransferTracker.ts | ||
| withTimeout.ts | ||