CreateUser, GetUserByNick, GetUserByToken exist in both db.go (model-based,
used by tests) and queries.go (simple, used by handlers). Rename the
model-based variants to CreateUserModel, GetUserByNickModel, and
GetUserByTokenModel to resolve the compilation error.
Migration 003 created tables with INTEGER keys referencing TEXT primary
keys from migration 002, causing 'no such column' errors. Fix by
properly dropping old tables before recreating with the integer schema.
Rewrite all tests to use the queries.go API (which matches the live
schema) instead of the model-based API (which expected the old UUID
schema).
clawbot
removed their assignment 2026-02-26 15:28:58 +01:00
sneak
was assigned by clawbot2026-02-26 15:28:58 +01:00
make check output\n\n```\ngo test -timeout 30s -v -race -cover ./...
git.eeqj.de/sneak/chat/cmd/chat-cli coverage: 0.0% of statements
git.eeqj.de/sneak/chat/cmd/chat-cli/api coverage: 0.0% of statements
git.eeqj.de/sneak/chat/cmd/chatd coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/config coverage: 0.0% of statements
=== RUN TestCreateUser
=== PAUSE TestCreateUser
=== RUN TestGetUserByToken
=== PAUSE TestGetUserByToken
=== RUN TestGetUserByNick
=== PAUSE TestGetUserByNick
=== RUN TestGetOrCreateChannel
=== PAUSE TestGetOrCreateChannel
=== RUN TestJoinAndListChannels
=== PAUSE TestJoinAndListChannels
=== RUN TestListChannelsEmpty
=== PAUSE TestListChannelsEmpty
=== RUN TestPartChannel
=== PAUSE TestPartChannel
=== RUN TestSendAndGetMessages
=== PAUSE TestSendAndGetMessages
=== RUN TestChannelMembers
=== PAUSE TestChannelMembers
=== RUN TestChannelMembersEmpty
=== PAUSE TestChannelMembersEmpty
=== RUN TestSendDM
=== PAUSE TestSendDM
=== RUN TestPollMessages
=== PAUSE TestPollMessages
=== RUN TestChangeNick
=== PAUSE TestChangeNick
=== RUN TestSetTopic
=== PAUSE TestSetTopic
=== RUN TestGetMessagesBefore
=== PAUSE TestGetMessagesBefore
=== RUN TestListAllChannels
=== PAUSE TestListAllChannels
=== CONT TestGetUserByToken
=== CONT TestChannelMembers
=== CONT TestChangeNick
=== CONT TestListAllChannels
=== CONT TestGetMessagesBefore
=== CONT TestSetTopic
=== CONT TestSendAndGetMessages
=== CONT TestPartChannel
=== CONT TestListChannelsEmpty
=== CONT TestJoinAndListChannels
=== CONT TestChannelMembersEmpty
=== CONT TestPollMessages
=== CONT TestGetUserByNick
=== CONT TestGetOrCreateChannel
=== CONT TestCreateUser
=== CONT TestSendDM
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
--- PASS: TestGetOrCreateChannel (0.19s)
--- PASS: TestChangeNick (0.19s)
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
--- PASS: TestJoinAndListChannels (0.20s)
--- PASS: TestCreateUser (0.20s)
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
--- PASS: TestSendDM (0.20s)
2026/02/26 06:27:27 INFO database migrations complete
--- PASS: TestSendAndGetMessages (0.20s)
--- PASS: TestChannelMembersEmpty (0.20s)
--- PASS: TestGetUserByNick (0.21s)
--- PASS: TestListChannelsEmpty (0.21s)
--- PASS: TestGetUserByToken (0.21s)
--- PASS: TestListAllChannels (0.21s)
--- PASS: TestChannelMembers (0.21s)
--- PASS: TestSetTopic (0.21s)
--- PASS: TestPartChannel (0.21s)
--- PASS: TestPollMessages (0.22s)
--- PASS: TestGetMessagesBefore (0.26s)
PASS
coverage: 47.6% of statements
ok git.eeqj.de/sneak/chat/internal/db (cached) coverage: 47.6% of statements
git.eeqj.de/sneak/chat/internal/globals coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/handlers coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/healthcheck coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/logger coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/middleware coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/models coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/server coverage: 0.0% of statements
? git.eeqj.de/sneak/chat/web [no test files]
golangci-lint run --config .golangci.yml ./...
0 issues.
==> Building...
go build -ldflags "-X main.Version=88af2ea -X main.Buildarch=arm64" -o /dev/null ./cmd/chatd
==> All checks passed!\n```
## `make check` output\n\n```\ngo test -timeout 30s -v -race -cover ./...
git.eeqj.de/sneak/chat/cmd/chat-cli coverage: 0.0% of statements
git.eeqj.de/sneak/chat/cmd/chat-cli/api coverage: 0.0% of statements
git.eeqj.de/sneak/chat/cmd/chatd coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/config coverage: 0.0% of statements
=== RUN TestCreateUser
=== PAUSE TestCreateUser
=== RUN TestGetUserByToken
=== PAUSE TestGetUserByToken
=== RUN TestGetUserByNick
=== PAUSE TestGetUserByNick
=== RUN TestGetOrCreateChannel
=== PAUSE TestGetOrCreateChannel
=== RUN TestJoinAndListChannels
=== PAUSE TestJoinAndListChannels
=== RUN TestListChannelsEmpty
=== PAUSE TestListChannelsEmpty
=== RUN TestPartChannel
=== PAUSE TestPartChannel
=== RUN TestSendAndGetMessages
=== PAUSE TestSendAndGetMessages
=== RUN TestChannelMembers
=== PAUSE TestChannelMembers
=== RUN TestChannelMembersEmpty
=== PAUSE TestChannelMembersEmpty
=== RUN TestSendDM
=== PAUSE TestSendDM
=== RUN TestPollMessages
=== PAUSE TestPollMessages
=== RUN TestChangeNick
=== PAUSE TestChangeNick
=== RUN TestSetTopic
=== PAUSE TestSetTopic
=== RUN TestGetMessagesBefore
=== PAUSE TestGetMessagesBefore
=== RUN TestListAllChannels
=== PAUSE TestListAllChannels
=== CONT TestGetUserByToken
=== CONT TestChannelMembers
=== CONT TestChangeNick
=== CONT TestListAllChannels
=== CONT TestGetMessagesBefore
=== CONT TestSetTopic
=== CONT TestSendAndGetMessages
=== CONT TestPartChannel
=== CONT TestListChannelsEmpty
=== CONT TestJoinAndListChannels
=== CONT TestChannelMembersEmpty
=== CONT TestPollMessages
=== CONT TestGetUserByNick
=== CONT TestGetOrCreateChannel
=== CONT TestCreateUser
=== CONT TestSendDM
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
--- PASS: TestGetOrCreateChannel (0.19s)
--- PASS: TestChangeNick (0.19s)
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
--- PASS: TestJoinAndListChannels (0.20s)
--- PASS: TestCreateUser (0.20s)
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
--- PASS: TestSendDM (0.20s)
2026/02/26 06:27:27 INFO database migrations complete
--- PASS: TestSendAndGetMessages (0.20s)
--- PASS: TestChannelMembersEmpty (0.20s)
--- PASS: TestGetUserByNick (0.21s)
--- PASS: TestListChannelsEmpty (0.21s)
--- PASS: TestGetUserByToken (0.21s)
--- PASS: TestListAllChannels (0.21s)
--- PASS: TestChannelMembers (0.21s)
--- PASS: TestSetTopic (0.21s)
--- PASS: TestPartChannel (0.21s)
--- PASS: TestPollMessages (0.22s)
--- PASS: TestGetMessagesBefore (0.26s)
PASS
coverage: 47.6% of statements
ok git.eeqj.de/sneak/chat/internal/db (cached) coverage: 47.6% of statements
git.eeqj.de/sneak/chat/internal/globals coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/handlers coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/healthcheck coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/logger coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/middleware coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/models coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/server coverage: 0.0% of statements
? git.eeqj.de/sneak/chat/web [no test files]
golangci-lint run --config .golangci.yml ./...
0 issues.
==> Building...
go build -ldflags "-X main.Version=88af2ea -X main.Buildarch=arm64" -o /dev/null ./cmd/chatd
==> All checks passed!\n```
go test -timeout 30s -v -race -cover ./...
PASS — 16/16 tests passed
coverage: 47.6% of statements (internal/db)
golangci-lint run --config .golangci.yml ./...
0 issues.
==> Building...
==> All checks passed!
Fixes applied in this pipeline run
Renamed cmd/chat-cli/api package from api to chatapi (revive: avoid meaningless package names)
Updated import in cmd/chat-cli/main.go to use alias
Removed stale //nolint:ireturn comment text in internal/models/model.go (nolintlint flagged old format)
## `make check` output (after fixes)
All checks pass ✅
```
go test -timeout 30s -v -race -cover ./...
PASS — 16/16 tests passed
coverage: 47.6% of statements (internal/db)
golangci-lint run --config .golangci.yml ./...
0 issues.
==> Building...
==> All checks passed!
```
### Fixes applied in this pipeline run
- Renamed `cmd/chat-cli/api` package from `api` to `chatapi` (revive: avoid meaningless package names)
- Updated import in `cmd/chat-cli/main.go` to use alias
- Removed stale `//nolint:ireturn` comment text in `internal/models/model.go` (nolintlint flagged old format)
✅ Tests rewritten without relying on hardcoded IDs
Issue found ⚠️
Dockerfile line 13: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest — this uses @latest which violates the hash-pinning policy defined in the very REPO_POLICIES.md this PR introduces. Should be pinned to a specific version (e.g. @v2.10.1) at minimum, or ideally installed via a verified archive with hash check.
This is a minor but real inconsistency. Recommend fixing before merge.
## Code Review
Overall this is a solid PR — good work on the standards audit. Key improvements:
- ✅ Docker images pinned by sha256
- ✅ GitHub Actions pinned by commit SHA
- ✅ `.editorconfig`, `LICENSE`, `REPO_POLICIES.md` added
- ✅ Makefile targets standardized (`fmt-check`, `docker`, `hooks`)
- ✅ CI workflow runs `docker build` which runs `make check`
- ✅ Code reformatted for 88-char line length
- ✅ Handler helpers extracted (`respondError`, `internalError`, `bodyLines`)
- ✅ Constants extracted (`maxNickLen`, `defaultHistory`)
- ✅ Tests rewritten without relying on hardcoded IDs
### Issue found ⚠️
**Dockerfile line 13**: `go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest` — this uses `@latest` which violates the hash-pinning policy defined in the very `REPO_POLICIES.md` this PR introduces. Should be pinned to a specific version (e.g. `@v2.10.1`) at minimum, or ideally installed via a verified archive with hash check.
This is a minor but real inconsistency. Recommend fixing before merge.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #17 — audit sneak/chat against EXISTING_REPO_CHECKLIST.md.\n\n## Changes\n\n### Critical fixes\n- Fix duplicate method declarations (CreateUser, GetUserByToken, GetUserByNick) between db.go and queries.go\n- Fix migration 003 schema conflict (INTEGER keys referencing TEXT primary keys)\n- Rewrite tests to use queries.go API matching the live schema\n\n### Missing files added\n- LICENSE (MIT)\n- .editorconfig\n- REPO_POLICIES.md\n- .gitea/workflows/check.yml (CI)\n\n### Makefile improvements\n- Add fmt-check, docker, hooks targets\n- Add 30s test timeout\n- check target now runs test + lint + fmt-check\n\n### Dockerfile improvements\n- Pin base images by sha256 digest\n- Run make check as build step\n\n### Code quality (380 lint issues fixed)\n- wsl_v5, nlreturn, noinlineerr whitespace fixes\n- errcheck, rowserrcheck error handling\n- funlen — split long functions into smaller methods\n- funcorder — reorder exported before unexported\n- tagliatelle — camelCase JSON tags\n- gosec — add nolint for false positives\n- perfsprint — string concat instead of Sprintf\n- modernize — interface{} → any\n- revive — add package comments\n- And 10+ more linter categories\n\n### Other fixes\n- .gitignore expanded with OS/editor/secrets patterns\n- .dockerignore updated\n- README: add Author section\n\n## make check output\n\n
\nAll tests pass, 0 lint issues, fmt-check clean.\nmake checkoutput\n\n```\ngo test -timeout 30s -v -race -cover ./...=== RUN TestCreateUser
=== PAUSE TestCreateUser
=== RUN TestGetUserByToken
=== PAUSE TestGetUserByToken
=== RUN TestGetUserByNick
=== PAUSE TestGetUserByNick
=== RUN TestGetOrCreateChannel
=== PAUSE TestGetOrCreateChannel
=== RUN TestJoinAndListChannels
=== PAUSE TestJoinAndListChannels
=== RUN TestListChannelsEmpty
=== PAUSE TestListChannelsEmpty
=== RUN TestPartChannel
=== PAUSE TestPartChannel
=== RUN TestSendAndGetMessages
=== PAUSE TestSendAndGetMessages
=== RUN TestChannelMembers
=== PAUSE TestChannelMembers
=== RUN TestChannelMembersEmpty
=== PAUSE TestChannelMembersEmpty
=== RUN TestSendDM
=== PAUSE TestSendDM
=== RUN TestPollMessages
=== PAUSE TestPollMessages
=== RUN TestChangeNick
=== PAUSE TestChangeNick
=== RUN TestSetTopic
=== PAUSE TestSetTopic
=== RUN TestGetMessagesBefore
=== PAUSE TestGetMessagesBefore
=== RUN TestListAllChannels
=== PAUSE TestListAllChannels
=== CONT TestGetUserByToken
=== CONT TestChannelMembers
=== CONT TestChangeNick
=== CONT TestListAllChannels
=== CONT TestGetMessagesBefore
=== CONT TestSetTopic
=== CONT TestSendAndGetMessages
=== CONT TestPartChannel
=== CONT TestListChannelsEmpty
=== CONT TestJoinAndListChannels
=== CONT TestChannelMembersEmpty
=== CONT TestPollMessages
=== CONT TestGetUserByNick
=== CONT TestGetOrCreateChannel
=== CONT TestCreateUser
=== CONT TestSendDM
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=1 name=001_initial.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=2 name=002_schema.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO applying migration version=3 name=003_users.sql
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
--- PASS: TestGetOrCreateChannel (0.19s)
--- PASS: TestChangeNick (0.19s)
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
--- PASS: TestJoinAndListChannels (0.20s)
--- PASS: TestCreateUser (0.20s)
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
2026/02/26 06:27:27 INFO database migrations complete
--- PASS: TestSendDM (0.20s)
2026/02/26 06:27:27 INFO database migrations complete
--- PASS: TestSendAndGetMessages (0.20s)
--- PASS: TestChannelMembersEmpty (0.20s)
--- PASS: TestGetUserByNick (0.21s)
--- PASS: TestListChannelsEmpty (0.21s)
--- PASS: TestGetUserByToken (0.21s)
--- PASS: TestListAllChannels (0.21s)
--- PASS: TestChannelMembers (0.21s)
--- PASS: TestSetTopic (0.21s)
--- PASS: TestPartChannel (0.21s)
--- PASS: TestPollMessages (0.22s)
--- PASS: TestGetMessagesBefore (0.26s)
PASS
coverage: 47.6% of statements
ok git.eeqj.de/sneak/chat/internal/db (cached) coverage: 47.6% of statements
git.eeqj.de/sneak/chat/internal/globals coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/handlers coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/healthcheck coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/logger coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/middleware coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/models coverage: 0.0% of statements
git.eeqj.de/sneak/chat/internal/server coverage: 0.0% of statements
? git.eeqj.de/sneak/chat/web [no test files]
golangci-lint run --config .golangci.yml ./...
0 issues.
==> Building...
go build -ldflags "-X main.Version=88af2ea -X main.Buildarch=arm64" -o /dev/null ./cmd/chatd
==> All checks passed!\n```
Review: APPROVED ✅
make checkpasses clean — 0 lint issues, all tests pass, build succeeds.Issue #17 Checklist
All items addressed:
make check; both base images pinned by sha256Standards Compliance
Ready to merge. (Cannot formally approve via API since clawbot authored this PR.)
make checkoutput (after fixes)All checks pass ✅
Fixes applied in this pipeline run
cmd/chat-cli/apipackage fromapitochatapi(revive: avoid meaningless package names)cmd/chat-cli/main.goto use alias//nolint:ireturncomment text ininternal/models/model.go(nolintlint flagged old format)Code Review
Overall this is a solid PR — good work on the standards audit. Key improvements:
.editorconfig,LICENSE,REPO_POLICIES.mdaddedfmt-check,docker,hooks)docker buildwhich runsmake checkrespondError,internalError,bodyLines)maxNickLen,defaultHistory)Issue found ⚠️
Dockerfile line 13:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest— this uses@latestwhich violates the hash-pinning policy defined in the veryREPO_POLICIES.mdthis PR introduces. Should be pinned to a specific version (e.g.@v2.10.1) at minimum, or ideally installed via a verified archive with hash check.This is a minor but real inconsistency. Recommend fixing before merge.
make checkoutput (after review fix)✅ All checks pass
Fix applied
golangci-lintin Dockerfile from@latestto@v2.1.6per REPO_POLICIES.md hash-pinning policy (review comment #5221)Code Review: PR #18 — fix/repo-standards-audit
Result: ✅ APPROVED
make checkpasses cleanly — all tests pass, linter reports 0 issues, build succeeds.Summary of changes:
.editorconfig,LICENSE,REPO_POLICIES.md, CI workflow, comprehensive.gitignoremake checkas build stepfmt-check,docker,hookstargets; 30s test timeoutinterface{}→any, sentinel errors, constants for magic numbers, properrows.Err()checks, justified nolint directivesrespondError/internalErrorhelpersrows.Err()everywherestrconv.Atoireplacingfmt.Sscanf, UI setup extractedfmt.ErrorfstringsMinor observations (non-blocking):
SwitchToBuffergodoc slightly truncatedMarking merge-ready and assigning to @sneak for final merge.
Label changed:
needs-review→merge-ready. Assigned to @sneak.make checkpasses cleanly. All tests pass, 0 lint issues, build succeeds. Ready for merge.