Repository navigation
chore(e2e): make run-e2e start fresh and accept --, update agent rules - #2261
Conversation
Vitest ignores everything after --, so run-e2e -- <spec> ran the whole suite and then lost the JSON reporter flags.
A running instance kept its window size, modals and keymap scopes, and the vault kept data.json and files from manual testing, so suite runs after hand-testing failed for reasons unrelated to the change.
Drop the shared dev vault, say main.js and styles.css are generated and gitignored, describe how a release PR may be merged, and add the run-e2e, modal and clickWhenStill rules that tooling does not enforce.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Runner lifecycle and test coverage .agents/run-e2e, tests/orb-setup.test.ts |
The runner stops an existing E2E instance, removes a stale vault within the repository’s E2E vault directory, and passes Vitest arguments without --. Tests check this ordering, confirm a sibling vault remains, verify external symlink contents are preserved, and test argument filtering. Templater setup no longer disables the loaded plugin. |
E2E setup guidance and artifact descriptions AGENTS.md, obsidian-e2e.config.mjs, tests/e2e/e2eVault.ts |
E2E guidance describes isolated vaults per checkout, native-spec execution, modal handling, and timing-safe clicks. Configuration and vault comments describe root plugin files as build outputs. |
Repository and release guidance
| Layer / File(s) | Summary |
|---|---|
Artifact, testing, and release instructions AGENTS.md, CONTRIBUTING.md |
Repository instructions describe generated files as gitignored, revise release-bot PR steps, and ask for regression tests that fail when a fix is reverted. The contribution guide no longer asks contributors to include generated files in PRs. |
Priority:
Estimated code review effort: 2 (Simple) | ~12 minutes
Change: Other
Possibly related PRs
- chhoumann/quickadd#2258: It changes the
clickWhenStillhelper and adds the same timing-safe click guidance referenced in this PR’s E2E instructions.
Merge Risk: 
Minimal · up to 194d9
-
The E2E vault reset is guarded against the reported symlinked-parent deletion, and no remaining merge-blocking issue is identified.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (1 skipped: 1 unsupported.)
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the vault at dawn
Clears old notes before tests run on
A separator hops away
Fresh plugin files greet the day
Safe clicks guide the testing paw
Then carrot crumbs receive applause
Comment @coderabbitai help to get the list of available commands.
|
FAIL Independent verification of Blocking finding, P2. the reset checks only the textual parent path before deletion. A symlinked Requested behavior otherwise verified:
A controlled provision failure emitting valid exports then exiting 23 propagated status 23, preserved the sentinel, skipped startup, and ran cleanup. No additional blocking argument-forwarding or documentation issue found. The pinned release workflow still requires the merger account to be All started instances are stopped; sibling-check fixtures removed. No push or tracked-file edits. |
A linked .obsidian-e2e-vaults made the reset delete the vault behind the link before the canonical-path check rejected the run.
|
PASS Independent round-2 verification of
Both started instances are stopped, with their profiles removed and no matching app processes remaining. The working tree is clean. No tracked files changed and nothing pushed. No additional findings in the fix diff. |
Summary
Agent telemetry showed recurring E2E traps that AGENTS.md was about to grow rules for. This removes two of them in
.agents/run-e2einstead, and updates AGENTS.md with only the rules tooling cannot enforce plus stale-fact corrections.Changes
run-e2edrops--from its arguments. Before,run-e2e -- <spec>ran the whole suite (Vitest ignores everything after--) and then crashed reading the JSON reporter output it never wrote.run-e2estops any running instance and deletes this checkout's vault before starting, so window size, dead modal keymap scopes,data.jsonand files left from manual testing no longer leak into a suite run. Only the vault path the runner reports is deleted; other vaults under.obsidian-e2e-vaultsare kept. The Templater step no longer unloads a reused Templater, since the instance is never reused.obsidian-e2e.config.mjsandtests/e2e/e2eVault.tssaid rootstyles.cssis hand-written; the build generates it fromsrc/styles.css.devvault,main.js/styles.cssare generated and gitignored, release PRs may be merged when the maintainer allows it, plus therun-e2e, modal-closing andclickWhenStillrules. CONTRIBUTING.md no longer asks to commit generated files.The "run
pnpm installafter pulling" rule was dropped: pnpm 11 defaultsverifyDepsBeforeRuntoinstall, sopnpm runalready reinstalls a stalenode_modules.Testing / validation
run-e2e -- tests/e2e/field-label.test.tsran 103 files before, 1 after; a 390x760 window plus a leftover note failedchoice-builder-pagesbefore, 12/12 passed after with the note gone and a sibling vault intact.tests/orb-setup.test.tscovers both behaviors; the new tests fail against the old script.pnpm run lint,pnpm run test, full.agents/run-e2e(101 files passed) and the Templater specs withOBSIDIAN_E2E_TEMPLATER=1.Checklist
— it becomes the squash-merge commit and drives the released version.
Note
Low Risk
Changes are limited to the E2E runner script, contributor docs, and mock-based tests; no plugin runtime or release artifacts are modified.
Overview
.agents/run-e2enow resets the E2E environment on every run: it stops any running Obsidian instance, removes only this checkout’s managed vault under.obsidian-e2e-vaults(with path/symlink guards), then starts fresh. Standalone--tokens are stripped so spec filters reach Vitest instead of running the full suite. The Templater setup no longer disables an already-loaded plugin, since instances are not reused.Docs (
AGENTS.md,CONTRIBUTING.md) reflect isolated per-checkout vaults, gitignored generatedmain.js/styles.css, updated release-PR guidance, and agent rules forrun-e2e, modal teardown, andclickWhenStill. Minor comment fixes inobsidian-e2e.config.mjsandtests/e2e/e2eVault.tsnote thatstyles.cssis built from source.tests/orb-setup.test.tsadds coverage for stop→provision→start ordering, vault wipe vs sibling vaults, refusing deletes through symlinked vault roots, and--stripping.Reviewed by Cursor Bugbot for commit 194d93b. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Make
run-e2estart fresh, drop--, and update agent rulesrun-e2enow stops an existing E2E instance, removes the stale provisioned vault, and only deletes it when the vault resolves to a physical directory directly under the repo vault root. This protects against deleting data behind symlinked paths.--separators before passing filters to Vitest, so spec filters still apply.main.jsandstyles.cssfrom PRs. Adds tests in orb-setup.test.ts covering the fresh-instance flow, sibling-vault preservation, symlinked vault roots, and separator dropping.run-e2enow deletes the provisioned E2E vault on each run; sibling vaults under the repo vault root are preserved.Macroscope summarized 194d93b.
Summary by CodeRabbit
--arguments.