From 25fffbc9f61a7f0268dbe163b722b44ae372732a Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Wed, 26 Aug 2026 18:34:46 +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 8431dff..102e2c9 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 ad18f642eada9b87a98e6aa5f20fbc548f428446 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Fri, 28 Aug 2026 16:52:23 +0100 Subject: [PATCH 2/2] fix(tests): export template values to the find child shell --- tests/e2e/template_instantiation_test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/e2e/template_instantiation_test.sh b/tests/e2e/template_instantiation_test.sh index 102e2c9..3fe14ad 100755 --- a/tests/e2e/template_instantiation_test.sh +++ b/tests/e2e/template_instantiation_test.sh @@ -112,6 +112,8 @@ replace_placeholder() { } # Replace in all text files +export TEST_REPO_NAME TEST_OWNER TEST_FORGE TEST_PROJECT_NAME \ + TEST_DESCRIPTION TEST_PRIMARY_LANGUAGE TEST_AUTHOR TEST_AUTHOR_EMAIL find "$TEST_REPO_PATH" -type f \ \( -name "*.md" -o -name "*.adoc" -o -name "*.a2ml" -o -name "*.zig" -o -name "*.idr" \ -o -name "Justfile" -o -name "Containerfile" -o -name "*.yml" -o -name "*.yaml" \