Skip to content

fix(e2e): harden Obsidian runner lifecycle#254

Merged
chhoumann merged 1 commit into
masterfrom
chore/typecheck-obsidian-e2e-tools
Jul 10, 2026
Merged

fix(e2e): harden Obsidian runner lifecycle#254
chhoumann merged 1 commit into
masterfrom
chore/typecheck-obsidian-e2e-tools

Conversation

@chhoumann

Copy link
Copy Markdown
Owner

Strictly type-check every JavaScript file in the Obsidian E2E runner subsystem and harden the lifecycle defects the new checks exposed.

This adds shared JSDoc declarations and structural unknown-error guards, enables checkJs for all script MJS files, and reduces the runner diagnostic baseline from 121 to zero without any, TypeScript suppressions, lint suppressions, or weakened strictness.

Three defects were reproduced with failing tests before correction:

  • resolved instance options omitted the required Electron userDataPath, so exported resolver/launcher composition could emit --user-data-dir=undefined; the path is now derived once with obsidianHome
  • unexpected process-liveness errors were treated as proof that a process had exited, allowing cleanup to remove a profile when process state was unknown; only ESRCH now means dead, EPERM means alive, and other errors abort cleanup
  • array-shaped registry and marker JSON passed the old object guard and could become authoritative orphan-reaping data; only plain records are now accepted

Malformed registry entries are filtered structurally, parser option keys are exhaustive, child-process output is explicitly UTF-8, collections and injected dependencies have exact contracts, and the production ES2020 target remains unchanged. The test/tool library is raised only to ES2021 for the Node 22 runners.

Validation:

  • strict JavaScript diagnostics: 121 -> 0
  • focused runner suite: 4 files, 46 tests
  • full suite: 70 files, 883 tests
  • real Obsidian E2E: 1 file, 11 tests
  • lint, formatting, both TypeScript projects, both Svelte environments, production build, Node syntax, docs, and diff check pass
  • all four direct node scripts/*.mjs --help entry points pass
  • production bundle remains byte-identical at 410,805 bytes, SHA-256 6f593e89c049bc84a8a9b3da90a5f002ccc5b8e1066ae05aef671dbc12cd5ebc

Real runtime proof:

  • macOS 26.5.1, Obsidian 1.12.7, isolated vault podnotes-podnotes
  • PodNotes 2.17.3 loaded and the committed E2E suite passed through the private HOME
  • after clearing expected dummy-audio errors and reloading, dev:errors reported no errors
  • teardown terminated the complete process tree without SIGKILL and removed the private profile

Two independent read-only reviews found and then cleared the array-guard issue. Final verdict: no actionable findings.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying podnotes with  Cloudflare Pages  Cloudflare Pages

Latest commit: 38d6502
Status: ✅  Deploy successful!
Preview URL: https://684ffb02.podnotes.pages.dev
Branch Preview URL: https://chore-typecheck-obsidian-e2e.podnotes.pages.dev

View logs

@chhoumann
chhoumann marked this pull request as ready for review July 10, 2026 00:54
@chhoumann
chhoumann merged commit 1ea8f68 into master Jul 10, 2026
5 checks passed
@chhoumann
chhoumann deleted the chore/typecheck-obsidian-e2e-tools branch July 10, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant