mirror of
https://github.com/sotashimozono/obsidian-remote-ssh.git
synced 2026-07-22 06:52:07 +00:00
A green E2E run did not mean the product worked. Three separate ways the
suite could pass while broken, plus the one scenario it never covered.
1. GREEN-BY-SKIPPING. `sync.spec.ts` and `reflect.spec.ts` still used the
old skip gate:
try { obsidian = await connectAndOpenShadow(...); connected = true; }
catch (e) { test.skip(true, `connectAndOpenShadow failed: ${e}`); }
A THROWN connect — i.e. a genuinely broken plugin — was swallowed into a
skip, and CI went green. Same for `if (!connected) test.skip(...)` and for
sshd being down. `helpers/sshd.ts` already exists to prevent exactly this
and even documents why ("that is how 1.0.49 shipped broken"); the
connect-* specs were migrated to `assertSshdReachable()` and these two
were left behind. Migrated now: both hard-fail, and the connect is no
longer wrapped in try/catch. A broken connect is RED.
2. THE RECORDER RAN AS A TEST. `demo.spec.ts` asserts nothing — it drives the
UI to emit PNG frames for the README GIF — but `testMatch: '**/*.spec.ts'`
pulled it into the behavioural "Obsidian E2E smoke" job, where it burns
minutes and can only go red for reasons unrelated to the product. Now
`testIgnore`d by default; `demo-capture.yml` sets E2E_DEMO=1 to opt back
in, so the GIF still regenerates.
3. NOTHING EVER RESTARTED OBSIDIAN. #342/#429 is an ORDERING bug: Obsidian
loads plugins and calls `Plugin.loadData()` — reading data.json off the
LOCAL shadow disk — BEFORE remote-ssh connects and patches the adapter. It
is only observable across a real quit + relaunch. No spec did that.
`tests/integration/restart-roundtrip.e2e.test.ts` is not it: despite the
name it is a vitest that never starts Obsidian — it calls ShadowVaultBootstrap
against a tmpdir and asserts the bootstrap's own output. It proves the pull
works; it never proves Obsidian READS it.
New `e2e/restart-settings.spec.ts` closes that: connect → write a plugin's
data.json through the PATCHED adapter (byte-for-byte what saveData() does)
→ assert the remote stored it PER-DEVICE and not at the shared identity
path → assert the write-through landed it on LOCAL disk → QUIT Obsidian →
RELAUNCH on the SAME vault → assert the settings are still on disk (what
loadData() reads at the next startup) and that the remote copy was not
clobbered by a defaults re-save.
Against a pre-1.1.7 build this fails at the local-disk assertion: the file
is never created, because the write only ever reached the remote. That is
the regression 1.1.7 fixed and, until now, nothing verified end-to-end.
The harness already supported the restart — `connectAndOpenShadow` has always
done quit+relaunch (onto the shadow vault); the same-vault case is three lines.
It was simply never written.
|
||
|---|---|---|
| .. | ||
| ISSUE_TEMPLATE | ||
| workflows | ||
| dependabot.yml | ||
| FUNDING.yml | ||
| labeler-config.yml | ||
| pull_request_template.md | ||
| replay-skip.txt | ||