Bug: task CLI writes fail on /var/lib/omni/tasks.db

t-747·WorkTask·
·
·
Created2 weeks ago·Updated1 week ago·pipeline runs →

Dependencies

Description

Edit

task commands that write (start/update/create/comment) fail with SQLite ErrorReadOnly because /var/lib/omni directory is not writable by ben. tasks.db file itself is writable, but sqlite cannot create journal/WAL side files in the parent dir (owned by ava, mode 755). Repro: 'task update t-740 review --json' returns 'attempt to write a readonly database'.

Timeline (21)

🔄[human]Open → InProgress2 weeks ago
💬[human]2 weeks ago

canary from old task binary

💬[human]2 weeks ago

Fixed in Omni/Task/Core.hs by adding a connection fallback: when the DB parent directory is not writable, task now sets PRAGMA journal_mode=MEMORY and PRAGMA temp_store=MEMORY. This avoids creating SQLite sidecar journal/WAL files in /var/lib/omni and prevents ErrorReadOnly on writes. Verified with live repro: task start/comment/update now succeed against /var/lib/omni/tasks.db even though /var/lib/omni is mode 755 and owned by ava.

🔄[human]InProgress → Review2 weeks ago
💬[human]2 weeks ago

Verification: ran 7[10000;10000H (all 36 tests passed) and re-ran real failing workflow against /var/lib/omni/tasks.db: task start/comment/update now succeed with no ErrorReadOnly.

💬[human]2 weeks ago

Verification details (clean): built and tested Omni/Task.hs (36 tests passed), then re-ran the original failing workflow on /var/lib/omni/tasks.db. task start/comment/update now succeed without SQLite ErrorReadOnly.

🔄[human]Review → InProgress2 weeks ago
🔄[human]InProgress → Review2 weeks ago
💬[human]2 weeks ago

Operational follow-up: /var/lib/omni ownership is drifted from declarative config. Omni/Dev/Beryllium/Ava.nix expects , but host currently has . Recommended host fix: Please touch the FIDO authenticator. (or run systemd-tmpfiles from deployed config).

💬[human]2 weeks ago

Operational follow-up: /var/lib/omni ownership is drifted from declarative config. Omni/Dev/Beryllium/Ava.nix expects tmpfiles rule d /var/lib/omni 0775 ben users -, but host currently has ava:users 0755. Recommended host fix:

  • sudo chown ben:users /var/lib/omni
  • sudo chmod 0775 /var/lib/omni

(or apply tmpfiles via the NixOS config)

💬[human]2 weeks ago

Committed in acf1cdd: includes SQLite readonly fallback in Omni/Task/Core.hs plus related rollout changes.

💬[human]1 week ago

Ava verified: cited commit confirmed in live history; feature shipped. Moving to Verified.

🔄[human]Review → Verified1 week ago