chore(e2e): migrate to shared obsidian-e2e instance runner#283
Merged
Conversation
Replace the four vendored scripts/*-obsidian-e2e-*.mjs orchestration copies
(their unit tests, and the two helper files obsidian-e2e-errors.mjs /
obsidian-e2e-types.d.ts that existed only to serve them) with the shared
`obsidian-e2e` instance-runner bin. The four npm script names are unchanged;
they now point at `obsidian-e2e <provision|start|stop|run>`, configured by a new
`obsidian-e2e.config.mjs` at the repo root.
- Add obsidian-e2e.config.mjs: pluginId, two plugin artifacts (manifest.json +
main.js only - PodNotes injects its CSS into main.js, so there is no styles.css
to symlink), the schema-v2 DEFAULT_SETTINGS-shaped data.json seed, envPrefix
"PODNOTES" so legacy PODNOTES_E2E_* aliases keep flowing, and the PodNotes eval
ready probe. defaultCommand/readyProbe match the runner defaults; the probe is
written out explicitly for documentation.
- Port the data-seed drift test to scripts/e2e-config.test.ts (asserts the
config's defaultData serialize-equals { schemaVersion: 2, ...DEFAULT_SETTINGS }
from src/constants.ts). The deleted script unit tests drop out of the vitest
`scripts/**` include cleanly.
- tests/e2e/harness.ts: read canonical OBSIDIAN_E2E_VAULT first, legacy
PODNOTES_E2E_VAULT alias as fallback. OBSIDIAN_BIN is unchanged.
- orca.yaml archive hook: `npm exec obsidian-e2e -- stop --worktree ...` (npm's
`npm exec <pkg> -- <args>` forwards --worktree to the bin), keeping the
`command -v node` guard and `|| true`.
- package.json: add obsidian-e2e.config.mjs to the oxfmt format file list.
- AGENTS.md + .gitignore: document the runner bin, config file, and canonical env
names + legacy aliases.
The dependency is a local file: link for validating the runner before it ships;
npm normalized it to `file:../obsidian-e2e` (pnpm consumers keep the absolute
path). This MUST switch to the published obsidian-e2e ^0.7.0 before this PR
merges (the runner package is currently unpublished at 0.6.0).
Deploying podnotes with
|
| Latest commit: |
f81bbb5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4a2c2de3.podnotes.pages.dev |
| Branch Preview URL: | https://chore-shared-e2e-runner.podnotes.pages.dev |
Owner
Author
|
All CI checks are green (Test, CodeQL, Analyze x2, Cloudflare Pages, Graphite AI Reviews). No open review threads and no changes requested. Also verified all four gates locally on the branch: |
Owner
Author
|
Pushed one follow-up: the orca.yaml archive hook now invokes the worktree-local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Migrates PodNotes' isolated Obsidian orchestration from four vendored scripts plus two helper modules to the published
obsidian-e2einstance runner.obsidian-e2e@0.7.0through a singleobsidian-e2e.config.mjs.OBSIDIAN_E2E_*variables while retaining the legacyPODNOTES_E2E_*aliases during migration.Why
PodNotes, MetaEdit, and QuickAdd carried near-identical E2E orchestration that had drifted between repositories. Consolidating on the shared published runner leaves one maintained implementation while preserving PodNotes' hardened readiness, process ownership, profile isolation, and teardown behavior.
The fixture cleanup also makes a clean runtime log meaningful. The old suite wrote plain text into
.mp3files and raced a second Markdown leaf against PodNotes' asynchronous note opening, which produced delayed browser and Obsidian errors even when assertions passed.Validation
Validated after merging current
masterinto this branch:npm run lintnpm run format:checknpm run typechecknpm run buildnpm run test: 93 files and 1,519 tests passed; Svelte checks reported 0 errors and 0 warnings.docs/requirements.txtversions.npm ls obsidian-e2e --depth=0resolvedobsidian-e2e@0.7.0.dev:errors: no errors captured.Drift guard
scripts/e2e-config.test.tsserialize-compares the runner'sdefaultDatawith{ schemaVersion: 2, ...DEFAULT_SETTINGS }. Adding or removing a setting without updating the seed fails the unit suite.Environment contract
The runner emits canonical
OBSIDIAN_E2E_*variables alongside the temporaryPODNOTES_E2E_*aliases. The harness reads canonical names first.HOMEmust still be remapped toOBSIDIAN_E2E_OBSIDIAN_HOMEbecause the Obsidian CLI socket is profile-scoped.Heads-up for in-flight branches
obsidian-e2e.config.mjsrather than restoring those scripts.DEFAULT_SETTINGSmust update the config seed in lockstep; the drift test enforces this.