-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathorca.yaml
More file actions
31 lines (31 loc) · 1.89 KB
/
Copy pathorca.yaml
File metadata and controls
31 lines (31 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Orca worktree lifecycle hooks for PodNotes.
# See AGENTS.md > "Isolated worktree vault" for the full workflow.
#
# `archive` runs on `orca worktree rm --run-hooks`, before the worktree is
# removed, with the cwd set to the worktree and $ORCA_WORKTREE_PATH pointing at
# it. It stops this worktree's isolated Obsidian E2E instance and removes its
# /private/tmp profile directory, so a merged or deleted worktree never leaks an
# Obsidian process tree or vault dir. It targets only this worktree's instance
# (matched by its private --user-data-dir token); the shared dev vault, other
# worktrees, and quickadd instances are untouched.
#
# Notes:
# - Orca skips this hook unless `--run-hooks` is passed; `start:e2e-obsidian`
# also reaps orphaned instances on the next start as a safety net.
# - A failed archive hook is logged by Orca but never blocks removal. `|| true`
# keeps the archive log clean when no instance was ever started.
# - This assumes the default per-worktree vault name (podnotes-<worktree>) and
# profile root. If you started an instance with a custom --vault or
# --profile-root, stop it with the matching
# `npm run stop:e2e-obsidian -- --vault <name> [--profile-root <path>]` before
# removing the worktree.
# - The hook needs `node` on the GUI app's PATH (Orca runs it via non-login
# /bin/bash). It is guarded with `command -v node` so a missing node degrades
# to a no-op (the reap-on-next-start safety net then handles cleanup) instead
# of erroring. The runner is invoked through the worktree-local bin rather
# than `npm exec` because the npm shim is often absent from that GUI PATH,
# which would make the stop fail silently behind `|| true` and leak the
# instance; the bin launcher is POSIX sh and needs only node.
scripts:
archive: |
command -v node >/dev/null 2>&1 && "$ORCA_WORKTREE_PATH/node_modules/.bin/obsidian-e2e" stop --worktree "$ORCA_WORKTREE_PATH" || true