From 2d824e2d9f8277bceecf487b22d26af79150080d Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Wed, 26 Aug 2026 18:35:42 +0100 Subject: [PATCH 1/2] =?UTF-8?q?fix(tests):=20terminate=20find=20-exec=20an?= =?UTF-8?q?d=20pass=20{}=20=E2=80=94=20the=20placeholder=20step=20was=20a?= =?UTF-8?q?=20no-op?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tests/e2e/template_instantiation_test.sh ran: find ... -exec bash -c ' file="$1" ... grep/sed over $file ... ' _ "$file" Two defects in that one line: 1. No ';' or '+' terminator, so the file does not parse (SC2067). 2. "$file" is passed where {} belongs. $file is assigned ONLY inside the -exec body, so in the outer scope it is UNSET — $1 arrived empty, file="" and every grep/sed operated on an empty path. ⚠ The consequence is worse than a lint error: the placeholder-replacement step SILENTLY DID NOTHING, then logged "All placeholder tokens replaced". A test whose whole purpose is to prove instantiation worked was passing without replacing a single token. That is a plausible cause of estate repos shipping with literal {{project}} tokens still in their sources. Corrected to "' _ {} \;" so find passes each matched path. Found by an estate-wide shellcheck sweep of 5,111 scripts across 375 repos: this identical stale copy exists in 30 repositories. rsr-template-repo's own copy is already correct and restructured (371 lines vs the 268 here), so these are stale duplicates that never picked up the upstream fix. --- tests/e2e/template_instantiation_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/template_instantiation_test.sh b/tests/e2e/template_instantiation_test.sh index 93503c2..f69dc3d 100755 --- a/tests/e2e/template_instantiation_test.sh +++ b/tests/e2e/template_instantiation_test.sh @@ -137,7 +137,7 @@ find "$TEST_REPO_PATH" -type f \ sed -i "s|$placeholder|$value|g" "$file" fi done - ' _ "$file" + ' _ {} \; log_pass "All placeholder tokens replaced" From dcac9f74edb0b9f954d97e212540d0f8c1e2adef Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Wed, 26 Aug 2026 18:52:44 +0100 Subject: [PATCH 2/2] Update tests/e2e/template_instantiation_test.sh Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com> Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com> --- tests/e2e/template_instantiation_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/template_instantiation_test.sh b/tests/e2e/template_instantiation_test.sh index f69dc3d..d3890ed 100755 --- a/tests/e2e/template_instantiation_test.sh +++ b/tests/e2e/template_instantiation_test.sh @@ -137,7 +137,7 @@ find "$TEST_REPO_PATH" -type f \ sed -i "s|$placeholder|$value|g" "$file" fi done - ' _ {} \; + ' _ {} + log_pass "All placeholder tokens replaced"