From 0d3067ba96ede09a516f389547f3ebb7f008a4bb Mon Sep 17 00:00:00 2001 From: Sal Date: Sun, 30 Aug 2026 16:23:10 +0100 Subject: [PATCH] docs(testing): isolate autoload paths from other checkouts Require Zsh tests to rebuild FPATH and fpath from the subject checkout. This prevents same-named autoloads in another worktree from hiding stale-code execution. --- .github/instructions/testing.instructions.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/instructions/testing.instructions.md b/.github/instructions/testing.instructions.md index 60aedd674..0203a5750 100644 --- a/.github/instructions/testing.instructions.md +++ b/.github/instructions/testing.instructions.md @@ -58,6 +58,9 @@ Do not add an org-wide coverage number. integration or system tests are also valid when they exercise boundaries that do not fit a unit test. - Test plugins by sourcing them in a clean Zsh session; there is no build step. +- Before testing autoloaded functions, clear or rebuild inherited `FPATH` and + `fpath` from the subject checkout. A same-named entry from another worktree + or installation can make tests exercise stale code. - Prime lifecycle observers before the baseline. Compare functions, parameters and attributes, aliases, options, traps, modules, hooks, widgets, bindings, styles, `path`, and `fpath` without printing captured values.