From 9d19544215cff274d230c31b8aa68043587d8600 Mon Sep 17 00:00:00 2001 From: Scott McCarty Date: Wed, 4 Nov 2026 21:25:25 -0500 Subject: [PATCH] fix: the host-contract shim allows only what the gate itself runs 0.4.0 added `tail` to this test's PATH shim. bin/sdlc does not run `tail`. `log_since`, a helper in this same file, does -- and that runs with the real PATH, not the shim's, so the entry bought nothing. It is not free. Every name in that list is one tool this test stops checking for, and checking for them is its whole job: nothing upstream notices bin/sdlc growing a dependency on a program a developer's machine may not have, which is why this file exists rather than leaning on the validator's gap. With `tail` listed, a future bin/sdlc could reach for it and the test would pass. `mkdir` stays: `state_init` genuinely runs it. --- tests/test_host_contract.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_host_contract.sh b/tests/test_host_contract.sh index 2175d92..52e87bd 100755 --- a/tests/test_host_contract.sh +++ b/tests/test_host_contract.sh @@ -57,8 +57,12 @@ done # POSIX utilities. The rule is about language toolchains and linters, not about # rebuilding coreutils -- every machine with a shell has these. +# +# Only what bin/sdlc ITSELF runs belongs here. Every entry is one tool this test +# stops checking for, and checking for them is the whole job. What this file's +# own helpers use is irrelevant: they run with the real PATH, not the shim's. POSIX_UTILS="sh awk sed tr grep basename dirname nproc cat mktemp rm ln head id - cut sleep date wc mkdir tail" + cut sleep date wc mkdir" for prog in $POSIX_UTILS; do if full=$(command -v "$prog" 2>/dev/null); then ln -sf "$full" "$SHIM/$prog"; fi done