Background
The repo has two local-filesystem dalgo backends:
dalgo2fsingitdb — the backend the CLI actually wires in production (cmd/ingitdb/main.go → dalgo2fsingitdb.NewLocalDBWithDef).
dalgo2ingitdb — described in its own code as the concurrent-safe sibling driver (gofrs/flock file locking). Not currently used by the CLI.
Why this issue
PR #71 (transaction message → git commit message) had to add the same opt-in, git-repo-gated commit-on-transaction behavior to both adapters so the CLI path (fsingitdb) actually commits:
pkg/dalgo2ingitdb/ — RunReadwriteTransaction commits tx-written files when a message is set.
pkg/dalgo2fsingitdb/ — mirrors it, reusing the shared dalgo2ingitdb.GitCommitPaths helper.
The git-commit helper is shared (not duplicated), but the write-tracking + commit wiring now exists in two places. Maintaining two local FS adapters means new features and bug fixes risk being applied to only one.
Proposal
Decide the long-term direction for the local FS backend and consolidate:
- If
dalgo2ingitdb (concurrent-safe) is the intended future, migrate the CLI's newDB wiring to it and deprecate/remove dalgo2fsingitdb once feature parity is confirmed.
- Otherwise, document why both exist and which one owns which capability, to avoid divergence.
Acceptance criteria (suggested)
References
🤖 Generated with Claude Code
Background
The repo has two local-filesystem dalgo backends:
dalgo2fsingitdb— the backend the CLI actually wires in production (cmd/ingitdb/main.go→dalgo2fsingitdb.NewLocalDBWithDef).dalgo2ingitdb— described in its own code as the concurrent-safe sibling driver (gofrs/flock file locking). Not currently used by the CLI.Why this issue
PR #71 (transaction message → git commit message) had to add the same opt-in, git-repo-gated commit-on-transaction behavior to both adapters so the CLI path (fsingitdb) actually commits:
pkg/dalgo2ingitdb/—RunReadwriteTransactioncommits tx-written files when a message is set.pkg/dalgo2fsingitdb/— mirrors it, reusing the shareddalgo2ingitdb.GitCommitPathshelper.The git-commit helper is shared (not duplicated), but the write-tracking + commit wiring now exists in two places. Maintaining two local FS adapters means new features and bug fixes risk being applied to only one.
Proposal
Decide the long-term direction for the local FS backend and consolidate:
dalgo2ingitdb(concurrent-safe) is the intended future, migrate the CLI'snewDBwiring to it and deprecate/removedalgo2fsingitdbonce feature parity is confirmed.Acceptance criteria (suggested)
dalgo2fsingitdbordalgo2ingitdbis the canonical local backend.insert/update/delete) or the--message/-mflag.References
--messageflag)pkg/dalgo2fsingitdb/db_local.go,pkg/dalgo2ingitdb/database.go,pkg/dalgo2ingitdb/git_commit.go🤖 Generated with Claude Code