Skip to content

Comments

core: harden sqlite feature claiming with atomic updates#60

Merged
gabelul merged 2 commits intomasterfrom
feat/db-atomicity
Feb 3, 2026
Merged

core: harden sqlite feature claiming with atomic updates#60
gabelul merged 2 commits intomasterfrom
feat/db-atomicity

Conversation

@gabelul
Copy link
Owner

@gabelul gabelul commented Feb 3, 2026

Adaptation inspired by upstream SQLite-corruption/atomicity work (concept only; implementation is fork-native).\n\nChanges:\n- Add BEGIN IMMEDIATE-based atomic_transaction()\n- Make claim_next_pending_feature atomic (UPDATE+subquery+RETURNING with fallback)\n- Harden claim_batch, mark_feature_failed transactionality, idempotent passing/verification\n- Add multiprocessing regression test (tests/test_db_atomicity.py)\n\nTest:\n- On Windows: set PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 and run python -m pytest -q -p asyncio tests/test_db_atomicity.py

@gabelul gabelul merged commit fced589 into master Feb 3, 2026
3 checks passed
@gabelul gabelul deleted the feat/db-atomicity branch February 3, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant