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