Consolidate the data directory mode into one owner #318

Merged
clawbot merged 1 commits from issue-288-datadir-mode-owner into next 2026-09-21 10:01:51 +02:00
1 Commits
Author SHA1 Message Date
sneak 4c7272170a Consolidate the data directory mode into one owner (closes #288)
check / check (push) Failing after 1s
internal/datadir now owns the DATA_DIR mode as an exported constant,
DirPerm; internal/database consumes it in both places that create the
directory rather than keeping its own copy. datadir is the owner
because guarding and creating DATA_DIR is its whole purpose, and the
dependency runs the right way: datadir imports only the standard
library and the flock package, so database importing datadir adds no
cycle. A comment on DirPerm names it as the single source, chosen over
a source-scanning test because it survives refactoring and builds no
machinery that inspects the tree. The mode value is unchanged.

Model: opus-4-8
2026-09-21 07:48:44 +00:00