Reconcile import can fail with SQLite lock and leave closing targets unlinked #97

Open
opened 2026-10-16 16:54:30 +08:00 by Breadway · 0 comments
Owner

How found: isolated runtime verification of accepted deployed image breadboard:candidate-93de7f9, revision93de7f9b8c19e5ea40ddfb4399d4d7657b349667, on Hestia16Oct2026. Canary bb99-canary-93de7f9 uses separate database and fake Forgejo; production was not mutated. Confidence high on observed database-is-locked failures/missing links, medium on deferred-WAL transaction upgrade being the cause.

Reconcile importing a new plain issue repeatedly logged database is locked (SQLite code5, five observed occurrences) while PR import in the same pass succeeded. A PR imported before its missing target had no closing link; later unchanged reconcile passes did not repair it because sync_pr_closes runs only on import/field change. Signed webhook target import first followed by reconcile PR policy did pass.

Evidence on Hestia: /home/breadway/breadboard-deploy-93de7f9/verification/bb99-93de7f9/evidence/{driver-run.log,summary.json,driver-phase3.log,summary-phase3.json,scratch-container.log,fake-forgejo-requests.jsonl}. No secrets printed.

Expected: new issue imports safely handle concurrent writers without permanent failure, and reconcile heals closing links when target appears after PR even if PR fields unchanged. Preserve keys/LWW/sync_log/echo prevention. Add concurrent import regression and reversed arrival-order idempotent link-healing test. Diagnose exact locking cause before choosing retry/transaction strategy; do not merely increase timeout or mutate production DB.

How found: isolated runtime verification of accepted deployed image breadboard:candidate-93de7f9, revision93de7f9b8c19e5ea40ddfb4399d4d7657b349667, on Hestia16Oct2026. Canary bb99-canary-93de7f9 uses separate database and fake Forgejo; production was not mutated. Confidence high on observed database-is-locked failures/missing links, medium on deferred-WAL transaction upgrade being the cause. Reconcile importing a new plain issue repeatedly logged database is locked (SQLite code5, five observed occurrences) while PR import in the same pass succeeded. A PR imported before its missing target had no closing link; later unchanged reconcile passes did not repair it because sync_pr_closes runs only on import/field change. Signed webhook target import first followed by reconcile PR policy did pass. Evidence on Hestia: /home/breadway/breadboard-deploy-93de7f9/verification/bb99-93de7f9/evidence/{driver-run.log,summary.json,driver-phase3.log,summary-phase3.json,scratch-container.log,fake-forgejo-requests.jsonl}. No secrets printed. Expected: new issue imports safely handle concurrent writers without permanent failure, and reconcile heals closing links when target appears after PR even if PR fields unchanged. Preserve keys/LWW/sync_log/echo prevention. Add concurrent import regression and reversed arrival-order idempotent link-healing test. Diagnose exact locking cause before choosing retry/transaction strategy; do not merely increase timeout or mutate production DB.
Sign in to join this conversation.
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
Breadway/breadboard#97
No description provided.