fix: change appname to neoirc, default DB to /var/lib/neoirc/state.db #45

Merged
sneak merged 1 commits from fix/issue-44-default-db-path into main 2026-03-06 12:40:29 +01:00
Collaborator

Changes

  • Change Appname from "chat" to "neoirc" in cmd/chatd/main.go
  • Change default DBURL from file:./data.db?_journal_mode=WAL to file:///var/lib/neoirc/state.db?_journal_mode=WAL in both internal/config/config.go and the internal/db/db.go fallback
  • Create /var/lib/neoirc/ directory in Dockerfile with proper ownership for the chat user
  • Update README.md to reflect new defaults (DBURL table, .env example, docker run example, SQLite backup/location docs)
  • Remove stale data.db reference from Makefile clean target

The DB path remains configurable via the DBURL environment variable. No Go packages were renamed.

Closes #44

## Changes - Change `Appname` from `"chat"` to `"neoirc"` in `cmd/chatd/main.go` - Change default `DBURL` from `file:./data.db?_journal_mode=WAL` to `file:///var/lib/neoirc/state.db?_journal_mode=WAL` in both `internal/config/config.go` and the `internal/db/db.go` fallback - Create `/var/lib/neoirc/` directory in Dockerfile with proper ownership for the `chat` user - Update README.md to reflect new defaults (DBURL table, `.env` example, docker run example, SQLite backup/location docs) - Remove stale `data.db` reference from Makefile `clean` target The DB path remains configurable via the `DBURL` environment variable. No Go packages were renamed. Closes https://git.eeqj.de/sneak/chat/issues/44
clawbot added 1 commit 2026-03-06 12:36:01 +01:00
fix: change appname to neoirc and default DB to /var/lib/neoirc/state.db
All checks were successful
check / check (push) Successful in 5s
fd86a774ae
- Change Appname from "chat" to "neoirc" in cmd/chatd/main.go
- Change default DBURL from file:./data.db to file:///var/lib/neoirc/state.db
  in both internal/config/config.go and internal/db/db.go fallback
- Create /var/lib/neoirc/ directory in Dockerfile with proper ownership
- Update README.md to reflect new defaults (DBURL, docker run example,
  SQLite backup/location docs)
- Remove stale data.db reference from Makefile clean target

The DB path remains configurable via DBURL environment variable.

Closes #44
clawbot added the botneeds-review labels 2026-03-06 12:36:11 +01:00
clawbot removed the needs-review label 2026-03-06 12:37:28 +01:00
Author
Collaborator

Review: PASS

Reviewed PR #45 (closes issue #44) — all requirements met.

Checklist

Requirement Status Details
appname"neoirc" (string constant only) Changed in cmd/chatd/main.go as Appname var. No Go package renames — all packages remain main, config, db, etc.
Default DBURL → file:///var/lib/neoirc/state.db?_journal_mode=WAL Updated in internal/config/config.go (viper default) and internal/db/db.go (fallback)
DBURL still configurable via env var viper.AutomaticEnv() + viper.GetString("DBURL") — env var override works as before
Dockerfile creates /var/lib/neoirc/ with proper permissions mkdir -p /var/lib/neoirc && chown chat:chat /var/lib/neoirc in final stage
README updated Config table, .env example, Docker run command, binary run output, backup command, SQLite location — all updated
No tests weakened Zero *_test.go files changed
No linter config changed .golangci.yml untouched
docker build . passes Build succeeds — lint, fmt-check, and tests all pass

Files Changed (6)

  • Dockerfile — creates /var/lib/neoirc/ with chat:chat ownership
  • Makefile — removes stale data.db from clean target
  • README.md — all documentation references updated
  • cmd/chatd/main.goAppname constant → "neoirc"
  • internal/config/config.go — default DBURL updated
  • internal/db/db.go — fallback DBURL updated

Clean, minimal, correct. Ready to merge.

## ✅ Review: PASS Reviewed [PR #45](https://git.eeqj.de/sneak/chat/pulls/45) (closes [issue #44](https://git.eeqj.de/sneak/chat/issues/44)) — all requirements met. ### Checklist | Requirement | Status | Details | |---|---|---| | `appname` → `"neoirc"` (string constant only) | ✅ | Changed in `cmd/chatd/main.go` as `Appname` var. No Go package renames — all packages remain `main`, `config`, `db`, etc. | | Default DBURL → `file:///var/lib/neoirc/state.db?_journal_mode=WAL` | ✅ | Updated in `internal/config/config.go` (viper default) and `internal/db/db.go` (fallback) | | DBURL still configurable via env var | ✅ | `viper.AutomaticEnv()` + `viper.GetString("DBURL")` — env var override works as before | | Dockerfile creates `/var/lib/neoirc/` with proper permissions | ✅ | `mkdir -p /var/lib/neoirc && chown chat:chat /var/lib/neoirc` in final stage | | README updated | ✅ | Config table, `.env` example, Docker run command, binary run output, backup command, SQLite location — all updated | | No tests weakened | ✅ | Zero `*_test.go` files changed | | No linter config changed | ✅ | `.golangci.yml` untouched | | `docker build .` passes | ✅ | Build succeeds — lint, fmt-check, and tests all pass | ### Files Changed (6) - `Dockerfile` — creates `/var/lib/neoirc/` with chat:chat ownership - `Makefile` — removes stale `data.db` from clean target - `README.md` — all documentation references updated - `cmd/chatd/main.go` — `Appname` constant → `"neoirc"` - `internal/config/config.go` — default DBURL updated - `internal/db/db.go` — fallback DBURL updated Clean, minimal, correct. Ready to merge. <!-- session: agent:sdlc-manager:subagent:49dc8928-279d-4b42-841d-e9870f3c1f10 -->
clawbot added merge-ready and removed bot labels 2026-03-06 12:39:20 +01:00
sneak was assigned by clawbot 2026-03-06 12:39:26 +01:00
sneak merged commit 6e7bf028c1 into main 2026-03-06 12:40:29 +01:00
sneak deleted branch fix/issue-44-default-db-path 2026-03-06 12:40:29 +01:00
Sign in to join this conversation.