From e13195dd845a29358c60ddc62f9a5871e74ebd65 Mon Sep 17 00:00:00 2001 From: clawbot <35+clawbot@noreply.example.org> Date: Mon, 16 Nov 2026 23:40:00 +0000 Subject: [PATCH] REPO_POLICIES: Pinned tools The POSIX sh rule joins the list of what the canonical form does, and two sentences lose filler ("installing into a clean image", "which then succeeds while no caller sees any change"); each step of the canonical form and the go install rule stay. Model: opus-5-5 --- prompts/REPO_POLICIES.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/prompts/REPO_POLICIES.md b/prompts/REPO_POLICIES.md index bbda88b..d9c5c7f 100644 --- a/prompts/REPO_POLICIES.md +++ b/prompts/REPO_POLICIES.md @@ -273,12 +273,14 @@ style conventions are in separate documents: the first two, the install fails, and Alpine's yarn 1 says to enable corepack. Never do that; copy the missing files instead. +## Pinned tools + - **`script/bootstrap` installs a pinned tool by comparing versions, never by testing presence.** An `if ! command -v ; then install; fi` guard tests `PATH` only. On an already-provisioned machine the pin is then inert, and a - version bump is a silent no-op. The Dockerfile, installing into a clean image, - gets the pinned version, so a local `make check` and `make docker` can - disagree about what the tool even is. The canonical form: + version bump is a silent no-op. The Dockerfile's clean image still gets the + pinned version, so a local `make check` and `make docker` can disagree about + what the tool even is. The canonical form: - compares the installed version against the pin over the **whole** version token. A parser that stops at the first `-` reports `2.12.2` for a host running `2.12.2-rc1` and skips the install. @@ -290,16 +292,14 @@ style conventions are in separate documents: So a failure causes a redundant install, never a skipped one. - - after installing, re-resolves the binary the way callers do, with - `hash -r` and then through `PATH`, not through the directory the installer - wrote to. A shadowing binary can hide an install, which then succeeds - while no caller sees any change. In that case it fails and names the - resolved path. + - after installing, re-resolves the binary the way callers do: `hash -r`, + then `PATH`, not the directory the installer wrote to. A shadowing binary + can hide an install that reported success. In that case it fails and names + the resolved path. - is actually called, and prints the version on both success paths. A function defined and never invoked has the same exit status and the same empty output as one that worked. - - Keep it POSIX sh: no arrays, no `[[`, no `grep -P`. + - stays POSIX sh: no arrays, no `[[`, no `grep -P`. A Go tool a repo needs on the host is installed with `go install` pinned to a commit hash (`go install @`). It is never tracked as