From 6dc35e5bf27e7514091f2c8e3c1b0cb2c2a847c2 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 16 Aug 2026 17:20:01 -0500 Subject: [PATCH] fleet(test): attribute FIRST-position to the fixture, not to the fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Comment-only. The colon-padding note said the anchored regex 'rejects the directory in FIRST position — which is exactly where the fix puts it'. True in this fixture, which runs env -i with no MOSAIC_RUNTIME_BIN so the bootstrap directory leads, but stated as a property of the fix. In general the directory sits second, after MOSAIC_RUNTIME_BIN, and it reads as a contradiction of the source comment corrected in c7ee3cb. Found in review by rhodey, who also noted the same sentence is live in the PR description. No executable line changed. --- .../framework/tools/fleet/test-start-agent-session.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/mosaic/framework/tools/fleet/test-start-agent-session.sh b/packages/mosaic/framework/tools/fleet/test-start-agent-session.sh index 182b1ee6..3343e60a 100755 --- a/packages/mosaic/framework/tools/fleet/test-start-agent-session.sh +++ b/packages/mosaic/framework/tools/fleet/test-start-agent-session.sh @@ -422,8 +422,12 @@ ln -sf "$FAKE_BIN/npm" "$NODE_LAUNCHER_BIN/npm" node_pane_environment=$(tr '\0' '\n' < "$HOME_NODE/fleet/pane-environment") # Colon-pad and match a whole element. A regex with `(^|:)` after `.*` looks like it # does this and does not: an anchor cannot match mid-pattern, so it silently requires -# a leading colon and rejects the directory in FIRST position — which is exactly where -# the fix puts it. That produced a failure reading "pane ran but PANE_PATH does not +# a leading colon and rejects the directory in FIRST position — which is where THIS +# FIXTURE puts it: it runs under `env -i` with no MOSAIC_RUNTIME_BIN, so the bootstrap +# directory leads. That is a property of the fixture, not of the fix — in general the +# directory sits second, after MOSAIC_RUNTIME_BIN. The colon padding makes the +# assertion position-independent either way, which is why it is written this way and +# not with an anchor. That produced a failure reading "pane ran but PANE_PATH does not # carry " against a PATH whose first element was that dir. node_pane_path=":$(printf '%s\n' "$node_pane_environment" | sed -n 's/^PATH=//p' | head -1):" case "$node_pane_path" in