sotashimozono_obsidian-remo.../.github
Souta 1207550967 test(e2e): make the suite trustworthy, and actually test the restart (#342/#429)
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.
2026-07-14 17:25:17 +09:00
..
ISSUE_TEMPLATE ci: production-ready GitHub workflow suite 2026-04-24 21:43:50 +00:00
workflows test(e2e): make the suite trustworthy, and actually test the restart (#342/#429) 2026-07-14 17:25:17 +09:00
dependabot.yml ci: Phase D-α — dependabot docker entries + commitlint gate (0.4.49) 2026-04-29 08:53:09 +09:00
FUNDING.yml chore: add FUNDING.yml and BRAT install instructions 2026-04-30 21:18:58 +09:00
labeler-config.yml chore: monorepo restructure (plugin/ + server/ + proto/) 2026-04-25 10:52:52 +09:00
pull_request_template.md ci: production-ready GitHub workflow suite 2026-04-24 21:43:50 +00:00
replay-skip.txt ci(replay): replay previous release tag's tests against current source 2026-04-30 17:54:22 +09:00