sotashimozono_obsidian-remo.../plugin/scripts
Souta 79aace49c3 fix(daemon): sha-verify on the fast path + keep the dev-daemon marker in E2E
Addresses /review-pr findings on #447 and the E2E smoke failure they caused.

- F1 (code-reviewer + silent-failure): the connect fast-path trusted
  existsSync alone, re-opening the "deploy an unverified binary" gap one layer
  above DaemonDownloader's fixed sha-check. Now records `daemonBinarySha` and
  re-hashes the cached file on the fast path; a post-write-corrupted binary
  fails the check and is re-fetched (network-free). Version + sha must both
  match to reuse.
- F2 (silent-failure): a saveSettings() failure after a successful download
  was caught by the generic "download failed -> SFTP" handler and misreported.
  Marker persistence is now its own non-fatal try — the verified binary is
  still returned; a persist failure just re-verifies next connect.
- F3 (comment-analyzer): corrected the dev-install marker comment (a stale
  binary is refreshed only when its sha differs, not "always on a bump").
- F4/F5 (pr-test): new ensureDaemonBinary.test.ts covers the locateDaemonBinary
  .dev-daemon gate and the fast-path reuse/skip (sha match, sha mismatch,
  version mismatch).

E2E fix: the new locateDaemonBinary `.dev-daemon` gate broke the Obsidian smoke
run — E2E stages the daemon via `build:server` (no dev-install), so the staged
binary was unmarked -> gated out -> no RPC -> the live-reflect specs failed.
build-server.mjs now writes the `.dev-daemon` marker; the E2E vault-scaffold
copies server-bin/ verbatim so it rides along. (Release daemons are built via
the Makefile, never marked — correct: users' downloads stay subject to the sha
refresh.)

tsc/lint/vitest green (1193). Still beta.14 (same PR #447).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 19:07:38 +09:00
..
perf ci(plugin): Phase C.M10 — perf-bench off the PR critical path; nightly + workflow_dispatch (0.4.48) 2026-04-29 08:39:01 +09:00
build-server.mjs fix(daemon): sha-verify on the fast path + keep the dev-daemon marker in E2E 2026-07-02 19:07:38 +09:00
bump-stable.mjs feat(release): formalize next=beta / main=stable two-channel model 2026-05-10 12:11:35 +09:00
bump-version.mjs feat(release): formalize next=beta / main=stable two-channel model 2026-05-10 12:11:35 +09:00
cdp-tail.mjs chore: monorepo restructure (plugin/ + server/ + proto/) 2026-04-25 10:52:52 +09:00
dev-install.mjs fix(daemon): sha-verify on the fast path + keep the dev-daemon marker in E2E 2026-07-02 19:07:38 +09:00
replay-prev-tests.mjs ci(replay): replay previous release tag's tests against current source 2026-04-30 17:54:22 +09:00
start-test-sshd.mjs fix(test): integration sshd healthcheck (install iproute2 + dump logs on fail) 2026-04-27 14:23:59 +09:00
stop-test-sshd.mjs feat(test): docker sshd integration test environment (Tier B-1+B-3, 0.4.0) 2026-04-27 14:05:55 +09:00