make deps: repair a module cache whose rastrillo extraction lost files
CI failed vet at 841a6a6 with "pattern locales/*.toml: no matching files found" (and migrations/*.sql, ui/calendar.js) inside the runner's cached amadan.net/rastrillo/rastrillo 29e4491, while the same commit passed here. Calendar's branch met the same runner cache first (oficina/calendar#26), where go mod verify there reported a dozen modules as modified. main only compiled rastrillo's crypto and assertion packages, which embed nothing, so it never noticed. vet now depends on deps: go mod download, then go mod verify; a module it reports as "dir has been modified" is deleted and extracted again from the checksummed zip. The same target, reproduced with a scratch GOMODCACHE, repaired Calendar's CI.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+20
−2
Makefile+20 −2
CI passed — run details
CI log
=== vet === amadan.net/oficina/home/handoff v0.0.0-20260908102137-481d2d57f489: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/amadan.net/oficina/home/handoff@v0.0.0-20260908102137-481d2d57f489) amadan.net/oficina/suite v0.0.0-20260905215529-60b01a8a0d6d: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/amadan.net/oficina/suite@v0.0.0-20260905215529-60b01a8a0d6d) amadan.net/rastrillo/rastrillo v0.26.1-0.20260908075707-29e4491631bd: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/amadan.net/rastrillo/rastrillo@v0.26.1-0.20260908075707-29e4491631bd) github.com/BurntSushi/toml v1.6.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/!burnt!sushi/toml@v1.6.0) github.com/carlosframework/rastrillo v0.23.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/carlosframework/rastrillo@v0.23.0) github.com/dustin/go-humanize v1.0.1: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/dustin/go-humanize@v1.0.1) github.com/go-chi/chi/v5 v5.3.2: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/go-chi/chi/v5@v5.3.2) github.com/go-json-experiment/json v0.0.0-20250725192818-e39067aee2d2: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/go-json-experiment/json@v0.0.0-20250725192818-e39067aee2d2) github.com/google/uuid v1.6.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/google/uuid@v1.6.0) github.com/jinzhu/inflection v1.0.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/jinzhu/inflection@v1.0.0) github.com/jinzhu/now v1.1.5: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/jinzhu/now@v1.1.5) github.com/keymaildev/signin v0.1.1: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/keymaildev/signin@v0.1.1) github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/remyoudompheng/bigfft@v0.0.0-20230129092748-24d4a6f8daec) golang.org/x/crypto v0.55.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/golang.org/x/crypto@v0.55.0) golang.org/x/sys v0.47.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/golang.org/x/sys@v0.47.0) golang.org/x/text v0.41.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/golang.org/x/text@v0.41.0) gorm.io/gorm v1.31.2: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/gorm.io/gorm@v1.31.2) gorm.io/plugin/dbresolver v1.6.2: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/gorm.io/plugin/dbresolver@v1.6.2) modernc.org/libc v1.74.1: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/modernc.org/libc@v1.74.1) modernc.org/mathutil v1.7.1: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/modernc.org/mathutil@v1.7.1) modernc.org/memory v1.11.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/modernc.org/memory@v1.11.0) modernc.org/sqlite v1.55.0: dir has been modified (/tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/modernc.org/sqlite@v1.55.0) deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/amadan.net/oficina/home/handoff@v0.0.0-20260908102137-481d2d57f489 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/amadan.net/oficina/suite@v0.0.0-20260905215529-60b01a8a0d6d deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/amadan.net/rastrillo/rastrillo@v0.26.1-0.20260908075707-29e4491631bd deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/!burnt!sushi/toml@v1.6.0 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/carlosframework/rastrillo@v0.23.0 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/dustin/go-humanize@v1.0.1 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/go-chi/chi/v5@v5.3.2 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/go-json-experiment/json@v0.0.0-20250725192818-e39067aee2d2 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/google/uuid@v1.6.0 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/jinzhu/inflection@v1.0.0 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/jinzhu/now@v1.1.5 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/keymaildev/signin@v0.1.1 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/github.com/remyoudompheng/bigfft@v0.0.0-20230129092748-24d4a6f8daec deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/golang.org/x/crypto@v0.55.0 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/golang.org/x/sys@v0.47.0 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/golang.org/x/text@v0.41.0 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/gorm.io/gorm@v1.31.2 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/gorm.io/plugin/dbresolver@v1.6.2 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/modernc.org/libc@v1.74.1 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/modernc.org/mathutil@v1.7.1 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/modernc.org/memory@v1.11.0 deps: re-extracting /tmp/oficina-extra-ci-runner/workdir/repos/oficina__memoria/cache/go-mod/modernc.org/sqlite@v1.55.0 all modules verified go vet ./... go vet -tags browser ./internal/memoriatest/ === fmt === === test === go test ./... ? amadan.net/oficina/memoria/cmd/memoria [no test files] ok amadan.net/oficina/memoria/internal/memoria 3.874s ok amadan.net/oficina/memoria/internal/memoria/chunk 0.005s ok amadan.net/oficina/memoria/internal/memoria/fact 0.584s ? amadan.net/oficina/memoria/internal/memoria/icons [no test files] ok amadan.net/oficina/memoria/internal/memoria/index 0.045s ok amadan.net/oficina/memoria/internal/memoria/notion 0.023s ok amadan.net/oficina/memoria/internal/memoria/provider 1.131s ok amadan.net/oficina/memoria/internal/memoria/query 0.004s ok amadan.net/oficina/memoria/internal/memoria/seal 0.005s ok amadan.net/oficina/memoria/internal/memoria/sibling 3.027s ok amadan.net/oficina/memoria/internal/memoriatest 2.048s ? amadan.net/oficina/memoria/scripts/writeestilo [no test files] ? amadan.net/oficina/memoria/tools/bench [no test files] ? amadan.net/oficina/memoria/tools/drive [no test files] ? amadan.net/oficina/memoria/tools/seed [no test files] ? amadan.net/oficina/memoria/tools/vendorassets [no test files] === migration-check === go tool rastrillo migration check rastrillo migration check: models and migrations agree
diff --git a/Makefile b/Makefile| index 3a14c4a..35bfb6b 100644 |
| --- a/Makefile |
| +++ b/Makefile |
| @@ -12,7 +12,7 @@ RELEASE_GOOS ?= linux |
| RELEASE_GOARCH ?= arm64 |
| RELEASE_BIN := releases/$(APP)-$(RELEASE_GOOS)-$(RELEASE_GOARCH) |
| -.PHONY: build release test vet fmt-check migration-check ci browser |
| +.PHONY: build release deps test vet fmt-check migration-check ci browser |
| # build is the compile check: with more than one package matched, go |
| # build discards the output, so this catches a broken package without |
| @@ -61,9 +61,27 @@ release: |
| test: |
| go test ./... |
| +# deps makes sure the module cache holds what go.sum says, and repairs it |
| +# when it does not. The CI runner's cache held an extracted |
| +# amadan.net/rastrillo/rastrillo whose embedded files (locales/*.toml, |
| +# migrations/*.sql, ui/calendar.js) were missing, so vet failed with |
| +# "pattern ...: no matching files found" while the same commit passed |
| +# here (Calendar met it first, oficina/calendar#26). `go mod verify` |
| +# names such a directory as "dir has been modified"; deleting it lets |
| +# `go mod download` extract it again from the checksummed zip. |
| +deps: |
| + @go mod download |
| + @out=$$(go mod verify 2>&1) || { \ |
| + echo "$$out"; \ |
| + echo "$$out" | sed -n 's/.*: dir has been modified (\(.*\))$$/\1/p' | while read -r dir; do \ |
| + echo "deps: re-extracting $$dir"; chmod -R u+w "$$dir" && rm -rf "$$dir"; \ |
| + done; \ |
| + go mod download && go mod verify; \ |
| + } |
| + |
| # Also vets the browser-tagged tests: they are outside `make ci`, and a |
| # test behind a tag that nothing compiles rots silently. |
| -vet: |
| +vet: deps |
| go vet ./... |
| go vet -tags browser ./internal/memoriatest/ |