Re-vendor the standard files from sneak/prompts dd4027b (closes #33)
check / check (push) Failing after 5s

REPO_POLICIES.md, .golangci.yml, the CI workflow and the scripts the
policy keeps identical across repositories are copies of the files at
that commit. .gitignore, .editorconfig and the new .dockerignore are the
canonical files followed by this repository's own entries. The lint
stage moves to the golangci-lint image the policy pins, in the same
commit as .golangci.yml. The format check leaves the lint stage and runs
on the host from script/check, which script/cibuild now runs after
script/bootstrap. The last Dockerfile stage runs script/bootstrap.
script/fmt runs goimports with go run at a pinned commit.

Model: opus-5-5
This commit is contained in:
2026-10-06 12:49:32 +00:00
parent 16fc20b81c
commit d193c99cb7
14 changed files with 639 additions and 126 deletions
+13 -5
View File
@@ -1,11 +1,11 @@
# Lint stage: format check + golangci-lint
# golangci/golangci-lint:v2.12.2 (Debian-based), 2026-08-07
FROM golangci/golangci-lint:v2.12.2@sha256:5cceeef04e53efe1470638d4b4b4f5ceefd574955ab3941b2d9a68a8c9ad5240 AS lint
# Lint stage. The format check is not here: it runs on the host, in
# script/fmt-check.
# golangci/golangci-lint:v2.14.0 (Debian-based), 2026-09-24
FROM golangci/golangci-lint@sha256:ad862ba6b3798cbe0fd9fd7408d498fd74fbd2623a92406b2fd3898faf0bf98f AS lint
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN make fmt-check
# Called directly: make lint is itself a docker build of this stage.
RUN golangci-lint run --config .golangci.yml ./...
@@ -21,8 +21,16 @@ RUN go test -timeout 90s -race -cover ./... || \
{ echo "--- Rerunning with -v for details ---"; \
go test -timeout 90s -race -v ./...; exit 1; }
# Final stage: the copies make a plain docker build run both stages above.
# Final stage: a development environment, set up by script/bootstrap.
# The copies make a plain docker build run both stages above. No stage
# compiles a binary, since simplelog is a library, so none declares the
# VERSION build argument that script/docker and script/cibuild pass.
# golang 1.22.12 (2025-02-04)
FROM golang@sha256:1cf6c45ba39db9fd6db16922041d074a63c935556a05c5ccb62d181034df7f02
COPY --from=lint /src/go.sum /dev/null
COPY --from=test /src/go.sum /dev/null
WORKDIR /src
COPY script/ script/
COPY go.mod go.sum ./
RUN script/bootstrap
COPY . .