Skip to content
This repository was archived by the owner on Nov 2, 2026. It is now read-only.

Honor MUNUS_DB_PATH when opening SQLite database - #24

Merged
jabbott-iii merged 1 commit into
jabbott-iii:mainfrom
hugosmoreira:agent/honor-munus-db-path
Aug 8, 2026
Merged

jabbott-iii merged 1 commit into
jabbott-iii:mainfrom
hugosmoreira:agent/honor-munus-db-path

Conversation

@hugosmoreira

Copy link
Copy Markdown
Contributor

Summary

  • read the SQLite database path from MUNUS_DB_PATH when configured
  • preserve munus.db as the default for local use
  • add focused coverage for configured and unset environment paths

Why

The Docker image sets MUNUS_DB_PATH=/app/data/munus.db, but the application previously passed the literal munus.db to NewDatabase. As a result, container data was written outside the documented persistent volume.

Validation

  • go test -v database_path.go database_path_test.go
  • go test -count=100 database_path.go database_path_test.go
  • go vet database_path.go database_path_test.go
  • go mod tidy (no module diff)
  • gofmt and git diff --check

The repository-wide suite is currently blocked by pre-existing compilation errors in the unfinished export/import code on main; this PR does not modify those files.

Fixes #23

@jabbott-iii
jabbott-iii marked this pull request as ready for review August 8, 2026 17:37
@jabbott-iii
jabbott-iii merged commit 3ffed6c into jabbott-iii:main Aug 8, 2026
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Honor MUNUS_DB_PATH when opening the SQLite database

2 participants