From 56596e21bb057058b956de5ec99f37e930d55263 Mon Sep 17 00:00:00 2001 From: John McLear Date: Sat, 2 May 2026 19:25:16 +0800 Subject: [PATCH] fix(test): disables helper auto-detect must follow symlinks (#7654) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ep_disable_chat#75 ran with `disables: ["@feature:chat"]` declared in ep.json but the helper printed "No 'disables' declared — running standard test suite" and exec'd a vanilla `playwright test`, with @feature:chat-tagged tests running anyway and timing out one by one. Root cause: the auto-detect used `find -maxdepth 3 plugin_packages/ -name ep.json -not -path '*/.versions/*'`. Live-plugin-manager installs plugins under `plugin_packages/.versions/@/` and exposes them as symlinks at `plugin_packages/ep_`. find(1) doesn't follow symlinks by default, so: - the .versions/ ep.json was excluded by -not -path - the symlink at plugin_packages/ep_ was visited but find didn't recurse into it because it's a symlink, not a real dir => 0 candidates found, helper falls through to standard mode. Switch to a shell glob with `-f` membership tests, which resolve symlinks correctly. Verified against a synthetic install: the helper now finds the disables list and prints "Plugin disables: @feature:chat" before running pass 1. Co-authored-by: Claude Opus 4.7 (1M context) --- bin/run-frontend-tests-with-disables.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/bin/run-frontend-tests-with-disables.sh b/bin/run-frontend-tests-with-disables.sh index 9e6fcb10e..b9d2ee369 100755 --- a/bin/run-frontend-tests-with-disables.sh +++ b/bin/run-frontend-tests-with-disables.sh @@ -71,12 +71,22 @@ elif [[ -n "$EP_JSON" ]]; then DISABLES="$(read_disables_from_json "$EP_JSON")" else # Auto-detect from plugin_packages/. Skip if 0 or >1 disabling plugins. + # + # Live-plugin-manager installs plugins under plugin_packages/.versions/ + # and exposes them as symlinks at plugin_packages/ep_. find(1) + # doesn't follow symlinks by default, so iterate via shell glob and + # `-f $dir/ep.json` (which DOES resolve symlinks) instead. declare -a CANDIDATES=() if [[ -d plugin_packages ]]; then - while IFS= read -r f; do + shopt -s nullglob + for dir in plugin_packages/ep_*; do + [[ -L "$dir" || -d "$dir" ]] || continue + f="$dir/ep.json" + [[ -f "$f" ]] || continue d="$(read_disables_from_json "$f")" [[ -n "$d" ]] && CANDIDATES+=("$d") - done < <(find plugin_packages -maxdepth 3 -name ep.json -not -path '*/.versions/*' 2>/dev/null) + done + shopt -u nullglob fi if [[ ${#CANDIDATES[@]} -eq 1 ]]; then DISABLES="${CANDIDATES[0]}"