fix(core): remove SQLite from home/session ownership #291

Merged
karsten merged 2 commits from fix/os-session-locks-no-sqlite into main 2026-11-06 11:59:21 +00:00
Owner

Explicit operator requirement: no SQLite in self-written Core; external Matrix crypto SDK is the sole exception and is unchanged. Replace node:sqlite locks with POSIX flock(2), acquired by isolated Python standard-library fcntl on the inherited Node descriptor. Helper exits before acquisition succeeds; Node retains the shared open file description. No PID reaping, no database fallback, no unlink/recreate. Helper self-alarm bounds orphaned acquisition. Legacy protocol fails closed and requires offline marker migration after all older owners stop. Add no-Core-SQLite import/dependency regression and single-owner/crash/race/missing-helper tests; preserve conversation/queue/crypto data. Typecheck and 24 focused tests pass; initial full local 1575 pass. Final exact full suites running after helper alarm review fix. Do not merge until final full receipts recorded.

Explicit operator requirement: no SQLite in self-written Core; external Matrix crypto SDK is the sole exception and is unchanged. Replace node:sqlite locks with POSIX flock(2), acquired by isolated Python standard-library fcntl on the inherited Node descriptor. Helper exits before acquisition succeeds; Node retains the shared open file description. No PID reaping, no database fallback, no unlink/recreate. Helper self-alarm bounds orphaned acquisition. Legacy protocol fails closed and requires offline marker migration after all older owners stop. Add no-Core-SQLite import/dependency regression and single-owner/crash/race/missing-helper tests; preserve conversation/queue/crypto data. Typecheck and 24 focused tests pass; initial full local 1575 pass. Final exact full suites running after helper alarm review fix. Do not merge until final full receipts recorded.
Author
Owner

Final exact source verified: canonical typecheck/build/full 1571/1571 pass; local current UI integration typecheck/build/full 1575/1575 pass. Independent final review: no findings. Regression tests cover concurrency (one writer), owner crash, metadata preservation, release/reacquire and missing helper fail-closed. Actual installed TUI PTY start and /quit exit 0: no SQLite warning, zero SQLite files created, no model requests. Local user-home and idle-admitted Matrix daemon home migrated offline, preserving marker inodes; obsolete lock-backend files quarantined with receipts, no conversation/state/queue/crypto data modified. Local Matrix daemon healthy and connected; external Matrix crypto SDK/store explicitly unchanged. Source UI worktree also contains both lock commits so future UI builds cannot regress the change.

Final exact source verified: canonical typecheck/build/full 1571/1571 pass; local current UI integration typecheck/build/full 1575/1575 pass. Independent final review: no findings. Regression tests cover concurrency (one writer), owner crash, metadata preservation, release/reacquire and missing helper fail-closed. Actual installed TUI PTY start and /quit exit 0: no SQLite warning, zero SQLite files created, no model requests. Local user-home and idle-admitted Matrix daemon home migrated offline, preserving marker inodes; obsolete lock-backend files quarantined with receipts, no conversation/state/queue/crypto data modified. Local Matrix daemon healthy and connected; external Matrix crypto SDK/store explicitly unchanged. Source UI worktree also contains both lock commits so future UI builds cannot regress the change.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
harness/core!291
No description provided.